Subject: Lottrup assembly book

From: Owen Brand <[email-masked]>
Date: Fri, 20 Nov 2009 21:33:22 -0500

This book is great... It applies most directly to the MiniMem module  
and line by line assembler... However, my minimem cart is out of  
battery.  I might have another minimem cart in my secondary cart box  
(duplicates) but I am thinking all the principles apply to the EA cart  
as well...  Are there many differences in the syntax, etc that I  
should be concerned about if applying the examples in this book to the  
EA environment? For one, I have noticed that labels in EA can be 4  
characters long, but that in minimem, they can only be 2...

Owen Brand
**Oprysoft**
Opry99er.com

---

From: Marc Hull <[email-masked]>
Date: Fri, 20 Nov 2009 18:50:50 -0800 (PST)

The ideas apply directly.  The syntax is a bit more flexible with the E/A.  The major areas you should try and learn at first are.  Using the E/A package (read the big E/A binder.)  the console utilities (so you can write some shit to the screen so you don't get too bored) and addressing modes (sounds intimidating and for a while it is but...there are relationships to XB that will help you put everything in context....  Read and ask ;-)

BTW....   1 more sub circuit to install and I may have the first SID-Blaster 99 prototype done (if it works that is...)

--- On Fri, 11/20/09, Owen Brand <[email-masked]> wrote:

From: Owen Brand <[email-masked]>
Subject: [TI994A] Lottrup assembly book
To: [email-masked]
Date: Friday, November 20, 2009, 8:33 PM

  

Owen Brand

**Oprysoft**

Opry99er.com

---

From: Marc Hull <[email-masked]>
Date: Fri, 20 Nov 2009 18:55:24 -0800 (PST)

SORRY... thought I was replying directly to Owen....

--- On Fri, 11/20/09, Marc Hull <[email-masked]> wrote:

From: Marc Hull <[email-masked]>
Subject: Re: [TI994A] Lottrup assembly book
To: [email-masked]
Date: Friday, November 20, 2009, 8:50 PM

  

--- On Fri, 11/20/09, Owen Brand <owenbrand@opry99er. com> wrote:

From: Owen Brand <owenbrand@opry99er. com>
Subject: [TI994A]
 Lottrup assembly book
To: TI994A@yahoogroups. com
Date: Friday, November 20, 2009, 8:33 PM

    

Owen Brand

**Oprysoft**

Opry99er.com

---

From: "Matthew" <[email-masked]>
Date: Sat, 21 Nov 2009 03:05:35 -0000

> characters long, but that in minimem, they can only be 2...

Like Mark accidentally said... ;-)  The minimem was nice, I guess, when it came out, but you definitely want to use the E/A package.  Labels can be 6 in the E/A by the way.

You do need to understand the addressing modes, but that will come in time.  The video "utilities" built into the console are okay, but I recommend that as soon as you understand what it going on well enough that you either write your own VDP routines or use one that others have provided (I have made mine available, as have others).  The built-in video routines are too sloppy IMHO and were written so save space.  For a video game you need to focus on speed.

Matthew

---

From: Owen Brand <[email-masked]>
Date: Fri, 20 Nov 2009 22:12:47 -0500

Well, also this book deals with 7 directives... I understand there  
15-18 more??  It talks alot about formatting everything to be  
applicable to the line by line assembler... I know this stuff applies  
to EA, but it's a bit confusing on the typing in side... I suppose if  
my AORG is the same as the examples in the book, everything should  
line up properly...  Then again, I still have no idea what the he'll  
I'm talking about... :) But I'm learning!

Owen Brand
**Oprysoft**
Opry99er.com

On Nov 20, 2009, at 10:05 PM, "Matthew" <[email-masked]> wrote:

> Like Mark accidentally said... ;-) The minimem was nice, I guess,  
> when it came out, but you definitely want to use the E/A package.  
> Labels can be 6 in the E/A by the way.
>
> You do need to understand the addressing modes, but that will come  
> in time. The video "utilities" built into the console are okay, but  
> I recommend that as soon as you understand what it going on well  
> enough that you either write your own VDP routines or use one that  
> others have provided (I have made mine available, as have others).  
> The built-in video routines are too sloppy IMHO and were written so  
> save space. For a video game you need to focus on speed.
>
> Matthew
>
>

---

From: Owen Brand <[email-masked]>
Date: Fri, 20 Nov 2009 22:59:28 -0500

So looking through the first two chapters, I will not have to enter  
each line one at a time... I can essentially type in the entire source  
code, and then assemble it, correct?  Will it still show resolved and  
unresolved references, or is that a line by like thing?

Owen Brand
**Oprysoft**
Opry99er.com

---

From: ti99_forever <[email-masked]>
Date: Fri, 20 Nov 2009 20:44:41 -0800 (PST)

