Sei sulla pagina 1di 15

___________________________________________________________________________

<Documentation>
8085 Assembler For Windows95 is as suggested by name
an assembler for 8085 microprocesser assembly program.
This product is non-commertial and intended only as a
demonstration College Project.
Included Files should not be used and sold or distributed
by anyone without permition of Developer.

Developed by Mandeep Singh Bhatia


(Electronics And Communications Engineering)
Required :
1. all program files
2. 80486 or above processor(386 may work- 4 MB Ram)
3. windows95 or above
___________________________________________________________________________
<Formats and Rules>
Programming the assembler:
Rules:

A valid name contains digits('0'..'9') and alphabets('A'..'Z'..'a'..'z')

Space and comma are treated the same

A constant or parameter can't accept a value greater


than ffffh any time. If a parameter is given out
of range value an error is obtained.

For instruction using register pair valid register pair


name should be put bc,de,hl,sp eg: lxi bc,eeffh
;This has been removed in new version in which use
B for BC etc;

All psuedo instructions and Assembly Instruction


mnemonics are reserved words and can not be defined
labels by user

A label declaration is done with a colon following the


label, while a constant declaration is done by a
following "=" sign or a following word "EQU" seperated with spaces, whil
e to put these values into a place they always have to be referenced by a follow
ing colon symbol and thus duplicate names are not permitted

In case a number is not followed by suffix h-for hex


or b-for binary it is considered decimal by default

An org instruction or a constant declaration must be


followed with a number(not a label)

A program must always end with END statement

A DB or DW psuedo instruction must be terminated with


a full stop

There can be no remark between an insruction and its


parameters (any instruction)
Also a semicolon shall cause compiler not to
read the following line, while " ' " shall cause
assembler not to read next instruction till
another " ' " is encountered

<Note: an address label is not an instruction while since a constant label is de


claired with an "=" or "EQU" psuedo instruction it can't have in b/w remarks eg:
const = 'constant' 40h
const=;
40h
' These would give an error as by above stated rule'
label: 'Procedure hello' Mov A,B is valid>
Psuedo instructions
ORG - (Psuedo Instruction)
This Psuedo Instruction tells the assembler where to start assembling for the ne
xt instruction.
eg:
org 200h; assemble next instruction from 200h
END (psuedo instruction)
This Instruction tells assembler to ctop compiling
eg:
End
DB (psuedo instruction)
This instruction lets us put data or string of data
(Byte- 8 bit) at given location
Db instruction is terminated if full stop is put
other wise a error of the type number,label expected or End statement missing sh
all occur
eg:
k=4; k holds value 4
Bytes: DB 40h,11b,15,k: . ;valid
DB 90h 001B . ;valid
;space and comma are treated the same
DW (psuedo instruction)
This instruction lets us put data or string of data
(Word- 16 bit) at given location
DW instruction is terminated if full stop is put
other wise a error of the type number,label expected or End statement missing sh
all occur
<Same is true for DB>
eg:
k=4; k holds value 4
DW ff40h,11b,15000,k:, L: .
L: DW ef90h 001B .

;space and comma are treated the same


Defining constant
The two methods of defining constants are
c1 = 45h
c2 equ fffeh
if you attempt to assign a value larger than the parameter can handle you get an
error
Source Code File:
The source code file is a normal text file
Output File Format
The output file is has following format
offset description
0000: a85 -header
0003: 2 bytes start address
0005: 2 bytes stop address
0006: <assembled code>;size =stop-start+1
<stop-start+1>: 2 bytes start address 'if more orgs exist
<stop-start+1+2>: 2 bytes stop address
<stop-start+1+2+1>: <assembled code>
<Note: multiple org's can be used in one text file
hence information for that must be stored as start and stop- 2 bytes each>

___________________________________________________________________________

<8085 Instruction Set Information>


________________________________________
OpCode symbol meaning
S
R
B
1
0

