Menu

#7 Error when PC goes past FFFF

v1.0 (example)
open
nobody
None
5
2018-01-17
2018-01-16
J.B.
No

I found another one that will not assemble: http://altairclone.com/downloads/roms/DBL.ASM.

asm8080 will not accept it because the DS 84H and DS 08H at the end causes it to go past the top of RAM at FFFF:

Error 17 in "DBL1.ASM" @397: Program counter over range! (0)
Error 17 in "DBL1.ASM" @402: Program counter over range! (132)
I changed 84H and 08H to 00H, and it assembled successfully, but then the STACK label is wrong, pointing to 0000H instead of 008CH. Looking at the original listing, apparently from the original assembler allows the PC to wrap back around to 0:

;---------------------------------------------------------------
;DISK BUFFER IN RAM RIGHT AFTER THE LOADER
;---------------------------------------------------------------
FFFE 0000 BUFFER: DW 00H ;FILLS THE EPROM OUT WITH 00'S
0000 DS 84H

            ;---------------------------------------------------------------
            ; AND FINALLY THE STACK, WHICH GROWS DOWNWARD
            ;---------------------------------------------------------------
0084 STSP: DS 08H ;SPACE FOR STACK
008C = STACK: EQU $

008C END

http://altairclone.com/downloads/roms/DBL.PRN

Discussion

  • Jay Cotton

    Jay Cotton - 2018-01-17

    Pushed a fix for this. What I did was break the code that prevents the wrap around. Did add a warning. Just in case you did not intent to wrap the address around.

    I my opinion the above is a bad fix. I may add a run time switch to allow users to decide they want broken behavior.

     
  • J.B.

    J.B. - 2018-01-17

    Confirmed that http://altairclone.com/downloads/roms/DBL.ASM now assembles succesfully with a warning. I agree it may not be what most people want so a command-line switch is probably a good idea.

     

Log in to post a comment.