Last update: Oktober 30th 2016

Editor/Assembler IV rel.4



Download the Editor/Assembler IV rel.3 binary files now
with inverted and NON-inverted image and 40/80 column editor EDIT v2.0 ...
EPROM images as zipped file (ZIP)

(The NON-Inverted image is compatible with ubergrom board, 512k redboard and the FlashRom99 board)

Release 2: Bug fixed for command E XXXX.

Release 3: New insights while creating Editor/Assembler V.
- Fixed : Breakpoint first selects correct page before return to module
- Changed: M command : M [G|V]AAAA [CCCC], CCCC is number of bytes instead of end address.
- Removed: G and V command, replaced by M GXXXX and M VXXXX resp.
- Changed: W command : Allow 0-15 and 0-9, A-F for register R0-R15


Editor/Assembler IV is a module for the TI99/4A home computer. The software this cartridge contains is the in TMS9900 assembler rewritten Editor and Assembler loader, Program loader and an implementation of my own written Linking Loader and a simple debugger. The editor and debugger are running completely in the module space (>6000 - >7FFF). The assembler is copied from EPROM to CPU RAM before it is started.

[Editor/Assembler]

The Editor

The Editor/Assembler IV module contains the EDIT1 version 2.0 editor with 2 new editor menu (fctn-9) functions:
  • 4o : Switch to 40 column mode.
  • 8o : Switch to 80 column mode.
The editor always starts in 40 column mode, typing fctn-9 and 8 will switch the editor quickly to 80 column mode.

... and 7 new editor function keys:
  • ctrl-7 : Back tab.
  • ctrl-w : Next word.
  • ctrl-s : Go to begin of line
  • ctrl-d : Go to end of line (cursor behind last word).
  • ctrl-e : Go to begin of the first line on screen.
  • ctrl-x : Go to begin of the last line on screen.
  • ctrl-z : Undo the last change of current line.
Undo (ctrl-z) only works when used before the enter key is hit and can't not undo erased (fctn-3) lines.

... and 2 new features:
  • Find : Last used find string is remembered.
  • Replace : Last used find and replace string is remembered.

[Editor 40/80]

The Debugger

The Editor/Assembler IV module contains a simple DEBUG program.
With the DEBUG program it is possible to inspect values in CPU RAM, VDP RAM and GROM and it is possible to change values in CPU RAM and VDP RAM, the user program registers workspace pointer, address counter and status register, the workspace registers, set and clear breakpoints and set and clear CRU bits.

[Debug]

When the debugger is started the load interrupt vector is set to an address location so that the DEBUG program can be re-enterred when a load interrupt occurs. When the debugger is ended the load interrupt vector is set equal to the reset vector.

The DEBUG program makes use of the same line input function as used by the Editor/Assembler IV module and therefore a debug command is only executed after the enter key is pressed and no complaints are made the moment a wrong character is entered ... the user is allowed to correct the entered debugger command until the enter key is hit.

Function keys:
  • fctn-1 : Delete character at cursor position.
  • fctn-2 : Insert characters at cursor position.
  • fctn-3 : Erase line.
  • fctn-s : Cursor one position to the left.
  • fctn-d : Cursor one position to the right.
  • fctn-e : Previous address (or like enter).
  • fctn-x : Next address (or like enter).
  • enter : Execute the entered command line.
  • fctn-9 : Escape.

Debugger commands:
  • B - Breakpoint set/clear.
  • C - CRU inspect/change.
  • E - Execute program.
  • M - CPU/GROM/VDP RAM address inspect/change.
  • R - CPU registers inspect/change.
  • W - Workspace register inspect/change.
  • Q - Quit debugger, return to E/A module.
All debugger commands must be entered in capitals.

B - Breakpoint set/clear

Syntax:
    Set a breakpoint:

       B<space><address><enter>

    Clear a breakpoint:

       B<space><address><enter>

    Show all breakpoints:

       B<enter>