or D or X = 3-bit binary code


= 2-bit binary code
= 1-bit binary code
= binary 1
= binary 0

________________________________________
Mnemonic: ACI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11001110
________________________________________
Mnemonic: ADC

Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10001S
________________________________________
Mnemonic: ADD
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10000S
________________________________________
Mnemonic: ADI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11000110
________________________________________
Mnemonic: ANA
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10100S
________________________________________
Mnemonic: ANI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11100110
________________________________________
Mnemonic: CALL
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11001101
________________________________________
Mnemonic: CC
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11011100
________________________________________

Mnemonic: CM
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11111100
________________________________________
Mnemonic: CMA
Parameter Count: 0
OpCode Formula(Binary): 00101111
________________________________________
Mnemonic: CMC
Parameter Count: 0
OpCode Formula(Binary): 00111111
________________________________________
Mnemonic: CMP
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10111S
________________________________________
Mnemonic: CNC
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11010100
________________________________________
Mnemonic: CNZ
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11000100
________________________________________
Mnemonic: CP
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11110100
________________________________________

Mnemonic: CPE
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11101100
________________________________________
Mnemonic: CPI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11111110
________________________________________
Mnemonic: CPO
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11100100
________________________________________
Mnemonic: CZ
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11001100
________________________________________
Mnemonic: DAA
Parameter Count: 0
OpCode Formula(Binary): 00100111
________________________________________
Mnemonic: DAD
Parameter Count: 1
Parameter 1: Register pair (BC or DE or HL or SP)
OpCode Formula(Binary): 00R1001
________________________________________
Mnemonic: DCR
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 00S101
________________________________________

Mnemonic: DCX
Parameter Count: 1
Parameter 1: Register pair (BC or DE or HL or SP)
OpCode Formula(Binary): 00R1011
________________________________________
Mnemonic: DI
Parameter Count: 0
OpCode Formula(Binary): 11110011
________________________________________
Mnemonic: EI
Parameter Count: 0
OpCode Formula(Binary): 11111011
________________________________________
Mnemonic: HLT
Parameter Count: 0
OpCode Formula(Binary): 01110110
________________________________________
Mnemonic: IN
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11011011
________________________________________
Mnemonic: INR
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 00S100
________________________________________
Mnemonic: INX
Parameter Count: 1
Parameter 1: Register pair (BC or DE or HL or SP)
OpCode Formula(Binary): 00R0011
________________________________________
Mnemonic: JC

Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11011010
________________________________________
Mnemonic: JM
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11111010
________________________________________
Mnemonic: JMP
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11000011
________________________________________
Mnemonic: JNC
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11010010
________________________________________
Mnemonic: JNZ
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11000010
________________________________________
Mnemonic: JP
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11110010
________________________________________
Mnemonic: JPE
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11101010
________________________________________

Mnemonic: JPO
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11100010
________________________________________
Mnemonic: JZ
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 11001010
________________________________________
Mnemonic: LDA
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 00111010
________________________________________
Mnemonic: LDAX
Parameter Count: 1
Parameter 1: Register pair (BC or DE only)
OpCode Formula(Binary): 000B1010
________________________________________
Mnemonic: LHLD
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 00101010
________________________________________
Mnemonic: LXI
Parameter Count: 2
Parameter 1: Register pair (BC or DE or HL or SP)
Parameter 2: 16-bit number
OpCode Formula(Binary): 00R0001
________________________________________
Mnemonic: MOV
Parameter Count: 2

Parameter 1: Register(A,B,C,D,E,H,L,M)
Parameter 2: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 01DS
________________________________________
Mnemonic: MVI
Parameter Count: 2
Parameter 1: Register(A,B,C,D,E,H,L,M)
Parameter 2: 8-bit number
OpCode Formula(Binary): 00D110
________________________________________
Mnemonic: NOP
Parameter Count: 0
OpCode Formula(Binary): 00000000
________________________________________
Mnemonic: ORA
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10110S
________________________________________
Mnemonic: ORI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11110110
________________________________________
Mnemonic: OUT
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11010011
________________________________________
Mnemonic: PCHL
Parameter Count: 0
OpCode Formula(Binary): 11101001
________________________________________

