assembly laboratory
DESCRIPTION
Assembly Language ProgramTRANSCRIPT
Org100h; assembler directives.model SMALL; assembler directives.stack; assembler directives.data
msg_1 db "Please type your :$"msg_2db "Name :$"name_1db 15 dup ('$')msg_3db "Age :$"age_1db 4 dup ('$')msg_4 db "USN :$"Usn_1db 15 dup ('$')inst db "*Select the best answer:*$"
que_1 db "1. Sex: *Male *Female *Both *Everyday ",0dh,0ah,'$'Sex_1db 20 dup ('$')
que_2db "2. Favorite Food: *Siomai *Siopao *all ",0dh,0ah,'$'Fave_1db 20 dup ('$')
que_3 db "3. School: *AMA rocks!! *Tiny Tots *Harvard ",0dh,0ah,'$'School_1db 20 dup ('$')que_4 db "4. Pet's Name: *Barney*Borjak *Pikachu ", 0dh,0ah,'$'Pet_1db 20 dup ('$')
que_5db "5. Crush: *James *James Again *James Dyapon ", 0dh,0ah,'$'Crush_1db 20 dup ('$')
Sum db "Summary : $"Out_Sexdb "Sex :$"Out_Fave db "Favorite Food :$"Out_Schooldb "School :$"Out_Pet db "Pet's Name :$"Out_Crushdb "Crush :$".code
mov dx, offset msg_1;;;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;;call print_out;;;;;;; PLEASE ENTER YOUR: ;;;;;;;;;;;;;;;;call next_line;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset msg_2;;;;;;;;;;;;; PRINT ;;;;;;;;;;;call print_out;;;;;;;NAME: ;;;;;;;call type_name;;;;;;;;ASK FOR INPUT ;;;;;;;;;call Store_data;;;;;;;; SAVES DATA INPUT ;;;;;;;;;;mov dx, offset msg_3;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;call print_out;;;;;;; AGE: ;;;;;;;call type_name1;;;;;;;;;;;ASK FOR INPUT;;;;;;;call Store_data;;;;;;;SAVES DATA INPUT;;;;;;;mov dx, offset msg_4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;call print_out;;;;;;;USN: ;;;;;;;call type_name2;;;;;;; ASK FOR INPUT ;;;;;;;call Store_data;;;;;;;; SAVES DATA INPUT ;;;;;;;;call next_line;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset inst;;;;;;;;;;;;;;;PRINT;;;;;;;;;;;;;;call print_out;;;;;;; *Select the best answer:* ;;;;;;;;;;;;;;call next_line;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset que_1;;;;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;;;;;;;call print_out;;;;;;; 1. Sex: *Male *Female *Both *Everyday ;;;;;;;;;;call type_name3;;;;;;;;;;; ASK FOR INPUT ;;;;;;;;;;;call Store_data;;;;;;;;;;; SAVES DATA INPUT ;;;;;;;;;;;mov dx, offset que_2;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;;call print_out;;;;;;; 2. Favorite Food: *Siomai *Siopao *all ;;;;;;call type_name4;;;;;;;;;;;;;;;ASK FOR INPUT ;;;;;;;;;;;;;;;;;;;call Store_data;;;;;;;;;;;;SAVES DATA INPUT ;;;;;;;;;;;;mov dx, offset que_3;;;;;;;;;;;;;; PRINT ;;;;;;;;;;;;call print_out;;; 3. School: *AMA rocks!! *Tiny Tots *Harvard ;;;;;;call type_name5;;;;;;;;;;;;; ASK FOR INPUT ;;;;;;;;;;;;call Store_data;;;;;;;;;;;;; SAVES DATA INPUT ;;;;;;;;;;;;mov dx, offset que_4;;;;;;;;;;;;;; PRINT ;;;;;;;;;;;;call print_out;;;;; 4. Pet's Name: *Barney *Borjack *Pikachu ;;;;;;;;;call type_name6;;;;;;;;;;;;;;;;; ASK FOR INPUT ;;;;;;;;;;;;;;;;call Store_data;;;;;;;;;;;;;; SAVES DATA INPUT ;;;;;;;;;;;;;;;;mov dx, offset que_5;;;;;;;;;;;;;; PRINT ;;;;;;;;;;;;;;;;call print_out;;;; 5. Crush: *James *James Again *James Gyapon ;;;;call type_name7;;;;;;;;;;;; ASK FOR INPUT;;;;;;;;;;;;call Store_data;;;;;;;;;;;;SAVES DATA INPUT;;;;;;;;;;;;
;;;;;;;SUMMARY;;;;;;;mov dx, offset Sum;;;;;;;;;;;;;;;;; PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;SUMMARY ;;;;;;;;;;;;;;;;call next_line;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset msg_2;;;;;;;;;;;;;;;;; PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;NAME: _______________________;;;;;;;;;;;;;;;;mov dx, offset name_1;;;;;;;;;;;;;;PRINTS SAVED DATA;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset msg_3;;;;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;AGE: ________________________ ;;;;;;;;;;;;;;;;mov dx, offset age_1;;;;;;;;;;;;;;PRINTS SAVED DATA;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset msg_4;;;;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;USN: ________________________;;;;;;;;;;;;;;;;mov dx, offset Usn_1;;;;;;;;;;;;;PRINTS SAVED DATA;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset Out_Sex;;;;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;SEX: ________________________;;;;;;;;;;;;;;;;mov dx, offset Sex_1;;;;;;;;;;; PRINTS SAVED DATA ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset Out_Fave;;;;;;;;;;;;;;;;;PRINT;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;FAVORITE FOOD: ______________ ;;;;;;;;;;;;;;;;mov dx, offset Fave_1;;;;;;;;;;;PRINTS SAVED DATA ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset Out_School;;;;;;;;;;;;;;;;;PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;; SCHOOL: ______________________;;;;;;;;;;;;;;;;mov dx, offset School_1;;;;;;;;;; PRINTS SAVED DATA;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset Out_Pet;;;;;;;;;;;;;;;;; PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;; PET'S NAME: __________________ ;;;;;;;;;;;;;;;;mov dx, offset Pet_1;;;;;;;;;; PRINTS SAVED DATA ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov dx, offset Out_Crush;;;;;;;;;;;;;;;;; PRINT ;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;CRUSH: ______________________;;;;;;;;;;;;;;;;mov dx, offset Crush_1;;;;;;;;;;PRINTS SAVED DATA ;;;;;;;;;;;;;;;;;call print_out;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mov ah, 4Ch;;;;;;;;;;;;;; END PROGRAM;;;;;;;;;;;;;;;;int 21h;;;;;;;;;;;;;;END PROGRAM;;;;;;;;;;;;;;;;
;;;;;PROCEDURES;;;;;;;;;;;;;PRINT;;;;;print_out: mov ax, @datamov ds, axmov ah, 9hint 21hret;;;;;INPUT;;;;;type_name:mov dx, offset name_1rettype_name1:mov dx, offset age_1ret
type_name2:mov dx, offset Usn_1ret
type_name3:mov dx, offset Sex_1ret
type_name4:mov dx, offset Fave_1rettype_name5:mov dx, offset School_1ret
type_name6:mov dx, offset Pet_1ret
type_name7:mov dx, offset Crush_1ret;;;;Store the Data;;;;Store_data:mov ah, 3fhint 21hret
;;;;NextLine;;;;next_line:mov ah,2mov dl,0ahint 21hmov ah,2mov dl,0Dhint 21hretEND