Skip to content

Commit cfec9ab

Browse files
Arrange Folder Hierarchy
1 parent a5e0ec4 commit cfec9ab

9 files changed

+84
-65
lines changed

Hello.asm

-14
This file was deleted.

Programs/Hello.asm

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
DATA SEGMENT
2+
msg DB "Hello World$"
3+
DATA ENDS
4+
CODE SEGMENT
5+
ASSUME CS:CODE,DS:DATA
6+
START: MOV AX,DATA
7+
MOV DS,AX
8+
LEA DX,msg
9+
MOV AH,09H
10+
INT 21H
11+
MOV AH,4CH
12+
INT 21H
13+
CODE ENDS
14+
END START

Programs/palindrome.asm

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
data segment
2+
msg1 db 0ah,0dh,"Enter the string : $"
3+
msg2 db 0ah,0dh,"Is a pallindrome $"
4+
msg3 db 0ah,0dh,"Is not a pallindrome $"
5+
n db 09h dup(?)
6+
data ends
7+
code segment
8+
assume cs:code,ds:data
9+
start: mov ax,data
10+
mov ds,ax
11+
12+
;Getting offset of array
13+
mov si,offset n
14+
mov di,offset n
15+
16+
;Printing message1
17+
lea dx,msg1
18+
mov ah,09h
19+
int 21h
20+
21+
mov cl,00h
22+
;Reading string
23+
scan:mov ah,01h
24+
int 21h
25+
26+
cmp al,0dh
27+
jz ended
28+
mov [si],al
29+
inc cl
30+
inc si
31+
jmp scan
32+
33+
ended:
34+
dec si
35+
mov bl,[si]
36+
cmp [di],bl
37+
jnz notpal
38+
inc di
39+
dec cl
40+
jnz ended
41+
42+
43+
pal:
44+
;Printing pallindrom
45+
lea dx,msg2
46+
mov ah,09h
47+
int 21h
48+
jmp stoped
49+
50+
notpal: ;Printing not pallindrom
51+
lea dx,msg3
52+
mov ah,09h
53+
int 21h
54+
55+
stoped:
56+
mov ah,4ch
57+
int 21h
58+
59+
60+
code ends
61+
end start

README.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
2-
## CSL331 Microproccesor Lab
1+
<h1 align="center">Microprocessor Lab | KTU</h1>
2+
<div align="center">
3+
<p>This repository contains a collection of assembly programs written as part of Microprocessor Lab KTU</p>
4+
</div>
5+
<br><br>
36

47
### [System Software Lab](https://github.com/aromalsanthosh/Microprocessor-Lab-S5)
58

@@ -17,10 +20,11 @@
1720
`mount c: /home/Desktop/masm` <br>
1821
`c:`
1922
7. Assemble, link & run program using MASM <br>
20-
`masm pgmname;`<br>
21-
`link pgmname;` <br>
22-
`pgmname`
23+
`masm pgmname.asm;`<br>
24+
`link pgmname.obj;` <br>
25+
`pgmname.exe`
2326

2427
## 👉🏻 MASM Programs
2528

29+
- [Program to print Hello World](/Programs/Hello.asm)
2630
- [Program to check if a string is palindrome](/Programs/palindrome.asm)

masm-20220208T054915Z-001.zip

-766 KB
Binary file not shown.

masm.zip

764 KB
Binary file not shown.

palindrome.asm

-46
This file was deleted.

0 commit comments

Comments
 (0)