Mnemonic: POP
Parameter Count: 1
Parameter 1: Register pair (BC or DE or HL or SP)
OpCode Formula(Binary): 11R0001
________________________________________
Mnemonic: PUSH
Parameter Count: 1
Parameter 1: Register pair (BC or DE or HL or SP)
OpCode Formula(Binary): 11R0101
________________________________________
Mnemonic: RAL
Parameter Count: 0
OpCode Formula(Binary): 00010111
________________________________________
Mnemonic: RAR
Parameter Count: 0
OpCode Formula(Binary): 00011111
________________________________________
Mnemonic: RC
Parameter Count: 0
OpCode Formula(Binary): 11011000
________________________________________
Mnemonic: RET
Parameter Count: 0
OpCode Formula(Binary): 11001001
________________________________________
Mnemonic: RIM
Parameter Count: 0
OpCode Formula(Binary): 00100000
________________________________________
Mnemonic: RLC
Parameter Count: 0
OpCode Formula(Binary): 00000111
________________________________________

Mnemonic: RM
Parameter Count: 0
OpCode Formula(Binary): 11111000
________________________________________
Mnemonic: RNC
Parameter Count: 0
OpCode Formula(Binary): 11010000
________________________________________
Mnemonic: RNZ
Parameter Count: 0
OpCode Formula(Binary): 11000000
________________________________________
Mnemonic: RP
Parameter Count: 0
OpCode Formula(Binary): 11110000
________________________________________
Mnemonic: RPE
Parameter Count: 0
OpCode Formula(Binary): 11101000
________________________________________
Mnemonic: RPO
Parameter Count: 0
OpCode Formula(Binary): 11100000
________________________________________
Mnemonic: RRC
Parameter Count: 0
OpCode Formula(Binary): 00001111
________________________________________
Mnemonic: RST
Parameter Count: 1
Parameter 1: 3-bit number
OpCode Formula(Binary): 11X111
________________________________________
Mnemonic: RZ

Parameter Count: 0
OpCode Formula(Binary): 11101000
________________________________________
Mnemonic: SBB
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10011S
________________________________________
Mnemonic: SBI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11011110
________________________________________
Mnemonic: SHLD
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 00100010
________________________________________
Mnemonic: SIM
Parameter Count: 0
OpCode Formula(Binary): 00110000
________________________________________
Mnemonic: SPHL
Parameter Count: 0
OpCode Formula(Binary): 11111001
________________________________________
Mnemonic: STA
Parameter Count: 1
Parameter 1: 16-bit number
OpCode Formula(Binary): 00110010
________________________________________
Mnemonic: STAX
Parameter Count: 1
Parameter 1: Register pair (BC or DE only)

OpCode Formula(Binary): 000B0010


________________________________________
Mnemonic: STC
Parameter Count: 0
OpCode Formula(Binary): 00110111
________________________________________
Mnemonic: SUB
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10010S
________________________________________
Mnemonic: SUI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11010110
________________________________________
Mnemonic: XCHG
Parameter Count: 0
OpCode Formula(Binary): 11101011
________________________________________
Mnemonic: XRA
Parameter Count: 1
Parameter 1: Register(A,B,C,D,E,H,L,M)
OpCode Formula(Binary): 10101S
________________________________________
Mnemonic: XRI
Parameter Count: 1
Parameter 1: 8-bit number
OpCode Formula(Binary): 11101110
________________________________________
Mnemonic: XTHL
Parameter Count: 0
OpCode Formula(Binary): 11100011
________________________________________

End of Instruction document.

Potrebbero piacerti anche