Strip control codes and extended characters from a string: Difference between revisions
Strip control codes and extended characters from a string (view source)
Revision as of 01:09, 4 October 2021
, 2 years ago→{{header|8086 Assembly}}: fixed inconsistent formatting
Puppydrum64 (talk | contribs) |
Puppydrum64 (talk | contribs) m (→{{header|8086 Assembly}}: fixed inconsistent formatting) |
||
Line 37:
.data
StringStrip db "abc",13,10,8,7,"def",90h
▲ .code
start:
Line 67 ⟶ 66:
jz Terminated
;not equal to zero
cmp al,21h
jb PrintString_Stripped ;skip this character and keep going
cmp al,7Fh
jae PrintString_Stripped ;skip this character and keep going
mov ah,02h
mov dl,al
int 21h ;prints character in DL to screen
jmp PrintString_Stripped
Terminated:
ret
end start</lang>
{{out}}
|