Assembly language........

debjit625

Joined Apr 17, 2010
790
Go back, way back, when the 8085 was actually useful.

http://www.classiccmp.org/dunfield/kyocera/service.pdf

This document describes the device as used in probably it's most successfull application. Read over the Theory of operation to see how the device must be supported by external integration for it to become of any real use.

Is it your intent to work with hardware, or are you just simulating?
Is it a big calculator?.:D

Anyway good stuff for RRITESH KAKKAR.
 

debjit625

Joined Apr 17, 2010
790
Dont know much about your kit but,I think to start the program again you use RST instruction,you are looping the program using RST instruction rather using HLT to stop.

Good Luck
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
Ihere we use HLt in OSHON, but in case of our 8085 scientific training kit RST 5 is used,why??
It's only a guess, but a HaLT would allow single stepping, while a RST may allow a status collection routine and a wait loop to resume.

You should really try to answer this one yourself. It would show that your putting an effort in to understand the device and the related tools.
 

debjit625

Joined Apr 17, 2010
790
They all jump to a specific address which will contain some instruction which will be executed after jump.Here the address

Rich (BB code):
RST 0 --> 0x0000
RST 1 --> 0x0008
RST 2 --> 0x0010
RST 3 --> 0x0018
RST 4 --> 0x0020
RST 5 --> 0x0028
RST 6 --> 0x0030
RST 7 --> 0x0038
I think we have already said about it on your earlier post....

Now how it makes a loop,in your kit may be at address 0x0028 (RST 5) their will be a jump instruction with the address of the main routine ,so that when ever you call a RST 5 instruction the execution transfers to 0x0028 location and from their it executes the jump instruction to the main routine.

Good Luck
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Rich (BB code):
;jump at the main program
 JMP 2003H
 
.ORG 2000H
DATA_1 .DB 03H ;2000H location to store data initialized to 3
DATA_2 .DB 06H ;2001H location to store data initialized to 6
RESULT .DB 00H ;2003H location to store data initialized to 0
;The jump instruction takes the execution here.
.ORG 2003H 
 
;Here we load the memory address "2000H" i.e. DATA1 to reg pair HL
 LXI H,2000H 
;Now we move the value "03" pointed by the address in HL pair 
;i.e. data at 2000H in accumulator register
 MOV A,M
;Increment by 1 the address in HL pair i.e 2000H + 1 = 2001H
 INX H
;Add the data pointed by the address in HL pair with the data in accumulator register
 ADD M
;Increment by 1 the address in HL pair i.e 2001H + 1 = 2002H
 INX H
;Move the data from the accumulator register to the address pointed by the HL pair i.e at 2002H 
 MOV M,A
;Halt the program
 HLT
Good Luck


Hi,
In this program during stimulation it shows error at, and please tell about this initialization as it is not describe in 8085 programming model in coursre book....

DATA_1 .DB 03H ;2000H location to store data initialized to 3
DATA_2 .DB 06H ;2001H location to store data initialized to 6
RESULT .DB 00H ;2003H location to store data initialized to 0
 

debjit625

Joined Apr 17, 2010
790
RRITESH KAKKAR said:
Hi,
In this program during stimulation it shows error at, and please tell about this initialization as it is not describe in 8085 programming model in coursre book....
I have no problem during simulation,it must be something else which caused the problem.Try to load the files from the zip file,they all are assembled in Oshon's 8085 Simulator IDE..
 

debjit625

Joined Apr 17, 2010
790
can please tell the about this more, .ORG add.??
".ORG add." together doesn't make any sence as per me but ".ORG" and "ADD" have meaning in 8085's assembly.

".ORG" is an assembler directive i.e.. when you give an address after this directive you are asking the assembler to start your content(instruction,data) at that address for example...
Rich (BB code):
.ORG 0x0020
ADD M
here you are asking the assembler to put the instruction "ADD M" at memory location "0x0020"

Now about ADD instruction,its adds register or memory to accumulator i.e.. the contents of the operand (register or memory) is added with the contents of the accumulator register for example
Rich (BB code):
Rich (BB code):
ADD B
ADD M


In first instruction, its adding the contents of reg "B" with contents of the accumulator.
On second instruction ,its adding the contents of memory address stored in "HL" pair with contents of the accumulator.

You can google for assembly for 8085.

Good Luck

 

t06afre

Joined May 11, 2009
5,934
It would really be easier for RRITESH KAKKAR. If debjit625 or someone else. Would just fly to wherever RRITESH KAKKAR lives, sit next to him, and handhold him through programming for the rest of his assembler career
 
Last edited:

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hi,

In this program i want to know the instruction EQN which is used for defining variable but i don't find this instruction in 8085 ass. in book this program is running in stimulator, i don't understand the variable name give is CNST when i change it the program shows error, please clear my dout for this............


Thanks.
org 0 ; The code is to be loaded into memory
; beginning at location 0
cnst equ 50 ; Set cnst to 50
xyz: db 72 ; Allocate a memory location for 72,
; name it, and set it to 72
result: ds 1 ; Allocate a memory location for result
start: mvi a, cnst ; Load 50 into the accumulator
lxi h, xyz ; Load the address of xyz into the H-L
; register pair
add m ; Add the value, 72, to the value in the
; accumulator. The sum is stored in the
; accumulator.
lxi h, result ; Load the address of result into the H-L
; register pair
mov M, A ; Copy the accumulator to the memory
; location, result
hlt ; Halt the processor
end start ; End of assembly
 
Top