Chatgpt says that my code is working, i passed it to the AI for the AI to troubleshoot but it's still not working, why can't i call the function like this?
I should clarify that when i run this insted of hello world some wierd symbols appear, at least it prints something.
PS: after 20 minutes or so i realized that the problem is with the push and pop that i use, i resolved it in a different way but it would be helpful if someone could explane to me why it doesn't work as intended if i use the stack in the way that i did.
[org 0x7c00]
mov bp, 0x7c00
mov sp, bp
push message
call printstring
printstring:
pop bx
mov ah,0x0e
.loop:
cmp [bx], byte 0
je .Exit
mov al, [bx]
int 0x10
inc bx
jmp .loop
.Exit:
ret
message:
db 'Hello World!',0
encomenda:
db 'ENCOMENDA REAL!', 0
times 510-($-$$) db 0
dw 0x55aa
I tried troubleshooting using ChatGPT but the AI didn't helped me at all.