cpu 8048 ; asl needs this to know how to assemble
org 0410h ; start of ROM, but bypass interrupts, etc.
start call 00f1h ; BIOS reset
call 011ch ; BIOS display off
mov r0,#10h ; starting character pointer for VDC
mov r2,#01h ; 02 characters
mov r3,#28h ; x position
mov r4,#70h ; y position
mov r6,#03h ; color start with grey
mov r1,#00h
mov a,#0ffh ; location of memory mapped input
movp a,@a
add a,#58h ; a is 0 at 10.06 volts
mov r7,a
inc r7 ; r7 will dec once before loop
clr a ; start a at 0
clr c ; start with no carry set
vstep add a,#06h
da a
jc wrap
vstepi djnz r7,vstep
jmp disp
wrap inc r1
jmp vstepi
disp mov r7,a
mov r5,#01h ; always tens place =1
call 03eah ; print character BIOS routine
mov a,r1
mov r5,a
call 03eah ; print character BIOS routine
mov r5,#27h
call 03eah ; print character BIOS routine
mov a,r7
swap a
anl a,#0fh
mov r5,a
call 03eah ; print character BIOS routine
mov a,r7
anl a,#0fh
mov r5,a
call 03eah ; print character BIOS routine
mov r5,#0ch
call 03eah ; print character BIOS routine
mov r5,#24h
call 03eah ; print character BIOS routine
mov r5,#17h
call 03eah ; print character BIOS routine
mov r5,#0Eh
call 03eah ; print character BIOS routine
mov r5,#14h
call 03eah ; print character BIOS routine
mov r5,#19h
call 03eah ; print character BIOS routine
call 0127h
mov r1,#0ffh
lpo mov r7,#0ffh
lpi djnz r7,lpi
djnz r1,lpo
call 011ch ; BIOS display off
jmp start
org 04ffh ; these are not read when live
db 0a8h ; 10.06 they are just used when
; db 0b7h ; 10.96 using the emulator to
; db 0b8h ; 11.02 test
; db 0d9h ; 13.00
|