Write an assembly for the intel-64 program that prints a character with code 0x2d by calling a subprogram.
; Description: an assembly for the intel-64 program that prints
; a character with code 0x2d by calling a subprogram.
INCLUDE Irvine32.inc
.code
main PROC
mov al, 2dh
CALL PrintChar ; input: al = char
call CrLf
call CrLf
call WaitMsg
Invoke ExitProcess, 0 ; exit
main ENDP
; ---------------------------------------------------------------------------------
; Name: PrintChar
;
; Input: al = character
; ---------------------------------------------------------------------------------
PrintChar PROC
call WriteChar
ret
PrintChar ENDP
END main
Comments
Leave a comment