Jump to content
IGNORED

Beginning Machine Language with a 600XL


Recommended Posts

Hi Guys,

 

I have a great interest in learning basics for machine language programming on the 6502. I own a real Atari 600XL but do you think it would be easier at least at the beginning to use an emulator?

I am a noob and would like to know any books or publication on how to code ML for beginners on an XL computer. Also which assembler shall I use and how to compile the source code then?

 

I know there are some threads on this matter already but there is a lot of information and I cannot dig out what would be essential for a good start. :?

 

Many thanks :)

Rick

Link to comment
Share on other sites

If it is a 16k 600xl, use an emulator to start because the alternative would be using a cassette for storing your programs. If you expand the memory to 64k, then you have better options then the cassette.

 

Common denominator would probably be some form of the ASM/ED cartridge. There are better assemblers out there, matter of fact it would probably be hard to find one that isn't better! :) Most published code from books will probably be compatible.

 

Couple of links

https://www.atarimax.com/freenet/freenet_material/12.AtariLibrary/2.MiscellaneousTextFiles/showarticle.php?111

https://atariwiki.org/wiki/attach/Atari%20Assembler%20Editor/ATARI%20Assembler%20Editor%20Users%20Manual.pdf

http://onlinebooks.library.upenn.edu/webbin/book/browse?type=lcsubc&key=Atari%20800%20(Computer)%20--%20Programming

Link to comment
Share on other sites

Develop using WUDSN. Atari Roots is a good book to start with. And, of course, this wonderful group of talented developers can always get you over the rough patches. After you get 6502 down, you'll want to read a Atari specific book. De Re Atari is really good but also ready technical so I wouldn't suggest that for beginners.

Edited by Justin Payne
Link to comment
Share on other sites

H Guys,

 

Many thanks to both of you for your advices :-). The 600 is modded to 64k. WUDSN is that a Window based assembler? Sorry I did not specify I am on MAC. Is there any Atari assembler for MAC OSX available?

And thanks for redirecting me to ATARI ROOTS, have already heard about it :-)

 

Rick

Link to comment
Share on other sites

Happy programming! You will of course want to set up your system for your own personal tastes. Reason why you see so many people recommending modern computers is the huge speed advantage due to both processing speed and fast I/O. Big programs typically can't be memory resident on an Atari just because the text buffer will need to use the same space as the assembled program. This forces you to compile from disk and usually to disk, then go to DOS, reboot w.o the cartridge if you were using something like MAC/65 or the ASM/ED, then test your code. On an Atari with serial disk drives, you can just about go to lunch it takes so long.

 

Programming tools like editors are superior on the newer platforms too. Eventually if you don't have it already, you will want some form of interface between your Atari and your modern computer. SIO2USB<PC> is pretty much a must have device and if you build your own, less then $10. After you finish with your code a SIO2USB cable will let you test it on real iron.

Link to comment
Share on other sites

This is one big reason that I use the Atari Macro Assembler and MEDIT. Utilizing the link directive, it's possible to assemble _very_ large programs in one invocation.

 