Enter the whole thing. Not as educational as line-by-line...Undefined/Unresolved references are always an issue.

From: Owen Brand <[email-masked]>
Subject: Re: [TI994A] Re: Lottrup assembly book
To: "[email-masked]" <[email-masked]>
Date: Friday, November 20, 2009, 10:59 PM

So looking through the first two chapters, I will not have to enter each line one at a time... I can essentially type in the entire source code, and then assemble it, correct?  Will it still show resolved and unresolved references, or is that a line by like thing? 

Owen Brand**Oprysoft**Opry99er.com
On Nov 20, 2009, at 10:05 PM, "Matthew" <[email-masked]> wrote:

    

      --- In TI994A@yahoogroups. com, Owen Brand <owenbrand@. ..> wrote:

Matthew

---

From: "Matthew" <[email-masked]>
Date: Sat, 21 Nov 2009 04:45:58 -0000

> unresolved references, or is that a line by like thing?

With the E/A you write you program code in the editor, save it as a text file essentially, then assemble it with the assembler.  The assembler creates a relocatable binary object file that you use with option 3 (i.e. an EA3 program) to load and run your program.

The minimem is basically assembling each line as you type it in.  Like I mentioned before, the minimem was nice when that's all you could get, but since you can use the E/A for free in Clasic99 and Win994a, then I highly recommend you do so.  You can also get a brand new still in the box with shrink wrap E/A package, I see them on Ebay all the time (I bought one too).

The AORG instruction you are using with the minimem is not necessarily required when using the E/A and assembling relocatable code.  What the AORG "directive" (it is not an assembly language instruction) does is tell the minimem or assembler where in memory your program will go.  The directive stands for Absolute Origin and comes in handy when you need code at a specific address in the computer's memory, like when we were doing the VDP tests an needed the test code located in the scratch pad RAM at >8320.

When you use the E/A, the general practice is to not use AORG and just let the assembler generate relocatable code.  What that means is that the program can be loaded into memory pretty much at any address and the loader will decide where to put the program when it is being loaded.  This way the loader can load more than 1 program, or many parts of a program that were assembled separately (for larger programs it is necessary to break them into chunks).  For relocatable programs, the loader will "fix up" the memory references within the binary object file during loading.

I'll post you a skeleton E/A program that you can use with the Lottrup book.

Also, you can type your assembly programs using your favorite text editor on your PC and assemble them with the Asm99 assembler that comes with the Win994a simulator, or copy and paste you assembly code into the E/A editor with Tursi's Classic99 emulator.  Either way, using a PC based text editor is much easier IMHO and the way I code these days.

Matthew

---

From: "Matthew" <[email-masked]>
Date: Sat, 21 Nov 2009 04:55:16 -0000

> unresolved references, or is that a line by like thing?

Here you go, the code sample I posted on the AtariAge forum will give you a skeleton program that you can use as a starting point:

http://www.atariage.com/forums/topic/153681-xb-and-assembly-the-connection/page__view__findpost__p__1882170

Just put your own code before the LIMI 2 instruction:

.
. your code here
.

       LIMI 2
LOOP1  JMP  LOOP1

That program skeleton does not rely on the console VDP routines and will be a little faster.  However, those VDP routines do not use BLWP and Lottrup's examples might expect your own workspace registers to not be affected by those routines (only R0, R1, R2, and R11 would be affected anyway).

Matthew

---

From: Owen Brand <[email-masked]>
Date: Sat, 21 Nov 2009 00:44:32 -0500

Alright... Sounds good man...  Last question of the night... Am I to  
understand that the format is the same... One space between the  
fields, label, opcode, operand, and comment---and an "*" for all full  
line comments?

Owen Brand
**Oprysoft**
Opry99er.com

On Nov 20, 2009, at 11:55 PM, "Matthew" <[email-masked]> wrote:

> Here you go, the code sample I posted on the AtariAge forum will  
> give you a skeleton program that you can use as a starting point:
>
> That program skeleton does not rely on the console VDP routines and  
> will be a little faster. However, those VDP routines do not use BLWP  
> and Lottrup's examples might expect your own workspace registers to  
> not be affected by those routines (only R0, R1, R2, and R11 would be  
> affected anyway).
>
> Matthew
>
>

---

From: Owen Brand <[email-masked]>
Date: Sat, 21 Nov 2009 00:50:54 -0500

The comment field is separated by about 5 spaces and a semicolon in  
the examples in Atariage, is why I ask.  :)

Owen Brand
**Oprysoft**
Opry99er.com

---

From: "Matthew" <[email-masked]>
Date: Sat, 21 Nov 2009 06:18:57 -0000

> the examples in Atariage, is why I ask.  :)

