mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-24 12:29:29 +00:00
peasant: add "where" command
This commit is contained in:
parent
37e50c3ef3
commit
7239ea553f
|
@ -158,13 +158,45 @@ check_show:
|
|||
|
||||
check_version:
|
||||
cmp #VERB_VERSION
|
||||
bne check_unknown
|
||||
bne check_where
|
||||
|
||||
lda #<version_message
|
||||
sta OUTL
|
||||
lda #>version_message
|
||||
jmp finish_parse_message
|
||||
|
||||
check_where:
|
||||
cmp #VERB_WHERE
|
||||
bne check_unknown
|
||||
|
||||
where_blargh:
|
||||
ldx MAP_LOCATION
|
||||
lda location_names_l,X
|
||||
sta INL
|
||||
lda location_names_h,X
|
||||
sta INH
|
||||
|
||||
lda #<(where_message+22)
|
||||
sta OUTL
|
||||
lda #>(where_message+22)
|
||||
sta OUTH
|
||||
|
||||
ldy #0
|
||||
where_loop:
|
||||
lda (INL),Y
|
||||
sta (OUTL),Y
|
||||
beq where_done
|
||||
iny
|
||||
bne where_loop ; bra
|
||||
|
||||
where_done:
|
||||
|
||||
lda #<where_message
|
||||
sta OUTL
|
||||
lda #>where_message
|
||||
jmp finish_parse_message
|
||||
|
||||
|
||||
check_unknown:
|
||||
lda #<help_message
|
||||
sta OUTL
|
||||
|
@ -253,6 +285,7 @@ verb_lookup:
|
|||
.byte "SAVE",VERB_SAVE|$80
|
||||
.byte "SHOW",VERB_SHOW|$80
|
||||
.byte "VER",VERB_VERSION|$80
|
||||
.byte "WHERE",VERB_WHERE|$80
|
||||
.byte $00
|
||||
|
||||
|
||||
|
|
|
@ -74,8 +74,8 @@ drink_message2:
|
|||
; + what the f- / this sucks
|
||||
.byte "Come now. Don't get discouraged.",0
|
||||
|
||||
; + where (offset 21)
|
||||
where_label:
|
||||
; + where (offset 22)
|
||||
where_message:
|
||||
.byte "You're hanging out in",13
|
||||
.byte " ",0
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user