I want to remove the last char of a string that the user inputs because its a carriage return, here is what I use but NASM gives me and error, what am I doing wrong?
mov data, 0
...
buffer:
max db 20
count db 0
data db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
its ok I have it now
mov al, 0
mov bh,
mov bl, 0
mov , al
its ok I have it now
mov al, 0
mov bh,
mov bl, 0
mov , al
Not sure if that did work, but it shouldn't.
Here is something that will work, foregoing optimization.
movzx bl,BYTE ;Copies to BL, zeros-out BH, so that BX becomes the offset
add bx,data ;Offset + Base = Pointer
mov BYTE,0 ;Convert Carriage Return into Zero
thank you, appreciate it, but my version did work....