arm assembly language and machine codecs107e.github.io/lectures/asm/slides.pdf · 2020-02-26 ·...

56
ARM Assembly Language and Machine Code Goal: Blink an LED

Upload: others

Post on 04-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

ARM

Assembly Language and

Machine Code

Goal: Blink an LED

Page 2: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

///SET0=0x2020001c//SET0=0x20200020movr0,#0x20//0x00000020lslr1,r0,#24//0x20000000lslr2,r0,#16//0x00200000orrr0,r1,r2//0x20200000orrr0,r0,#0x1c//0x2020001cmovr1,#1//0x00000001lslr1,#20//0x00010000strr1,[r0]//store1<<20to0x2020001c

//loopforeverloop:bloop

Page 3: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//configureGPIO20foroutput////FSEL0=0x20200000//FSEL1=0x20200004//FSEL2=0x20200008//...movr0,#0x20//0x00000020lslr1,r0,#24//0x20000000lslr2,r0,#16//0x00200000orrr0,r1,r2//0x20200000orrr0,r0,#0x08//0x20200008movr1,#1//1indicatesOUTPUTstrr1,[r0]//store1to0x20200008

Page 4: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Watchoutfor…Manualsays:0x7E200000Replace7Ewith20:0x20200000

Ref: BCM2835-ARM-Peripherals.pdf

GPIO Function Select Registers Addresses

Page 5: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Specifying 1 of 8 functions requires 3 bits

Bit pattern Pin Function000 The pin in an input 001 The pin is an output 100 The pin does alternate function 0 101 The pin does alternate function 1 110 The pin does alternate function 2111 The pin does alternate function 3011 The pin does alternate function 4010 The pin does alternate function 5

GPIO Pins can be configured to be INPUT, OUTPUT, or ALT0-ALT5

Page 6: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

2 1 05 4 38 7 69101114 13 1215161720 19 1821222326 25 242728293031

GPIO 0GPIO 1GPIO 3 GPIO 4GPIO 5GPIO 6 GPIO 7GPIO 8GPIO 9 GPIO 2

GPIO Function Select Register

3 bits per GPIO pin

10 pins per 32-bit register (2 wasted bits)

Function is INPUT, OUTPUT, or ALT0-ALT5

54 GPIOs pins requires 6 registers

Page 7: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian
Page 8: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

2 1 05 4 38 7 69101114 13 1215161720 19 1821222326 25 242728293031

34 33 3237 36 3540 39 3841424346 45 4447484952 51 5053

2020001C:GPIOSET0Register20200020:GPIOSET1Register

GPIO Function SET Register

Notes 1. 1 bit per GPIO pin 2. 54 pins requires 2 registers

Page 9: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

02000000016

10000000016Memory Map 4 GB

Ref: BCM2835-ARM-Peripherals.pdf

Peripheral registers are mapped into address space

Memory-Mapped IO (MMIO)

MMIO space is above physical memory

512 MB

Page 10: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

3 Types of Instructions

1. Data processing instructions

2. Loads from and stores to memory

3. Conditional branches to new program locations

Page 11: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Data Processing Instructions and

Machine Code

Page 12: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

From armisa.pdf

Page 13: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction##ra=rboprc

oprbrarc111000ioooosbbbbaaaacccccccccccc

Data processing instruction

Always execute the instruction

Immediate mode instruction

Set condition codes

Page 14: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Assembly Code OperationsAND 0000 ra=rb&rcEOR(XOR) 0001 ra=rb^rcSUB 0010 ra=rb-rcRSB 0011 ra=rc-rbADD 0100 ra=rb+rcADC 0101 ra=rb+rc+CARRYSBC 0110 ra=rb-rc+(1-CARRY)RSC 0111 ra=rc-rb+(1-CARRY)TST 1000 rb&rc(ranotset)TEQ 1001 rb^rc(ranotset)CMP 1010 rb-rc(ranotset)CMN 1011 rb+rc(ranotset)ORR(OR) 1100 ra=rb|rcMOV 1101 ra=rcBIC 1110 ra=rb&~rcMVN 1111 ra=~rc

Page 15: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rboprc#

oprbrarc111000ioooosbbbbaaaacccccccccccc

#i=0,s=0addr1r0r211100000100000010000000000000010

Page 16: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rboprc#

oprbrarc111000ioooosbbbbaaaacccccccccccc

#i=0,s=0addr1r0r211100000100000010000000000000010

11100000100000010000000000000010E0810002

Page 17: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

E0 81 00 02020081E0

ADDRADDR+1ADDR+2ADDR+3