Example:
    B A000<enter>     Set a breakpoint at address >A000

    B<enter>          Show all breakpoints

Definition:

Sets or clears a breakpoint at the given address. A maximum of 5 breakpoints can be set. When a breakpoint is encountered during execution, the workspace pointer, program counter and status are saved, the breakpoint is cleared and the debugger is entered.

C - CRU inspect/change

Syntax:
    C<space><base address><space><bit count><enter>
    [<DATA>]{<enter> or <fctn-x> or <fctn-e>}
Example:
    C 1100 1<enter>       Display CRU bit at address >1100
    1100=00   1<enter>    Change CRU bit at CRU address >1100 to 1


    C 1300 8<enter>       Display 8 CRU bits from consecutive CRU addresses >1300 - >1310
    1300=00   41<enter>   Write a byte to 8 consecutive CRU addresses >1300 - >1310

Definition:

Inspect, set or clear one or up to 16 CRU bits at the given address. If 1 through 15 bits are specified for the bit count then that many bits are returned as a hexadecimal number. If 0 is specified for the bit count then 16 bits are returned.

A CRU bit is only changed when a new value is entered and the <enter> key is pressed. If the <fctn-e> key or the <fctn-x> key is pressed the previous or next CRU address is displayed. The CRU address is decremented or incremented according to the bit count and each CRU bit takes up to bytes on the CRU. By pressing escape (fctn-9) control is returned to the debugger.

E - Execute program

Syntax:
    E[<space><address>]<enter>

Example:
    E<enter>          Execute the program with the parameters defined by
                      the R command.

    E A000<enter>     Execute the program with the parameters defined by
                      the R command starting at address >A000.

Definition:

Execute the program with the parameters defined by the R command, starting at the address provided. If the optional address is entered, execution begins at that address rather than at the program counter address specified by the R command.

M - CPU/GROM/VDP ROM/RAM address inspect/change

Syntax:
    Display a range of addresses from either CPU RAM/ROM, GROM or VDP RAM:

       M<space>[G|V]<start address><space><byte count><enter>


    Display and alter a single CPU/VDP address:

       M<space>[V]<address><enter>
       [<DATA>]{<enter> or <fctn-x> or <fctn-e>}

Example:
    M A000 40<enter>        Display CPU addresses >A000 to >A03F
    M G2000 80<enter>       Display GROM addresses >2000 to >207F
    M V1000 100<enter>      Display VDP addresses >1000 to >10FF

    M A000<enter>           Display CPU address >A000
    A000=1234  5678<enter>  Change the value of CPU address to >5678

Definition:

Displays the address(es) and the values of a range of given CPU/GROM/VDP addresses. Each line start with a CPU address followed by 3 words (CPU RAM/ROM) or 6 bytes (GROM or VDP RAM) of data and the ASCII representation of the data and a '.' character for unprintable characters. The display process can be halted by pressing escape (fcnt-9). Press any key to stop the list temporarily and press a key again to resume the list.
Display the address and value of a single CPU or VDP address. A value of the given CPU or VDP address can be changed by entering a new word (CPU) or byte (VDP) value followed by <enter>. If the <fctn-e> key or the <fctn-x> key is pressed the previous or next CPU/VDP address is displayed. By pressing escape (fctn-9) control is returned to the debugger.

R - CPU registers inspect/change

Syntax:
    R<return>
    [<DATA>]<return>
    [<DATA>]<return>
    [<DATA>]<return>
Example:
    R<return>                Shows the workspace pointer value and allows
                             you to change its value.

    R FE00<return>           Set the workspace pointer to E040 and
                             shows the workspace pointer value and allows
                             you to change its value.

    R FE00 A040<return>      Set the workspace pointer to E040 and
                             and the program counter to A040 and
                             shows the workspace pointer value and allows
                             you to change its value.

Definition:

