Thursday, February 4, 2010

LXI, MOV, MVI..8085

Not understand?? ..it's microprocessor language. It determine how your microprocessor should react/flow whenever there is input and their action is unique.

This subject had driven me craaaaazyyy for few weeks now(since the start of my new sem)..silly me~ Bt there's something I need to share about this SUBJECT.

3/2/2010, 1020pm, venue: Micro-p Lab

At this very instant of time, I manage to get my assignment done by typing and modifying the program MYSELF..(aiks...aiks~)..now~atleast I can get something done in the micro-p's lab session...happiiieee~^^

Here's the program i manage to get it done(Just hope that professionals outside don't laugh at me, I'm still ranked noobies in this things..)

CPU "8085.TBL"
PORTA: EQU 80H
PORTB: EQU 81H
PORTC: EQU 82H
CTRLPORT: EQU 83H

ORG 2000H
LXI SP,3FF0H
MVI A,90H
OUT CTRLPORT

CHK: MVI D,0
MVI A,0
IN PORTA
CMA
ANI 00000011B
CPI 00000000B
JZ LOOP10
CPI 00000001B
JZ LOOP20
CPI 00000010B
JZ LOOP30
CPI 00000011B
JZ LOOP40
LOOP10: MVI D,00H
MVI D,10
BLINK10: MVI A, 11111111B
OUT PORTB
CALL DELAY
MVI A, 11111110B
OUT PORTB
CALL DELAY
DCR D
JNZ BLINK10
OFF10: MVI A, 11111111B
OUT PORTB
IN PORTA
CMA
ANI 00000011B
CPI 00000000B
JZ OFF10
JMP CHK
.
. (Decide to make it short due to its length)
.
DELAY: LXI B, 64000
LOOPING: DCX B
MOV A,B
ORA C
JNZ LOOPING
RET
END
p/s: Wish me luck in my Micro-p labtest next week...pray pray~

1 comment:

Long YC said...

Load register pair immediate, move and move immediate, assembly programming eh? Haha! Must be computer engineering or electronic engineering student.

Related Posts Plugin for WordPress, Blogger...