a guest Nov 17th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- AREA theRemover, CODE, READONLY
- pointIncrement EQU 1
- tCheck EQU "t"
- hCheck EQU "h"
- eCheck EQU "e"
- spaceCheck EQU " "
- ADR r1, EoS ;address of memory location of the end of the string
- point ADR r2, STRING1 ;address of string that will act as a pointer
- loop LDRB r3, [r2], #pointIncrement ;gets the character of the string to check
- STRB r3, [r1, #pointIncrement]! ;stores a valid character into the new string
- b loop
- finish b finish
- STRING1 DCB "and the man said they must go" ;String1
- EoS DCB 0x00 ;end of String1
- STRING2 SPACE 0x7F ;just allocating 127 bytes
RAW Paste Data