Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; You may customize this and other start-up templates;
- ; The location of this template is c:\emu8086\inc\0_com_template.txt
- org 100h
- ; add your code here
- .DATA
- INPUT DB "Enter a value $"
- OUTPUT DB "OUTPUT IS $"
- Var DW ?
- .Code
- ;PRINT STRING
- MOV AX, @DATA; initialize DS
- MOV DS,AX
- LEA DX,INPUT; load & display the STRING_1
- MOV AH,09
- INT 21H
- ;MOV AH,01
- ;Int 21H
- ;Take Input
- MOV AH,01
- INT 21H
- MOV BL,AL
- ;NEW LINE
- MOV AH,02
- MOV DL, 0DH; carriage return
- INT 21H
- MOV DL,0AH; linefeed
- INT 21H
- ;Print String
- MOV AX, @DATA; initialize DS
- MOV DS,AX
- LEA DX,OUTPUT; load display the String_1
- MOV AH,09
- INT 21H
- ;Shift input in DL
- MOV DL,BL
- ;Display input
- MOV AH,02
- INT 21H
- ;MOV DL,AL
- ;MOV AH,02
- ;INT 21H
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement