Skip to content

xdg99 possibly not correctly disassembling vcha / vchar instruction after FEND? #49

@hippietrail

Description

@hippietrail

I've been working on my own GPL disassembler extension for the Ghidra reverse-engineering tool and found an anomaly disassembling a hello world example posted in the atariage forum for me to test on. I use xdg99 as a reference to check that my results match.

Here is xdg99's output:

601d 07   all   >20                  
601e 20                              
601f 87   dclr  @ypt                 
6020 7e                              
6021 08   fmt                        
6022 cb   for   >0c                  
6023 ff   col   >1a                  
6024 1a                              
6025 04   htext 'HELLO'              
6026 48                              
6027 45                              
6028 4c                              
6029 4c                              
602a 4f                              
602b a1   row+  >02                  
602c fb   fend                       
602d 60                              
602e 23                              
602f fb   fend                       
6030 86   clr   @>834a               
6031 4a                              
6032 be   st    >20, @>834b          
6033 4b                              
6034 20                              

And here is RetroGhidra's output:

                     
       601d 07 20                   ALL        >0x20
       601f 87 7e                   DCLR       @>0x837e
                     
       6021 08                      FMT
       6022 cb                      FOR        >0xc
       6023 ff 1a                   COL        >0x1a
       6025 04 48 45 4c 4c 4f       HTEX       0x480x450x4c0x4c0x4f
       602b a1                      ROW+       >0x2
       602c fb                      FEND
       602d 60 23                   VCHAR      >0x1,>'#'
       602f fb                      FEND
       6030 86 4a                   CLR        @>0x834a
       6032 be 4b 20                ST         >0x20,@>0x834b

Notice how at 602c it looks like the FEND instruction uses the three bytes fb 60 23 rather than just fb as would be normal and the 60 and 23 bytes are blank to their right.
After looking through the GPL docs I have I implemented the 6x VCHA instruction which seems correct for that position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions