Update for blinkenlights.asm
This commit is contained in:
parent
be7709e040
commit
811766af00
@ -1,3 +1,22 @@
|
||||
; blinkenlights.asm
|
||||
; Copyright (C) 2023 William R. Moore
|
||||
;
|
||||
; This program is free software: you can redistribute it and/or modify
|
||||
; it under the terms of the GNU General Public License as published by
|
||||
; the Free Software Foundation, either version 3 of the License, or
|
||||
; (at your option) any later version.
|
||||
;
|
||||
; This program is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
; GNU General Public License for more details.
|
||||
;
|
||||
; You should have received a copy of the GNU General Public License
|
||||
; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
; Modified from https://github.com/kloyd/Retro8080/blob/main/funstuff/blinken_pattern.asm
|
||||
; to run in CP/M and with my own pattern.
|
||||
|
||||
ORG 100H
|
||||
INIT LXI H,DATA ; HL points to blinken data
|
||||
SHLD SAVE_HL
|
||||
@ -10,10 +29,9 @@ GETD LHLD SAVE_HL ; restore HL
|
||||
INR L ; HL++
|
||||
SHLD SAVE_HL ; Save data
|
||||
|
||||
|
||||
INPDEL LXI H,0 ; Init HL to zero before starting the delay loop
|
||||
IN 0ffh
|
||||
CPI 0ffh ; All Sense switches on is a HALT.
|
||||
IN 0FFH
|
||||
CPI 0FFH ; All Sense switches on is a HALT.
|
||||
JZ DONE
|
||||
ADI 1
|
||||
MOV C,A ; sense switches to B
|
||||
@ -25,56 +43,37 @@ BLINK LDAX D
|
||||
LDAX D
|
||||
DAD B
|
||||
JNC BLINK
|
||||
; Done with this loop go get the next D
|
||||
JMP GETD
|
||||
; Done with this loop go get the next D
|
||||
|
||||
; Halt if FF on sense switches. Some way to drop out.
|
||||
DONE HLT
|
||||
|
||||
; Return to CP/M if FF on sense switches. Some way to drop out.
|
||||
DONE JMP 0H
|
||||
; Somewhere to save HL, since it will get clobbered by the delay routine.
|
||||
SAVE_HL DW 0
|
||||
; Put your pattern list here... this is just jiggy wiggy back forth here.
|
||||
|
||||
DATA
|
||||
DB 00010001b
|
||||
DB 00100010b
|
||||
DB 01000100b
|
||||
DB 10111010b
|
||||
DB 11000011b
|
||||
DB 11011111b
|
||||
DB 10001000b
|
||||
db 00010001b
|
||||
db 00100010b
|
||||
DB 01000100b
|
||||
db 10001000b
|
||||
db 00010000b
|
||||
db 00100000b
|
||||
db 01000000b
|
||||
db 10000000b
|
||||
db 00000000b
|
||||
db 10000000b
|
||||
db 11000000b
|
||||
db 01100000b
|
||||
db 00110000b
|
||||
db 00011000b
|
||||
db 00001100b
|
||||
db 00000110b
|
||||
db 00000011b
|
||||
db 00000001b
|
||||
db 00000000b
|
||||
db 00000001b
|
||||
db 00000011b
|
||||
db 00000111b
|
||||
db 00001111b
|
||||
db 00011111b
|
||||
db 00111111b
|
||||
db 01111111b
|
||||
db 11111111b
|
||||
db 11111110b
|
||||
db 11111100b
|
||||
db 11111000b
|
||||
db 11110000b
|
||||
db 11100000b
|
||||
db 11000000b
|
||||
db 10000000b
|
||||
db 00000000b
|
||||
DB 01001000b
|
||||
DB 00110000b
|
||||
DB 01000110b
|
||||
DB 10000010b
|
||||
DB 01101010b
|
||||
DB 01000000b
|
||||
DB 00100111b
|
||||
DB 01010111b
|
||||
DB 00100000b
|
||||
DB 11110010b
|
||||
DB 01101111b
|
||||
DB 10000011b
|
||||
DB 00110011b
|
||||
DB 00010101b
|
||||
DB 10001100b
|
||||
DB 10111011b
|
||||
DB 00000000b
|
||||
|
||||
DB EOF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user