|
Post by retro80 on Oct 17, 2020 3:51:13 GMT
Hi guys
Noobie here, trying to understand Assembly programming.
I'm stuck trying to figure how assembly manage strings and variables.
I succeeded creating a Script to capture keystrokes and display them in the screen.
Now how do I save these keystrokes (letters/numbers) in a "variable", keep it in memory and display the text later?
Thanks
|
|
|
Post by bjonte on Oct 17, 2020 4:56:42 GMT
Now how do I save these keystrokes (letters/numbers) in a "variable", keep it in memory and display the text later? You just write the bytes to memory somewhere and read it from the same location to print it. Most assemblers have a keyword to reserve some space without storing anything at assemble-time. This can be used to reserve space for that string in memory. This is an example of a common way to reserve 8 bytes: ds.b 8
|
|