home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 405.lha / Z8_CrossAsm / amiga.doc < prev    next >
Text File  |  1990-06-05  |  4KB  |  92 lines

  1. -
  2. - Z8-Basic  Assembly language program development using the Amiga.
  3. -
  4. - Bob Bush 22-Apr-1989
  5. -
  6.  
  7. Amiga.doc
  8. ---------
  9.    I happen to use an Amiga, running a 'terminal' program, which provides
  10.    access to programming my z8-Basic controller. The terminal program also 
  11.    allows me to send and receive programs to/from the z8-basic controller
  12.    via an ascii file capture & send mode. This provides a convienient method
  13.    of z8-basic program storage and retrieval. While this method works well for
  14.    the stroage/retrieval of Basic programs, no method exists for the transfer
  15.    of assembly language programs.
  16.   
  17.    When I developed the z8 cross-assembler I wanted a quick and easy method of
  18.    loading z8 assembly programs using somewhat the same methods I had become
  19.    comfortable with for Basic programs. The 'z8.hex' file format (output from
  20.    the assembler) allows for this capability.
  21.  
  22.    If you are using a 'terminal' program with the same capabilities I have
  23.    mentioned above, you now have a means for transferring z8 assembly
  24.    programs. The following documentation will explain how such a transfer
  25.    can be accomplished. 
  26.  
  27.  
  28. Using the z8 format hex file
  29. ----------------------------
  30.    When you assemble a program and use the '-z' option, a special .hex output
  31.    file is created in what I call 'z8' format. This file has the capability to
  32.    be loaded directly into z8 program memory provided the user has entered
  33.    and executed the 'download.bas' program on their z8-basic controller. The
  34.    following steps outline a procedure which works well on my setup.
  35.  
  36.    1) Using your favorite 'terminal' emulator, enter the following program
  37.       into your z8-basic controller. This is a very short program (5 lines)
  38.       so it shoudn't take long at all..
  39.  
  40.       10 rem z8 program loader
  41.       20 "Ready for download:"
  42.       30 input b
  43.       40 input c:if c>255 b=c:goto 40
  44.       50 @b=c:b=b+1:goto 40
  45.  
  46.    2) Execute the program. You should see 'Ready for download' and  a '?'
  47.       prompt appear. This means that the program is ready for an assembly
  48.       language download.
  49.  
  50.    3) Back to your terminal emulator. Using the same method you use for
  51.       transferring Basic progams to the z8-basic controller, send the .hex
  52.       file created by the assembler (This happens to be the 'Ascii file 
  53.       Send' mode on my terminal emulator). You should see a listing of Hex
  54.       code appear on the terminal as the program is transferred. The download
  55.       is complete when the Basic program stops with an '!427' error (this is
  56.       intentional).
  57.  
  58.    4) If everything works as advertised, the assembly code should have been
  59.       loaded in z8 memory at the location specified by the 'org' statement
  60.       in the assembly source file. You can now test your program by entering
  61.       a GO @%xxxx where 'xxxx' is the start address of your program (in hex).
  62.       That's all there is to it...
  63.  
  64. Possible problems:
  65. ------------------
  66.    Generally, if you have no problems in transferring Basic programs with
  67.    your terminal emulator software, you should not experience any problems
  68.    transferring assembly code files. Most problems encountered with the
  69.    transfer of programs stems from the fact that z8 basic requires some time
  70.    at the end of each line to digest whatever was sent over the Rs232 link.
  71.    If your  terminal emulator allows for a 'line delay' (this is a settable
  72.    delay that occurs after each line is sent from the emulator) try to 
  73.    increase the 'line delay' parameter. This should solve the problem.
  74.  
  75.    I have tested the shareware terminal emulator 'Access!' and it seems to
  76.    work fine at 9600 -or- 19200 baud provided you set the 'line delay' parm
  77.    for a short delay between lines.
  78.  
  79. An integrated solution?
  80. -----------------------
  81.    If there is sufficient interest in using the Amiga as a z8 development
  82.    tool, I have considered the prospect of developing an integrated
  83.    environment which would allow for the development,transfer, and debugging
  84.    of z8 assembly (and Basic) language programs. If you are interested in
  85.    such a tool please send your comments and or suggestions via Compuserve
  86.    email to:
  87.    
  88.     Bob Bush
  89.     73105,1332 (compuserve id)
  90.  
  91. ********* end of file **********
  92.