EMAC PRIMER Instruction Manual page 93

Table of Contents

Advertisement

C
If ZAP has finished executing with no errors, the A register will be 0 and the other registers (except the flag
register) will be unaffected. If an error has occured, the A register will indicate the following:
A=1
Error during EPROM write (registers returned with same values as BURN error)
A=2
Error during verification (registers returned with same values as VERIFY error)
A=3
EPROM not erased (registers returned with same values as ERASECHK error)
To make an EPROM-based application:
1)
Load and test your program. To make it easier to relocate your program to 2F01h, you should start at
address XF01h, where X denotes a hex digit which would result in a valid RAM address. Address FF01h
could be used, for example.
2)
Rewrite the program to execute at address 2F01h.
Otherwise you must look for all JMP's and CALL's that need to be changed. Remember that if your
program refers to data tables, these should be relocated to EPROM, and all RAM variables should remain
at the same address. Also, remember that all registers, except the stack pointer and program counter
must be initialized by the user.
3)
Put a blank 32k EPROM (type 2 EPROM) in the programmer, aligning pin 1 of the chip to pin 1 of the
socket, then latch the socket
4)
Load DE with the length of the program, H with the upper byte of the starting address of the program and
C with 20h (for service 20). Press "func." then "2" to make MOS service call.
5)
Remove power from the trainer and carefully replace its EPROM with the EPROM that was just
programmed, making sure pin 1 of the EPROM goes to pin 1 of the socket. 0J2 must be in position B for
a 32k EPROM. Place the unused EPROM in a static safe area.
6)
Power up your unit and the program should begin to run. If it doesn't work, make sure you have followed
these procedures carefully, especially step 2.
To insure desired results:
When inserting or removing EPROMS, make sure the EPROM burner power LED is off.
When performing an ERASECHK, VERIFY or BURN command make sure the EPROM type was correctly entered.
SERVICE 21
DECPNT
INPUT
OUTPUT
SERVICE 22
BIN2BCD
INPUT
OUTPUT
Service number 20h
LED Decimal Point output. This service allows you to individually turn on or off the 6
decimal points on the numeric LED display based upon bits 5 to 0 of the D register. In
the D register, bit 5 corresponds to the far left digit and bit 0 to the far right digit. A 0 bit
will turn off the corresponding decimal point and a 1 will turn it on.
REGISTER C: 21H
REGISTER D: bit pattern to light or unlight appropriate decimal points.
NONE
Binary to Binary Coded Decimal. This service converts the 16 bit number in register pair
DE to binary coded decimal with the low nibble in register E being the least significant
digit
REGISTER C: 22H
REGISTER PAIR DE: The number to be converted to BCD
REGISTER PAIR DE: The BCD number.
If you have an assembler, this will be easy.
93

Advertisement

Table of Contents
loading

Table of Contents