Jump to content



2

Assembly Language programming books


16 replies to this topic

#1 morelenmir OFFLINE  

morelenmir

    Space Invader

  • 38 posts
  • Location:West Yorkshire, Great Britain

Posted Sun Feb 5, 2012 5:27 PM

I have started to make some - a little! - progress in Atari Assembler.

Most books which purport to teach ASM for Atari beginners usually focus exclusively on X=USR(...) routines in BASIC. The single title I have found that doesn't, instead required you to type in their own assembly language editor and debugger - in BASIC!

I was wondering if anyone knew of any titles other than 'The Atari Assembler - Don Inman & Kurt Inman' that focus primarily on programming with the Atari Assembler/Editor cart? I would ideally like something with a lot of listings that I can type-in and learn from - but again I would really like to find something with raw ASM and not just poking and peeking from BASIC. A screen-friendly PDF would be the icing on the cake!

Alternately I wonder if there are any internet-archived magazine that offer plenty of ASM code?

#2 David_P OFFLINE  

David_P

    Moonsweeper

  • 295 posts
  • Location:Canada

Posted Sun Feb 5, 2012 7:11 PM

Old ANALOG magazines had a fair number of assembly programs with source code. They also had a colun called "Boot Camp" that was intended to teach assembly lanaguage programming.

You'll want access to Mapping the Atari as well, once you get deeper into things.

#3 morelenmir OFFLINE  

morelenmir

    Space Invader

  • 38 posts
  • Location:West Yorkshire, Great Britain

Posted Sun Feb 5, 2012 7:26 PM

I shall go on a trawl for Analog then David!

'Mapping The Atari' I did actually get hold of the other day - along with 96 other atari books!!!

#4 Ransom OFFLINE  

Ransom

    River Patroller

  • 2,915 posts
  • Cartridge Gaming Enthusiast
  • Location:Just south of the Wisconsin border.

Posted Sun Feb 5, 2012 8:24 PM

"Atari Roots" is the one I found most useful.

#5 Allan OFFLINE  

Allan

    River Patroller

  • 4,249 posts
  • Location:Wallingford, CT

Posted Sun Feb 5, 2012 9:36 PM

Try these:

http://www.atariarchives.org/alp/

http://www.atariarchives.org/mlb/

http://www.atariarchives.org/roots/

http://www.atariarchives.org/

Allan

#6 morelenmir OFFLINE  

morelenmir

    Space Invader

  • 38 posts
  • Location:West Yorkshire, Great Britain

Posted Sun Feb 5, 2012 10:38 PM

MANY thanks again guys!!! I do actually have all those titles you recommend. Now I know they focus in the right area I shall go through them carefully.

I think the difficulty of ASM has been greatly over-emphasized. If it were as easy to find material on the Assembler/Editor cartridge as it is for BASIC then I am sure more people would be comfortable programming there. I really don't get the 'learn machine language through basic' angle. It is far easier to use a proper assembler working from mnemonics than it is to poke in hex op-codes. It is also far more of a struggle to correctly find free memory to use when the BASIC cartridge is in residence.

Edited by morelenmir, Sun Feb 5, 2012 10:39 PM.


#7 David_P OFFLINE  

David_P

    Moonsweeper

  • 295 posts
  • Location:Canada

Posted Sun Feb 5, 2012 11:01 PM

