3.5. YOUR SECOND FUNCTION 39
; restore the registers
PULX
PULB
PULA
RTS
;;;;;;;;;;;;;;;;;;;;;;;End: PRBINARY;;;;;;;;;;;;;;;;;;;;
3.5.1 Test your function
We can test the function by loading different values in the A register. The random
number generator we wrote first comes in useful here! Write the following program,
and test it by repeating the call to $C100 from the BUFFALO prompt.
;;;;;;;;;;;;;;;;;;;;;;;start of code ;;;;;;;;;;;;;;;;;;;;;;;;
;
; 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 $C100
LDX #ABOUTME
JSR OUTSTRG
Comentarios a estos manuales