andy_bernstein Posted May 9, 2004 Share Posted May 9, 2004 Hi, I'd like to know if I need any special header on a text editor file containing either basic or ML so that it can run on an emulator (OS X). The goal is obviously to program and run my creations on Atari 800MacX to get faster results. Thanks for your help. AB. Quote Link to comment Share on other sites More sharing options...
Sheddy Posted May 10, 2004 Share Posted May 10, 2004 In a word, yes, you will need a header if you want Atari DOS to read or run it AFAIK you won't be able to do BASIC programs with a text editor on the MAC, as the Atari expects a tokenized file, not just BASIC commands in plain text. If it was just machine language, that is much less of a problem. You need a cross-assembler such as ATasm, XASM, DASM etc. Type in assembler code in plain text then use the cross-assembler to generate an executatble file for the emulator. ATasm at least creates the right header info without you having to worry too much (you do need to put an autorun address into the right memory locations though) Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted May 10, 2004 Share Posted May 10, 2004 ENTER"D:BASIC.TXT" Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 10, 2004 Author Share Posted May 10, 2004 Sheddy & Nukey Shay, Thanks for the replies. Sadly, none of the cross-assemblers you mentioned exist on Mac so I'll have to do it the old fashion way. Nukey - will try the "D:BASIC.TXT" command. Thanks for all - hopefully a first program shouldn't be too far. AB. Quote Link to comment Share on other sites More sharing options...
Bryan Posted May 10, 2004 Share Posted May 10, 2004 I found this page which mentions a 6502 assembler for the Mac. I would really try to find a way other than assembling on the emulator. It's so much faster to edit and assemble on the host, then drop the exe into the emulator. Plus, you don't have to worry about your program conflicting with the dev. environment. -Bry Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 10, 2004 Author Share Posted May 10, 2004 Bry, The only one I could think of on Mac is CC65.org which links to the following page: http://www.umich.edu/~archive/atari/8bit/L...Languages/Cc65/ Most of these are supposed to run under UNIX and, hopefully, OS X. Also, for those who don't know it, please check Atari 800MACX: http://members.cox.net/atarimac/ To get back to the CC65.org page, it mentions that their compiler can be run on Mac: Mac OS X 10.2 using the gcc version that comes with the system (report from Eric Shepherd ). No changes needed. So far, I haven't been able to make it work (I use 10.2.8 right now) but maybe I've done something wrong. Anyway - can't wait to get started (outside of typing on a real machine or inside an emulator). AB. Quote Link to comment Share on other sites More sharing options...
Bryan Posted May 10, 2004 Share Posted May 10, 2004 Whoops!! Here's the missing link: http://www.hinton.demon.co.uk/archive/macide.html -Bry Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 10, 2004 Author Share Posted May 10, 2004 Bry, Thank you for the link. Interestingly, I wasn't aware of that utility ! It runs on OS9 which can be accessed from OS X (as "Classic" Environment) so that should work out. Thanks again. AB. Quote Link to comment Share on other sites More sharing options...
Bryan Posted May 10, 2004 Share Posted May 10, 2004 It's based on TASM (which I use), so it should be a nice environment to use. Here are a couple files I #INCLUDE with my projects, that contain hardware register names. There are more complete ones out there with all the OS variables too, but this might help you get started. -Bry a8files.zip Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 10, 2004 Author Share Posted May 10, 2004 Bry, Thanks for the files. I'll look at their integration tonight. If I run into any issues, I'll post a reply here. Thanks a lot ! AB. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted May 10, 2004 Share Posted May 10, 2004 http://xi6.com/hacks My assembler should run under any posix environment. But I've only tested it under OS X. I use XCode to develop it, but it will compile with just a simple "gcc asm6502.c -o asm6502" on the command line. I'm also making a new version which will add a 6809 assembler (Did you ever have one of those days when you wrote a 6809 assembler in 24 hours? Well, I did.) in addition to the Z-80 assembler, and will also add conditional assembly. I'll put it up in a week or two when I'm satisfied that it works well enough and when I can resist the urge to add new features. And I think someone has also gotten DASM to run under OS X. Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 11, 2004 Author Share Posted May 11, 2004 Okay, I downloaded the package from Bruce's web site and, once decompressed, I get the following: asm6502-z80-1.6.tar asmz80.c z80.asm 65c02.asm asmx.txt asmguts.h asm6502.c 7800.asm 6502.asm 2600.asm Once I activate asm6502-z80-1.6.tar, I am taken to the Text Editor (no surprise there). What is the app that I'm missing to exploit the 6502 and 65C02.asm documents ? Note for Bry -> I've looked at your files. Thank you. Also, regarding orgASM (which runs in classic environment), I get this once the package is decompressed and re-arranged (I've included a screen capture): Source Code Scripts BBEditStartup•TASM Tools Startup Items UserStartup•TASM HexSIO.doc OrgASM Tables HexSIO Any help would be appreciated. Thanks - AB. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted May 11, 2004 Share Posted May 11, 2004 Look at my previous message again. I tell you how to compile there. asmx.txt is the documentation, but it's still rather flimsy. Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 11, 2004 Author Share Posted May 11, 2004 Bruce, Thank you for the reply - I'll look at it again tonight. I'll post here if necessary. AB. Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 12, 2004 Author Share Posted May 12, 2004 Bruce, I did some research last night about the POSIX environment and, correct me if I'm wrong, I must use the Script Editor in OS X to compile. I tried to drag the 65c02.asm document icon over the Script Editor but it got rejected every time. I also tried a few lines of code but (obviously) without results. I'm stuck on that level - any help would be appreciated. Thanks - AB. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted May 12, 2004 Share Posted May 12, 2004 Script Editor is for Applescript and for nothing else. I gave you the command line to compile it: gcc asm6502.c -o asm6502 Don't forget to install the Developer Tools disk first. Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 12, 2004 Author Share Posted May 12, 2004 Don't forget to install the Developer Tools disk first. Thanks - I didn't know. I've gone to: http://developer.apple.com/sdk/ And the one I'm supposed to download contains XCode (correct me if I'm wrong). Okay - downloading right now (version for 10.2 - Development content dated Dec 2002). 300 megs... I'll post later here when I've taken a look at everything. Thanks for all, AB. Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 13, 2004 Author Share Posted May 13, 2004 Bruce, I've installed the Developer Disk (the one compatible with 10.2) but no sign of X-Code. Is it only compatible with 10.3 ? Also, when you say: I use XCode to develop it, but it will compile with just a simple "gcc asm6502.c -o asm6502" on the command line. Does it mean that your assembler can function without XCode ? Thanks. AB. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted May 13, 2004 Share Posted May 13, 2004 Xcode is the new thing in 10.3. But that doesn't matter. All you need is gcc installed. That's what the developer disk install is for. Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 14, 2004 Author Share Posted May 14, 2004 Bruce, Good news ! When I double click on the asm6502.c icon, I'm taken to the Project Builder. I presume I have to drop the asm6502.c inside the Tools folder then, the next time I open the project builder, I can start a 6502 document. Please let me know what you think. Thanks - AB. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted May 14, 2004 Share Posted May 14, 2004 Um, I hate to ask this, but have you ever used command line programs before? You know, like in Terminal? Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 14, 2004 Author Share Posted May 14, 2004 Hello Bruce, I hate to ask this, but have you ever used command line programs before? Answer below In terms of programming (command line), I've done a lot of Basic on the real hardware (XL/XE), some Mac/65 too but it's the first time I'm ever programming for the XL/XE from my Macintosh. I never used Terminal (link below for those who don't know it) but I'm not a newbie either so, hopefully, once I get the basics worked out, I can start coding. http://www.apple.com/macosx/features/unix/ My first goal would be to type a ML program, compile it, get an executable and run it through Atari 800MacX. Despite having dropped asm6502.c in the Tools folder, I can't start a Project Builder document with 6502 as its language. I've been able to include 6502 as a source document inside a project but I doubt that's tha place it's supposed to go to. Please let me know what you think. Thanks for everything, AB. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted May 14, 2004 Share Posted May 14, 2004 I'm not sure where you got the idea of how you think things should work, but you're completely way off base. This is a simple command-line C program. As in it only does stuff when you tell it to in Terminal. I've already given you the command to compile it. This is no plug-in. It has no GUI. You don't use the mouse. In fact, you could log into your Mac over a modem and use it that way. Quote Link to comment Share on other sites More sharing options...
andy_bernstein Posted May 14, 2004 Author Share Posted May 14, 2004 Bruce, Okay, I'll try again tonight to figure it out. Thanks for the reply. AB. 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.