(also, I can't _STAND_ assemblers that use line numbers for editing. I prefer real text editors.)

 

-Thom

  • Like 1
Link to comment
Share on other sites

(also, I can't _STAND_ assemblers that use line numbers for editing. I prefer real text editors.)

I assume MAC/65 uses line numbers because it parses during entry, thus allowing for speedy compiles (and as you can't write that fast, you don't really notice the minuscule time lag per line during entry while you sure notice the time lag caused by parsing line by line of a text based program during assembly.

 

Now, is there any known Atari assembler that combines parsing with full screen "linenumber-less" editing? I imagine that would be quite a challenge to program as it would require the editor to "unparse"/expand those lines currently shown on screen.

Link to comment
Share on other sites

Ok noted :-). I will give this WUSDN a try. Anyway I may also use any window based assembler through the Wine platform which works pretty good on Mac OS X.

WUDSN contains a number of different assemblers and should leave few wishes unfulfilled. It was super easy to install on a Mac, just install Eclipse and then you need to enter one address as per the WUDSN site and Clips will load the Atari parts.

 

As a big plus, you can single-step through programs in an Emulator for debugging with register displays and lots of assistance which 6502 based debugging tools like exDDT cannot provide.

 

In the end it's a matter of style and of how much "retroness" you desire. If you care for program output, use WUDSN. If you want to feel like an 80s amateur coder, use any assembler you like on your 600XL (some pros used cross-assemblers even back then). If you don't insist on sticking to real floppies one of the main nuisances of on-machine-programming can be reduced as modern storage options will allow you to re-load your code much faster after every test run crash ;-)

  • Like 1
Link to comment
Share on other sites

I assume MAC/65 uses line numbers because it parses during entry, thus allowing for speedy compiles (and as you can't write that fast, you don't really notice the minuscule time lag per line during entry while you sure notice the time lag caused by parsing line by line of a text based program during assembly.

 

Now, is there any known Atari assembler that combines parsing with full screen "linenumber-less" editing? I imagine that would be quite a challenge to program as it would require the editor to "unparse"/expand those lines currently shown on screen.

 

sigh, no.

 

editors like ASM/ED and MAC/65 use line numbers because they are built directly on top of the OS editor device (E:), which retrieves things a line at a time, and passes them into the program that opened the E: device and read it. This is the way to determine an immediate command vs a line of entered program code. It's a throw-back to punch card data entry, and is absolutely maddening, because I'm spending time ordering my program, instead of delegating to a text editor, which can do an infinitely better job ,hence why I use AMAC on the Atari, and similar assemblers on other computers.

 

Every assembler of the time, worth its salt, incorporates two-pass assembly, that is, the first pass does mnemonic and operand parsing, making anything else it can't recognize into an unresolved symbol. This is most commonly a label, somewhere else in the program, and the two pass nature allows you to use labels before they have been defined in the code (forward-declaration). In good macro assembler,s the expression parsing is also split across the first and second pass, with the first pass creating basically a relocatable expression, and the second pass indicating where to inject the macro for use.

  • Like 1
Link to comment
Share on other sites

I never coded anything longer than maybe 200 lines in MAC/65 and a couple hundred in MAE and remember MAC/65 to be faster at in-memory Assembly (for programs of equal length) but maybe it's just more convenient as it leaves more space for programming thanks to the Bank-switched cart. (I didn't use ramdisks as I had an 800).

 

How does AMAC compare to MAC/65 speedwise? Action! Shows code parsing can be done quite fast even when done at compile time.

 

Probably people didn't mind line numbers back then because they were used to them from BASIC and with auto renumbering it's just one command to make more linenumber space. It also makes it easier to navigate to a portion of code on a machine that had no scrollbars on its fullscreen editors. Not trying to convince you in any way, just musing about the different concepts.

 

 

Gesendet von iPhone mit Tapatalk

Link to comment
Share on other sites

Hi Guys,

 

Thanks a lot for your advices ;-) . I am really noob in ML programming so I have now two options :

 

- I can use my real 600XL (upgraded to 64k) with a SIOD2SD reader and MAC/65 or Atari Assembler Cartridge if I want to play with this on a real hardware

- Use Altirra emulation with Mac/65 or Atari Assembler Cart but I just need to fix how to correctly format a new disk as I have issues with it (always error 130 despite the fact the disk is formatted and DOS files written onto it)

 

There is really no point for me in using advanced modern assembler as I have no experience. Better to start with what was available at that time and use the good ATARI ROOTS book to start with something ;-)

Edited by repetto74
  • Like 1
Link to comment
Share on other sites

I never coded anything longer than maybe 200 lines in MAC/65 and a couple hundred in MAE and remember MAC/65 to be faster at in-memory Assembly (for programs of equal length) but maybe it's just more convenient as it leaves more space for programming thanks to the Bank-switched cart. (I didn't use ramdisks as I had an 800).

 

