Professional Documents
Culture Documents
USES
Procedure
- (prog)
Ret
Nameprocedure endp
Macro
Syntax:
namemacro macro keyword (a1, a2) arguments can be passed to simply without brackets write the
var
-(prog)
Endm
Calling is done by just writing name and passing arguments if any (can pass reg,var,direct vals)
Similar to ‘proc’ just the prog within body is diff with some restrictions
Structure
Cgpa db ?
Namestruct ends
Struct /macro files should be in the same file where your .Asm file is present
.data
(struct name you defined) S1 Namestruct <>
leaving ‘<>’ blanks mean you’re not assigning values to struct vars
Or
S1 Namestruct <4,3>
If you initialize the values, then 4 goes for sem and 3 for cgpa
Or
S1 Namestruct <,3> (ya phir) S1 Namestruct <4,>
. code
Mov ah,01h
Int 21h
mov S1. Sem, al
(For printing)
mov dl, S1. Sem
mov ah,02h
int 21h
Or else take from user and send the offset into variable