You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is in the .asciiz directive. When processing .asciiz strings, the original code incorrectly packs characters into 16-bit words, which causes problems when these strings are used with the ecall 5 instruction.
Example:
.text
.org 0
main:
lui a0, %hi(0x100)
ecall 5 # service 5 to print a string
exit:
ecall 3
.data
.org 0x100
str:
.asciiz "hello world"
Expected Behavior:
Each character in the .asciiz string should be stored as a separate byte .
Actual Behavior:
As shown in the screenshot of the bin file, characters are incorrectly packed, causing incorrect string representation.
The text was updated successfully, but these errors were encountered:
Bug Description:
The bug is in the .asciiz directive. When processing .asciiz strings, the original code incorrectly packs characters into 16-bit words, which causes problems when these strings are used with the ecall 5 instruction.
Example:
Expected Behavior:
Each character in the .asciiz string should be stored as a separate byte .
Actual Behavior:
As shown in the screenshot of the bin file, characters are incorrectly packed, causing incorrect string representation.
The text was updated successfully, but these errors were encountered: