User Tools

Site Tools


inline_basic_assembler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
inline_basic_assembler [2025/06/19 15:16] – [Example of Use] reggieinline_basic_assembler [2025/06/20 10:17] (current) – [Dragon Basic Inline Assembler] reggie
Line 1: Line 1:
 ====== Dragon Basic Inline Assembler ====== ====== Dragon Basic Inline Assembler ======
  
-This utility (GTAsm) is intended for small 6809 machine language utilities that enhance programs written mostly in Dragon Basic, for example a routine to scroll the graphics screen. The assembly source code is written in Basic comment statements.+This utility (GTAsm) is intended for developing small 6809 machine language routines that enhance programs written mostly in Dragon Basic, for example a routine to scroll the graphics screen. The assembly source code is written in Basic comment statements. This documentation assumes a good working knowledge of the 6809 and the Dragon 32.
  
 [[https://6809.uk/cas/GTAsm.cas|Download GTAsm Inline Basic Assembler]] (as a .cas file for the Dragon 32 - get the [[https://www.6809.org.uk/xroar/|XRoar Emulator]]) [[https://6809.uk/cas/GTAsm.cas|Download GTAsm Inline Basic Assembler]] (as a .cas file for the Dragon 32 - get the [[https://www.6809.org.uk/xroar/|XRoar Emulator]])
Line 38: Line 38:
 Or, since we used the DEFUSR1 directive: Or, since we used the DEFUSR1 directive:
  
-  A=USR1(0)+  A=USR01(0)
      
 EXEC remembers its last address, so as long as we don't use it (or DEFUSR0) for something else we can type plain EXEC to re-run the assembler.   EXEC remembers its last address, so as long as we don't use it (or DEFUSR0) for something else we can type plain EXEC to re-run the assembler.  
Line 51: Line 51:
  
   TFR (use TRF instead - this is a simple error)   TFR (use TRF instead - this is a simple error)
 +  
 +=== Addressing ===
 +
 +Use standard brackets rather than square to specify indirect addressing. Use the "<" and ">" symbols to force 8 and 16 bit offsets respectively.
 +
 +  JSR (,X++)        call subroutine at address stored at X, then point to the next address in the list
 +  LDA (CURSPOS)     load A from the address stored at CURSPOS
 +  LDB >$0034        load B from $0034 using extended mode rather than direct
 +  CLR <LINELEN,   clear the byte at Y+LINELEN, forcing 8 bit offset mode (doesn't work!)
      
 === Directives === === Directives ===
Line 80: Line 89:
 A comment can be added after any valid statement without preceding it with any special character. A comment can be added after any valid statement without preceding it with any special character.
  
-When assembly fails there are a number of useful error messages. Beware that some errors can be missed; sometimes you can write garbage amd have it silently interpreted as a comment.+When assembly fails there are a number of useful error messages. Beware that some errors can be missed; sometimes you can write garbage and have it silently interpreted as a comment.
  
 Keep lines to a reasonable length to avoid a bug in Basic. Entering a line of the maximum length then trying to edit it can cause a system crash. This appears to be due to the single-quote being stored as a two-byte token. Keep lines to a reasonable length to avoid a bug in Basic. Entering a line of the maximum length then trying to edit it can cause a system crash. This appears to be due to the single-quote being stored as a two-byte token.
Line 143: Line 152:
              
  
-==== About ====+==== Credits ====
  
 GTAsm was hand written in machine code by Gwilym Thomas and is copyright © 1985. It probably hasn't been debugged since then so don't expect it to be free of errors. But do feel free to have fun with it developing 6809 assembly language programs for your Dragon 32. GTAsm was hand written in machine code by Gwilym Thomas and is copyright © 1985. It probably hasn't been debugged since then so don't expect it to be free of errors. But do feel free to have fun with it developing 6809 assembly language programs for your Dragon 32.
  
  
inline_basic_assembler.1750346185.txt.gz · Last modified: 2025/06/19 15:16 by reggie

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki