Jump to content
IGNORED

Programming for the XL/XE on MAC (OS X) w/ a text editor


Recommended Posts

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.

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

post-3367-1084257853_thumb.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Hello Bruce,

 

I hate to ask this, but have you ever used command line programs before?

 

Answer below :D

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...