This document provides information about assembly instructions, their machine codes, GPIO registers and other useful SFRs for an embedded systems course. It includes 17 assembly instructions, their descriptions and machine codes. It also lists GPIO registers, other useful SFRs and their addresses. Finally, it describes useful registers and their bit-level functionality.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views
Assembly C
This document provides information about assembly instructions, their machine codes, GPIO registers and other useful SFRs for an embedded systems course. It includes 17 assembly instructions, their descriptions and machine codes. It also lists GPIO registers, other useful SFRs and their addresses. Finally, it describes useful registers and their bit-level functionality.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
Embedded Systems (EE-354) Instructions Set and Register Description Annexure
NAME: Roll Number: Section: .
Section 1: Assembly Instructions and their Machine Codes S.No. Instruction Description Machine Code Syntax 1 LDI Rd, K ; load Rd (destination) with immediate value K ;d must be between 16 and 31 ; K is an 8-bit value that can be 0-255 in ; decimal 2 ADD Rd, Rr ;ADD Rr to Rd and store the result in Rd ;d = r = 0 – 31
3 LDS Rd, K ;load Rd with the contents of location K
;d = 0 – 31 ;K is an address between 0x0000 to 0xFFFF
4 STS K, Rr ;stores register Rr into location K
;K is an address between 0x0000 to 0xFFFF ;r = 0 – 31
5 IN Rd, A ;load an I/O location to one of the GPRs
;Rd = Rd + 1 ;d = 0 – 31 9 DEC Rd ;decrement the content of GPR Rd by 1 ;Rd = Rd – 1 ;d = 0 – 31 10 SUB Rd, Rr ;Rd = Rd – Rr ;d = r = 0 – 31
11 COM Rd ;complements Rd, Rd=Rd’
;d = 0 – 31
12 JMP label ;jump to name ‘label’ in the program
13 MUL Rd,Rr ;0 ≤ d ≤ 31, 0 ≤ r ≤ 31,
;the result is stored in R1:R0 in this order
14 SBI a, b ;a is ioReg can be any one of the first 32
; I/O registers (addresses 0 to 31) ;b is bit number. It is the desired bit ;number from 0 to 7.
Approved for use in Mid-term Exam, Spring 2024
Embedded Systems (EE-354) Instructions Set and Register Description Annexure NAME: Roll Number: Section: . 15 CBI a, b ;a is io Register can be any one of the first 32 ;I/O registers (addresses 0 to 31) ;b is bit number is the desired bit number from ;0 to 7.
16 SBIS a, b ; tests bit ‘b’ of location a (I/O address)