I've been working on this for 12 hours... I dont know why it doesnt work and my instructor hasnt been responding in the past 48hours... someone give me a little hint plz![]()
![]()
![]()
readChar and writeChar are provided in libraries... just read and write chars. uuh it's supposed to swap the two characters stores in the charArr but it doesnt do anything. what's wrongCode:INCLUDE irvine32.inc .data charArr BYTE 2 DUP(?) .code main PROC ; these just get two character inputs call ReadChar mov charArr, al call ReadChar mov [charArr+1], al ; push the characters onto the stack push OFFSET [charArr + 1] push OFFSET charArr call swap mov al, charArr call WriteChar mov al, [charArr+1] call WriteChar main ENDP swap PROC push ebp mov ebp, esp mov al, BYTE PTR [ebp+8] mov bl, BYTE PTR [ebp+12] mov [ebp+8], bl mov [ebp+12], al pop ebp ret 8 swap ENDP END main




Reply With Quote