assembly code LED on

Thread Starter

111 1

Joined Apr 26, 2018
2
how can i get led on using assembly code

in my class we only have learned about ld, out and heard that we can turn led using only ld out

there are 8 leds at board and i have to turn 4 leds on

ORG 0000H
LD A,00000001B
OUT (00000011B),A
DEC A
LD A,00000010B
END

this is what we have done in class and i still dont get what i have to do...
we use z80
 

ericgibbs

Joined Jan 29, 2010
21,439
hi 111,
Welcome to AAC.
Are the 4 LED's connected to 4 separate Z80 pins, via a current limiting resistor.??
Did you write that Code fragment.?
E
 

Thread Starter

111 1

Joined Apr 26, 2018
2
all the LEDs are connected to different pins with resistor.
and that code is one of the code that professor explained us about turning light on
 
Top