1 ;in "Year/month/day: minutes: Seconds" format, display the current date, time2AssumeCS:Code3 Code Segment4 Main:5 movAl96 out70h,al;tells the CMOS RAM which memory unit number to access7 inchal,71h;read data from this storage unit8 9 movAh,alTen movCl4 One SHRAL,CL A Addal,30h;10-bit ASCII code for the displayed year - andAh00001111b - Addah,30h;ASCII code for the digit of the year displayed the - movbx,0b800h - movES,BX - movbyte ptres:[ the* A+ -*2],al + movbyte ptres:[ the* A+ to*2],ah;Show Year - + movbyte ptres:[ the* A+ +*2],'/' ;Show '/' A at movAl8 - out70h,al;tells the CMOS RAM which memory unit number to access - inchal,71h;read data from this storage unit - - movAh,al - movCl4 in SHRAL,CL - Addal,30h;10-bit ASCII code for the displayed year to andAh00001111b + Addah,30h;ASCII code for the digit of the year displayed - the movbyte ptres:[ the* A+ -*2],al * movbyte ptres:[ the* A+ the*2],ah;Show Month $ Panax Notoginseng movbyte ptres:[ the* A+ **2],'/' ;Show '/' - the movAl7 + out70h,al;tells the CMOS RAM which memory unit number to access A inchal,71h;read data from this storage unit the + movAh,al - movCl4 $ SHRAL,CL $ Addal,30h;10-bit ASCII code for the displayed year - andAh00001111b - Addah,30h;ASCII code for the digit of the year displayed the - movbyte ptres:[ the* A+ $*2],alWuyi movbyte ptres:[ the* A+Panax Notoginseng*2],ah;Display Day the - movbyte ptres:[ the* A+ -*2],' ' ;display "' Wu - movAl4 About out70h,al;tells the CMOS RAM which memory unit number to access $ inchal,71h;read data from this storage unit - - movAh,al - movCl4 A SHRAL,CL + Addal,30h;10-bit ASCII code for the displayed year the andChn00001111b - Addah,30h;ASCII code for the digit of the year displayed $ the movbyte ptres:[ the* A+ the*2],al the movbyte ptres:[ the* A+ +*2],ah;when displayed the the movbyte ptres:[ the* A+ A*2],':' ;Show ': ' - in movAl2 the out70h,al;tells the CMOS RAM which memory unit number to access the inchal,71h;read data from this storage unit About the movAh,al the movCl4 the SHRAL,CL + Addal,30h;10-bit ASCII code for the displayed year - andAh00001111b the Addah,30h;ASCII code for the digit of the year displayedBayi the movbyte ptres:[ the* A+ the*2],al the movbyte ptres:[ the* A+ +*2],ah;Display points - - movbyte ptres:[ the* A+ -*2],':' ;Show ': ' the the movAl0 the out70h,al;tells the CMOS RAM which memory unit number to access the inchal,71h;read data from this storage unit - the movAh,al the movCl4 the SHRAL,CL94 Addal,30h;10-bit ASCII code for the displayed year the andChn00001111b the Addah,30h;ASCII code for the digit of the year displayed the 98 movbyte ptres:[ the* A+ $*2],al About movbyte ptres:[ the* A+ $*2],ah;Show Seconds - 101 102 movax,4c00h103 int21h104 code ends theEnd Main
Wang Shuang << assembly language >> Experiment 14