caute potrebujem pomoct
potrebujem naprogramovat v aseblery 8086 program ktory retazec znakov vypíše reverzne tj zrkadlovo n napr. dnes je pekne ma vypisat: send ej enkep
mam zatal toto kto by mi vedel pomoct pls pomozte
Kód:
segment .data
msg1 db "Zadaj retazec: ", 13, 10
msg2 db "Zadal si retazec: ", 13, 10
msg3 db "Reverzny vypis: ", 13, 10
msg4 db 13,10
segment .bss
buff1 resb 100
buff2 resb 100
segment .text
global _asm_main
_asm_main:
enter 0,0
pusha
mov EAX,4 ; syscall (write - Zadaj retazec:)
mov EBX,1
mov ECX,msg1
mov EDX,msg2-msg1
int 80h
mov EAX,3 ; syscall (read)
mov EBX,0
mov ECX,buff1
mov EDX,100
int 80h
mov ESI,EAX
mov EAX,4 ; syscall (write - Zadal si retazec:)
mov EBX,1
mov ECX,msg2
mov EDX,msg3-msg2
int 80h
mov EAX,4 ; syscall (write - zadany retazec)
mov EBX,1
mov ECX,buff1
mov EDX,ESI
int 80h
; --- doplnit reverzny vypis retazca ---
mov EAX,4
mov EBX,1
mov ECX,msg4
mov EDX,2
int 80h
popa ; program termination
mov EAX, 0
leave
ret
to mi vypise to iste co napisem neveim sa pohnut prosim o pomoc