5.5. WORKING WITH TABLES 65
that we accept only digits and ignore non-digits (the user may be in the habit of
typing spaces, dashes etc. You want to silently ignore these). So it will be useful
to write a function, called rddigit that will accept only digits. The following
program shows a typical usage:
;Name:
;email:
;date:
;
; Standard buffalo equates
; Make sure you have ALL the equates in the file.
;
ucase equ $ffa0
wchek equ $ffa3
dchek equ $ffa6
init equ $ffa9
input equ $ffac
output equ $ffaf
outlhlf equ $ffb2
outrhlf equ $ffb5
outa equ $ffb8
out1byt equ $ffbb
out1bsp equ $ffbe
out2bsp equ $ffc1
outcrlf equ $ffc4
outstrg equ $ffc7
outstrgo equ $ffca
inchar equ $ffcd
vecinit equ $ffd0
org $3000
; setup some strings ...
preamble
fcc /=====================================/
fcb 10
fcc /Lab on using Tables/
fcb 10, 10 *use 10 to start a new line
fcc /Name: _____________________/
fcb 10
fcc /This program is an infinite loop! /
fcb 10
Kommentare zu diesen Handbüchern