Skip to content

libasm does not disassemble 16b code correctly. #103

@thorkill

Description

@thorkill

Here is the latest update of this ticket for errors while disassembling 16b code with libasm:

Case on which I have a doubt:

mov (%esi,%esp,2),%cs:%ecx      66 2E 8B 0C 66          
mov  (%esi),%cs:%ds             2E 8E 1E  

A certain nbr of operands (registers) are printed in 32b while it should be printed in 16b:

xor           %ax,%eax           33 C0  
or            %ax,%eax           0B C0  
cmp           $0xFF,0xFFEA(%esi) 83 7E EA FF  
mov           (%si),%es:%eax     26 8B 06  
mov           %eax,0xFFFC(%esi)  89 46 FC  
sbb           (%si),%edx         1B 16  
sub           %dx,%edx           2B D2  
cmp           %eax,0xFFF8(%esi)  39 46 F8  
mov           0xFFF8(%esi),%eax  8B 46 F8  
mov           %ax,0xC0330944     66 A3 44 09 33 C0  
mov           %al,0xFFFE(%esi)   88 46 FE  
cmp           %al,0xFFFE(%esi)   38 46 FE  
mov           0xFFFE(%esi),%al   8A 46 FE  

(and more...)


Ticket: 97 Reported by: camoroz0 on Thu Dec 4 21:50:59 2008
attachment: grub.img/boot sector
attachment: stage1.S/Stage1.S
attachment: stage1.h/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions