Download ANC-3052 8052 Single Board Computer

Transcript
Appendix C - BASIC Programming Examples
The short listings that follow give the ANC-3052B user an idea of the cards
capability to quickly implement an application. These listings are sample programs
only, and are intended as a guide for the designer to build upon.
10
20
30
40
50
60
REM SAMPLE INITIALIZATION OF ANC-3052 CARD
REM
MTOP=MTOP-0FFH
BAUD 9600
PRINT “ANTONA Corporation”
END
10
20
30
40
60
70
80
REM EXERCISE ONBOARD PORT 1
REM
FOR X=0 TO 0FFH
PORT1=X
NEXT X
GOTO 30
END
20
30
35
40
50
60
70
80
85
90
100
110
120
130
140
REM HEX DUMP MEMORY PROGRAM
REM USE TO EXAMINE DATA AND MEMORY MAPED I/O
REM
INPUT “ENTER BEG. ADDR. IN HEX=“,V
FOR X=0 TO 0FH
PH0. V,” “,
FOR Y=0 TO 0FH
PH0. XBY(V+Y),
IF Y=7 THEN PRINT “ “,
NEXT Y
PRINT
V=V+10H
NEXT X
PRINT
GOTO 40
Antona Corporation
(310)473-8995 FAX:(310)473-7112
17