Current location - Education and Training Encyclopedia - Graduation thesis - Hello, can you help me translate this assembly language program? Translate every sentence. Thank you. I need it for my thesis defense.
Hello, can you help me translate this assembly language program? Translate every sentence. Thank you. I need it for my thesis defense.
First of all, every sentence translated by the assembler is meaningless (it should be a comment).

Main business: MOV SP, # SP transfer SP, calculate SP immediately.

MOV 30H, # 08H transmits 30H, and counts 08H immediately.

MOV P 1,# FFH; Transfer interface 1, and count FFH immediately.

MOV P0,FFH; Transport interface 0, FFH

CLR TR0 clears 0 TR0.

To: MOV TMOD, # 01h; Transfer TMOD and count 0 1H immediately.

MOV TH0, # 3CH sends TH0 and immediately counts 3CH.

MOV TL0, # 0B0H turns to TL0, and immediately counts 0B0H.

SETB TR0; Bit group 1 TR0

T 1: MOV 30H,# 50; Send 30 hours, and count 50 immediately.

M8: CJNE 30H,#00H,M8; Comparison-Unequal rotation for 30H, immediate counting for 00H,

CJNE 3 1H,08H,M7; Comparison-inequality conversion 3 1H, 08H,

MOV P 1,FFH; Transmission interface 1, FFH

MOV P0,FFH; Transport interface 0, FFH

1February 365438+0h; Negative 1 3 1H

SJMP t 1; Transition to T 1

M7: CJNE 3 1H,07H,M6; Comparison-inequality transformation 3 1H, 07H,

MOV P 1,FFH; Transmission interface 1, FFH

Movp0,00h transmission interface 0,00h

1February 365438+0h; Negative 1 3 1H

SJMP t 1; Transition to T 1

M6: CJNE 3 1H,06H,M5; Comparison-inequality transformation 3 1H, 06H,

MOV p 1 . 00H; Transmission interface 1.00h

MOV P0,FFH; Transport interface 0, FFH

1February 365438+0h; Negative 1 3 1H

SJMP t 1; Transition to T 1

M5: CJNE 3 1H,05H,M4; Comparison-inequality transformation 3 1H, 05H,

MOV P 1, F0H transmission interface 1, F0H

MOV P0, F0H transmission interface 0, F0H

1February 365438+0h; Negative 1 3 1H

SJMP t 1; Transition to T 1

M4: CJNE 3 1H,04H,M3; Comparison-inequality conversion 3 1H, 04H,

MOV P 1,AAH; Transmission interface 1, AAH

MOV P0,AAH; Transport interface 0, AAH

1February 365438+0h; Negative 1 3 1H

SJMP t 1; Transition to T 1

M3: CJNE 3 1H,03H,M2; Comparison-inequality transformation 3 1H, 03H,

MOV P 1,CCH; Transmission interface 1, CCH

MOV P0,CCH; Transport interface 0, CCH

1February 365438+0h; Negative 1 3 1H

SJMP t 1; Transition to T 1

M2: CJNE 3 1H,02H,m 1; Comparison-inequality transformation 3 1H, 02H,

MOV P 1, 55H transmission interface1.55h.

MOV P0, 55H transmission interface 0.55h.

1February 365438+0h; Negative 1 3 1H

LJMP t 1; Long transfer to T 1

M 1: CJNE 3 1H,0 1H; Comparison-inequality transformation 3 1H, 0 1H

MOV P 1, 33H transmission interface1.33h.

Movp0,33H transmission interface 0,33h

MOV 3 1H, 08H transfer 3 1H, 08H

LJMP t 1; Long transfer to T 1

*************************************** ; ***************************************

; Interrupt service routine (short for interrupt service routine)

*************************************** ; ***************************************

INT 1: push 30H to stack for 30h.

Push 31h; Stack 3 1H

CLR TR0 clears 0 TR0.

MOV TMOD,# 0 1H; Transfer TMOD and count 0 1H immediately.

MOV TH0, # 3CH sends TH0 and immediately counts 3CH.

MOV TL0, # 0B0H turns to TL0, and immediately counts 0B0H.

1February 30th h; Negative 1 30 hours

POP 3 1H; Off-stack 3 1H

POP 30H is outside the stack 30H,

SETB TR0; Bit group 1 TR0

RETI; Interrupt return