10.4.4


:

: 5 ;

: 4 ;

: 7 .

1970[13]

.

.

ideal

p486

model flat

extrn ExitProcess:proc

dataseg

record data1 y:7, m:4, d:5

d1 data1 <>

day db 1

month db 11

year dw 2000

codeseg

begin:

movzx ax, [day]

movzx bx, [month]

mov cl, m

shl bx, cl

or ax, bx

mov bx, [year]

sub bx, 1970

mov cl, y

shl bx, cl

or ax, bx

mov [d1], ax

mov ax, [d1]

mov bx, mask d

and bx, ax

mov [day], bl

mov bx, mask m

and bx, ax

mov cl, m

shr bx, cl

mov [month], bl

mov bx, mask y

and bx, ax

mov cl, y

shr bx, cl

add bx, 1970

mov [year], bx

call ExitProcess

end begin

. , .