wok diff linld/stuff/jump.u @ rev 19204
linld/tobzimage: add realmode_switch support (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 11 20:26:42 2016 +0200 (2016-06-11) |
parents | 86c9fae82f47 |
children | 8c67051bb198 |
line diff
1.1 --- a/linld/stuff/jump.u Sat Jun 11 15:57:21 2016 +0200 1.2 +++ b/linld/stuff/jump.u Sat Jun 11 20:26:42 2016 +0200 1.3 @@ -1,47 +1,47 @@ 1.4 --- LINLD097/JUMP.ASM 1.5 +++ LINLD097/JUMP.ASM 1.6 @@ -24,33 +24,22 @@ 1.7 - jmpseg :word, \ 1.8 - jmpofs :word = PARAM_SIZE 1.9 - 1.10 -- push bp ;TODO: kinda useless, isn't it? 1.11 -- mov bp,sp 1.12 -- 1.13 -- ;;mov ax,[jmpseg] ;Move data to CS segment var 1.14 -- ;;mov [seg2],ax ; we cannot use any other seg! 1.15 -- ;;mov ax,[jmpofs] ; 1.16 -- ;;mov [ofs2],ax ; 1.17 -- mov cx,[jmpofs] ;Do NOT load in r32: 1.18 -- mov dx,[jmpseg] ; wrong order! 1.19 -- 1.20 -- mov ax,[sreg] 1.21 -- mov sp,[stk] ;Do not use [bp+n] after this... 1.22 -- mov ds,ax 1.23 -- mov es,ax 1.24 -- mov ss,ax 1.25 -- mov fs,ax 1.26 -- mov gs,ax 1.27 -+ pop bx ;caller return address 1.28 -+ pop bx ; sreg 1.29 -+ pop ax ; stk 1.30 -+ pop dx ; jmpseg 1.31 -+ pop cx ; jmpofs 1.32 -+ mov ds,bx 1.33 -+ mov es,bx 1.34 -+ mov fs,bx 1.35 -+ mov gs,bx 1.36 -+ mov ss,bx 1.37 -+ xchg sp,ax 1.38 - assume nothing 1.39 - assume cs:DGROUP 1.40 - 1.41 -- ;;jmp [dword ofs2] 1.42 -- 1.43 - push dx cx 1.44 - retf 1.45 --; Data 1.46 --;;ofs2 dw ? 1.47 --;;seg2 dw ? 1.48 - endp _set_sregs_jump_seg_ofs 1.49 - 1.50 - ends _TEXT 1.51 + jmpseg :word, \ 1.52 + jmpofs :word = PARAM_SIZE 1.53 + 1.54 +- push bp ;TODO: kinda useless, isn't it? 1.55 +- mov bp,sp 1.56 +- 1.57 +- ;;mov ax,[jmpseg] ;Move data to CS segment var 1.58 +- ;;mov [seg2],ax ; we cannot use any other seg! 1.59 +- ;;mov ax,[jmpofs] ; 1.60 +- ;;mov [ofs2],ax ; 1.61 +- mov cx,[jmpofs] ;Do NOT load in r32: 1.62 +- mov dx,[jmpseg] ; wrong order! 1.63 +- 1.64 +- mov ax,[sreg] 1.65 +- mov sp,[stk] ;Do not use [bp+n] after this... 1.66 +- mov ds,ax 1.67 +- mov es,ax 1.68 +- mov ss,ax 1.69 +- mov fs,ax 1.70 +- mov gs,ax 1.71 ++ pop bx ;caller return address 1.72 ++ pop bx ; sreg 1.73 ++ pop ax ; stk 1.74 ++ pop dx ; jmpseg 1.75 ++ pop cx ; jmpofs 1.76 ++ mov ds,bx 1.77 ++ mov es,bx 1.78 ++ mov fs,bx 1.79 ++ mov gs,bx 1.80 ++ mov ss,bx 1.81 ++ xchg sp,ax 1.82 + assume nothing 1.83 + assume cs:DGROUP 1.84 + 1.85 +- ;;jmp [dword ofs2] 1.86 +- 1.87 + push dx cx 1.88 + retf 1.89 +-; Data 1.90 +-;;ofs2 dw ? 1.91 +-;;seg2 dw ? 1.92 + endp _set_sregs_jump_seg_ofs 1.93 + 1.94 + ends _TEXT