












































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This lecture is part of lecture series on Computer Organization and Assembly Language. Main points of this lecture are: Structures and Macros, Defining Structures, Declaring Structure, Referencing Structure Variables, Displaying the System Time, Nested Structures, Drunkard'S Walk, Using Unions, Containing Data, Logically Related
Typology: Slides
1 / 84
This page cannot be seen from the preview
Don't miss anything!
"000000000" (null) 0 0 0 0 0 Lastname SalaryHistory
Years
Idnum
NumPoints = 3 AllPoints COORD NumPoints DUP(<0,0>)
RD_Dept Employee 20 DUP(<>)
accounting Employee 10 DUP(<,,,4 DUP(20000) >)
.data worker Employee <>
mov eax,TYPE Employee ; 57 mov eax,SIZEOF Employee ; 57 mov eax,SIZEOF worker ; 57 mov eax,TYPE Employee.SalaryHistory ; 4 mov eax,LENGTHOF Employee.SalaryHistory ; 4 mov eax,SIZEOF Employee.SalaryHistory ; 16
Employee STRUCT ; bytes IdNum BYTE "000000000" ; 9 LastName BYTE 30 DUP(0) ; 30 Years WORD 0 ; 2 SalaryHistory DWORD 0,0,0,0 ; 16 Employee ENDS ; 57
.data NumPoints = 3 AllPoints COORD NumPoints DUP(<0,0>)
.code mov edi,0 ; array index mov ecx,NumPoints ; loop counter mov ax,1 ; starting X, Y values L1: mov (COORD PTR AllPoints[edi]).X,ax mov (COORD PTR AllPoints[edi]).Y,ax add edi,TYPE COORD inc ax Loop L
mov edx,OFFSET TheTimeIs ; "The time is " call WriteString movzx eax,sysTime.wHour ; hours call WriteDec mov edx,offset colonStr ; ":" call WriteString movzx eax,sysTime.wMinute ; minutes call WriteDec mov edx,offset colonStr ; ":" call WriteString movzx eax,sysTime.wSecond ; seconds call WriteDec