8086 for 7 segments - ASSEMBLY LANGUAGE
i havent got to learn about this topic yet but would like to try this interesting basic language for 8086. i have no idea how to start.
anyone here can help?
i can do the table, but assembly language got me blank.
"Write an 8086 assembly language program that will display from 0 to 9 seconds and loops continuously thereafter. The LED should be lighted ON during the counting. Assuming that a 1 second delay subroutine, ?D1SEC? is available and port A is already initialized to be the output port, at the address PORTA"
RF-forum? GHz CPU maybe.
As it requires a very short and simple answer will I give it to you.
Hope you not is a cheater, letting some one else do your homework?
Start:
mov ! offset LED_table ;source pointer
mov !,10 ;Loop counter
mov !,porta ;port number
Loop1:
lodsb
out !,! ; Output a byte
call d1sec
Loop Loop1
jmp Start
Just replace ! with fitting registers.
Not more complex then any computer language.
Oh bye the way, this code will never be able to do 1 sec steps in a 8086. Too slow CPU I assume.
hi there, thank you for the reply. its an open question in one of my assesment books. just wana try it out and understand it first before my class.
i understand to replace ! with fitting registers, but how do i know from the program u wrote, the number 0 to 9 is turned on?
it looks so simple. you mind if you could explain further line by line of the program u worite what is actually happening?
To control a 7 segment display is some kind of translating table needed, simplest, let each bit in a hexadecimal byte corresponds to if a specific segment is lit or not.
In a 8086 is a byte 8 bits. x7Fh do then corresponds to when a 8 is turned, xOh and whole display is turned off.
You learn much better what happening by seeing the code execute.
EMU8086
A86 assembler
