public sksp ; Subroutine to skip over spaces in the buffer pointed to by HL. On return, ; the zero flag is set if we encountered the end of the line or a command ; separator character. sksp: ld a,(hl) ; Get next character inc hl ; Point to the following character cp ' ' ; Space? jr z,sksp ; If so, keep skipping dec hl ; Back up to non-space ret ; ..and ret with char end