Write / supply on this page, a small program that will determine what EOF (Control Z) is for an assembly language program.

 

 


Camron: This program will print out the ascii value of an entered charater. If you run this program and enter Ctrl+Z, the program prints out 26 which is the value of the EOF character.

 

.MODEL SMALL
.586
.STACK 100h
.DATA

Prompt DB 'Enter the character you want to find the ascii value of :','$'
Message1 DB 13,10,'The ascii value of ','$'
Message2 DB ' is ','$'

.CODE
EXTRN PutDec : NEAR
ctrlz PROC
mov ax, @data
mov ds, ax
mov dx, OFFSET Prompt
mov ah, 9h
int 21h
mov ah,1h
int 21h
mov bl,al
mov dx, OFFSET Message1
mov ah, 9h
int 21h
mov dl,bl
mov ah,2h
int 21h
mov dx, OFFSET Message2
mov ah, 9h
int 21h
mov al,bl
mov ah,0
call PutDec
mov al, 0
mov ah, 4ch
int 21h
ctrlz ENDP
END ctrlz

 


Page Information

  • 3 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts