CSE 506 LAB 2

July 17, 2017
By shp

Assembly Code to print a string

.MODEL SMALL 
.STACK 100H
.DATA ;
CR EQU 0DH ;
LF EQU 0AH ;

MSG db CR, LF, 'Hello: $'

.CODE ;
MAIN PROC ;MAIN PROCEDURE ; CODE SEGMENT
 MOV AX,@DATA ;
 MOV DS, AX ;
 
LEA DX, MSG ;Print hello
mov ah,9
int 21h

 MOV AH, 4CH ;Exit code 
 INT 21H
 MAIN ENDP

END MAIN

Problem #1

Write an assembly code to print 2 different string that will be stored in 2 different variable.

Problem #2

Write an assembly code to take 3 input and print them right away.

Problem #3

Write an assembly code to take 4 inputs and print them after taking all the inputs.

example

a b c d <-- 4 inputs taken
abcd   <-- Prints

Practice #1

Practice Marut code example 4.2  for next class.

 

Leave a Reply

Your email address will not be published. Required fields are marked *