PrintLogo

Display A as BCD Digits on the Odyssey 2




Here is a program to display A as 2 BCD digits on the Odyssey 2:

cpu     8048   
org     0400h
jmp     02C3h           ;system start or reset - select game 
jmp     0009h           ;external IRQ - vblank routine  
jmp     timer           ;timer IRQ
jmp     001Ah           ;vblank service - vblank (collision and clock) 
jmp     start
jmp     0044h           ;continuation of vblank service - vblank (tune)
timer   retr                    ; we don't do anything with timer IRQs 
start   
call    011Ch
mov     r1,#10h         ; starting char in VDC 
mov     r3,#20h         ; x-position
mov     r4,#20h         ; y-position
mov     r6,#09h         ; color
mov     a,#37h
call    017ch           ; BCD print routine     
call    0127h           ; start display
sixnenine
jmp     sixnenine	; wait while six ne nine (i don't mind)

Here is how it looks:





This article comes from Coprolite:
http://coprolite.com/

The URL for this story is:
http://coprolite.com/art45.html

Copyright 1997-2006 Coprolite.com. Read our Terms of Use.