Sample machine-language routine

Routine list

BROWSE IS A COMMAND-LINE PROGRAM TO ACCESS THE SUBROUTINES. THEY
ARE CALLED BY THE FIRST KEY AFTER THE PROMPTS; NO CR IS NEEDED.
MANY FUNCTIONS NEED THE P(PARAMETER), B(BEGIN ADDRESS),E(END
ADDRESS) OR T(TO ADDRESS) SET UP FIRST BY KEYING P,B,E or T AND
THEN THE HEX CODE AFTER THE PROMPT. THE M VALUE IS THE CONTENTS
OFTHE T ADDRESS LOCATION. THE FOLLOWING COMMANDS ARE
IMPLEMENTED: 

# COMPARE Displays the differences between the programs
between Band E and the same lengthstarting
at T. P=17 on Console,or 03/12 on Host. 

    @     Run the program at B000 

*     LD-HOST Loads a .F8D format program from host at P baud
into memory at B, which must agree with S=XXXX.
P values are 03(300),12(1200) or 96(9600). 

    ~     Run the program at 600 

    +     INC-ADDR Increment B to address following next' lA' 

    -     DEC-ADDR Decrement B to address following previous 'lA' 

    1     19200     Run from Console at 19200 baud 

    2     1200     Run from Host at 1200 baud 

    3     300     Run from Host at 300 baud 

    4     SAY-TIME Says the 24-hour time. 

    7         Run the program at 700 

    S         Run the program at 8050 

    9     9600     Run from Console at 9600 baud 

    <     lKRAM     Enables lK RAM for writing 

    =     lKRAM     Shows state of lK RAM 

    )     lKRAM     Disables lK RAM for writing 

I     HEX-DUMP Show block of memory in hex starting at B 

    A     STO-STR Set P=42 and clear memory first. Input to memory 

at B in ASCII until a AZC' 1A') is keyed. E is set
to address after the' lA'. 

    B     SET-B     Last 4 hex digits form B address 

    C     COpy     Copies up to 4K from B to E, inclusive, to T 

unless T ) FF00. T is. set to next free address. 

    D     BACKUP     Dumps memory from B to E, inclusive in hex to Host 

at P baud in .FSD format. 

    E     SET-E     Last 4 digits form E address 

    F     FILL-MEM Fills memory from B to E inclusive with zeroes. 

The location at B gets a 'lA' code. 

    G     EXEC-DC Runs the program pointed to by th~ B address 

    H     HEX-DEC Converts input in hex to decimal for each '=' 

Goes to address 0 for a CR. 

    I     PATCH     Search and replace in range B to E. P=00 for hex 

or P=50 for text. Key S for search string. For hex
separate bytes with spaces. End search string with
a comma. Key R for replace string. A CR starts the
search. For each match key R to replace, or CR to
go on to next match without replacement.S bytes
max string length. 

    K     TABLE     Displays B to E in various formats depending on P 

In particular,P=00 for hex and P=40 for text. 

    L     EXT-LOAD Loads .FSD format files into memory at B from 

host. This command must ,be executed from the Host.
B must agree with S=XXXX 

    M     SET-M     Inspect and change memory at T. Put in hex to 


change. Key CR for next location, Up-arrow for the
previous location. Key. to return. 

    N     DRAWCHAR Reads ZRT-80 character generator EPROMS. Shows 15 

characters enlarged,starting at B. Commands ·are CR
for another 15,'-' for previous 16,'.' to return. 

    P     SET-PARM Last 2 hex makes P value 

    Q     DISTRIB Displays distribution of values between Band E-1 

If p=00 hex,P=01 unsigned decimal,P=02 signed
decimal,else in characters and hex for non-print
Location 4C2C should be '80' 

    R     RDSOURCE Loads .F8S files into memory at B from Host at P 

baud (03=300, 12=1200 or 95=9500). B does not have
to equal the @XXXX. XXXX goes into T and actual
end address goes into E. 

    S     SOURCE     Dumps from B to E inclusive to Host in .F8S format 

at P baud.P=03 for 300,P=12 for 1200,P=95 for 9500
or P=17 to display on Console. 

    T     SET-T     Last 4 hex becomes T address 

    U     LD-INTEL Loads memory at file address plus B address from 

Host at P baud.P=03(300),12(1200) or 95(9500).
The file is in Intel hex format. Errors are put
into memory at T to avoid loading host. 

    W     BITCOUNT Adds bit values f1"~om B tCI E irlclusive 1"~ega1"~dless 

of bit position in byte. P=00 counts 1 bits,P=0l
c':ltmts 0 bits. 

    X     DISP-STR Set P=A0 to display text fromB address tQ next 

'lA'. Set P=18 for Console to/from Modem. P=19
stores modem data also at B. Many other valid P
values. Return with a AZ. 

    Z     EPROM-WR Dumps memory from B to E into EPROM, starting at 

