lbaeza Posted November 4, 2004 Share Posted November 4, 2004 OK I'm playing with MAC65 on my emulator (cartridge-version). I have no experience on assembler programming. I have the sources for the ELEVATOR REPAIRMAN game on drive D1. So far I have loaded the sources with the command LOAD #D1:ELEVATOR.M65 Then I assembled-it with the ASM command. So far I understand, now I have the object code in RAM, and I want to save it to a file. I should use: BSAVE #filespec<hxnum1,hxnum2 where filespec = D1:ELEVATOR.OBJ My question is: what values should I use for hxnum1 and hxnum2 ??? How can I guess those values? Regards Quote Link to comment Share on other sites More sharing options...
Tickled_Pink Posted November 5, 2004 Share Posted November 5, 2004 You can get it to save to disk directly with the ASM command. If I remember correctly, try this: ASM,,#D1:FILENAME.OBJ The two commas are there to specify error list filename and program list filename I think. Never used BSAVE. Have the original cart and manual but not to hand so I'll take a guess and say that the hxnum1 and hxnum2 are the start addresses and end addresses of the memory block you want to save. That being the case, BSAVE is a bad choice. Just use ASM like above. Quote Link to comment Share on other sites More sharing options...
lbaeza Posted November 6, 2004 Author Share Posted November 6, 2004 Thanks! That worked OK, now I have the object code in a file called ELEVATOR.OBJ. I can run this file by loading ATARI DOS, option L (Binary load). Now, creating an EXE file from the OBJ file is just renaming the file or do I have to do something else? I don't want to execute this game by using Atari DOS, I want to use the typical menu used for playing games within a disk... Regards You can get it to save to disk directly with the ASM command. If I remember correctly, try this: ASM,,#D1:FILENAME.OBJ Quote Link to comment Share on other sites More sharing options...
raster/c.p.u. Posted November 8, 2004 Share Posted November 8, 2004 Now, creating an EXE file from the OBJ file is just renaming the file or do I have to do something else? You have to define some START address in your ASM source code: 10 START 20 ... your code... ... your code... 1000;-------- 1010 *=$02E0 1020 .WORD START That's all. BTW - you can use ASM,,#D:FILENAME.COM directly (without renaming OBJ to COM) Quote Link to comment Share on other sites More sharing options...
lbaeza Posted November 8, 2004 Author Share Posted November 8, 2004 Hi Checked the sources for Elevator Repairman and in fact it does include the START address in the last lines of code: ; *= $02E0 ; .WORD INIT .END Now, a tricky question. The file containg the assembled code is it a COM file or a EXE file? What's the difference between COM and EXE? Regards Quote Link to comment Share on other sites More sharing options...
Dracon Posted November 8, 2004 Share Posted November 8, 2004 What's the difference between COM and EXE? As for Atari 8-bit, I guess those two extesions mean the same - an executable program... :wink: An off-topic question: do you know about people from Chile that made great "LINE-UP" game for A8 ??? I wonder if they did anything more - could be cool if they did ! Quote Link to comment Share on other sites More sharing options...
cas Posted November 8, 2004 Share Posted November 8, 2004 What's the difference between COM and EXE? In the Intel Processor world, an COM file is a file loading at a fixed memory address ($0100 on an intel CPU), and an EXE file is a segmented binary that can be relocated in memory by an exe-loader (build in in MS-DOS, Windows etc). I think the COM format (on Intel Machines) is an leftover from the earlier CP/M Operating System. Even in later MS-DOS Versions, a lot of tools were still named with the COM extender even if they where now segmented programms (like fdisk.com) to maintain backwards compatibility with old DOS Batch Scripts. So on the Atari today we have COM files loading to fixed memory addresses, to my knowledge there are no real EXE files in the Intel sense on the Atari 8bit platform. However it would be nice to have a real relocateable executeable program format for our machines, and a loader (DOS) for it. Maybe there is something like this on one of the other 8bit platforms that is worth porting. Also Turbo-DOS is using the EXE extender for plain text batch files, so exe files can be confusing Turbo-DOS. Carsten Quote Link to comment Share on other sites More sharing options...
Shawn Jefferson Posted November 8, 2004 Share Posted November 8, 2004 However it would be nice to have a real relocateable executeable program format for our machines, and a loader (DOS) for it. Maybe there is something like this on one of the other 8bit platforms that is worth porting. Isn't the o65 loadable module format of CC65 relocatable? I think some projects for the C64 were using it (lunix?) I also think that Contiki on the C64 uses loadable modules now too. How useful would relocatable executables really be though? Outside a program like Contiki, I don't see much use for them, and even then the memory contraints of the 6502 makes it impractical to run too many programs at once anyhow. 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.