Update for Mooreheim
This commit is contained in:
parent
83dd75d73d
commit
524bfaab19
@ -28,8 +28,6 @@
|
||||
ORG 100H
|
||||
|
||||
; Driver logic
|
||||
LXI SP, 4000h
|
||||
|
||||
PUSH D
|
||||
LXI D, WELCOME
|
||||
CALL PRINTS
|
||||
@ -45,22 +43,14 @@
|
||||
CALL ROLLTHEMBONES
|
||||
CALL OUTPUT
|
||||
|
||||
CHECKSWITCH6
|
||||
IN 0FFH
|
||||
ANI 32
|
||||
CNZ ROLLTHEMBONES
|
||||
IN 0FFH
|
||||
ANI 32
|
||||
JZ CHECKSWITCH6
|
||||
CALL OUTPUT
|
||||
|
||||
CHECKSWITCH7
|
||||
IN 0FFH
|
||||
ANI 64
|
||||
CNZ ROLLTHEMBONES
|
||||
IN 0FFH
|
||||
ANI 64
|
||||
JZ CHECKSWITCH7
|
||||
CALL OUTPUT
|
||||
|
||||
JMP 0h
|
||||
@ -93,7 +83,6 @@ ROLLTHEMBONES
|
||||
|
||||
; Output the dice results
|
||||
OUTPUT
|
||||
|
||||
PUSH D
|
||||
LXI D, YOUROLLED
|
||||
CALL PRINTS
|
||||
@ -163,6 +152,11 @@ OUTPUT
|
||||
CALL PRINTS
|
||||
POP D
|
||||
|
||||
DCR L
|
||||
DCR L
|
||||
DCR L
|
||||
DCR L
|
||||
|
||||
RET
|
||||
|
||||
; Roll the different dice
|
||||
@ -278,7 +272,7 @@ ROLL5_END
|
||||
|
||||
; Print a null-terminated string
|
||||
PRINTS
|
||||
; PUSH PSW
|
||||
PUSH PSW
|
||||
OUT1CH
|
||||
LDAX D ; LET A = (DE)
|
||||
CPI 0H ; Done when null terminated.
|
||||
@ -287,7 +281,7 @@ OUT1CH
|
||||
INR E ; Increment the address of the current character
|
||||
JMP OUT1CH
|
||||
PRINTS_DONE
|
||||
; POP PSW
|
||||
POP PSW
|
||||
RET
|
||||
PRINTC
|
||||
; PUSH PSW
|
||||
@ -300,8 +294,8 @@ SAVE_HL DW 0
|
||||
WELCOME DB "Welcome to the gambling halls of Mooreheim!", 0H
|
||||
DICE DB 0, 0, 0, 0, 0
|
||||
HELD_DICE DB 0, 0, 0, 0, 0
|
||||
NEWLINE DB CR, LF, 0H
|
||||
YOUROLLED DB "You rolled:", CR, LF, 0H
|
||||
NEWLINE DB CR, LF, 0H
|
||||
CR equ 0DH
|
||||
LF equ 0AH
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user