Strip control codes and extended characters from a string: Difference between revisions

m
→‎{{header|8086 Assembly}}: fixed inconsistent formatting
m (→‎{{header|8086 Assembly}}: fixed inconsistent formatting)
Line 37:
.data
StringStrip db "abc",13,10,8,7,"def",90h
.code
 
.code
start:
Line 67 ⟶ 66:
jz Terminated
;not equal to zero
cmp al,21h ; if (AL < 21h)
jb PrintString_Stripped ;skip this character and keep going
cmp al,7Fh ; if (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</lang>
 
end start</lang>
 
{{out}}
1,489

edits