Estex-DSS/SHELL/Commands/ECHO.ASM

59 lines
1.3 KiB
NASM
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;///////////////////////////////////////////////////
;
; ECHO. ‚뢮¤ á®®¡é¥­¨© ­  íªà ­
;
;///////////////////////////////////////////////////
cmd_echo:
ex de,hl
ld a,(hl) ; ª®¬-áâப 
or a
jr z,A862E ; ¡¥§  à£ã¬¥­â®¢
ex de,hl
; â¥áâ  à£ã¬¥­â®¢ ­  "on","off"
push de
ld b,3 ; ¤«¨­  áà ¢­¥­¨ï
ld hl,T8C21 ; "ON",0
call A874E ; áà ¢­¨âì áâப¨
pop de
ld a,true ; ०¨¬ "on"
jr z,A864B
push de
ld b,4 ; ¤«¨­  áà ¢­¥­¨ï
ld hl,T8C24 ; "OFF",0
call A874E ; áà ¢­¨âì áâப¨
pop hl
ld a,false ; ०¨¬ "off"
jr z,A864B
;  à£ã¬¥­âë ­¥ "on","off"
A8623: ld c,Dss.PChars
RST ToDSS
jp newline
; <20>®ª § âì ⥪. ०¨¬ íå 
A862E: ld a,(echo_mode) ; ä« £ echo-०¨¬ 
or a
ld de,7 ; ¨­¤¥ªá "on"
jr nz,$+5 ; false
ld de,MAIN_MSG.OFF ; ¨­¤¥ªá "off"
call FMESAGE ; ­ ©â¨ áâப㠯® ¨­¤¥ªáã
ld de,PRM1 ; ªã¤  ( à£ã¬¥­â %1)
call ncopy_string ; ᪮¯¨à. áâபã (á ­ã«¥¬), ¬ ªá.15 ᨬ¢.
ld de,MAIN_MSG.ECHO ; ¨­¤¥ªá "Echo is %1"
jp MESSAGE
;
A864B: ld (echo_mode),a ; ä« £ echo-०¨¬ 
ret
;///////////////////////////////////////////////////
;
; Š®¬ ­¤  "ECHO." ‚áâ ¢ª  ¯ãá⮩ áâப¨ ­  íªà ­
;
;///////////////////////////////////////////////////
cmd_echoLN:
ex de,hl
ld a,(hl) ; ª®¬-áâப 
or a
jp z,newline ; ¡¥§  à£ã¬¥­â®¢
jr A8623 ; ¢ë¢¥á⨠ à£ã¬¥­âë