wok-next diff syslinux/stuff/iso2exe/libdos.c @ rev 17454
syslinux/iso2exe: create a vfat partition in usb bootkey (DOS case only)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Dec 18 11:42:27 2014 +0100 (2014-12-18) |
parents | 7d300004a3b8 |
children | 6aed6fc5819d |
line diff
1.1 --- a/syslinux/stuff/iso2exe/libdos.c Thu Dec 13 14:33:27 2012 +0100 1.2 +++ b/syslinux/stuff/iso2exe/libdos.c Thu Dec 18 11:42:27 2014 +0100 1.3 @@ -128,3 +128,58 @@ 1.4 sbb ax, ax 1.5 #endasm 1.6 } 1.7 + 1.8 +void dosshutdown(void) 1.9 +{ 1.10 +#asm 1.11 + push bp 1.12 + push si 1.13 + push di 1.14 + push ds 1.15 + seg cs 1.16 + mov stack+2, ss 1.17 + seg cs 1.18 + mov stack,sp 1.19 + xor bx, bx 1.20 + mov ds, bx // ds = 0 1.21 + mov [bx+4], #step 1.22 + mov [bx+6], cs 1.23 + pushf 1.24 + pop ax 1.25 + or ax, #0x100 // set TF 1.26 + push ax 1.27 + popf 1.28 + jmp far [bx+4*0x19] 1.29 +stack: 1.30 + .long 0 1.31 +stepagain: 1.32 + iret 1.33 +step: 1.34 + push si 1.35 + push ds 1.36 + mov si, sp 1.37 + seg ss 1.38 + lds si, [si+4] 1.39 + cmp word ptr [si], #0x19CD 1.40 + pop ds 1.41 + pop si 1.42 + jne stepagain 1.43 + seg cs 1.44 + lss sp, stack 1.45 + pop ds 1.46 + pop di 1.47 + pop si 1.48 + pop bp 1.49 +#endasm 1.50 +} 1.51 + 1.52 +int versiondos; 1.53 +int dosversion(void) 1.54 +{ 1.55 +#asm 1.56 + mov ah, #0x30 1.57 + int 0x21 1.58 + cbw 1.59 + mov _versiondos, ax 1.60 +#endasm 1.61 +}