EPROM location T. For P=00 copying is forwards,
or P=FF to complement addresses to the EPROM. 

    [     EPROM-CP Loads memory at T from addresses B to E-1 in EPROM 

in burn socket. P=00 for forward copy,P=FF to
complement EPROM addresses. (Not made here). 

    A     STOINTEL Dumps from B to E at P(03,12) baud in Intel hex 

format, addresses starting at 100. 

    _     PORT     Puts P into port 1, then the most significant byte 

of B into port 4, puts port 0 into the LSB of B 

@3500 

0000 128 4D 201RESET
0003 128 40 301INIT 

-- DISPLAY STATUS LINE -- 

0005 AI28 4D 32ICR-LF 

0009 12A FF A81P address 

    000C 171 55 11 byte      

000E I 20 50 57 I ' P' 

0011 128 4B CCIX=:; <ISAR=20,QL=<DC})
0014 103 5C 35IR20:=QL;2 bytes 

0017 120 42 57 1 ' B' 

001A 128 4B CCIX= 

001D 102 5A 03IH:=Q 

    0020 15B     1 

0021 120 45 57 I ' E'
0024 128 4B CCIX= 


12112127 12121 54 571'T'
1211212R 128 4B CCiX= 

(211212D \ I 71 55 I21F I 1 byt e ; DC : =Q
1211213121 12121 4D 571'M' 

e~33 128 4B CCIX=;writes out content of T
12112135 !28 31 RI21ISPRCE 

12112139 12121 3E 571')' 

1211213C 128 4F 9121IDISP-C 

1211213F 128 31 RI21ISPRCE 

-- GET COMMRND -- 

12112142 12121 5R B41Reset UART Data Received flag to avoid old
12112145 17121 B4 I command 

12112147 128 37 B9IKBD-CMD 

1211214R 145 25 2121115 command} 'space' ? 

    1211214D !82 17     lif not, carry is set, go to B 

    121 1214 F 125 5121     115 command} 'l' ? 

    12112151 192 13     lif so carry is not set, go to B 

12112153 !2R 2F Cl21lBottom of Jump table, less 4121 hex 

12112155 18E 8E 151Add command to DC twice, points to Jump index
12112159 11214 15 1215IK:=(2FCI21+2*command};next location 

12105C 1121121 25 BFIIs KU } 'BF' ? 

    005F 192 1215     IIf so ,go to B CNo programs up there) 

    12112151 11121 I21C     IDC:=HCB address saved here) ;Call subroutine 

    12112153 19121 R2     IReturn to R 

-- ILLEGAL CONDITIONS -- 

    12112155 BI7121 57     I 

12112157 128 32 78IPROMPTC"INVALID COMMAND ") 

    12105R 19121 9B     IGO TO A 

'""355B 

1200.F8S

19200.F8S

300.F8S

9600.F8S

BACKUP.F8S

BITCOUNT.F8S

BYTE-CNT.F8S

CLR-SCRN.F8S

COMM.F8S

COMPARE.F8S

COPY.F8S

CR-LF.F8S

CUR-VT52.F8S

DC-LIMIT.F8S

DEC-ADDR.F8S

DELAY.F8S

DISP-C.F8S

DISP-DCS.F8S

DISP-DEC.F8S

DISP-ESC.F8S

DISP-FP.F8S

DISP-HEX.F8S

DISP-STR.F8S

DISP-SUM.F8S

DISPTIME.F8S

DISTRIB.F8S

DIVIDE.F8S

DRAW.F8S

DRAWCHAR.F8S

ELLIPSES.F8S

EPROM-CP.F8S

EPROMLOC.F8S

EPROMWR.F8S

ERASE-LN.F8S

EXEC-DC.F8S

EXT-INT.F8S

EXT-LOAD.F8S

FILL-MEM.F8S

GET-FLAG.F8S

GET-TIME.F8S

GO-HOST.F8S

GO-TERM.F8S

HEX-DEC.F8S

HEX-DUMP.F8S

INC-ADDR.F8S

INITIATE.F8S

INT-JUMP.F8S

IR-READ.F8S

KBD-OLD.F8S

KEYBOARD.F8S

LD-HOST.F8S

LD-INTEL.F8S

LOOKUP-2.F8S

LOOKUP.F8S

MIRROR.F8S

MULT-ADD.F8S

MULTIPLY.F8S

N-SPACE.F8S

NEGATE.F8S

PAGE-DC.F8S

PATCH.F8S

POP.F8S

PROMPT.F8S

PRT-PMPT.F8S

PUSH.F8S

RANDOM.F8S

RDSOURCE.F8S

REC-BYTE.F8S

REC-HEX.F8S

RESET.F8S

RESTORE.F8S

RHEX.F8S

ROMCHECK.F8S

SAVE-REG.F8S

SAY-BCD.F8S

SAY-TIME.F8S

SAY-WORD.F8S

SET-ADDR.F8S

SET-B.F8S

SET-BYTE.F8S

SET-E.F8S

SET-M.F8S

SET-PARM.F8S

SET-T.F8S

SET-TIME.F8S

SETUP.F8S

SOURCE.F8S

SPACE.F8S

SQRT.F8S

STOR-STR.F8S

TAB.F8S

TABLE.F8S

TABULATE.F8S

TEKPOINT.F8S

TESTAUTO.F8S

TESTDTOA.F8S

TIMEDATE.F8S

TIMERINT.F8S

TUNE.F8S

UNKNOWN.F8S

VECTOR.F8S

VERT-BAR.F8S

X-EQUALS.F8S

XMIT-C.F8S