slampam Posted May 18, 2013 Share Posted May 18, 2013 I'm want to assemble this 2+2 addition program with atasm but the output "addnrs.bin" doesn't have the right header or length and so the program doesn't load or run. What do I need to add to make it work? AN 8-BIT ADDITION PROGRAM ADDNRS.SRC (Atari Roots Ch.4) 10 ; 20 ;ADDNRS.SRC 30 ; 40 *=$0600 50 ; 60 CLD 70 ADDNRS CLC 80 LDA #2 90 ADC #2 100 STA $CB 110 RTS 120 .END http://www.atariarchives.org/roots/chapter_4.php http://www.atariarchives.org/roots/displayfile.php?file=ADDNRS.SRC addnrs program.txt addnrs atasm output.txt addnrs.bin Quote Link to comment Share on other sites More sharing options...
8bit-guy Posted May 19, 2013 Share Posted May 19, 2013 depends on the compiler's/editor syntax check spaces/tabs , if it requires line numbers or not and maybe replace *= with ORG Quote Link to comment Share on other sites More sharing options...
Xuel Posted May 20, 2013 Share Posted May 20, 2013 It looks like you used the -r option of atasm. Just use no options, and you should get a proper object file with the appropriate header. But note that running that program from DOS won't have any visible effect because all it does is write the result of 2+2 to an unused zero page address ($CB). You could use the debugger in an emulator like Altirra or Atari800 to view the result though. Or you could use an assembler with a built-in monitor that runs on the Atari like Mac/65 or Assembler Editor. See also this thread. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.