Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

8086 Assembly language

Status
Not open for further replies.

shermaine

Newbie level 6
Joined
Aug 15, 2005
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
8086 assembly

basically, how to i write a asembly program displaying 5 digit random number on the five 7-segment LEDs and automatically incremented by one every second whenever pushbutton 3 is pressed. Pressing push button 4 shall alternately pause and continue the counting. Is there any sample program which i can have a look? Please advise. Thanks!
 

gliss

Advanced Member level 2
Joined
Apr 22, 2005
Messages
692
Helped
75
Reputation
150
Reaction score
16
Trophy points
1,298
Activity points
5,892
8086 assembly language

It depends mostly on the hardware you're using. Like what hardware, I/O ports and memory space, etc.
 

udit

Member level 3
Joined
Jun 27, 2005
Messages
60
Helped
4
Reputation
10
Reaction score
2
Trophy points
1,288
Location
Canada
Activity points
1,824
8086 assembly language programs

Well i have a code for generating the random numbers on 8085 trainer kit.
If you want that i can send it to you but it wont be much useful as most of the things depend on the trainer kit,or hardware that you are using.
 

    shermaine

    points: 2
    Helpful Answer Positive Rating

shermaine

Newbie level 6
Joined
Aug 15, 2005
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
8086 assembly kit

Hi,

Could you please send it to me?
 

gliss

Advanced Member level 2
Joined
Apr 22, 2005
Messages
692
Helped
75
Reputation
150
Reaction score
16
Trophy points
1,298
Activity points
5,892
8086 assembly loop

What hardware are you using shermaine?
 

udit

Member level 3
Joined
Jun 27, 2005
Messages
60
Helped
4
Reputation
10
Reaction score
2
Trophy points
1,288
Location
Canada
Activity points
1,824
seven segment asm 8086

the code for a random numer generator
the main program consist of a simple loop to increment a byte counter.The counter after reaching FFh,become 0 again with one further increment and thus is alwyas a value between 0 and FFh.Whenever the user presses KBINT (rst7.5 interrupt in our trainer kit)the interrupt service routine fetches the counter value ,masks off the most significant 6 bits,displays the value (thus the number displayed is alwats 0,1,,2,3)and returns to main program which to update the counter value

main program
MVI A,0B; UNMASK RST7.5 INTERRUPT
SIM;enable interrupts
EI;intialise interrupt
XRA A
LOOP:INR A
JMP LOOP

now in my kit whenever kbint is presses it transfers the control to 8fbf mem location after executing the instruction at 3C
So at 8FBF we eneter JMP to some new location (say address 8820)


now at 8820H we writ
PUSH PSW ;for saving a counter
ANI 03 :to mask off the most significant 6 bits
LOOP: STA 8FF1 ;STORE CONTENT OF ACC TO ADRESS 8FF1
MVI B,00; LOAD REG B WITH 0(TO AVOID DOTS IN DISPLAY)
CALL UPDDT;(DISPLAY THE DATA AT ADDRESS 8FF1)KIT'S SPECIFIC FUNXN
POP PSW
EI
RET ;RETURN TO MAIN PROGRAM


ANY RANDOM NUMBER BETWEEN 0 AN 3 IS DISPLAYED WHENVR KBINT IS PRESSED.



thIS PROGRAM IS SPECIFIC TO A KIT BUT I THINK THE LOGIC WOULD BE CLEAR TO YOU.BUT THE CODING DEPENDS ON THE HARDWARE
 

shermaine

Newbie level 6
Joined
Aug 15, 2005
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
increment variable 8086

My hardware is per attached. I need to construct an address decoding circuitry on an ISA adapter card for decoding the I?O devices. The I/O devices consist of five 7-segment LEDs, one 16-segment LED and eight push buttons. The 16-bit data bus is for data transfer, and I/O map for I?O devices. The I/O address for 16-segment LED is 300H-301H and I/O address for 5 x 7 segment LEDS is 302H-306H and I/O address for 8 x push button is 307H (D8-D15)
I need to do a auntomatic incremental counter ( how sould the program be like for this part)? A 5 digit random number shall be displayed on the five 7 -segnebt LEDs and automtically incremented by one every second whenever pushbutton 3 is pressed. Any one can advise me on this part's programming? Thanks!!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top