wok view 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 source
1 --- LINLD097/JUMP.ASM
2 +++ LINLD097/JUMP.ASM
3 @@ -24,33 +24,22 @@
4 jmpseg :word, \
5 jmpofs :word = PARAM_SIZE
7 - push bp ;TODO: kinda useless, isn't it?
8 - mov bp,sp
9 -
10 - ;;mov ax,[jmpseg] ;Move data to CS segment var
11 - ;;mov [seg2],ax ; we cannot use any other seg!
12 - ;;mov ax,[jmpofs] ;
13 - ;;mov [ofs2],ax ;
14 - mov cx,[jmpofs] ;Do NOT load in r32:
15 - mov dx,[jmpseg] ; wrong order!
16 -
17 - mov ax,[sreg]
18 - mov sp,[stk] ;Do not use [bp+n] after this...
19 - mov ds,ax
20 - mov es,ax
21 - mov ss,ax
22 - mov fs,ax
23 - mov gs,ax
24 + pop bx ;caller return address
25 + pop bx ; sreg
26 + pop ax ; stk
27 + pop dx ; jmpseg
28 + pop cx ; jmpofs
29 + mov ds,bx
30 + mov es,bx
31 + mov fs,bx
32 + mov gs,bx
33 + mov ss,bx
34 + xchg sp,ax
35 assume nothing
36 assume cs:DGROUP
38 - ;;jmp [dword ofs2]
39 -
40 push dx cx
41 retf
42 -; Data
43 -;;ofs2 dw ?
44 -;;seg2 dw ?
45 endp _set_sregs_jump_seg_ofs
47 ends _TEXT