Title: 87C750 Assembly Language Intro
187C750 Assembly Language Intro
ECET2210/01
2Categories of Instruction Mnemonics
- Arithmetic
- ADD - addition
- ADDC - addition with carry
- SUBB - subtraction
- INC - increment
- DEC - decrement
- MUL - multiplication
- DIV - division
3- Logical
- ANL - AND 2 bits
- ORL - OR 2 bits
- CPL - complement/invert
- XRL - XOR 2 bits
- RL - rotate bits right once
- RLC - rotate bits right thru carry bit
- RR - rotate bits right once
- RRC - rotate bits right thru carry bit
4- Program Control
- CALL - subroutine call
- SJMP - short jump
- AJMP - absolute jump
- LJMP - long jump (N/A on 75x)
- RET - return from subroutine
- RETI - return from interrupt
5- Data Transfer
- MOV - move RAM contents
- MOVX - Move external - N/A on 75x PUSH - push
to stack - POP - pop from stack
- XCH - exchange
687C750 Addressing Modes
Direct Addressing - operand is an 8-bit address
(only for RAM and SFRs) MOV A, 40h BBh -gt
A MOV B, P1 2Fh -gt B
7Indirect Addressing - address contained in any
one of R0, R1, SP (all 8 bits) and DPTR (16
bit) MOV A, _at_R0 AAh -gt A
8Immediate Constant Addressing - operand is data
value MOV A, 42h 42h -gt A MOV B, 42
2Ah -gt B
9Register Addressing Mode - contents of registers
are accessed with instructions having a 3-bit
specification MOV A, R1 22h -gt A
10Indexed Addressing - address formed by adding
contents of A to DPTR (data pointer) or PC (used
for program mem.) MOVC A, _at_A DPTR
11DEBUG assembler directives MOD750 required
for all programs org 00h MOV DPTR, 0100h init.
l.u. table MOV A, 0 A number MOVC A,
_at_ADPTR A pattern org 0100h here is where
l.u. table starts DB 0CH,0F9H,0A4H,0B0H,99H,92H,82
H DB 0F8H,80H,90H,88H,83H,0C6H,0A1H, DB 86H,8EH
here is lu table END a must at the bottom of
code
12(No Transcript)
13 THIS IS VERY RARELY USED Register Specific Mode
- contents of certain registers are accessed with
instructions instead of direct bytes MOV A,
100 100 -gt A MOV ACC, 100 100 -gt A