Jump to content
IGNORED

Assembler for the absolute beginner


Trooper

Recommended Posts

I posted this in the programming forum but perhaps more people will see it if I post here

 

I am, once again, going to try to get started creating some fun stuff for the old 8-bitters. It's been many many years since I last did anything on my trusty old Atari apart from playing games so I have a few questions.

 

I used to dabble a bit in Assemblerprogramming but this is so long ago that I see myself as an absolute beginner, I have some basic knowledge of BASIC

 

My questions are, what should I get to start on my career ( ) as an eight bit maestro assembler programmer?

 

What utilities, and above all, what books should I start with as an absolute beginner?

Link to comment
Share on other sites

Hi, I'm interested in this too :ponder: I had a go using the assembler editor cart a few years ago but never had time to get very far, made a blob move round the screen and then didn't know what to do! ... I found a couple of "First Steps in Assembly" type articles in the old Page 6 and Atari Users magazines that were quite good (available on the page 6 site and here in a recent post respectively).

Cheers

p.s. just remembered it was you who beat me at Gumball in last years HSC... hope you r gonna play this year!

Edited by therealbountybob
Link to comment
Share on other sites

if you want to go native programming I would use:

 

- Turbo Basic XL

- Mac/65 or Bibo Assembler or MAE

 

but most of us are not coding native on the machine so I definitly vote for

 

- MADS cross assembler (mads.atari8.info)

- Atari800 or Atari800win or Atar++ as dev emulator

 

additional tools are

 

- RMT - Raster music tracker for PC

- G2F - graphics conversion and creation tool

 

for editing source codes: Notepad++

Link to comment
Share on other sites

I would second Heavens advice above.

 

Along with the books to get to grips with your first 6502, also the great specific Atari book resources most recommended to understand more about the A8 are Mapping the Atari, De Re Atari and, Atari's official Technical reference notes which are freely available now online. and the great resource is here on AA too.

 

You'll find that once you get the initial understanding of assembler you'll progress quickly. Good luck :)

Link to comment
Share on other sites

Here's another tool you may find useful (for beginners and experienced programmers alike):

 

http://home.pacbell.net/michal_k/6502.html

 

It's a 6502 simulator that includes an integrated macro assembler and debugger. I use it to develop and verify subroutines. I like it because it allows easy source-level debugging. You can certainly do the same thing using the monitor that comes with Atari800 win+ but this application has a nice IDE-like GUI. It's ideal for experimenting with 6502 assembler.

 

tjb

Link to comment
Share on other sites

I posted this in the programming forum but perhaps more people will see it if I post here

 

I am, once again, going to try to get started creating some fun stuff for the old 8-bitters. It's been many many years since I last did anything on my trusty old Atari apart from playing games so I have a few questions.

 

I used to dabble a bit in Assemblerprogramming but this is so long ago that I see myself as an absolute beginner, I have some basic knowledge of BASIC

 

My questions are, what should I get to start on my career ( ) as an eight bit maestro assembler programmer?

 

What utilities, and above all, what books should I start with as an absolute beginner?

 

I use AMAC myself and if you check out Megamagazines from Freddy Offenga, I did a small intro of coding there in assembler. Just a simple scroller using DLI's and VBI's ... Good luck and have fun with the most fun computer in the world ... PC's are soulless ... Atari's have something special ... Love those little beauties (my girlfriend looks at me with jealousy :-))

Link to comment
Share on other sites

Here's another tool you may find useful (for beginners and experienced programmers alike):

 

http://home.pacbell.net/michal_k/6502.html

 

It's a 6502 simulator that includes an integrated macro assembler and debugger. I use it to develop and verify subroutines. I like it because it allows easy source-level debugging. You can certainly do the same thing using the monitor that comes with Atari800 win+ but this application has a nice IDE-like GUI. It's ideal for experimenting with 6502 assembler.

 

tjb

 

Oh, I know that... that is cool one...I played around with it in the past, too...

 

But he should go really quickly to de facto standards nowadays so when posting code etc or getting sources he does not get frustrated by not running or converting source codes... ;) my 2 cents...

Link to comment
Share on other sites

Here's another tool you may find useful (for beginners and experienced programmers alike):

 

http://home.pacbell.net/michal_k/6502.html

 

It's a 6502 simulator that includes an integrated macro assembler and debugger. I use it to develop and verify subroutines. I like it because it allows easy source-level debugging. You can certainly do the same thing using the monitor that comes with Atari800 win+ but this application has a nice IDE-like GUI. It's ideal for experimenting with 6502 assembler.

 

tjb

 

Oh, I know that... that is cool one...I played around with it in the past, too...

 

But he should go really quickly to de facto standards nowadays so when posting code etc or getting sources he does not get frustrated by not running or converting source codes... ;) my 2 cents...

 

 

I'm not sure I follow what you mean. De facto standards as in assembler source format?

 

tjb

Link to comment
Share on other sites

