Browse Source

Merge pull request #202 from lynchaj/patch-3

Create button2.asm
pull/207/head
Wayne Warthen 5 years ago
committed by GitHub
parent
commit
7696c01670
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      Source/Apps/button2.asm

19
Source/Apps/button2.asm

@ -0,0 +1,19 @@
; test program for user button on Z80 MBC clock board
; by Andrew Lynch, 6 Jul 2021
ORG 00100H
MAIN_LOOP:
IN A,($70) ; READ USER BUTTON STATUS
AND %01000000 ; REMOVE ALL EXCEPT USER BUTTON (D6)
; 0=PRESSED, 1=NOT PRESSED
JR NZ,MAIN_LOOP ; IF NOT PRESSED TRY AGAIN
LD A,%00000011 ; TURN ON BOTH USER LEDS
OUT ($70),A ;
RET
end
Loading…
Cancel
Save