Bitwise IO: Difference between revisions

m
m (→‎Compressing a String of ASCII Zeroes and Ones: typo fix, removed unnecessary steps)
Line 3,441:
 
jr z,HandleEarlyExit
;input is assumed to be &30 or &31, so the least significant bit tells us
; all we need to know. The rest of the byte can be discarded.
 
sub &30 ;we're left with 0 if the ascii was "0" and 1 if the ascii was "1"
rra ;rotate the result into the carry
rl (hl) ;rotate it out of the carry into (HL)
1,489

edits