A little pet peeve I have - You call functions called writechar
and crlf
, yet, Mr. Kip created those functions and calls them WriteChar
and Crlf
.
All you need to do is open up Irvine32.asm and look at the source for WriteChar
, at the beginning of the procedure, Mr. Irvine left this for all to see:
WriteChar PROC
;
; Write a character to the console window
; Recevies: AL = character
; Last update: 10/30/02
; Note: WriteConole will not work unless direction flag is clear.
;------------------------------------------------------
So before you call WriteChar
, you put the ASCII value of the character to print into AL
NOT the address!
MOV al, letter
CALL WriteChar
INC letter
Also, as Frank mentioned, your variables should be in the .data
or .data?
section not the .code
section