System information
01F4 1A readc: dax d ; next command character
01F5 13 inx d ; to next command position
01F6 B7 ora a ; cannot be end of command
01F7 C8 rz
; not zero, numeric?
01F8 D630 sui '0'
01FA FE0A cpi 10 ; carry if numeric
01FC D20D02 jnc endrd
; add-in next digit
01FF 29 dad h ; *2
0200 49 mov c,1
0201 44 mov b,h ; bc - value * 2
0202 29 dad h ; *4
0203 09 dad b ; *2 + *8 = *10
0204 85 add l
0205 6F mov l,a
0206 D2F401 jnc readc ; for another char
0209 24 inr h ; overflow
020A C3F401 jmp readc ; for another char
endrd:
; end of read, restore value in a
020D C630 adi '0' ; command
020F FE61 cpi 'a' ; translate case?
0211 D8 rc
; lower case, mask lower case bits
0212 E65F ani 101$1111b
0214 C9 ret
;
; string data area
;
0215 736F727279badver: db 'sorry, you need cp/m version 2$'
0234 6E6F206469nospace:db 'no directory space$'
0247 7479706520datmsg: db 'type datas: $'
5.5 A Sample Random Access Program CP/M Operating System Manual
5-52