EMAC PRIMER Instruction Manual page 94

Table of Contents

Advertisement

SERVICE 23
BCD2BIN
INPUT
OUTPUT
SERVICE 24
KPINPUT
INPUT
OUTPUT
Binary Coded Decimal to Binary. This service converts a 4 digit BCD number in register
pair DE to binary.
REGISTER C: 23H
REGISTER PAIR DE: 4 digit BCD number
REGISTER PAIR DE: converted number in binary
Keypad Input. This service allows the user to input from the keypad a hexadecimal
number with up to 4 digits. The number will be returned in the DE register pair. The
numbers can be displayed on the LED display by loading D with 1 before the service is
called. The LED display will be turned off if D = 0. The service will not return until the
"ENT" key is pressed. Once ENTER is pressed, the last 4 digits entered will be loaded in
DE with the last digit being the Least significant. If 4 digits are not entered, a 0 will be
assumed for the leading digits.
REGISTER C: 24H
REGISTER D: 1 for LED display on, 0 for LED display off.
REGISTER PAIR DE: 4 digit number from keypad
94

Advertisement

Table of Contents
loading

Table of Contents