Created
September 14, 2018 02:58
-
-
Save vintagechips/fedcc5dd542ed595742d8c48add07110 to your computer and use it in GitHub Desktop.
Z8 Single Board Computer Start-up Program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Z8 STARTUP PROGRAM | |
; | |
; REGISTERS | |
PORT0 := %00 | |
PORT2 := %02 | |
PORT3 := %03 | |
P0MOD := %F8 | |
P2MOD := %F6 | |
P3MOD := %F7 | |
; | |
ORG %000C | |
RESET: DI ;DESABLE INTERRUPT | |
LD PORT0,#%00 ;ADDRESS PRESET | |
LD P0MOD,#%66 ;A8-A11, WAIT, INT-STACK, P04-P07(INPUT) | |
LD P2MOD,#%00 ;SET P20-P27 AS OUTPUT | |
LD P3MOD,#%01 ;SET P20-P27 PULLUP | |
; | |
LOOP: LD PORT2,#%55 ;OUT %55 TO P2 | |
JR STEP | |
STEP: LD PORT2,#%AA ;OUT %AA TO P2 | |
JR LOOP ;LOOP | |
; | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment