College of Engineering and Technology
Department of Computer Science
PROJECT IN
CS 223 Computer Organization and Assembly Language
Submitted By : Lord Zoe S. Alforja
Submitted To : Ms. Laurice Anne Iglesia
Schedule : Friday 4:00-7:00
Date : March 21, 2014
1. BASIC OUTPUT Construct an assembly language program that will show your name, your academic year and field of study, the name of your school on screen and your mobile number. SOURCE CODE :
TITLE project1.ASM
DOSSEG
.MODEL SMALL
.STACK 0100h
.DATA
namename DB 0Ah, 0Dh,"Lord Zoe S. Alforja",0Ah, 0Dh,"$" yearcourse DB 0Ah, 0Dh,"2nd Year - Computer Science",0Ah, 0Dh,"$" school DB 0Ah, 0Dh, "New Era University",0Ah, 0Dh,"$" number DB 0Ah, 0Dh, "09172482744",0Ah, 0Dh,"$"
.CODE
MOV AX, @DATA MOV DS, AX
MOV AH, 09h MOV DX, OFFSET namename INT 21h
MOV AH, 09h MOV DX, OFFSET yearcourse INT 21h
MOV AH, 09h MOV DX, OFFSET school INT 21h
MOV AH, 09h MOV DX, OFFSET number INT 21h MOV AX, 4C00h INT 21h
END
OUTPUT:
2. BASIC INPUT/OUTPUT
Construct an assembly language program that will enter any character and will categorize if the input character is an alphabet, a digit or a special symbol.
SOURCE CODE :
TITLE project2.ASM
DOSSEG
.MODEL SMALL
.STACK 100h
.DATA
char db " " msg1 db 0ah,0dh,"Input any character: $" msg2 db 0ah,0dh, "Category: $” alpha db "Alphabet$" sSymbol db "Special Symbol$" number db "Number$" val db " " num db "1","2","3","4","5","6","7","8","9","0" symbol db "!","@$","#$",'$$',"%","^","&","*","(",")","-", "+","_","="
.CODE
MOV AX, @DATA MOV DS, AX
MOV SI, 0 MOV BX, 0
MOV AH,09h MOV DX, OFFSET msg1 INT 21h
MOV AH, 01h INT 21h MOV CHAR, AL
MOV AH,09h MOV DX, OFFSET msg2 INT 21h
JMP F