search for: andw

Displaying 20 results from an estimated 36 matches for "andw".

Did you mean: and
2017 Mar 24
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...t; isohdpfc pushes the CX value to the stack which it gets from INT 13 AH 41. > Quite surely bit 0 of that CX is not set. But bit 2 "Enhanced Disk Drive" > could be set. > https://en.wikipedia.org/wiki/INT_13H > > I understand on David's BIOS after > > andw $1,%cx /* Bit 0 = fixed disk subset */ > jz 1f > > jz jumps because CX is 0. This gets pushed to the stack. > (So the code around the int 13 assumes that either int 13 fails and returns > CX == 0, or the reply is good enough to reach "andw 1,%cx"....
2017 Mar 24
2
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, i am looking now at the code which i assume loads the rest of isolinux.bin. The entry point for program execution from the MBR is obviously at http://git.zytor.com/syslinux/syslinux.git/tree/core/isolinux.asm#n186 (Do i get it right that this is the Intel syntax ? (Gronfff)) If POP yields the victim of the most recent not yet popped PUSH, then this does not look correctly coordinated
2017 Mar 26
0
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...value to the stack which it gets from INT 13 AH 41. >> Quite surely bit 0 of that CX is not set. But bit 2 "Enhanced Disk Drive" >> could be set. >> https://en.wikipedia.org/wiki/INT_13H >> >> I understand on David's BIOS after >> >> andw $1,%cx /* Bit 0 = fixed disk subset */ >> jz 1f >> >> jz jumps because CX is 0. This gets pushed to the stack. >> (So the code around the int 13 assumes that either int 13 fails and returns >> CX == 0, or the reply is good enough to reach &quo...
2017 Mar 24
0
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...isolinux.bin on our virtual BIOSes: isohdpfc pushes the CX value to the stack which it gets from INT 13 AH 41. Quite surely bit 0 of that CX is not set. But bit 2 "Enhanced Disk Drive" could be set. https://en.wikipedia.org/wiki/INT_13H I understand on David's BIOS after andw $1,%cx /* Bit 0 = fixed disk subset */ jz 1f jz jumps because CX is 0. This gets pushed to the stack. (So the code around the int 13 assumes that either int 13 fails and returns CX == 0, or the reply is good enough to reach "andw 1,%cx". Ewww ...) Now in isolin...
2017 Mar 25
0
where to swap
...2, %ah ; jmp read_common */ movl $0xeb42b4+((read_common-read_sector_cbios-4) << 24), (read_sector_cbios) - jmp 1f + jmp 2f 1: + xor %cx, %cx /* Clear EBIOS flag. */ +2: popw %dx pushw %cx /* EBIOS flag */ /* Get (C)HS geometry */ movb $0x08, %ah int $0x13 - andw $0x3f, %cx /* Sector count */ popw %bx /* EBIOS flag */ - pushw %cx /* -16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ - pushw %ax /* -18: Save heads on the stack */ + pushw %ax /* -16: Save heads on...
2005 Jan 10
0
Sony SonicStage
...00110000 00110000 00110000 980af9d0 0x0033ee00: 9806d679 980af9d0 0033ee3c 98077c22 0x0033ee10: 0011001c 00000001 00000000 00000000 0200: sel=1007 base=981bc000 limit=00001f97 32-bit rw- Backtrace: file_set_error: Bad address =>1 0x0040664d (0x0033f1dc) file_set_error: Bad address 0x0040664d: andw $0,0x0(%esi) Wine-dbg>bt Backtrace: file_set_error: Bad address =>1 0x0040664d (0x0033f1dc) file_set_error: Bad address Wine-dbg>q WineDbg terminated on pid 0xc ----------------- Running random other Setup.exe's hosted on that CDROM produced roughly the same results: the fault...
2017 Apr 16
1
fwd: [syslinux:syslinux-4.xx] mbr/isohdpfx.S: correct stack for heads/sectors
...gmail.com> --- mbr/isohdpfx.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index 17e1efe..f9e9691 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -175,12 +175,12 @@ next: /* Get (C)HS geometry */ movb $0x08, %ah int $0x13 - andw $0x3f, %cx /* Sector count */ popw %bx /* EBIOS flag */ - pushw %cx /* -16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ - pushw %ax /* -18: Save heads on the stack */ + pushw %ax /* -16: Save heads on the stack */ + andw $0x3f...
2017 Mar 21
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...uot;, "a", @nobits .globl bootsec bootsec: .space 512 .text .globl _start _start: .byte 0x33, 0xed /* xorw %bp, %bp */ cli movw %bp, %ss movw $stack, %sp sti cld /* Check to see if we have a partition table entry */ xorl %ebx, %ebx xorl %ecx, %ecx #ifdef PARTITION_SUPPORT andw %si, %si /* %si == 0 -> no partition data */ jz 1f testb $0x7f, (%si) /* Invalid active flag field? */ jnz 1f cmpb %cl, 4(%si) /* Partition type zero == invalid? */ je 1f cmpl $0x58504721, %eax /* !GPT signature in EAX? */ jne 2f cmpb $0xed, 4(%si) /* EFI partition type? */ jne 2f...
2017 Mar 25
1
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...en wrote: > No carry. > 3000 > AA55 > 0004 > 0080 > I die now Hah ! CX announces no LBA addressing but Enhanced Disk Drive Support. https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH.3D41h:_Check_Extensions_Present So isohdpfc pushed CX = 4 onto the stack, because it skipped andw 1,%xc So isolinux.bin read in "EHDD" mode by LBA and succeeded although it did not announce this capability. isohdpfd reached the "andw" instruction. So CX was set to (1 & 4) = 0 before it got pushed. So isolinux.bin read in "CHDD" mode by C/H/S and thus ran into...
2017 Mar 22
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...hich is invariant under swapping, there remains as suspect in read_sector_cbios only this division: divb (sectors) There is a suspicious discrepancy in the code: heads = (stack-16) sectors = (stack-18) ... /* here we computer CHS values or just do some dummy computation for EBIOS */ andw $0x3f, %cx /* Sector count */ popw %bx /* EBIOS flag */ pushw %cx /* -16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ pushw %ax /* -18: Save heads on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ Does &...
2017 Mar 25
2
where to swap
It is good to see this ----- Forwarded message from syslinux-bot for Martin Str|mberg <ams at ludd.ltu.se> ----- Date: Sat, 25 Mar 2017 05:54:09 -0700 From: syslinux-bot for Martin Str|mberg <ams at ludd.ltu.se> To: Syslinux commits mailing list <syslinux-commits at zytor.com> Cc: ams at ludd.ltu.se Subject: [syslinux:master] mbr/isohdpfx.S: correct pointer for heads/sectors
2010 Nov 26
1
[PATCH] new *br: Show handoff data
...scii " =$PnP\0" scn_pnp: call crlf /* $PnP Scan */ movw $0xf000, %dx pushw %dx popw %es movw $0, %si movw $0x1000, %cx /* 0x506E5024 */ movw $0x5024, %dx movw $0x506E, %bx ch_pnp: es lodsw cmpw %dx, %ax jne ch_pnp_l es lodsw cmpw %bx, %ax je pr_pnp ch_pnp_l: addw $14, %si andw $0xFFF0, %si loopw ch_pnp jmp end pr_pnp: pushw %si call wrstr .ascii "$PnP-\0" movw %es, %dx call wrhexw movb $':, %al call wrchr popw %dx andw $0xFFF0, %dx call wrhexw #endif /* DEBUG_PNP */ call crlf end: jmp bootfail ASCII_MARKER1 "wc" wrchr: movb $0x0...
2017 Oct 03
2
invalid code generated on Windows x86_64 using skylake-specific features
...leaq 24(%rsp), %r10 1800a9f75: 4c 2b d0 subq %rax, %r10 1800a9f78: 4d 0f 42 d3 cmovbq %r11, %r10 1800a9f7c: 65 4c 8b 1c 25 10 00 00 00 movq %gs:16, %r11 1800a9f85: 4d 3b d3 cmpq %r11, %r10 1800a9f88: 73 15 jae 21 <__chkstk+0x3F> 1800a9f8a: 66 41 81 e2 00 f0 andw $61440, %r10w 1800a9f90: 4d 8d 9b 00 f0 ff ff leaq -4096(%r11), %r11 1800a9f97: 45 84 1b testb (%r11), %r11b 1800a9f9a: 4d 3b d3 cmpq %r11, %r10 1800a9f9d: 75 f1 jne -15 <__chkstk+0x30> 1800a9f9f: 4c 8b 14 24 movq (%rsp), %r10 1800a9fa3: 4c 8b 5c 24 08 movq...
2017 Mar 22
0
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
On Wed, Mar 22, 2017 at 12:06:12PM +0100, Thomas Schmitt via Syslinux wrote: > There is a suspicious discrepancy in the code: > > heads = (stack-16) > sectors = (stack-18) > > ... > /* here we computer CHS values or just do some dummy computation for EBIOS */ > andw $0x3f, %cx /* Sector count */ > popw %bx /* EBIOS flag */ > pushw %cx /* -16: Save sectors on the stack */ > movzbw %dh, %ax /* dh = max head */ > incw %ax /* From 0-based max to count */ > pushw %ax /* -18: Save heads on the stack */ > mulw %cx /* Heads*sectors -> s...
2017 Mar 25
2
where to swap
Hi, Martin Str|mberg wrote: > Given David's last report the part: > - jmp 1f > + jmp 2f > 1: > + xor %cx, %cx /* Clear EBIOS flag. */ > +2: > > can be ignored. His BIOS isn't corrputing CX (which I > thought). However that part doesn't hurt if it remains. I think it still has good reason to exist. The test cmpw
2017 Mar 26
0
where to swap
...n Sat, Mar 25, 2017 at 09:28:16PM +0100, Thomas Schmitt via Syslinux wrote: > I think it still has good reason to exist. The test > > cmpw $0xaa55, %bx > jne 1f > > could cause a jump which could push a non-zero CX to the stack. Yes. But that can be fixed by putting the "andw $1, %cx" test before the "cmpw $0xaa55, %bx" test. But then if CX is filled with rubbish and carry is set (the first test) could lead to 0 != CX... I have no idea if this can happen. As you say, as is is the most safe. -- MartinS
2017 Mar 23
6
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, Geert Stappers wrote: > Contact David off-list, he did unsubscribe. Can you tell when he unsubscribed (i.e. which of the messages he got as last one) ? > Martin posted elsewhere in this thread "Thomas, you found the bug" > and provided a patch. Open question is whether the fix helps with David's BIOS. The newest answer from Martin indicates that a failure to read
2017 Mar 18
0
isohybrid boot from logical partition
...try length between the MBR and GPT entries. That's four more bytes. So 16+4=20. I think si points at the fake MBR entry at the insruction you ask about. But isohdpfx.S is buggy: /* Check to see if we have a partition table entry */ xorl %ebx, %ebx xorl %ecx, %ecx #ifdef PARTITION_SUPPORT andw %si, %si /* %si == 0 -> no partition data */ jz 1f testb $0x7f, (%si) /* Invalid active flag field? */ jnz 1f cmpb %cl, 4(%si) /* Partition type zero == invalid? */ je 1f cmpl $0x58504721, %eax /* !GPT signature in EAX? */ jne 2f cmpb $0xed, 4(%si) /* EFI partition type? */ jne 2f...
2017 Mar 21
0
Patch: make slightly more verbose versions of isohdp.x.S
...; +2: + call print_string + .ascii "Key?\r\n" + pop %si + xor %ax, %ax + int $0x16 +#else +1: +#endif + popw %dx pushw %cx /* EBIOS flag */ /* Get (C)HS geometry */ movb $0x08, %ah int $0x13 + + /* here we computer CHS values or just do some dummy computation for EBIOS */ andw $0x3f, %cx /* Sector count */ popw %bx /* EBIOS flag */ pushw %cx /* -16: Save sectors on the stack */ @@ -223,9 +257,15 @@ next: ljmpw $0, $isolinux_start_hybrid bad_signature: - call error + call print_string .ascii "isolinux.bin missing or corrupt.\r\n" +boot_failure: +...
2012 Aug 10
1
[PATCH 4/4] Support sectors >512
...+ */ + movb $0x48, %ah + movw %sp, %si + jmp 2f /* this can be replaced by a .byte 0xbf to gain + * another byte hidding next instruction */ +1: /* Get (C)HS geometry */ movb $0x08, %ah +2: int $0x13 + + /* here we computer CHS values of just do some dummy computation for EBIOS */ andw $0x3f, %cx /* Sector count */ - movw %sp, %bp /* %bp -> frame pointer: LEAVE UNCHANGED */ - pushw %cx /* -2(%bp) Save sectors on the stack */ + pushw %cx /* -32(%bp) Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ mulw %cx /* He...