Shows the workspace pointer (W), program counter (P) and status register (S) and allows changes to be made in their values. After a register is opened its value can be changed by entering a new value and pressing enter. After pressing enter the next register is displayed. If one or two values are supplied on the command line the first value is used as the workspace pointer and the second value is used as the program counter. By pressing <fctn-e> the previous register will be displayed and by pressing <fctn-x> the next register will be displayed. By pressing escape (fctn-9) control is returned to the debugger.

W - Workspace register inspect/change

Syntax:
    Display al registers:

       W<enter>


    Dislay a range of registers:

       W<space><register number><space><register number><enter>


    Change a registers value:

       W<space><register number><enter>
       [<DATA>]{<enter> or <fctn-x> or <fctn-e>}
Example:
    W A F<enter>      Display workspace registers R10 to R15
 or
    W 10 15<enter>    Display workspace registers R10 to R15

    W 3<enter>        Display workspace register R3
    R3=1234  ABCD<enter>    Change the value of R3 to >ABCD



Definition:

Displays all of the workspace registers or a range of workspace registers and their values.

Display the given workspace register and its value. A value of the given workspace register can be changed by entering a new (word) value followed by <enter>. If the <fctn-e> key or the <fctn-x> key is pressed the previous or next workspace register is displayed. By pressing escape (fctn- 9) control is returned to the debugger.

Workspace registers R10 to R15 can be entered as either A to F or 10 to 15 and are displayed as R10 to R15.

Q - Quit debugger, return to E/A module

Syntax:
    Q<enter>
Example:
    Q<enter>          Quit the debugger

Definition:

Quits the debugger and returns to the main menu of the Editor/Assembler module.

Features of the Editor/Assembler IV module

The Editor/Assembler IV module functioning is the same as the standard Editor/Assembler module, but the Editor/Assembler IV module has got a few extra features:

  • Editor and Assembler programs are in the EPROM, loading is fast.

  • Filename of file edited is remembered for saving.

  • Filetype of file edited is remembered for saving.

  • A command file can be used for the Assembler.

  • A command file can be used for the Loader, the Linking Loader program is build in.

Example

In the explanation below the following "hello world" assembler program will be used for demonstrating the features of the Editor/Assembler III module. This sample file is assumed to be saved as "DSK1.HELLO;S".

 

  0001         DEF  HELLO,END
  0002         REF  VMBW
  0003
  0004  HELLO  LI   R0,18*32+6
  0005         LI   R1,TXT
  0006         LI   R2,19
  0007         BLWP @VMBW
  0008         RT
  0009
  0010  TXT    TEXT '*** HELLO WORLD ***'
  0011
  0012  END    END
  0013
        *EOF (VERSION 2.0)
 
A hello world program saved as DSK1.HELLO;S

Using the editor

From the Editor/Assembler main menu select option "1 TO EDIT" to open the editor menu and next select option "1 TO LOAD" to load from disk an existing file first, for example "DSK1.HELLO;S" or select option "2 TO EDIT" for creating a new file. When finished editing press fctn-9 twice to return to the editor menu. When option "3 TO SAVE" is selected at this time then:
  • If option "1 TO LOAD" was used ...
    File type (VAR 80 FORMAT), location and name (DSK1.HELLO;S) was allready known and filled in for your convenience. Just press enter to save the previous loaded file.
  • If option "2 TO EDIT" was used ...
    Select "Y" to save the file in VAR 80 FORMAT and enter the file location and name yourself.

 

  * EDITOR *

  PRESS:
    1 TO LOAD
    2    EDIT
    3    SAVE
    4    PRINT
    5    PURGE

  VAR 80 FORMAT(Y/N)? Y

  FILE NAME?
  DSK1.HELLO;S
 
The Editor menu

Using the Assembler

From the Editor/Assembler main menu select option "2 TO ASSEMBLE" to go to the assembler menu and choose "Y" to load the Assembler. When leaving the assembler menu at this time the last loaded source file is still available in memory for editing.

 

  * ASSEMBLER *

  LOAD ASSEMBLER(Y/N)? Y
 
