Southwest Specialty Products 6800 Start LDX #TEXT JSR PDATA1 JMP Contrl Text, Fcc /Hello, Fcb

Page 17

 

 

ORG $100

 

START

LDX #TEXT

 

 

JSR PDATA1

 

 

JMP CONTRL

 

TEXT

FCB $0D, $0A

 

 

FCC /HELLO/

 

 

FCB 4

 

 

END

-

The accumulator and register status after using PDATA1 is as follows:

 

ACC A

Changed during the operation

 

ACC B

UNCHANGED

 

IXR

Contains the memory location of the 04

CHANGE (E088) CHANGE is SWTBUG‘s memory examine and change function. Change

 

uses a number of other SWTBUG® subroutines.

OUT4HS (E0C8)

OUT4HS is used to output a four-digit (16-bit) hexadecimal number onto the

 

control terminal. The address of the most significant byte to be output should

 

be loaded into the index register before calling OUT4HS. For example, to

 

out-put the 16-bit hex number stored in memory locations 1000 and 1001

 

whose most significant byte is in 1000 while the least significant byte is in

 

1001 the following sequence should be used:

 

 

LDX # $1000

 

 

JSR OUT4HS

-

If location 1000 contained a hex 3C and 1001 contained a hex 0B, an ASCII,

 

3C0B would be displayed on the screen when OUT4HS is called. Remember

 

memory data is handled in hex but must be output as ASCII characters which

 

have a different hex value than those stored in the computer’s memory. The

 

registers are affected as follows:

 

ACC A

Changed during the operation

 

ACC B

UNCHANGED

 

IXR

Incremented by two. (1002 in this example)

OUT2HS (E0CA)

OUT2HS is similar to OUT4HS, but outputs only two hex characters (one

 

byte). For example, to display the byte stored at 2008 the following sequence

 

would be used:

LDX # $2000

 

 

 

 

JSR OUT2HS

-

An ASCII 6C would

be output to the control terminal if location 2001

 

contained a hex 6C. The registers are affected as follows:

 

ACC A

Changed during the operation

 

ACC B

UNCHANGED

 

IXR

Incremented by one. (1001in this example)

OUTS (E0CC) OUTS is a subroutine that outputs one space to the control terminal.

START (E0D0) START is the beginning of a sequence of steps that initialize the system during power up or reset. First, the stack pointer is set to be A042 and is stored in SP. Next, an FF is stored in location A943. This sets the interrupt mask bit in the stack so that when a G command is given the processor will not respond to interrupts until told to do so. The type of port being used (ACIA or PIA) is then determined by initializing it as a PIA and looking to see if this worked. If not, an ACIA is assumed and the proper ACIA initialization routine, AL2, is selected. The program then goes to CONTRL sequence.

16

Image 17
Contents ROM Monitor Verson Users Guide Swtpc Swtbug Swatbug Monitor ROM Swtbug Operation Swtbug InstallationReset Register Dump Function R Memory Examine and Change M addrBIT BIT no Label Condition CodeAscii Tape Punch Command P CT-1024 Clear Screen Command CGO to USER’S Program Function G Jump to USER’S Program JaddrMost Significant Byte of Lower Address END of Tape Command ELeast Significant Byte of Lower Address Most Significant Byte of Upper AddressSoftware Breakpoints Baddr Optional Port Command O not zeroTape Loader Function L Do not This is OK Disk Boot DJump to Prom Program Z Byte Search F high address low address byteUsing Maskable IRQ Interrupts Using NON-MASKABLE InterruptsVectored Software Interrupts Vectored INPUT/OUTPUTBaud Rate PIA StrobingUse of the Control Interface for Read/Punch-On/Off Decoding Loading Binary Tapes Thru Swtbug CompatibilityCO-RES Ver .0 and 1.01 Acia Modifications Special Notes on Using AN Acia and Program ModificationsBlkjak Swtpc 6800 Black Jack Program General Rules for Program Writing Memory DiagnosticsProgram Description Temporary Storage LocationsSwtbug Subroutine and Text String Description Outhr E06B ACC a ACC B Cksm IXR UnchangedOutee LDA aFCC /HELLO Start LDX #TEXT JSR PDATA1 JMP Contrl TextFCB ENDNmiv E1A7 Contrl E0E3Search E1AE Goto E1D0Break E2D9 Clear E2CCPNCHS9 E31E Pnchon E34D