Jump to content

displaying a letter

- - - - -

  • Please log in to reply
1 reply to this topic

#1
cesarg

cesarg

    Newbie

  • Members
  • Pip
  • 9 posts
hello im trying to print a letter out three times after i capture it. i am using the display interumption

.model small
.stack 10h
.data
.code

mov ah, 01h; captura una tecla
int 21h; int=interupcion 21=sistema operativo D.O.S captura en AL


; imprimirla
mov dl,al
mov ah,02h

mov dl,al
mov ah,02h

mov dl,al
mov ah,02h
int 21h

mov ah,4ch
int 21h

end


i couldnt find an interruption to display something more than once but i figured assembly could be similar to a c# so i thought i would display three times and it would function, when i execute the program an error appears after i capture the letter i want to see. could someone help me out?

#2
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,252 posts
  • Location:C:\Countries\US
This works for me:
ORG 0x100 


mov ah, 01h; captura una tecla

int 21h; int=interupcion 21=sistema operativo D.O.S captura en AL



; imprimirla

mov dl,al

mov ah,02h

int 21h 


mov dl,al

mov ah,02h

int 21h 


mov dl,al

mov ah,02h

int 21h


mov ah,4ch

int 21h



The 'ORG 0x100' is NASM syntax, and I don't know if similar is needed for TASM, but the rest of the code can be applied to TASM.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users