wok annotate syslinux/stuff/iso2exe/ifmem.S @ rev 20133

linux: add CONFIG_USB_XHCI_HCD
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 28 20:23:38 2017 +0200 (2017-10-28)
parents
children
rev   line source
pascal@18151 1 .code16
pascal@18151 2 .org 0
pascal@18151 3 type_of_loader = 0x10
pascal@18151 4
pascal@18151 5 orw $0x8020, type_of_loader(%si) # loader type = 0x20 = bootsect-loader
pascal@18151 6 pushal
pascal@18151 7
pascal@18151 8 movw $10+16, %cx
pascal@18151 9 fillbuf:
pascal@18151 10 pushw $0
pascal@18151 11 loop fillbuf
pascal@18151 12 popal // clear regiters
pascal@18151 13 maploop:
pascal@18151 14 movw %sp, %di // %es = %ss
pascal@18151 15 movb $20, %cl
pascal@18151 16 movw $0xE820, %ax
pascal@18151 17 movl $0x534d4150, %edx
pascal@18151 18 int $0x15
pascal@18151 19 sbbl %eax, %edx
pascal@18151 20 jne mapdone
pascal@18151 21 decw 16(%di)
pascal@18151 22 jne notram
pascal@18151 23 addw 8+2(%di), %bp
pascal@18151 24 notram:
pascal@18151 25 orw %bx, %bx
pascal@18151 26 jnz maploop
pascal@18151 27 mapdone:
pascal@18151 28 addw $20, %sp
pascal@18151 29 shrw $20-16,%bp
pascal@18151 30 jnz mapdone2
pascal@18151 31 movb $0x88, %ah
pascal@18151 32 int $0x15
pascal@18151 33 xchgw %ax, %bp
pascal@18151 34 shrw $10, %bp
pascal@18151 35 mapdone2:
pascal@18151 36 incw %bp
pascal@18151 37 // %bp : nb Mb
pascal@18151 38 call here
pascal@18151 39 here:
pascal@18151 40 popw %di
pascal@18151 41 movw $0x1EE, %si
pascal@18151 42 lodsw
pascal@18151 43 sizeloop:
pascal@18151 44 scasw // %di += 2
pascal@18151 45 addw $4, %ax
pascal@18151 46 cmpb %al, (%si)
pascal@18151 47 jbe sizedone
pascal@18151 48 cmpw %bp, sizes-here(%di)
pascal@18151 49 jbe sizeloop
pascal@18151 50 movb %al, (%si)
pascal@18151 51 sizedone:
pascal@18151 52 popal
pascal@18151 53 lret // need %si
pascal@18151 54 sizes:
pascal@18151 55