wok-tiny rev 118
linux/bundle.S: 1-7 sectors kernel support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat May 21 17:52:27 2016 +0200 (2016-05-21) |
parents | 639516fd97da |
children | e5cfd000e4a6 |
files | linux/stuff/bundle.S |
line diff
1.1 --- a/linux/stuff/bundle.S Sun Apr 03 09:06:20 2016 +0200 1.2 +++ b/linux/stuff/bundle.S Sat May 21 17:52:27 2016 +0200 1.3 @@ -13,15 +13,12 @@ 1.4 movw %di, %sp 1.5 1.6 // patch disk parameter table 1.7 - xorw %ax, %ax 1.8 + xorw %cx, %cx 1.9 movw $0x78, %bx 1.10 - movw %ax, %ds 1.11 + movw %cx, %ds 1.12 ldsw (%bx), %si 1.13 pushw %ss 1.14 popw %es 1.15 - movw $64/2, %cx 1.16 - rep 1.17 - stosw 1.18 movb $6, %cl 1.19 pushw %di 1.20 rep 1.21 @@ -66,8 +63,8 @@ 1.22 lodsw // CRC16 1.23 lodsw // sector count 1.24 #endif 1.25 - cmpw %bx, (%si) 1.26 - jnc menulp 1.27 + cmpw $0, (%si) 1.28 + jne menulp 1.29 #ifdef CHECK_FILES 1.30 movw $msgcrc, %si 1.31 movb $' ', %al 1.32 @@ -150,10 +147,13 @@ 1.33 movw %bx, %di 1.34 scanboot: 1.35 incw %di 1.36 + cmpw %bx, %di 1.37 + je found 1.38 cmpw $0x5897, -3(%di) // xchgw %ax, %di; popw %ax 1.39 jne scanboot 1.40 cmpw $0xE841, -1(%di) // incw %cx ; call ... 1.41 jne scanboot 1.42 +found: 1.43 pushw %ds 1.44 pushw %di 1.45 movb 0x1F1(%bx), %al // setup size