I assume you have the E/A manual?  If not there is a PDF version on WHTECH or the bittorrent.  This is where that monster of a book will come in handy, i.e. as a reference.  Look on page 46 of the E/A manual and you will see:

The syntax (required form) for source statements other than comment statements is defined as follows.

[<label>] b op-code b [<operand>] [,<operand>] ... b [<comment>]

It goes on the explain the limits of each field in detail.  Also, on page 30 it explains:

The Editor has default tabs at columns 1, 8, 13, 26, 31, 46, 60, and 80.

Basically, labels can be up to 6 characters and must start with a letter.  Once you have an opcode (or assembly directive) and the proper operands and follow them with a space, the rest of the line is ignored (you can use it as a comment).  If you want a comment on a line by itself, i.e. no opcode on the line, then the first character of the line must be an *

I think the semi-colons used in some code you see are a feature of the Asm99 assembler only, not the original E/A assembler.  Also, the E/A assembler only recognizes labels, opcodes, and operands entered in upper case.  The Asm99 will take either upper or lower case.  Personally I like to stick with being compatible with the original E/A assembler so I can test my code on the real hardware if necessary.

Matthew

---

From: Owen Brand <[email-masked]>
Date: Sat, 21 Nov 2009 01:56:41 -0500

i do have the EA binder.  I actually have 3 binders... 2 carts... I'm  
just trying to take what I've
Learned from this book as compared to the Molesworth book, the  
Atariage examples, and the EA book...  Many different things, but  
they're all starting to come together!!!  :)

Owen Brand
**Oprysoft**
Opry99er.com

On Nov 21, 2009, at 1:18 AM, "Matthew" <[email-masked]> wrote:

> I assume you have the E/A manual? If not there is a PDF version on  
> WHTECH or the bittorrent. This is where that monster of a book will  
> come in handy, i.e. as a reference. Look on page 46 of the E/A  
> manual and you will see:
>
> Basically, labels can be up to 6 characters and must start with a  
> letter. Once you have an opcode (or assembly directive) and the  
> proper operands and follow them with a space, the rest of the line  
> is ignored (you can use it as a comment). If you want a comment on a  
> line by itself, i.e. no opcode on the line, then the first character  
> of the line must be an *
>
> I think the semi-colons used in some code you see are a feature of  
> the Asm99 assembler only, not the original E/A assembler. Also, the  
> E/A assembler only recognizes labels, opcodes, and operands entered  
> in upper case. The Asm99 will take either upper or lower case.  
> Personally I like to stick with being compatible with the original E/ 
> A assembler so I can test my code on the real hardware if necessary.
>
> Matthew
>
>

---

From: tursi <[email-masked]>
Date: Sat, 21 Nov 2009 12:51:10 -0800 (PST)

> with the Win994a simulator, or copy and paste you assembly code into the 
> E/A editor with Tursi's Classic99 emulator.

That's the slow way, Classic99 can read text files - that includes the 
source as well as the object code. ;)

With the CLIP device in the new version, copy and paste can be much 
faster, too, copy to the clipboard, then tell E/A to load from "CLIP." - 
much quicker than running it through the keyboard system. (You're stuck in 
BASIC, though, you have to run through the keyboard here.)  I didn't think 
it would be that useful, but I already use it all the time (printing to 
CLIP, from both E/A and BASIC, is also handy ;) ).

---

From: "Matthew" <[email-masked]>
Date: Sat, 21 Nov 2009 22:26:45 -0000

> CLIP, from both E/A and BASIC, is also handy ;) ).

So I can just save my assembly source as a CRLF (DOS) or LF (Unix) format text file in Classic99's DSK2 directory, then reference that file as the Source File for the E/A assembler?

Matthew

---

From: tursi <[email-masked]>
Date: Sat, 21 Nov 2009 14:31:19 -0800 (PST)

> So I can just save my assembly source as a CRLF (DOS) or LF (Unix) 
> format text file in Classic99's DSK2 directory, then reference that file 
> as the Source File for the E/A assembler?

Yep. Either line ending should work, if they don't, let me know.

---

From: "Matthew" <[email-masked]>
Date: Sun, 22 Nov 2009 04:01:19 -0000

> Yep. Either line ending should work, if they don't, let me know.

Now how cool is that!!!  I just tested and yes, it does work with both EOL formats!  Do you have this stuff documented somewhere other than your brain or the source code? :-)  That just made my code, compile, test, debug process a lot easier and faster!  I don't need Asm99 any more, which is good because is does not support the BES directive anyway. ;-)

The only thing that bugs me is that I cannot have a file name extension like .asm or whatever.  I never really knew the TI's rules for file naming, but I'm guessing a period is illegal in a file name?

Matthew