Assembly language........

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hi again,

In DAA is used for Direct add acc., in course book it was written for decimal adjust or binary something like this. please tell the use of this in program??
 

retched

Joined Dec 5, 2009
5,207
Rich (BB code):
Add register pair to H and L registers 
 DAD 
 Reg. pair 

The 16-bit contents of the specified register pair are added to the contents of
 the HL register and the sum isstored in the HL register.The contents of the 
source register pair are not altered.If the result is larger than 16 bits, the CY 
flag is set. No other flags are affected. 

 Example: DAD H
Rich (BB code):
Decimal adjust accumulator 
 DAA 
 none 

The contents of the accumulator are changed from a binary value to two 4-
bit binary coded decimal (BCD) digits.This is the only instruction that uses 
the auxiliary flag to perform the binary to BCD conversion, and the conversion 
procedure is described below.S, Z, AC, P, CY flags are altered to reflect the 
results of the operation. 


If the value of the low-order 4-bits in the accumulator is greater than 9 or if 
AC flag is set, the instruction adds 6 to the low-order four bits. 


If the value of the high-order 4-bits in the accumulator is greater than 9 or if
 the Carry flag is set, the instruction adds 6 to the high-order four bits. 

 Example: DAA
 
Last edited:

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
It was a copyrighted link..
I got this link, copy it to Google.

Ok, as 8086 uP use 16 bit for 64Kb 4bit extra add. make it 16x64kb i.e. 1MB then where these so much memory is used? except segment registers.
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
ORG 00H
COUNT EQU 2 ;totel hex size/2 (IN DESIMAL)
DB 11H
DB 00H
DB 33H
DB 22H ;data

MOV A,#00H ;acc initialization
MOV DPTR,#0000H ;dptr loaded with even data address
MOV R1,COUNT ;counter
CALL LOOP1
MOV R3,A ;even parity
MOV A,#00H ;acc initialization
MOV DPTR,#0001H ;dptr loaded with odd data address
MOV R1,COUNT ;counter
CALL LOOP1
MOV R4,A ;odd parity

LOOP1:
LOOP: MOV A,#00H
MOVC A,@A+DPTR
ADD A,R2
MOV R2,A
INC DPTR
CLR C
DJNZ R1,LOOP
RET

END

what the use of #??
 

DumboFixer

Joined Feb 10, 2009
217
Have you read the help text for the Oshon basic compiler as it tells you how to do it ?

Config PORTB = Output
Config PORTC = Input
Config PORTC.3 = Input

When you have compiled, assembled and loaded your program you can then run it. Once it is running select "Microcontroller view" from the tools menu. You can now click on the "T" by the pins you want to turn on/off
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hi again,

In 8085 up which pins are connected to in port & out? as i am using 8085 stimulator it is used for up only or whole 8085 board connected with peripheral device.

i am asking this because there are 16bit data & 20bit address.
 

t06afre

Joined May 11, 2009
5,934
The 8085 has no IO pins like a micro-controller. You should now that by now. The IO pins will be on some external chip made for IO. This chip may be "mapped" or addressable either in the memory address area, or the IO address area. How this is done is up to the system designer. It is no universal answer to this.
 
Last edited:

t06afre

Joined May 11, 2009
5,934
Holy Macaroni RickRock. Then you do not find one instruction that do not do all you want. You combine several instructions in a program. It is named coding or programming. And in your case assembler coding/programming. For this you will need
  1. The correct instruction set
  2. Some willingness to navigate in unknown water. And also some inner drive to explore the unknown.
Some is born with this gift. Those of us who are not so fortunate must learn this the hard way. You can not learn how to swim without getting wet. But you have also the saying "Non omnia possumus omnes"
 
Last edited:
Top