Harry Potter Posted December 31, 2021 Share Posted December 31, 2021 Hi! I saved about 2k of memory by converting my MadLibAtari code to use AtaSimpleIO instead of the standard I/O functions, but, when I run the program, it loads the stub files then crashes. I believe the first thing it does is use AtaSimpleIO to print information. I attached two files that may be causing the error. Am I doing something wrong? crt0_atari.s printc.s Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 1, 2022 Share Posted January 1, 2022 When you have problems like this, you need to attach more than the 2 modules you suspect, the problem may be elsewhere. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted January 1, 2022 Share Posted January 1, 2022 Have you also not yet learnt to step debug in Altirra? If not then you should. Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted January 1, 2022 Author Share Posted January 1, 2022 Okay. Here are the main module and the code to load the stubs.... BTW, AtaDisk65 is a library to access the disk with less code than the standard library. main.c readauxfile.c AtaDisk65.zip Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 1, 2022 Share Posted January 1, 2022 Not your bug but "goto start;" a goto in a C program ? 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 1, 2022 Share Posted January 1, 2022 May not be the bug, but this seems strange if (i==136) { k=*(unsigned char*)(0x348+16); <<< 0X348 is in IOCB0 +16 takes it into IOCB1 which starts at 0X350 ??? aux_memcpyto (j, auxbufx, k); break; Also maybe it's just me, but you mix freely Hex and Dec numbers in the same equations/calculations. Just a hint, it's also very useful to use system equates if possible Quote Link to comment Share on other sites More sharing options...
Harry Potter Posted January 1, 2022 Author Share Posted January 1, 2022 I found the problem: AtaSimpleIO was incompatible with the AtariXL: I forgot to enable the ROMs before each call and disable them afterwards. 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.