With BASIC, I tend toward small, relocatable routines for specific purposes, rather than trying to find some consistently free block of memory (well, there's always page 6, but everyone uses page 6).

#8 tschak909 OFFLINE  

tschak909

    Chopper Commander

  • 161 posts
  • Location:USA

Posted Fri Feb 10, 2012 7:13 PM

I can't stress enough, on more than a few sites there is the Atari 400/800 Hardware manual that was published by Atari. It is well formatted, and has an exhaustive reference of every single chip, its registers, and their functions.

This was superceded by a newer internal document (The Bob Duhamel written System Reference Manual) that I would use ALONGSIDE the original Atari hardware reference manual, which describes the various bits that have been added by the XL and XE series machines (i.e. bank switching using PORTB, how to access the RAM underlying the OS to get access to the full 64K, etc.)

Atarimania has these manuals, as does a few other sites, google for it.

-Thom

#9 SIO99 OFFLINE  

SIO99

    Star Raider

  • 64 posts
  • Location:London, UK

Posted Sat May 12, 2012 12:56 PM

View Postmorelenmir, on Sun Feb 5, 2012 5:27 PM, said:

I have started to make some - a little! - progress in Atari Assembler.

Most books which purport to teach ASM for Atari beginners usually focus exclusively on X=USR(...) routines in BASIC. The single title I have found that doesn't, instead required you to type in their own assembly language editor and debugger - in BASIC!

I was wondering if anyone knew of any titles other than 'The Atari Assembler - Don Inman & Kurt Inman' that focus primarily on programming with the Atari Assembler/Editor cart? I would ideally like something with a lot of listings that I can type-in and learn from - but again I would really like to find something with raw ASM and not just poking and peeking from BASIC. A screen-friendly PDF would be the icing on the cake!

Alternately I wonder if there are any internet-archived magazine that offer plenty of ASM code?

Can you tell me which book you're talking about that requires you to type in their own Assembler/Debugger BASIC listing? That may be the only one I can use, due to lots of bills, not enough money, and a lack of Assembler carts at more reasonable prices. I've just been reading a listing of PD disks by ABBUC, but I haven't got a disk drive.I hope to get an SIO2SD soon. One of the PD Assemblers is called BIBO. Their list is all in German, which I speak.

I may try Assembling by hand, then converting it into decimal and typing it into a BASIC loader program. I recently dissassembled a short section of code from a BASIC listing.

BTW, I only recently bought an Atari 8 bitter (65XE), which I'm using to study simple games programming. Earlier today, I converted some short Sinclair BASIC listings from a certain programming magazine. I don't know when I might move on to Assembly programming.

#10 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Sat May 12, 2012 2:40 PM

Why use Atari's Assembler/Editor at all? There's much better options available (even natively)...cross-programming using a modern computer probably being the easiest method.

If you really want to make the experience more-painful, tho...just cross-program with your feet in a bucket of live piranha fish.

#11 morelenmir OFFLINE  

morelenmir

    Space Invader

  • 38 posts
  • Location:West Yorkshire, Great Britain

Posted Sat May 12, 2012 6:36 PM

You've probably got the right of it Nukey!!! I do use EditPad Pro though and then copy/paste into Altirra when I have the source code typed into a text file.

My take on it is that for years and years I have wanted to learn how to program in assembler, but have always been scared away from PC ASM by the sheer complexity of doing so on the x86. Also there is the dos/windows issue where, yes you CAN use ASM for windows - but you inevitably end up just using it to make API calls. And I can do that fairly well in C already! For me at least this has always to an attempt at using MASM in native DOS - which leads back to the complexity of 8086 code and near/far pointers and all that malarkey. So... I thought I would give it a serious push by learning ASM on something nice and simple like the a8 with its pretty small number of mnemonics and small memory pool. To be fair I was doing pretty well, but then ran into a bloody irritating problem with DOS XE and a weird sound issue - a constant high-pitched whistle that drove me nuts and started whenever anything was written to disk from the assembler/editor cart. SpartaDOS didn't work with the examples from "atari roots", causing a crash whenever I tried to load object files into memory. ANYWAY that was a couple of months back now and I haven't found the impetus to knuckle down again, which is a shame as I was just getting to grips with the idea of the carry flag and doing register shifts! I might grit my teeth and start again with the blissfully quiet (I hope!) dos 2.5.

And SIO99 - the book with the basic assembler you typed in yourself called 'alpa' was "Atari 130XE Machine Language for the Absolute Beginner" by 'Kevin Bergin'. I really would recommend "Atari Roots" though - and perhaps through your learning stage give the PC Emulator 'Alitrra' a try, it is just about perfect and best of all FREE!!! I do understand some of us prefer to stick with nuts and bolts hardware though. I probably would too if I had a working A8!

Edited by morelenmir, Sat May 12, 2012 6:42 PM.


#12 SIO99 OFFLINE  

SIO99

    Star Raider

  • 64 posts
  • Location:London, UK

Posted Sun May 13, 2012 7:48 AM

View Postmorelenmir, on Sat May 12, 2012 6:36 PM, said:

You've probably got the right of it Nukey!!! I do use EditPad Pro though and then copy/paste into Altirra when I have the source code typed into a text file.

My take on it is that for years and years I have wanted to learn how to program in assembler, but have always been scared away from PC ASM by the sheer complexity of doing so on the x86. Also there is the dos/windows issue where, yes you CAN use ASM for windows - but you inevitably end up just using it to make API calls. And I can do that fairly well in C already! For me at least this has always to an attempt at using MASM in native DOS - which leads back to the complexity of 8086 code and near/far pointers and all that malarkey. So... I thought I would give it a serious push by learning ASM on something nice and simple like the a8 with its pretty small number of mnemonics and small memory pool. To be fair I was doing pretty well, but then ran into a bloody irritating problem with DOS XE and a weird sound issue - a constant high-pitched whistle that drove me nuts and started whenever anything was written to disk from the assembler/editor cart. SpartaDOS didn't work with the examples from "atari roots", causing a crash whenever I tried to load object files into memory. ANYWAY that was a couple of months back now and I haven't found the impetus to knuckle down again, which is a shame as I was just getting to grips with the idea of the carry flag and doing register shifts! I might grit my teeth and start again with the blissfully quiet (I hope!) dos 2.5.

And SIO99 - the book with the basic assembler you typed in yourself called 'alpa' was "Atari 130XE Machine Language for the Absolute Beginner" by 'Kevin Bergin'. I really would recommend "Atari Roots" though - and perhaps through your learning stage give the PC Emulator 'Alitrra' a try, it is just about perfect and best of all FREE!!! I do understand some of us prefer to stick with nuts and bolts hardware though. I probably would too if I had a working A8!

Thanks sooo much, for telling me about "Atari 130XE Machine Language for the Absolute Beginner"! It was one book I was considering anyway, so now I know which one to get. Atari Roots is available on www.atariarchives.org , anyway, but I haven't looked at it yet, because the title didn't give me any idea of what it was about. There are various A8 computers for sale on eBay, where I recently got my Atari 65XE complete with XC12, joystick, 3 games carts, and two TI game controllers which don't seem to work, for the sum of £22.01!

BTW, since my last post I've been working on a missile base/Space Invaders type program, which looks about as advanced as the original Pong, but I now understand how to program it and how it works!

Finally, here's a question for all you budding Assembly Language programmers out there. Here's a routine for the BBC Micro, as well as for the Commodore 64, which prints lots of text on the screen really quickly. I can't see much similarity between these routines. Can you modify them to work on the A8?

BBC

DATA 162,96,160,0,185,0,128,153,0,96,200,208,247,232,138,24,105,32,141,6,16,142,9,16,224,128,208,230,96

CBM64

DATA 162,0,169,46,157,40,4,157,0,5,157,0,6,157,232,6,232,208,241,96

#13 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 5,410 posts
  • Jumping through hOOPs...
  • Location:United Kingdom

Posted Sun May 13, 2012 10:10 AM

First thing to do is go and convert those numbers into their equivalent Assembly language instructions. You can do this easily with the hex converter in Windows' calculator and any website which lists the 6502's instructions. That will be an education in itself, and then you can post the resulting source code here for discussion. This is the kind of excercise I did two decades ago when I was first learning 6502 assembler, with no internet: just a 6502 guidebook and a pen and paper.

Regarding an A8 version: better to start from scratch, but comparisons with other systems will be much more meaningful with source code instead of data statements.

#14 SIO99 OFFLINE  

SIO99

    Star Raider

  • 64 posts
  • Location:London, UK

Posted Sun May 13, 2012 4:35 PM

View Postflashjazzcat, on Sun May 13, 2012 10:10 AM, said:

First thing to do is go and convert those numbers into their equivalent Assembly language instructions. You can do this easily with the hex converter in Windows' calculator and any website which lists the 6502's instructions. That will be an education in itself, and then you can post the resulting source code here for discussion. This is the kind of excercise I did two decades ago when I was first learning 6502 assembler, with no internet: just a 6502 guidebook and a pen and paper.

Regarding an A8 version: better to start from scratch, but comparisons with other systems will be much more meaningful with source code instead of data statements.

I have disassembled a routine by hand before but it didn't make much sense. I wouldn't be able to write this kind of routine at all by myself at the moment.

#15 Stephen OFFLINE  

Stephen

    River Patroller

  • 3,250 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Sun May 13, 2012 5:26 PM

View PostSIO99, on Sun May 13, 2012 4:35 PM, said:

I have disassembled a routine by hand before but it didn't make much sense. I wouldn't be able to write this kind of routine at all by myself at the moment.
But that is the only way you will start to understand this. It may seem confusing at first, but there are plenty of people here who will help. Trust me - it will make much more sense looking at the mnemonics, than it will staring at decimal numbers. At most, the CBM64 routine will have 10 instructions, and that is assuming everything is a two-byte. There are no "complex" instructions on the 6502. Everything is either a load, store, compare, or some kind of bit-twiddling operation. So disassemble the routine, use an online 6502 op-code resource, and trace out by hand what each instruction is doing.

#16 Marius1976 ONLINE  

Marius1976

    Stargunner

  • 1,701 posts
  • Location:Netherlands

Posted Sun May 20, 2012 1:14 PM

View PostNukey Shay, on Sat May 12, 2012 2:40 PM, said:

Why use Atari's Assembler/Editor at all? There's much better options available (even natively)...cross-programming using a modern computer probably being the easiest method.

Well... I agree on the first part of your comment. Atari Assembler Editor is terrible slow and not really a good option to learn assembler. The slowness of this assembler will not encourage anyone.

But I really do not share the idea of cross-assembling/programming at all.

I do a lot of coding on my little atari, and I do it all on the real thing itself. I have two assembler carts which I like both equal, and a lot. I have Synassembler on cart, and Mac/65. Both lightning fast, and very versatile.

The last few months I used the Synassembler some more than Mac/65. Synassembler is a drop faster, and has a few very handy options.

Although I see the benefits of cross-assembling, I do not think they are so great that they would discourage anyone of coding on the real thing.

And for me is the hobby: Spending time on the Atari... not spending more time on PC or Mac.

#17 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 5,410 posts
  • Jumping through hOOPs...
  • Location:United Kingdom

Posted Mon May 21, 2012 5:11 AM

View PostMarius1976, on Sun May 20, 2012 1:14 PM, said:

View PostNukey Shay, on Sat May 12, 2012 2:40 PM, said:

Why use Atari's Assembler/Editor at all? There's much better options available (even natively)...cross-programming using a modern computer probably being the easiest method.

Well... I agree on the first part of your comment. Atari Assembler Editor is terrible slow and not really a good option to learn assembler. The slowness of this assembler will not encourage anyone.

But I really do not share the idea of cross-assembling/programming at all.

It's entirely dependent on the size of the project. SpartaDOS X was (AFAIK) written using a cross-assembler in the 1980s because it was a massive cartridge based project. Because of cross-platform development tools, we're now able to undertake huge, commercial-sized projects like these with barely a second thought. Without such tools, I doubt such projects would be undertaken (certainly not by me). It's hard enough to manage a dozen 2,500 line assembly source files in Eclipse on a 1080p monitor, let alone on a tiny 40x24 display and a text editor that maybe handles 16K files. A previous project I started on the A8 simply grew so big that cross-development became a necessity.

One the other hand, I still love using the Atari for small projects, and I do miss the days of compiling 200KB of source code using a floppy drive and a RAMdisk. Unfortunately times change, and for large projects, one simply does not have the time to code "in situ". But I do long to do some development on real hardware again, especially with a fast hard drive and bags of RAM. Where's that copy of MAE??? :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users