跳轉到內容

Signetics 2650 和 2636 程式設計/教程程式碼 - 計分

100% developed
來自華夏公益教科書

教程程式碼 - 計分

[編輯 | 編輯原始碼]

這是教程的程式碼 計分

reset_vector:
        bcta,un	reset
interrupt_vector:
        retc,un	        ;just in case an interrupt occurs before we disable them
reset:	
        lodi,r0 $20	;initialise program status word, just to be sure!
        lpsu            ;inhibit interrupts, stack pointer=0
        lpsl            ;register bank 0, without carry, arithmetic compare

        eorz	r0
        stra,r0	effects   ;initialise the 74LS378
	
        bsta,un InitPVI   ;initialise video chip

        lodi,r0 $03
        stra,r0 scoreformat  
        lodi,r0 $98
        stra,r0 score12
        lodi,r0 $76
        stra,r0 score34     

endless:
        bctr,un endless   

;===================================================================
; subroutine - initialise PVI
InitPVI:
        eorz	r0		;r0 = 0
        lodi,r3	$CA		;set 1F00-1FC9 to 00 (most of PVI)
loop1:			        ;sets all colours to black, turns off sound, score 1 field at top.
        stra,r0	shape1,r3-
        brnr,r3	loop1

        retc,un
華夏公益教科書