Modify the following assembly code section in order to make: The pins 0 and 1 of
ID: 3850895 • Letter: M
Question
Modify the following assembly code section in order to make: The pins 0 and 1 of PORTA inputs. All PORTB pins outputs, PORTB pins 7, 5, 3 & 1 have the logic value 1. BCF ST ATUS.RP0 MOVLW b'00000000' MOVWF TRISA MOVLW b'10101010 MOVWF TRlSB BSF STATUSRP0 MOVLW b'01010101 MOVWF TRtSB The register which indicates that exact part of the execution sequel where the program is running is called? Write just the assembly code section to evaluate the sum of 0x48 + 0x26 Explain the difference between SUBWF and SUBWFB What is the STATUS REGISTER? What is used for? What is the difference between reading the LATCH REGISTER reading the PORT REGISTERExplanation / Answer
1.
BCF status,RP0
MOVLW b'00000011'; 0&1 pins are inputs and remaining are outputs;
MOVWF TRISA;
MOVLW b'00000000';all the pins are outputs;
MOVWF TRISB;
BSF status,RP0
MOVLW b'10101010'; port B pins 7,5,3 & 1 have the logic value 1.
MOVWF TRISB;
2.
Program Counter(PC) : Program counter is a register that contains the address (location) of the instruction being executed at the current time.
Instruction Pointer (IP): IP contains the address of the next instruction to be executed.
3.
Mov AX,#48h;
Mov BX,#26h;
Add AX,BX; Result is stored in AX
The syntax may change for different processors or controller, but the logic is same.
4.
Subwf is simply subtraction of word from f, wheras subwfb is subtraction along with the borrow.
Please rate it if you get the answer. Thanks...)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.