The Assembler menu, press Y to continue.


The assembler menu can still be used as normal:
  • Enter the location and name of a source file, for example "DSK1.HELLO;S".
  • Enter the location and name for an object file, for example "DSK1.HELLO;O".
  • Enter the location and name for a list file (if needed), for example "DSK1.HELLO;L".
  • Enter the assembler options: R for defining the registers R1..R15, L for creating a list file, S for generating a symbol table dump in te list file and C for creating a compressed object file.

 

  * ASSEMBLER *

  SOURCE FILE NAME?
  DSK1.HELLO;S

  OBJECT FILE NAME?
  DSK1.HELLO;O

  LIST FILE NAME?
  DSK1.HELLO;L

  OPTIONS?
  RLS
 
Filling in the assembler details.


In the process of creating a program with contineous editing, assembling and checking you have a lot of name entering to do. An new feature for the assembler is an assembler command file. The contents of this file is four lines containing the source file name, object file name, list file name and assembleroptions. If a list file is not needed the third line kan be left empty. Create an assembler command file, for example "DSK1.HELLO;A" with the editor and save it in "VAR 80 FORMAT".

 

  0001  DSK1.HELLO;S
  0002  DSK1.HELLO;O
  0003  DSK1.HELLO;L
  0004  RLS
 
A sample assembler command file saved as "DSK1.HELLO;A".


When in the assembler menu the source file name must be entered, simply preceed the file name with the '@' character and enter the file name of the assembler command file. Because of the '@' character the required file names and assembler options are read from the assembler command file instead.

 

  * ASSEMBLER *

  SOURCE FILE NAME?
  @DSK1.HELLO;A
 
Using the assembler command file "DSK1.HELLO;A".

Using the Loader

From the Editor/Assembler main menu select option "3 TO LOAD AND RUN" to go to the loader menu. The loader menu can still be used as normal:
  • Enter the location and name of an object file, for example "DSK1.HELLO;O".
  • Enter the location and name of another object file to load or press enter when no more object files are required.
  • Enter the name of the program to run, for example "HELLO", and press enter to start the program.

 

  * LOAD AND RUN *

  FILE NAME?
  DSK1.HELLO;O

  PROGRAM NAME?
  HELLO




     *** HELLO WORLD ***


  PRESS ENTER TO CONTINUE
 
Loading and running the "HELLO WORLD" sample program.


When creating a large assembler program consisting of many object files it is a lot of work everytime to enter al the file names to load. Make one mistake and you have to start all over again. A new feature of the Editor/Assembler III module is to make use of a command file which names all the object files to load, how to execute the program or even create a program file to use with the option "5 TO RUN PROGRAM FILE" of the module. See Linking Loader for all the details for a loader command file. With the loader command file bellow an Editor/Assembler option 5 program file named "HELLO" will be created. DSK1.HELLO contains the "HELLO WORLD" program starting at the label "HELLO" and ends at the label "END" (see sample source). DSK1.HELLP contains all the predefined functions like VSBW, VMBW etc which resides in memory between the locations >2000 and >2700.

 

  0001  .L DSK1.HELLO;O
  0002  .S DSK1.HELLO HELLO END >2000 >2700
 
A sample loader command file saved as "DSK1.HELLO;P" for creating a "HELLO WORLD" program file.


When in the loader menu an object file name must be entered, simply preceed the file name with the '@' character and enter the file name of the loader command file. Because of the '@' character the file names is interpreted as a loader command file and the commands are executed as described.

 

  * LOAD AND RUN *

  FILE NAME?
  @DSK1.HELLO;P






  .L DSK1.HELLO;O

 
Using the loader command file "DSK1.HELLO;P".


Now from the Editor/Assembler main menu select option "5 RUN PROGRAM FILE". Enter the program file's location and name, for example "DSK1.HELLO" and press enter.

 

  * RUN PROGRAM FILE *



  FILE NAME?
  DSK1.HELLO


  ONE MOMENT PLEASE...


     *** HELLO WORLD ***


  PRESS ENTER TO CONTINUE
 