I'm not sure I follow what you mean. De facto standards as in assembler source format?

 

tjb

 

Yeah,

.BYTE versus

dfb

 

*= versus

org

 

any number of other twists on the original standards for 6502 assemblers agreed to back in the day when the machine was still only on paper. Every new assembler author since then thinks they are allowed to deviate from those rules to the point that when it comes to coverting source code to compile from one assembler to another sometimes it can't be done unless some grunt spends hours going over and tweaking each and every line by hand. That's a real big PIA that was supposed to fixed once and for all by having De facto standards in the first place.

 

The best we can hope for is easy conversions, and some are much better than others. "Compatiable" with Mac/65 source code is the biggest joke yet - there is no such creature. Perhaps Mac to xxx assembler but never it seems xxx to Mac. Mac/65 is one of the assemblers that follows the standards, Ass/Ed cart is another. I don't know of any others that do...

Link to comment
Share on other sites

I'd read (almost) everything on www.atariarchives.org. Start writing some small programs. Using PC tools and cross-assembling/compiling is the fastest method, and then testing in the emulator.

 

I'm personally using the cc65 tool-chain most often. You can write programs in C, a combination of C and assembly, or straight assembly.

Link to comment
Share on other sites

I'm not sure I follow what you mean. De facto standards as in assembler source format?

 

tjb

 

Yeah,

.BYTE versus

dfb

 

*= versus

org

 

any number of other twists on the original standards for 6502 assemblers agreed to back in the day when the machine was still only on paper. Every new assembler author since then thinks they are allowed to deviate from those rules to the point that when it comes to coverting source code to compile from one assembler to another sometimes it can't be done unless some grunt spends hours going over and tweaking each and every line by hand. That's a real big PIA that was supposed to fixed once and for all by having De facto standards in the first place.

 

The best we can hope for is easy conversions, and some are much better than others. "Compatiable" with Mac/65 source code is the biggest joke yet - there is no such creature. Perhaps Mac to xxx assembler but never it seems xxx to Mac. Mac/65 is one of the assemblers that follows the standards, Ass/Ed cart is another. I don't know of any others that do...

 

I use Atasm myself. It's Mac/65 compatible AFAIK.

 

tjb

Link to comment
Share on other sites

This will probably come in handy. I had completely re-formatted Atari Roots into a more modern style manual. It is a .doc file, suitable for viewing in the "Print View" screen view, and optimized for printing.

 

I optimized this file for black & white printing on a laser printer, corrected misspellings, optimized space usage with tables, and designed the document margins in such a fashion that it could be easily printed on pre-punched 3-ring binder paper, using the double side (odd/even page) Print Setting.

 

To do this, you print all of your odd pages, then replace the paper in your printer, showing the opposite side, then print the even pages. You will end up with double-sided pages.

 

Tip: Do a few pages first as a test, to get the hang of it... it can be a PIA, until you figure it out, "just right"... then print the whole document.

I have found that for these types of documents, that the best way to figure things out is to use the Word option that allows you to view pages side by side, in Print View.

 

 

Essential illustrations have been retained. Non-essential illustrations have been removed, and all screenshots have been optimized for clear printing in black & white.

 

I did this to have a properly printed hardcopy that can be used as supplemental material to the original book on Atari Archives. I originally created it for my own use, but since it is made to be used WITH the original document on atariarchives.org, I don't think that anyone will mind if it is shared in the Atari community. If this is not well received, then just PM me & I'll remove the document.

 

While I did correct some of the more glaring errors in the text, I remember that when I re-read it, from the printed doc, that there were still a number of contextual errors (which also exist in the original). Maybe one day I will get around to further editing & polishing, but for now, this is it.

 

I do remember that there were a few discrepancies between the text & the screenshots, which could trip up a beginner. To avoid possibility of error, go with the actual source code listings, rather than the screen summaries.

 

Any other errors in there are from the original OCR scan... meaning, full sanity checking has not been done (although this copy is a lot better than the one on the web, in that regard).

 

There are two files, the complete printable text, and the cover for the 3-Ring Binder. Just print the cover twice to also get a Spine Label (by folding the paper to only show "ATARI 6502"). These slip right into the clear pockets on Staples 3-Ring Binders.

 

Enjoy!

  • Like 2
Link to comment
Share on other sites

The learning and the software are two different things...

 

But I'm always using Mac/65 disk version, in combination with a rather big ramdisk, which speeds up debugging.

 

I'd say: first start with thinking of what you want to make. Do not start with too big projects or ideas. I remember my first assembler program did just one thing, and that was moving a tekst line in graphics mode 0, using fine scrolling, because that was an effect I could not realise in Basic.

 

After I succeeded with that, I wanted more... and created more :D

 

@Heaven

Yeah. I do all my atari programming on the real thing. That is for me the most fun.

 

Abbuc Magazin #96 will start with my fresh programmed intro, in Mac/65 :D

Link to comment
Share on other sites