How does AMAC compare to MAC/65 speedwise? Action! Shows code parsing can be done quite fast even when done at compile time.

 

Probably people didn't mind line numbers back then because they were used to them from BASIC and with auto renumbering it's just one command to make more linenumber space. It also makes it easier to navigate to a portion of code on a machine that had no scrollbars on its fullscreen editors. Not trying to convince you in any way, just musing about the different concepts.

 

 

Gesendet von iPhone mit Tapatalk

 

 

AMAC is not a speed demon in terms of assembling, because it assembles directly from disk, into memory and back out to disk again.

 

But what this does allow is very flexible methods of inclusion and linking which allow you to compile _VERY LARGE_ projects. This was Atari's in-house assembler for the 400/800 software during the early 1980s, for this reason among others.

 

With a hard disk setup like Corvus, AMAC is very fast.

 

-Thom

Link to comment
Share on other sites

Hi Guys,

 

So I will use the MAC/65 assembler together with ATARI ROOTS as a good introduction in ML programming on the ATARI XL computers.

I have a fairly simple question : actually I will do programming with the Altirra emulator most of the time but I would be able also to use the real Atari 600XL I own. I have an SIO2SD reader for loading and saving but actually as far as I know the reader handle ATR (rw), XFD (ro) and COM/XEX (ro) file types only. Is there any ATR version of the MAC/65 assembler to be loaded with the real machine? (I do not have the MAC/65 cart).

I searched and found this https://atariwiki.org/wiki/Wiki.jsp?page=Mac65

What is the difference between a MAC/65 cart or bin image and the ATR image MAC/65 4.20 with BUG/65 and DOS XL 2.30. Can this be used to assemble? :?

Link to comment
Share on other sites

Bin image would be the raw cart rom where the .CAR file is

read by an emulator to automatically set the banking

scheme for the cart to work, just saves a step in using

bin files. .CAR is then for emulator use only.

 

Atr would contain the disk based version of MAC/65 and it's

not a fully featured version of MAC/65 in relation to the

cartridge. But the disk versions will assemble some source

code just fine, you have to avoid source that uses

.SET 6

directive for example as that one is only working in the

cartridge version.

http://www.mixinc.net/atari/mac65.htm#topofpage

 

Exactly what works with higher disk versions and what

doesn't wasn't fully explored by me because I got the

cart and never looked back. The cart of course can be

used in emulation quite easy, but you might consider

using an Atarimax cartridge with MAC/65 image on it?

Link to comment
Share on other sites

Pretty sure the disk based Mac-65 is an earlier version and wasn't developed further. I've got 2 versions of the cartridge image, 1.01 and 1.02. The disk based Mac-65 runs practically as fast but you're at a disadvantage if wanting to assemble to Ram and run in a debugging situation.

Link to comment
Share on other sites

Hi Guys,

 

Ok then better if I start using the BIN cart I have with Altirra emulator. Well I started coding a small source code as per the Atari Roots book but I have already an error message when saving the object code or the source code :? . I have loaded a blank formatted disk with DOS into D1.

 

 

Atari ML MAC:65.pdf

Atari ML MAC:65.tiff

Link to comment
Share on other sites

Nah, nah... You've got that blank ATR with DOS mounted on drive 1, right? With the MAC/65 cart attached, choose System->Cold Reset in the emulator, and the system should boot DOS from the disk before jumping into the cartridge. From there, you should find that you can save files.

 

DOS is a bootable driver which needs to be loaded into memory when the machine is first turned on or cold booted. Without this code in memory, the machine has no way of writing files to disk.

Link to comment
Share on other sites

OK Flashjazzcat thanks!! :) It is easier to handle the real machine than the emulator as playing with virtual disks, carts and virtual resets is sometimes confusing :P

:thumbsup:

 

Just tested and fully working :-D Many thanks dude.

Sorry I am a relative noob with 8bit Atari machines. I was more a C64 user and as far as I remember DOS system was sitting in a Rom of the Diskdrive and working in the background.

Edited by repetto74
  • Like 1
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...