Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Fundmentals of microcontrollers, Lecture notes of Engineering

Fundmentals of microcontrollers

Typology: Lecture notes

2024/2025

Uploaded on 02/03/2025

single-abdou-2
single-abdou-2 🇨🇦

19 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Fundmentals of microcontrollers and more Lecture notes Engineering in PDF only on Docsity!

EMCH 367 Fundamentals of Microcontrollers Example 9 EXAMPLE 9 OBJECTIVE This exercise has the following objectives: | Introduce hex subtraction 0 Introduce hex subtraction with negative results using the free borrow concept. 0 Show the decimal equivalent of hex subtraction with negative results using free borrow. Note: To facilitate understanding, the same numbers are used in both decimal and the hex cases. PROGRAM The program ex9.asm performs the following arithmetic operations: |. $0d - $06 = $07 (hex) using the opcode mnemonics LDAA, LDAB, SBA Il. $00 - $05 = $fb (hex) using the opcode mnemonics LDAA, LDAB, SBA I. 0 - 5 = 251 (decimal equivalent of &-bit hex arithmetic) using the opcode mnemonics LDAA, LDAB, SBA IV. $0e - $3a = $d4 (hex) using the opcode mnemonics LDAA, LDAB, SBA V. 14 - 58 = 212 (decimal equivalent of 8-bit hex arithmetic) using the opcode mnemonics LDAA, LDAB, SBA Dr. Victor Giurgiutiu Pagel 14/2019