Here is a zip, with the document & the cover with the embedded fonts.

 

I removed the previous download links, because the first document was apparently corrupted. The new "15 Minutes to Edit a Post" feature prevented me from fixing this issue directly, as I didn't notice the problem with the attachment until later.

 

Here's the correct download:

ATARI_ROOTS.zip

  • Like 1
Link to comment
Share on other sites

Hi, I'm interested in this too :ponder: I had a go using the assembler editor cart a few years ago but never had time to get very far, made a blob move round the screen and then didn't know what to do! ... I found a couple of "First Steps in Assembly" type articles in the old Page 6 and Atari Users magazines that were quite good (available on the page 6 site and here in a recent post respectively).

Cheers

p.s. just remembered it was you who beat me at Gumball in last years HSC... hope you r gonna play this year!

 

 

I'm in the same boat (want to learn) except I have some ideas of what I want to do. Port utilities over from other platforms.

 

Knowing assembler would be great even I don't want to code a bunch of long programs.

 

Also, we need more stuff like Drac does, drivers and additions / updates to existing softwares.

Link to comment
Share on other sites

Someone above mentioned the book "Mapping The Atari". It's available online, but it's nice to have a hard copy of the book handy as well. I just happen to have a free one available in the free stuff thread to the first person who claims it (along with or without a DOS 3 book) and wants to pay media mail shipping:

 

http://www.atariage.com/forums/index.php?showtopic=137716

Link to comment
Share on other sites

Ah! Much better!

 

'Roots' is my favorite m/l book - along with Chasin's. They both sit on the 'short list' shelf with 'Mapping'.

 

I vote for ASM/ED cart, too. I replaced internal Basic with the ASM/ED code - works great. When I want Basic, I plug in BasicXL most of the time, anyway.

 

Great job!

 

Thank you,

 

Bob

 

 

 

Here is a zip, with the document & the cover with the embedded fonts.

 

I removed the previous download links, because the first document was apparently corrupted. The new "15 Minutes to Edit a Post" feature prevented me from fixing this issue directly, as I didn't notice the problem with the attachment until later.

 

Here's the correct download:

Link to comment
Share on other sites

You're welcome! Glad that you find it useful.

 

& yes, I like just typing 'BUG' too.

 

The MAC/65 debugger is better, of course, but I REALLY hate the "BAD USER BUZZER", the garish color scheme, and disk access wait of BUG/65.

 

In fact, is there someone out there who can hack up a disk version quickly, to change those three things, and post it in this thread? I would guess that a lot of people would be very happy to have such a version...

 

- A regular key beep, instead of the bad user buzzer

- Standard BASIC color-scheme, no ugly border

- The whole debugger relocated to RAM, accessed by both the 'BUG' command & the original invocation

 

 

As far as the original topic... Here is a fairly obvious command, called BLACK, which is nice to use. If you assemble it, and save it as "BL.COM", you'll have a quick way to change your editor or DOS screen to a black background, with light lettering, just by issuing the BL.COM command via Binary Load, in DOS:

 

01 ; BLACK.SRC
02 ; BLACK BACKGROUND IN EDITOR
05       .OPT OBJ
10       *=  $0600
15 BLACKBG =  $02C6
20       LDA #$0
30       STA BLACKBG
90       RTS

Link to comment
Share on other sites

As far as the original topic... Here is a fairly obvious command, called BLACK, which is nice to use. If you assemble it, and save it as "BL.COM", you'll have a quick way to change your editor or DOS screen to a black background, with light lettering, just by issuing the BL.COM command via Binary Load, in DOS:

 

It's probably worth mentioning that the code could be simplified to just:

 

02 ; BLACK BACKGROUND IN EDITOR
05       .OPT OBJ
15 BLACKBG =  $02C6
20       *= BLACKBG
30       .BYTE $0

 

...though I disremember the ams/ed specifics, so you might have to add a .OPT line to assemble the file without a run address?

 

For beginner Atari asm programmers: when you get to the point where you understand why the two are equivalent, you will have learned something useful :)

Link to comment
Share on other sites

As far as the original topic... Here is a fairly obvious command, called BLACK, which is nice to use. If you assemble it, and save it as "BL.COM", you'll have a quick way to change your editor or DOS screen to a black background, with light lettering, just by issuing the BL.COM command via Binary Load, in DOS:

 

It's probably worth mentioning that the code could be simplified to just:

 

02 ; BLACK BACKGROUND IN EDITOR
05       .OPT OBJ
15 BLACKBG =  $02C6
20       *= BLACKBG
30       .BYTE $0

 

...though I disremember the ams/ed specifics, so you might have to add a .OPT line to assemble the file without a run address?

 

For beginner Atari asm programmers: when you get to the point where you understand why the two are equivalent, you will have learned something useful :)

 

What you suggest is that it turns the screen black during the assembling process. Is it possible to assemble this to a com file?

 

Marius

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...