Re: Introduction



On Jul 25, 3:57 pm, electrokr...@xxxxxxxxxxxxx wrote:
On Jul 25, 5:23 pm, Rick Cortese <ricor...@xxxxxxxxxxxxx> wrote:





electrokr...@xxxxxxxxxxxxx wrote:
On Jul 25, 11:28 am, Rick Cortese <ricor...@xxxxxxxxxxxxx> wrote:

Russg wrote:
<snip>
Well, I'm really going to write the code on an 800xl and the port the
code to my pc, and then burn it to a chip using the willem
programmer.

I'll be porting the "assembled code" to my pc, (I'll be using Mac/65
assembler.)

This really helps. One more thing, are you using the cartridge or file
version that was distributed on the free version of SparatDOS?

You see if you are using the cart, it will occupy the $A000-$BFFF
address space you want your code to run from. This leaves you the option
of assembling to disk which means you would have to use a program like
Russ gave to strip the header.

I don't have a set up Atari set up at the moment: I tried to get my SDX
cart back from phantom but he doesn't respond to my emails or posts to
the newsgroup. Going from memory I used the byte directive and mem sav.
I also wrote all my code to be compatible with the Atari ASM/ED which
meant I didn't take advantage of the Mac special features. SOOOO what
should work is:

10  *=$A000; Start of cart address space
20 START; 16 bit label equal to $A000 in this case
30  RTS; OK, It doesn't do much Your LDA #0 stuff goes here.
40 INIT; Ditto except will be one byte more because of the RTS
50  RTS; Still not doing anything!
60  *=$BFFA; Move program counter to CART START address
70  .WORD START; will put the START $A000 at $BFFA-B
80  *=$BFFE; Same thing for INIT
90  .WORD INIT

You also have to set the cart flag for if you want to allow things like
DOS to boot. If you are writing a word processor for example, you would
want that to happen so you could save and load files.

Now from there what you want to do is boot w/o a cart installed, lower
ram top to under $A000, use binary load to load the file. Now do a
binary save of address space $A000-$BFFF and strip the first six bytes
like Russ showed and it should be a pure binary ready to burn.

You see if the burner were on an Atari, those extra steps would not be
necessary since when you loaded the file it would be in a contiguous
memory block with the header not taking up space. I think MAC allows you
to assemble with an offset so you can have the actual code at say $4000,
but I never used that feature.

Are there any examples of the autoboot header code on the web? I would
like to see how it looks in a real program.

Thanks again, I appreciate it.
Tony

Rick

Thanks. I am using the cart version of MAC/65. I will read through
this info, try to absorb and re-post.
Thanks again,
Tony- Hide quoted text -

- Show quoted text -

One thing you should keep in mind with MAC/65 is that it creates
heavily segmented output files. I believe there will be a file
segment every 80 bytes of actual data output and if I remember
correctly, the file segments will have full headers of their own. In
other words, within the file there will be:

FF
FF
00
30
7F
30
and then $7Fdata bytes here to be loaded from $3000 thru $307F and
then:
FF
FF
80
30
FF
30
again $7Fof data here for $3080 thru $30FF and then:
FF
FF
00
31
7F
31
again $7Fof data here for $3100 thru $317F and so until the end of
contigious code generation.

Short file headers also exist and are just as vaild, they only contain
the start and end code loading destination bytes without the double FF
"binary file type announcer" bytes.

Just something else to complicate things for you...

.



Relevant Pages

  • Re: Introduction
    ... Russ gave to strip the header. ... like Russ showed and it should be a pure binary ready to burn. ... segment every 80 bytes of actual data output and if I remember ...
    (comp.sys.atari.8bit)
  • comp.lang.asm.x86 - Frequently Asked Questions - general 2
    ... x86 Assembly Language FAQ - General Part 2 of 3 ... Accessing 4 Gigs of Memory in Real Mode ... Changing the value of a segment register results in that segment's entry ... This tutorial is designed specifically for the cheap assembler ...
    (comp.lang.asm.x86)
  • x86 Assembly Language FAQ - General Part II
    ... x86 Assembly Language FAQ - General Part 2 of 3 ... Accessing 4 Gigs of Memory in Real Mode ... Changing the value of a segment register results in that segment's entry ... This tutorial is designed specifically for the cheap assembler ...
    (comp.lang.asm.x86)
  • x86 Assembly Language FAQ - General Part II
    ... x86 Assembly Language FAQ - General Part 2 of 3 ... Accessing 4 Gigs of Memory in Real Mode ... Changing the value of a segment register results in that segment's entry ... This tutorial is designed specifically for the cheap assembler ...
    (alt.lang.asm)
  • Re: Id like to learn asm...
    ... While we're at it, remove all the system instructions, ... instructions" is a miserable way to learn assembly language ... IF segment selector is NULL ... assembler code. ...
    (alt.lang.asm)

Loading