little-endian(LSBfirst)

most-significant-byte (MSB)

least-significant-byte (LSB)

ARM uses little-endian

Page 18: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

E0 81 00 02E0810002

big-endian(MSBfirst)

most-significant-byte (MSB)

ADDRADDR+1ADDR+2ADDR+3

least-significant-byte (LSB)

Page 19: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Read: Holy Wars and a Plea For Peace, D. Cohen

The 'little-endian' and 'big-endian' terminology which is used to denote the two approaches [to addressing memory] is derived from Swift's Gulliver s Travels. The inhabitants of Lilliput, who are well known for being rather small, are, in addition, constrained by law to break their eggs only at the little end. When this law is imposed, those of their fellow citizens who prefer to break their eggs at the big end take exception to the new rule and civil war breaks out. The big-endians eventually take refuge on a nearby island, which is the kingdom of Blefuscu. The civil war results in many casualties.

Page 20: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Registers

ALU

DATA

ADDR

INST

+

Memory

ADDR

1

r1

r0

addr0,r1,#1

Immediate value (#1) stored in INST

Page 21: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rbop#imm##imm=uuuuuuuu

addr1r0imm111000101000000100000000uuuuuuuu

addr0,r1,#1

#i=1,s=0##Asinimmediatelyavailable,#i.e.noneedtofetchfrommemory

Page 22: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rbop#imm##imm=uuuuuuuu

addr1r0imm111000101000000100000000uuuuuuuu

addr0,r1,#1addr1r0#111100010100000010000000000000001

Page 23: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rbop#imm##imm=uuuuuuuu

addr1r0imm111000101000000100000000uuuuuuuu

addr0,r1,#1addr1r0#111100010100000010000000000000001

11100010100000010000000000000001E2810001

Page 24: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Registers

ALU

Shift

DATA

ADDR

INST

+

Memory

ADDR

Page 25: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Rotate Right (ROR) - Rotation amount = 2x

Page 26: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rbopimm#imm=(uuuuuuuu)ROR(2*rrrr)

oprbrarorimm1110001oooo0bbbbaaaarrrruuuuuuuu

RORmeansRotateRight(imm>>>rotate)

Page 27: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rbopimm#imm=(uuuuuuuu)ROR(2*rrrr)

oprbraroruuu1110001oooo0bbbbaaaarrrruuuuuuuu

addr0,r1,#0x10000addr1r00x01>>>2*811100010100000010000100000000001

0x01>>>160000000000000000000000000000000100000000000000010000000000000000

Page 28: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rbopimm#imm=(uuuuuuuu)ROR(2*rrrr)

oprbrarorimm1110001oooo0bbbbaaaarrrruuuuuuuu

addr0,r1,#0x10000addr1r00x01>>>2*811100010100000010000100000000001

11100010100000010000100000000001E2810801

Page 29: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#Determinethemachinecodefor

subr7,r5,#0x300

#imm=(uuuuuuuu)ROR(2*rrrr)

#Rememberthatraistheresult

oprbrarorimm111000ioooosbbbbaaaarrrruuuuuuuu

//Whatisthemachinecode?

Assembly Code OperationsSUB 0010 ra=rb-rchint:

Page 30: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#dataprocessinginstruction#ra=rbopimm#imm=uuuuuuuuROR(2*rrrr)

oprbraror111000ioooosbbbbaaaarrrruuuuuuuu

subr7,r5,#0x300subr5r7#0x03>>>2411100010010001010111110000000011

11100010010001010111110000000011E2457C03

Page 31: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian
Page 32: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//SET1=0x2020001cmovr0,#0x20000000//0x20>>>8orrr0,#0x00200000//0x20>>>16orrr0,#0x0000001c//0x1c>>>0

Page 33: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

ldrr0,[r1,#4]

r1

ADDR=r1+4DATA= Memory[ADDR]

Load from Memory to Register (LDR)

4Registers

ALU

DATA

ADDR

INST

+

Memory

Page 34: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//configureGPIO20foroutputldrr0,FSEL2movr1,#1strr1,[r0]

//setbit20

ldrr0,SET0movr1,#0x00100000strr1,[r0]

loop:bloop

FSEL0:.word0x20200000FSEL1:.word0x20200004FSEL2:.word0x20200008SET0:.word0x2020001CSET1:.word0x20200020CLR0:.word0x20200028CLR1:.word0x2020002C

Page 35: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Fetch

3 steps to run an instruction

Decode Execute

Page 36: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Fetch

3 instructions takes 9 steps

Decode Execute Fetch DecodeDecode Execute

Page 37: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Fetch Decode Execute

Fetch Decode Execute

Fetch Decode Execute

To speed things up, steps are overlapped ("pipelined")

Page 38: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Fetch

To speed things up, steps are overlapped ("pipelined")

Decode Execute

Fetch Decode Execute

Fetch Decode Execute

PC value in the executing instruction is equal to the pc value of the instruction being fetched - which is 2 instructions ahead (PC+8)

Page 39: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Blink

Page 40: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

movr1,#(1<<20)

//TurnonLEDconnectedtoGPIO20ldrr0,SET0strr1,[r0]

//TurnoffLEDconnectedtoGPIO20ldrr0,CLR0strr1,[r0]

2 1 05 4 38 7 69101114 13 1215161720 19 1821222326 25 242728293031

34 33 3237 36 3540 39 3841424346 45 4447484952 51 5053

Page 41: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//ConfigureGPIO20forOUTPUT

loop:

//TurnonLED

//TurnoffLED

bloop

Page 42: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Loops and Condition Codes

Page 43: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//defineconstant.equDELAY,0x3f0000

movr2,#DELAY

loop:

subsr2,r2,#1//ssetcondcode

bneloop//branchifr2!=0

Page 44: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Manipulating Bit Fields

Page 45: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//SetGPIO20toOUTPUTmovr1,#1strr1,[r0]

//SetGPIO21toOUTPUTmovr1,#(1<<3)strr1,[r0]

//WhatvalueisinFSEL2now?//WhatmodeisGPIO20settonow?

2 1 05 4 38 7 69101114 13 1215161720 19 1821222326 25 242728293031

GPIO2 0GPIO2 1GPIO2 3 GPIO 24GPIO2 5GPIO 26 GPIO 27GPIO 28GPIO 29 GPIO 22

Page 46: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//SetGPIO20toOUTPUTmovr1,#1strr1,[r0]…

//PreserveGPIO20,setGPIO21toOUTPUTldrr1,[r0]andr1,#~(0x7<<3)orrr1,#(0x1<<3)strr1,[r0]

//WhatvalueisinFSEL2now?

2 1 05 4 38 7 69101114 13 1215161720 19 1821222326 25 242728293031

GPIO2 0GPIO2 1GPIO2 3 GPIO 24GPIO2 5GPIO 26 GPIO 27GPIO 28GPIO 29 GPIO 22

Page 47: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

//LDRFSEL2,GPIO20isOUTPUTldrr1,[r0]00000000000000000000000000000001//0x700000000000000000000000000000111//0x7<<300000000000000000000000000111000//~(0x7<<3)11111111111111111111111111000111andr1,#~(0x7<<3)00000000000000000000000000000001orrr1,#(0x1<<3)00000000000000000000000000001001

Page 48: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Orthogonal InstructionsAny operation

Register vs. immediate operands

All registers the same**

Predicated/conditional execution

Set or not set condition code

Orthogonality leads to composability

Page 49: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

SummaryYou need to understand how processors represent and execute instructions

Instruction set architecture often easier to understand by looking at the bits. Encoding instructions in 32-bits requires trade-offs, careful design

Only write assembly when it is needed. Reading assembly more important than writing assembly Allows you to see what the compiler and processor are actually doing

Normally write code in C (Julie, starting Fri)

Page 50: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

The Fun Begins …Lab1

■ Install tool chain before lab

■Read lab1 instructions (now online)

■Assemble Raspberry Pi Kit

■Bring USB-C to USB-A adapter (if you need it)

Assignment 1

■ Larson scanner

■YEAH office hours Thu 3-4pm in B21

Page 51: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Definitive ReferencesBCM2865 peripherals document + errata

Raspberry Pi schematic

ARMv6 architecture reference manual

see Resources on cs107e.github.io

Page 52: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Extra Material on Branches

Page 53: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Branch Instructions

Page 54: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Condition CodesZ - Result is 0

N - Result is <0

C - Carry generated

V - Arithmetic overflow

Carry and overflow will be covered later

Page 55: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

Condition CodesZ - the result is 0

N - the result is negative

C - a carry was generated

V - an arithmetic overflow occurred

Page 56: ARM Assembly Language and Machine Codecs107e.github.io/lectures/ASM/slides.pdf · 2020-02-26 · Read: Holy Wars and a Plea For Peace, D. Cohen The 'little-endian' and 'big-endian

#branchcondaddrcccc101Loooooooooooooooooooooooo

b=bal=branchalwayscondaddr1110101Loooooooooooooooooooooooo

bnecondaddr0001101Loooooooooooooooooooooooo