|
Subject: Re: [stella] Hello from Square One From: Robin Harbron <macbeth@xxxxxxxxxxx> Date: Wed, 06 Jan 1999 19:15:24 -0500 |
Pete Holland wrote:
> 1) I was looking over some of the disassembled code printouts and I
> notice that there are no "memory locations" (roughly analogous to line
> numbers in BASIC?) listed by the code. So how is the code put in?
> Where to the memory location assignments come in? And if you just
> start typing everything in, how do you know where the JSR and JMP
> commands are supposed to lead to?
That's the beauty of an assembler - you can avoid having to
know every last detail of the program you're working on -
most of the time, anyway.
Whenever you want to refer to a particular point in a program,
you just use a label, like:
here inx
jsr there
jmp here
there rts
I hope that's self-explanatory.
The assembler worries about what actual memory location "here" and
"there" refer to.
Most assemblers use a command like:
ORG $1000
or
*= $1000
to tell the assembler the starting address to assemble to.
> 2) I was reading a book on programming the Apple IIe (6502 processor,
> doncha know), and it mentions that the branch commands only go 127 (or
> 128, depending on direction) bytes at the most. Has anybody ever run
> into a situation where branches are required further than this?
Most of the time it's not a problem. If you require a larger branch,
you can just negate the branch instruction, and add a JMP, eg:
loop inx
bne loop
Will become:
loop inx
beq ahead
jmp loop
ahead
> 4) Supposing I JSR to a JMP command. Will a RTS send the program
> back to the command after JSR, or will I screw up the program?
As long as you don't mess up the stack yourself, it'll work fine.
> 5) When the Atari powers up, are all the memory locations, flags,
> etc. reset automatically, or in some random state so the programmer
> needs to reset them himself?
It's best to reset it yourself - never assume anything.
> 6) Is there a way to produce text for a few words on the Atari, or do
> any words have to be drawn out by the graphics engine (is that the
> right term?)?
Everything has to be drawn scan line by scan line.
> images (if you have the memory, of course). But why bother? The game
> is better suited to graphics engines that can display the curiosity
> and wonder of the images. Even if the Atari had 1 gigabyte, it
> wouldn't work, if you will. So I move that we leave the Atari and its
> limitations alone, and deal with them.
But there are plenty of nifty things the Atari can do when it's
given a bit of extra RAM - just check out a bunch of the great
games that have been made in the bigger formats. Those games
never would have happened in only 4k - and don't try to tell me
that they're not classic 2600 games...
--
Robin Harbron macbeth@xxxxxxxxxxx
http://www.tbaytel.net/macbeth
--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [stella] Hello from Square One, Pete Holland | Thread | Re: [stella] Hello from Square One, John Harvey |
| [stella] Hello from Square One, Pete Holland | Date | Re: [stella] Hello from Square One, John Harvey |
| Month |