Running the program file "DSK1.HELLO".






The hardware

Editor/Assembler IV must be programmed in a 27(c)256 EPROM (32Kb) and can be used on a TI99/4A Cart 16K v02a or a TI99/4A Cart 64K v03c as created by John Guidry, see www.hexbus.com. The original concept of cartridges like this can be found at www.mainbyte.com.

The download contains three files. All these files contain the complete module:


  • EAPROM_IV_INV.BIN at offset >0000 contains the complete module in INVERTED form which can be used for creating an EPROM for the module carts.

  • EAPROM_IV_NON.BIN at offset >0000 contains the complete module in NORMAL form which can be used for the ubergrom board, 512k redboard and the FlashRom99 board.

  • EAPROM_IV_B0.BIN at offset >0000 contains the complete module in NORMAL form which can be used for the TI994W emulator.

When using a TI99/4A Cart 64K v03c just place the programmed 27(c)256 EPROM (32Kb) in the socket and place jumpers JP1 and JP4.

When using a TI99/4A Cart 16K cart v02a also some soldering must be done.

[Ed/As IV PCB front]
[Ed/As IV PCB back]

The TI99/4A Cart 16K v02a can be configured for a 27(c)256 EPROM (32Kb) by soldering a wire from pin #5 (2D) of the 74LS379 to pin #8 (A2) of the EPROM socket and a wire from pin #6 (/2Q) of the 74LS379 to to pin #27 (/PGM) of the EPROM socket. Pin #27 of a 27(c)256 EPROM is A14. If you have a TI99/4A Cart 64K v03c place jumper JP1 and JP4 to be used wit ha 27(c)256 PEROM (32Kb).

Here below you find a simple schematic of the cart with a 27(c)256 EPROM wich fits smoothly in the socket for the 27(c)64/128 EPROM.



               74LS379 Quad D-type
              flip-flops with enable
                .____    ____.
                |    \__/    |
             /G | 1       16 | Vcc
             1Q | 2   2   15 |  4Q
            /1Q | 3   7   14 | /4Q
             1D | 4   L   13 |  4D
 (wire) A2<- 2D | 5   S   12 |  3D
 (wire)PGM<-/2Q | 6   3   11 | /3Q
             2Q | 7   7   10 |  3Q
            Gnd | 8   9    9 | Clk
                |____________|


        EPROM 27(c)64/128 socket on the                    EPROM 27(c)256
            TI99/4A Cart 16K v02a                       containing the E/A module
                                                      the Editor, Assembler and LL.
               ._____    _____.                            ._____    _____.
               |     \__/     |                            |     \__/     |
           Vpp |  1        28 | Vcc                    Vpp |  1        28 | Vcc
           A12 |  2        27 | /PGM->/2Q(wire)        A12 |  2        27 | A14
           A7  |  3        26 | NC - A13               A7  |  3        26 | A13
           A6  |  4   2    25 | A8                     A6  |  4   2    25 | A8
           A5  |  5   7    24 | A9                     A5  |  5   7    24 | A9
           A4  |  6  (C)   23 | A11                    A4  |  6  (C)   23 | A11
           A3  |  7   6    22 | /OE                    A3  |  7   2    22 | /OE
 (wire)2D<-A2  |  8   4    21 | A10                    A2  |  8   5    21 | A10
           A1  |  9   /    20 | /CE                    A1  |  9   6    20 | /CE
           A0  | 10   1    19 | D8                     A0  | 10        19 | D8
           D1  | 11   2    18 | D7                     D1  | 11        18 | D7
           D2  | 12   8    17 | D6                     D2  | 12        17 | D6
           D3  | 13        16 | D5                     D3  | 13        16 | D5
           GND | 14        15 | D4                     GND | 14        15 | D4
               |______________|                            |______________|









[EOF] Warning: goto_ti99geek.html could not be included.