-
- Z8-Basic  Assembly language program development using the Amiga.
-
- Bob Bush 22-Apr-1989
-

Amiga.doc
---------
   I happen to use an Amiga, running a 'terminal' program, which provides
   access to programming my z8-Basic controller. The terminal program also 
   allows me to send and receive programs to/from the z8-basic controller
   via an ascii file capture & send mode. This provides a convienient method
   of z8-basic program storage and retrieval. While this method works well for
   the stroage/retrieval of Basic programs, no method exists for the transfer
   of assembly language programs.
  
   When I developed the z8 cross-assembler I wanted a quick and easy method of
   loading z8 assembly programs using somewhat the same methods I had become
   comfortable with for Basic programs. The 'z8.hex' file format (output from
   the assembler) allows for this capability.

   If you are using a 'terminal' program with the same capabilities I have
   mentioned above, you now have a means for transferring z8 assembly
   programs. The following documentation will explain how such a transfer
   can be accomplished. 


Using the z8 format hex file
----------------------------
   When you assemble a program and use the '-z' option, a special .hex output
   file is created in what I call 'z8' format. This file has the capability to
   be loaded directly into z8 program memory provided the user has entered
   and executed the 'download.bas' program on their z8-basic controller. The
   following steps outline a procedure which works well on my setup.

   1) Using your favorite 'terminal' emulator, enter the following program
      into your z8-basic controller. This is a very short program (5 lines)
      so it shoudn't take long at all..

      10 rem z8 program loader
      20 "Ready for download:"
      30 input b
      40 input c:if c>255 b=c:goto 40
      50 @b=c:b=b+1:goto 40

   2) Execute the program. You should see 'Ready for download' and  a '?'
      prompt appear. This means that the program is ready for an assembly
      language download.

   3) Back to your terminal emulator. Using the same method you use for
      transferring Basic progams to the z8-basic controller, send the .hex
      file created by the assembler (This happens to be the 'Ascii file 
      Send' mode on my terminal emulator). You should see a listing of Hex
      code appear on the terminal as the program is transferred. The download
      is complete when the Basic program stops with an '!427' error (this is
      intentional).

   4) If everything works as advertised, the assembly code should have been
      loaded in z8 memory at the location specified by the 'org' statement
      in the assembly source file. You can now test your program by entering
      a GO @%xxxx where 'xxxx' is the start address of your program (in hex).
      That's all there is to it...

Possible problems:
------------------
   Generally, if you have no problems in transferring Basic programs with
   your terminal emulator software, you should not experience any problems
   transferring assembly code files. Most problems encountered with the
   transfer of programs stems from the fact that z8 basic requires some time
   at the end of each line to digest whatever was sent over the Rs232 link.
   If your  terminal emulator allows for a 'line delay' (this is a settable
   delay that occurs after each line is sent from the emulator) try to 
   increase the 'line delay' parameter. This should solve the problem.

   I have tested the shareware terminal emulator 'Access!' and it seems to
   work fine at 9600 -or- 19200 baud provided you set the 'line delay' parm
   for a short delay between lines.

An integrated solution?
-----------------------
   If there is sufficient interest in using the Amiga as a z8 development
   tool, I have considered the prospect of developing an integrated
   environment which would allow for the development,transfer, and debugging
   of z8 assembly (and Basic) language programs. If you are interested in
   such a tool please send your comments and or suggestions via Compuserve
   email to:
   
    Bob Bush
    73105,1332 (compuserve id)

********* end of file **********
