Chapter 4.1: Memory Access

Microprocessors
Addressing modesDisplacementEffective addressSegment:offsetbyte ptr / word ptrMOV rulesVideo memory exampleXCHG8/16-bit copyingNumber bases
Sercan KÜLCÜ · Giresun University · Computer Engineering

Introduction

Learning Outcomes

Addressing modes

Build valid memory operands from BX, SI, DI, BP and a displacement.

Address arithmetic

Compute the effective address, and the physical address from segment:offset.

Data size

State the access size with byte ptr / word ptr; read little-endian data.

MOV and XCHG

Tell valid operand combinations apart and trace copy and swap programs.

Addressing Modes

Memory Access

  • Memory is addressed through the BX, SI, DI and BP registers.
  • Combining these registers (and a constant) inside [ ] reaches different memory locations; these combinations are the addressing modes.
Register(s) only+ d8 (8-bit displacement)+ d16 (16-bit displacement)
[BX + SI][BX + SI + d8][BX + SI + d16]
[BX + DI][BX + DI + d8][BX + DI + d16]
[BP + SI][BP + SI + d8][BP + SI + d16]
[BP + DI][BP + DI + d8][BP + DI + d16]
[SI][SI + d8][SI + d16]
[DI][DI + d8][DI + d16]
d16 (direct address)[BP + d8][BP + d16]
[BX][BX + d8][BX + d16]

These 24 combinations are all the memory choices of the mod/rm field in 8086 machine code. A bare [BP] is encoded by the assembler as [BP + 0] (d8 = 0).

Addressing Modes

The Combination Rule

BaseBXBPnoneIndexSIDInoneDisplacementd8d16none++at most one per column · BP chosen → segment SS, else DS
Rules
  • BX and BP never appear in the same mode.
  • SI and DI never appear in the same mode.
  • Modes with BP use the SS segment; modes without BP use DS.
Examples
  • [BX+5] → base + d8 (DS)
  • [BX+SI] → base + index (DS)
  • [DI+BX-4] → [BX+DI-4], order does not matter (DS)
  • [BP+SI+300] → base + index + d16 (SS)

Addressing Modes

Displacement

d88-bit signed displacement (−128 … +127). Examples: 22, 55h, -1.
d1616-bit signed displacement. Examples: 300, 5517h, -259.
  • A displacement can be a number or the offset of a variable: [BX + arr].
  • The assembler folds several constants into one: [BX + 2 + 3] → [BX + 5].
  • It may be written inside or outside [ ]; the machine code is the same: [BX+5] = 5[BX] = [BX]+5.
  • It is signed, so it can be positive or negative: [SI-1].
  • The assembler picks the short form (d8) when the value is in −128…127, otherwise the long form (d16).
[BX − 2]FEhd8 = −2extendFFFEhBX = 0100h→ EA = 00FEh0100h + FFFEh = 1 00FEh: bit 17 dropped (16-bit wrap)−128 … +127 → d8 (1 byte), else d16 (2 bytes)
The effective address is computed in 16 bits and wraps around: with BX = FFFFh, [BX+2] → EA = 0001h.

Addressing Modes

Valid or Invalid?

ValidMode
[BX]register indirect
[1234h]direct address
[SI+10]indexed
[BP+DI-2]based-indexed (SS)
ES:[BX+SI]segment override
InvalidWhy?
[AX], [CX], [DX]cannot address memory
[BL], [BH]an 8-bit register is not an address
[BX+BP]two base registers
[SI+DI]two index registers
[SP], [BX*2]not on the 8086 (80386+)

The table generates every valid combination: base (BX/BP) + index (SI/DI) + displacement, each optional.

Addressing Modes

Kinds of Addressing Modes

ModeExampleWhere is the operand?
ImmediateMOV AX, 5in the instruction (constant)
RegisterMOV AX, BXin a register
DirectMOV AX, [1000h]DS:1000h
Register indirectMOV AX, [BX]DS:BX
BasedMOV AX, [BP+4]SS:BP+4
IndexedMOV AL, [SI+3]DS:SI+3
Based-indexedMOV AL, [BX+DI]DS:BX+DI
Based-indexed + displacementMOV AL, [BX+SI+8]DS:BX+SI+8

The first two never touch memory; the rest compute an effective address (EA). Physical address = segment × 10h + EA.

Addressing Modes

String, I/O and Relative Modes

Three more modes: the operand is not written at all, lives in an address space separate from memory, or is found relative to IP.

String modeString instructions have implicit operands: source DS:SI, destination ES:DI. After each operation SI and DI increase when DF = 0 and decrease when DF = 1 (byte ±1, word ±2).
MOVSB ; ES:[DI] ← DS:[SI]
I/O modePorts live in a separate 64 K address space. Data passes only through AL or AX; a port 0–255 is given in the instruction, a higher one in DX.
IN  AL, 45h
OUT DX, AX
Relative modeThe instruction holds not the target but a signed distance added to IP: IP = address of next instruction + distance. Short jumps use an 8-bit distance (−128 … +127).
JNZ again ; 75 FA = −6

Mnemonics are written as one word (MOVSB, not MOVS B). OUT takes the port first, then the data register: OUT 50h, AL; IN A, 45 is 8085 syntax.

Addressing Modes · Step through the code

Code Trace: Six Addressing Modes

ORG 100h
MOV BX, OFFSET table
MOV SI, 2
MOV AH, 7          ; immediate
MOV AL, [table+1]  ; direct
MOV CL, [BX]       ; indirect
MOV CH, [BX+4]     ; based
MOV DL, [BX+SI]    ; base+index
MOV DH, [BX+SI+3]  ; + d8
RET
table DB 11h,22h,33h,44h,55h,66h
table (DS:0116h …)11h011622h011733h011844h011955h011A66h011BBX = 0116h SI = 0000hAH00hAL00hCL00hCH00hDL00hDH00h

BX = 0116h: the offset of table (OFFSET is computed at assembly time).

table (DS:0116h …)11h011622h011733h011844h011955h011A66h011BBX = 0116h SI = 0002hAH00hAL00hCL00hCH00hDL00hDH00h

SI = 2: the index register.

table (DS:0116h …)11h011622h011733h011844h011955h011A66h011Bimmediate07h is in the instructionAH07hAL00hCL00hCH00hDL00hDH00h

Immediate mode: 7 is inside the instruction; no memory access. AH = 07h.

table (DS:0116h …)11h011622h011733h011844h011955h011A66h011BdirectEA = table+1 = 0117hphysical = 07000h + 0117h = 07117hAH07hAL22hCL00hCH00hDL00hDH00h

Direct mode: the address is in the instruction: [0117h] → AL = 22h.

table (DS:0116h …)11h011622h011733h011844h011955h011A66h011Bregister indirectEA = BX = 0116hphysical = 07000h + 0116h = 07116hAH07hAL22hCL11hCH00hDL00hDH00h

Register indirect: EA = BX = 0116h → CL = 11h.

table (DS:0116h …)11h011622h011733h011844h011955h011A66h011BbasedEA = BX + 4 = 011Ahphysical = 07000h + 011Ah = 0711AhAH07hAL22hCL11hCH55hDL00hDH00h

Based: EA = BX + 4 = 011Ah → CH = 55h.

table (DS:0116h …)11h011622h011733h011844h011955h011A66h011Bbased-indexedEA = BX + SI = 0118hphysical = 07000h + 0118h = 07118hAH07hAL22hCL11hCH55hDL33hDH00h

Based-indexed: EA = BX + SI = 0118h → DL = 33h.

table (DS:0116h …)11h011622h011733h011844h011955h011A66h011Bbase + index + d8EA = BX + SI + 3 = 011Bhphysical = 07000h + 011Bh = 0711BhAH07hAL22hCL11hCH55hDL33hDH66h

Base + index + d8: EA = BX + SI + 3 = 011Bh → DH = 66h. No BP is used, so the segment is always DS.

DS = 0700h is assumed for the .COM program; physical address = DS × 10h + EA.

Addressing Modes

Effective Address Step by Step

MOV AL, [BX + SI + 4] · DS = 1000h, BX = 0200h, SI = 0030h

BX0200

Base register BX = 0200h.

BX0200+ SI0030

Add the index register SI = 0030h.

BX0200+ SI0030+ d80004

8-bit displacement: +4.

BX0200+ SI0030+ d80004EA0234

Effective address EA = 0200h + 0030h + 0004h = 0234h (16 bits).

BX0200+ SI0030+ d80004EA0234Physical addressDS × 10h = 10000h+ EA = 0234h10234hAL ← [10234h]

No BP → segment DS. Physical address = 10000h + 0234h = 10234h. AL gets the byte at that address.

Addressing Modes

Access Through BP

MOV AX, [BP + DI - 2] · SS = 2000h, BP = 0100h, DI = 0010h

BP0100

Base register BP = 0100h.

BP0100+ DI0010

Add the index register DI = 0010h.

BP0100+ DI0010+ d8FFFE

Signed displacement −2 (FEh in machine code).

BP0100+ DI0010+ d8FFFEEA010E

EA = 0100h + 0010h − 2 = 010Eh.

BP0100+ DI0010+ d8FFFEEA010EPhysical addressSS × 10h = 20000h+ EA = 010Eh2010EhAX ← [2010Eh], [2010Fh]

BP is used, so the segment is SS: 20000h + 010Eh = 2010Eh. AX ← [2010Eh] (2 bytes: 2010Eh and 2010Fh).

Addressing Modes

Effective Address Calculator

[ + + ]

Register values are hex; the displacement may be decimal (-2) or hex (1Ah).

Addressing Modes

Addressing Mode by Data Structure

Data accessedSuitable modeExample
A single variabledirectMOV AX, count
Element a pointer points toregister indirectMOV AL, [SI]
Element i of an array (fixed array, variable index)indexed + d16MOV AL, arr[SI]
A field of a record (structure)based + d8MOV AX, [BX+2]
Matrix or array of recordsbase + index + dMOV AL, mat[BX+SI]
Parameter or local variable on the stackbased, with BP (SS)MOV AX, [BP+4]
Buffer in another segmentsegment overrideMOV AL, ES:[DI]
Base = which record / rowBX or BP holds the start of the structure; moving to another row updates only the base register.
Index = element within the recordSI or DI steps through the loop; the displacement is the fixed position of the array or field.

The same data can be reached with several modes; choose by what is fixed and what changes at run time.

Addressing Modes · Step through the code

Code Trace: Accessing a Matrix Element

org 100h
mov bx, 2*4          ; row 2
mov si, 1            ; column 1
mov al, mat[bx+si]   ; mat[2][1]
mov si, 3            ; column 3
mov ah, mat[bx+si]   ; mat[2][3]
sub bx, 4            ; row 1
mov dl, mat[bx+si]   ; mat[1][3]
ret
mat db 11h,12h,13h,14h
    db 21h,22h,23h,24h
    db 31h,32h,33h,34h
mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0008SI0000AH00AL00DL00

BX = 2 × 4 = 0008h: row 2 starts 8 bytes into the matrix (row × row length).

mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0008SI0001AH00AL00DL00

SI = 1: the column within the row. The base register selects the row, the index register the column.

mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0008SI0001AH00AL32DL00EA = 0119 + 0008 + 0001= 0122h

mat[bx+si]: EA = 0119h + 8 + 1 = 0122h → AL = 32h (row 2, column 1). The displacement is the offset of mat (d16).

mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0008SI0003AH00AL32DL00

SI = 3: another column in the same row. BX is unchanged, so the row stays fixed.

mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0008SI0003AH34AL32DL00EA = 0119 + 0008 + 0003= 0124h

EA = 0124h → AH = 34h. Same instruction; only the index changed.

mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0004SI0003AH34AL32DL00

sub bx, 4: one row up (BX = 0004h). The column (SI = 3) is kept.

mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0004SI0003AH34AL32DL24EA = 0119 + 0004 + 0003= 0120h

EA = 0119h + 4 + 3 = 0120h → DL = 24h (row 1, column 3).

mat (4 bytes per row)column 0123row 0 · 011911121314row 1 · 011D21222324row 2 · 012131323334BX0004SI0003AH34AL32DL24

ret: AX = 3432h, DL = 24h. Three elements were read with a single addressing pattern.

Row-major order: address of element[row][col] = mat + row × number of columns + col. For a word matrix, both terms are doubled.

Addressing Modes

Effective Address Calculation Time

EA componentsClocks
[BX], [BP], [SI], [DI]5
direct [d16]6
[BP+DI], [BX+SI]7
[BP+SI], [BX+DI]8
one register + d8/d169
[BP+DI+d], [BX+SI+d]11
[BP+SI+d], [BX+DI+d]12
segment override+2

On the 8086 the execution unit computes the effective address with a separate addition; that time is added to the instruction’s own time.

  • MOV AX, BX: 2 clocks (no memory).
  • MOV CL, [BX]: 8 + 5 = 13 clocks.
  • MOV CL, [BX+DI+4]: 8 + 12 = 20 clocks.
  • A word at an odd address needs +4 clocks for the second bus cycle.

Keeping a value that a loop reads often in a register removes this calculation from every pass.

Figures are from the table in the Intel 8086 user’s manual; from the 80286 on, address calculation has its own unit and these differences shrink.

Segment and Offset

Segment and Offset

  • The value in a segment register (CS, DS, SS, ES) is the segment; the value in an addressing register (BX, SI, DI, BP) is the offset.
  • The segment selects a block of memory and the offset a specific location in it; together they form the physical address.
DS1234

DS = 1234h, SI = 7890h. Notation: 1234:7890.

DS1234× 10h12340

The segment is multiplied by 10h (shifted left 4 bits): 12340h.

DS1234× 10h12340+ SI7890

The offset is aligned for the addition: 7890h.

DS1234× 10h12340+ SI7890=19BD0digits: 4 + 9 = D, 3 + 8 = B,2 + 7 = 9, 1 + 0 = 1 → 19BD0h

12340h + 7890h = physical address 19BD0h.

Segment and Offset

Address Lines and Memory Capacity

n address lines select 2n locations. The number of data lines sets the bits per location:

capacity = 2n × data width

  • 8086: 20 lines → 220 = 1,048,576 locations = 1 MB (00000h–FFFFFh).
  • A segment’s limit comes from the offset: 16 bits → 216 = 64 KB.
  • The reverse question: how many lines at least? Take the first power of 2 that covers the capacity: for 6 GB, 232 = 4 GB is not enough, so 33 lines (8 GB).
Address / data linesCapacity
12 / 84096 × 1 B = 4 KB
16 / 464 K × 4 bits = 32 KB
16 / 864 KB (one segment)
20 / 81 MB (8086)
24 / 1616 M × 2 B = 32 MB
32 / 84 GB (80386)

On a memory chip the number of data lines is the word width; for a capacity in bytes, divide the bit count by 8.

Segment and Offset

Working Backwards: DS:SI from a Physical Address

We want to reach physical address 2A5C3h through DS:SI. There is no single answer; we find the range DS can take.

Largest DSMake SI as small as possible: DS = first four digits = 2A5Ch, SI = 2A5C3h − 2A5C0h = 0003h.
Smallest DSSI can be at most FFFFh: DS × 10h ≥ 2A5C3h − FFFFh = 1A5C4h → DS ≥ 1A5C.4h → 1A5Dh, SI = FFF3h.
How many pairs?Each step up in DS lowers SI by 10h: 2A5Ch − 1A5Dh + 1 = 1000h = 4096 pairs.
4096 valid DS valuesDS = 1A5DhDS = 2A5ChSI = FFF3hSI = 0003hleft: SI would be > FFFFhright: SI would be < 0

Always check with the forward calculation: 1A5Dh × 10h + FFF3h = 1A5D0h + FFF3h = 2A5C3h.

Segment and Offset

Segment Override Prefix

Writing a segment override prefix before the brackets replaces the default segment:

MOV AX, 0B800h
MOV ES, AX          ; ES = video memory
MOV BX, 0
MOV AL, ES:[BX]     ; read ES:0000
MOV AL, [BX]        ; read DS:0000
MOV DL, SS:[SI]     ; read SS:SI

The prefix is a 1-byte code placed before the instruction in machine code (ES: → 26h, CS: → 2Eh, SS: → 36h, DS: → 3Eh).

When is it needed?
  • To reach data in another segment (e.g. video memory) without changing DS.
  • To reach stack data through a register other than BP: SS:[BX].
  • To read a table stored in the code: CS:[SI].

IP always pairs with CS and SP always with SS; these cannot be overridden.

Segment and Offset · Step through the code

Code Trace: Video Memory Through ES

ORG 100h
MOV AX, 0B800h
MOV ES, AX         ; ES = video
MOV BX, 00A0h      ; row 1
MOV BYTE PTR ES:[BX], 'K'
MOV BYTE PTR ES:[BX+1], 1Eh
MOV AL, [BX]       ; DS:00A0h
MOV DL, ES:[BX]    ; B800:00A0h
RET
DS = 0700h07000h + 0000h = 07000h00h+0ES = 0700h07000h + 0000h = 07000h20h+007h+1screen, row 1:AL00hDL00h

AX = B800h: the segment of the color text screen. In video memory one cell = character + color.

DS = 0700h07000h + 0000h = 07000h00h+0ES = B800hB8000h + 0000h = B8000h20h+007h+1screen, row 1:AL00hDL00h

ES = B800h. DS still holds the program’s segment (0700h), so variable access is unaffected.

DS = 0700h07000h + 00A0h = 070A0h00h+0ES = B800hB8000h + 00A0h = B80A0h20h+007h+1screen, row 1:AL00hDL00h

BX = 00A0h = 160 = (1 × 80 + 0) × 2: the first cell of row 1.

DS = 0700h07000h + 00A0h = 070A0h00h+0ES = B800hB8000h + 00A0h = B80A0h4Bh+007h+1screen, row 1:KAL00hDL00h

The ES: prefix (byte 26h in machine code): B8000h + 00A0h = B80A0h ← 'K' (4Bh).

DS = 0700h07000h + 00A0h = 070A0h00h+0ES = B800hB8000h + 00A0h = B80A0h4Bh+01Eh+1screen, row 1:KAL00hDL00h

B80A1h ← 1Eh: yellow on blue. A yellow K appears on the screen.

DS = 0700h07000h + 00A0h = 070A0h00h+0ES = B800hB8000h + 00A0h = B80A0h4Bh+01Eh+1screen, row 1:KAL00hDL00h

No prefix → default DS: 07000h + 00A0h = 070A0h is read (the program’s PSP area, 00h here). Same offset, different byte.

DS = 0700h07000h + 00A0h = 070A0h00h+0ES = B800hB8000h + 00A0h = B80A0h4Bh+01Eh+1screen, row 1:KAL00hDL4Bh

ES:[BX] goes to video memory again: DL = 4Bh ('K').

The video cell is assumed to start as 20h 07h (space, gray). The prefix affects only its own instruction; DS does not change.

Segment and Offset · Step through the code

Code Trace: Reaching Data Through BP

data segment
pad db 3 dup(0)
x db 'D'
data ends
stk segment stack
dw 64 dup(0)
stk ends
code segment
assume cs:code, ds:data, ss:stk
start:
mov ax, data
mov ds, ax
mov bp, offset x
mov al, [bp]         ; reads SS:BP!
mov bl, ds:[bp]      ; DS:BP
mov si, offset x
mov cl, [si]         ; DS:SI
mov ax, 4C00h
int 21h
code ends
end start
data: DS = 0700h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0000SI0000AL10BL00CL00

AX = 0710h: the paragraph number of the data segment (set by the loader). When an EXE starts, DS does not point to its data.

data: DS = 0710h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0000SI0000AL10BL00CL00

DS = 0710h. The stack segment SS = 0711h is a separate block; in this program DS ≠ SS.

data: DS = 0710h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0003SI0000AL10BL00CL00

BP = 0003h: the offset of x. The offset is right; the trouble is the segment.

data: DS = 0710h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0003SI0000AL00BL00CL00SS:0003 → 07113h

[bp] pairs with SS by default: 07113h is read, AL = 00h. Not 'D', but a byte from the stack.

data: DS = 0710h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0003SI0000AL00BL44CL00DS:0003 → 07103h

ds:[bp]: the prefix overrides the default, 07103h is read → BL = 44h ('D').

data: DS = 0710h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0003SI0003AL00BL44CL00

The same offset goes into SI: SI = 0003h.

data: DS = 0710h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0003SI0003AL00BL44CL44DS:0003 → 07103h

[si] uses DS by default: CL = 44h. Use BX/SI/DI for data and BP for the stack.

data: DS = 0710h000000000001000002440003phys. 07100h…stack: SS = 0711h000000000001000002000003phys. 07110h…BP0003SI0003AL00BL44CL44

AH = 4Ch, AL = 0: the program returns to DOS with exit code 0.

In a .COM program CS = DS = SS, so this bug stays hidden; it shows up in an .EXE program with a separate stack segment.

Segment and Offset

Changing a Segment Register

PUSH DS            ; save DS
MOV  AX, 0B800h
MOV  DS, AX        ; temporary
MOV  BYTE PTR [0], 'Z'
POP  DS            ; variables back

MOV  AX, new_stack
MOV  SS, AX        ; right after it
MOV  SP, 0400h     ; set SP
DSVariable names are only offsets; once DS changes, the same name reaches a byte in another segment. Wrap a temporary change in PUSH DS / POP DS, or use ES.
SS and SPChange them together. After a MOV or POP into a segment register, the 8086 accepts no interrupt until the next instruction finishes, so SS:SP is never left half-set.
CSCannot be written with MOV; a far JMP/CALL/RET or INT/IRET changes CS and IP together.

ES is used by default only as the string destination, which makes it the safest way to reach a second data block (video memory, a buffer).

Data Type

Specifying the Data Type

  • Type specifiers tell the assembler the size of the data being accessed:
    • byte ptr [BX]: a byte (8-bit) access.
    • word ptr [BX]: a two-byte (16-bit, one word) access.
  • emu8086 also accepts shorter forms:
    • b.[SI]: the value at the address in SI, as a byte.
    • w.[DI]: the value at the address in DI, as a word.
  • Often the assembler infers the type itself: if the other operand is a register, its size wins.
34[BX]12[BX+1]…[BX+2]byte ptr [BX] → 34hword ptr [BX] → 1234h (low byte at low address)
InstructionWhere does the size come from?
MOV [BX], ALAL is 8 bits → a byte is written
MOV [BX], AXAX is 16 bits → a word is written
MOV [BX], 5ambiguous! → MOV BYTE PTR [BX], 5 or MOV WORD PTR [BX], 5

Data Type · Step through the code

Code Trace: byte ptr and word ptr

BX0200BHBLAX0000AHALCX0000CHCLDS:0200 … DS:02030200AA0201BB0202CC0203DD

BX = 0200h. Memory still holds earlier values (AA BB CC DD).

BX0200BHBLAX0000AHALCX0000CHCLDS:0200 … DS:02030200340201120202CC0203DD

word ptr: 2 bytes are written. The low byte (34h) goes to the low address: 34 12.

BX0200BHBLAX0000AHALCX0000CHCLDS:0200 … DS:02030200FF0201120202CC0203DD

byte ptr: only 0200h changes → FF 12. 0201h is untouched.

BX0200BHBLAX0000AHALCX0000CHCLDS:0200 … DS:02030200FF0201000202CC0203DD

Same constant, word ptr: 00FFh is written → FF 00. 0201h changed too!

BX0200BHBLAX00FFAHALCX0000CHCLDS:0200 … DS:02030200FF0201000202CC0203DD

AX is 16 bits, so the size is clear: AX = 00FFh (0201h is the high byte).

BX0200BHBLAX00FFAHALCX0000CHCLDS:0200 … DS:02030200FF0201000202CC0203DD

CL is 8 bits: the byte at [BX+1] = 0201h → CL = 00h.

MOV BX, 0200h
MOV WORD PTR [BX], 1234h
MOV BYTE PTR [BX], 0FFh
MOV WORD PTR [BX], 0FFh
MOV AX, [BX]        ; word
MOV CL, [BX+1]      ; byte

Data Type

Little-Endian Order

AX = 1234h1234high byte (AH)low byte (AL)0200340201120202…low address → low byte
  • The 8086 is little-endian: the low byte of a 16-bit value is stored at the low address, the high byte at the next one.
  • MOV [0200h], AX → [0200h] = AL, [0201h] = AH. MOV AX, [0200h] does the reverse.
  • That is why words look “reversed” in the emu8086 memory window: 1234h → 34 12.
  • The rule also applies to constants in machine code: MOV AX, 1234h → B8 34 12.

Data Type · Step through the code

Code Trace: The Word-Array Index Bug

org 100h
mov si, 1            ; index 1
mov ax, arr[si]      ; BUG!
shl si, 1            ; index × 2
mov bx, arr[si]      ; arr[1]
mov si, 2            ; index 2
shl si, 1            ; SI = 4
mov cx, arr[si]      ; arr[2]
ret
arr dw 1234h, 5678h, 9ABCh
34011712011878011956011ABC011B9A011Carr[0]arr[1]arr[2]SI0001AX0000BX0000CX0000

SI = 1, meaning “the second element”. But SI is a byte distance.

34011712011878011956011ABC011B9A011Carr[0]arr[1]arr[2]SI0001AX7812BX0000CX0000EA = 0117 + 0001 = 0118

arr[si] = 0118h: the high byte of arr[0] and the low byte of arr[1] are read → AX = 7812h. Neither 1234h nor 5678h.

34011712011878011956011ABC011B9A011Carr[0]arr[1]arr[2]SI0002AX7812BX0000CX0000

shl si, 1: index × 2 → SI = 2. In a word array, byte distance = index × 2.

34011712011878011956011ABC011B9A011Carr[0]arr[1]arr[2]SI0002AX7812BX5678CX0000EA = 0117 + 0002 = 0119

EA = 0119h → BX = 5678h = arr[1]. The right element.

34011712011878011956011ABC011B9A011Carr[0]arr[1]arr[2]SI0002AX7812BX5678CX0000

SI = 2: this time index 2 (the third element).

34011712011878011956011ABC011B9A011Carr[0]arr[1]arr[2]SI0004AX7812BX5678CX0000

shl si, 1: SI = 4. A shift is the shortest way to multiply by 2.

34011712011878011956011ABC011B9A011Carr[0]arr[1]arr[2]SI0004AX7812BX5678CX9ABCEA = 0117 + 0004 = 011B

EA = 011Bh → CX = 9ABCh = arr[2].

When a loop walks a word array, advance SI with ADD SI, 2 on every pass; INC SI is for byte arrays only.

The MOV Instruction

The MOV Instruction

  • MOV dest, source copies the source value into the destination; the source is unchanged.
  • Source: an immediate (constant), a general-purpose register, a segment register or a memory location.
  • Destination: a general-purpose register, a segment register (not CS) or a memory location.
  • It cannot load CS or IP.
  • Both operands must be the same size: both bytes or both words.
  • Only one operand may be memory.
  • MOV does not affect the flags.
REGSREGMEMIMM✗MEM ↔ MEM ✗SREG ↔ MEMREG → REG
MOV AX, BXCopies the value in BX into AX. BX is unchanged.
MOV [SI], 10hWrites 10h to the address in SI (DS:SI). The size is ambiguous, so the correct form is MOV BYTE PTR [SI], 10h.

The MOV Instruction

Supported Operands

General-purpose

MOV REG, memory
MOV memory, REG
MOV REG, REG
MOV memory, immediate
MOV REG, immediate

Segment registers

MOV SREG, memory
MOV memory, SREG
MOV REG, SREG
MOV SREG, REG
REGAX, BX, CX, DX, AH, AL, BL, BH, CH, CL, DH, DL, DI, SI, BP, SP
SREGDS, ES, SS and CS (CS only as the second operand, the source)
memory[BX], [BX+SI+7], a variable…
immediate5, -24, 3Fh, 10001101b…

There is no MOV SREG, immediate or MOV SREG, SREG; go through a general register first.

The MOV Instruction

MOV: Valid or Not?

Instruction?Instruction?
MOV [BX], [SI]1MOV AX, CS6
MOV DS, ES2MOV SP, BX7
MOV DS, 100h3MOV BL, DX8
MOV CS, AX4MOV AL, [SI+BP]9
MOV [BX], 55MOV 5, AX10
Answers
  1. Invalid: no memory-to-memory MOV → MOV AL,[SI] · MOV [BX],AL.
  2. Invalid: no segment-to-segment MOV → MOV AX,ES · MOV DS,AX or PUSH ES · POP DS.
  3. Invalid: no immediate into a segment register.
  4. Invalid: CS cannot be a destination (use JMP FAR); IP cannot be written directly either (JMP AX instead of MOV IP, AX).
  5. Ambiguous size → needs BYTE PTR / WORD PTR.
  6. Valid (CS may be a source). 7. Valid (but may wreck the stack). 8. Invalid: sizes differ. 9. Valid: [BP+SI], segment SS. 10. Invalid: the destination cannot be immediate.

The MOV Instruction · Step through the code

Code Trace: Block Copy Through a Register

org 100h
mov si, offset src
mov di, offset dst
mov cx, 4
copy:
mov al, [si]         ; memory → AL
mov [di], al         ; AL → memory
inc si
inc di
loop copy
ret
src db 'ABCD'
dst db 4 dup('.')
src'A'0112'B'0113'C'0114'D'0115dst'.'0116'.'0117'.'0118'.'0119SIAL00CX0000

SI = 0112h: the offset of the source.

src'A'0112'B'0113'C'0114'D'0115dst'.'0116'.'0117'.'0118'.'0119SIDIAL00CX0000

DI = 0116h: the offset of the destination. Two pointers, two separate buffers.

src'A'0112'B'0113'C'0114'D'0115dst'.'0116'.'0117'.'0118'.'0119SIDIAL00CX0004

CX = 4: the number of bytes to copy (the LOOP counter).

src'A'0112'B'0113'C'0114'D'0115dst'.'0116'.'0117'.'0118'.'0119SIDIAL'A'CX0004

mov al, [si]: memory to register → AL = 'A' (41h). There is no memory-to-memory MOV, so AL is the stopover.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'.'0117'.'0118'.'0119SIDIAL'A'CX0004

mov [di], al: register to memory → [0116] = 41h.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'.'0117'.'0118'.'0119SIDIAL'A'CX0004

inc si: the source pointer moves to the next byte.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'.'0117'.'0118'.'0119SIDIAL'A'CX0004

inc di: so does the destination pointer. The two pointers advance together.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'.'0117'.'0118'.'0119SIDIAL'A'CX0003

loop copy: CX = 3 ≠ 0 → back to the top.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'B'0117'.'0118'.'0119SIDIAL'B'CX0002

Pass 2 (summary): 'B' copied, SI = 0114h, DI = 0118h, CX = 2.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'B'0117'C'0118'.'0119SIDIAL'C'CX0001

Pass 3 (summary): 'C' copied, CX = 1.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'B'0117'C'0118'D'0119AL'D'CX0000

Pass 4 (summary): 'D' copied, CX = 0 → LOOP falls through. The destination now holds ABCD.

src'A'0112'B'0113'C'0114'D'0115dst'A'0116'B'0117'C'0118'D'0119AL'D'CX0000

ret: SI and DI point just past the buffers (0116h, 011Ah).

Each byte costs two memory accesses and a register. String instructions do the same job in one instruction (REP MOVSB: DS:SI → ES:DI).

Example Program

Example Program

ORG 100h          ; for a .com program
MOV AX, 0B800h    ; AX = B800h
MOV DS, AX        ; DS = B800h
MOV CL, 'A'       ; CL = 41h
MOV CH, 11011111b ; CH = DFh
MOV BX, 15Eh      ; BX = 015Eh
MOV [BX], CX      ; B800:015E ← CX
RET               ; back to DOS
  • The program writes the letter 'A' at a given position in video memory.
  • MOV copies a value from source to destination.
  • ORG sets the program’s starting address (it produces no machine code).
  • ; starts a comment.
  • DS cannot take an immediate, so B800h goes into AX first.
InstructionMachine codeInstructionMachine code
MOV AX, 0B800hB8 00 B8MOV CH, 11011111bB5 DF
MOV DS, AX8E D8MOV BX, 15EhBB 5E 01
MOV CL, 'A'B1 41MOV [BX], CX · RET89 0F · C3

Example Program · Step through the code

Code Trace: Writing 'A' on the Screen

AX0000AHALCX0000CHCLBX0000BHBLDS0700B800:015C … 015F (video memory)015C20015D07015E20015F07

The screen is blank: each cell is 20h (space) + 07h (gray on black).

AXB800AHALCX0000CHCLBX0000BHBLDS0700B800:015C … 015F (video memory)015C20015D07015E20015F07

AX = B800h (the segment of the color text screen).

AXB800AHALCX0000CHCLBX0000BHBLDSB800B800:015C … 015F (video memory)015C20015D07015E20015F07

DS = AX = B800h. From now on [ ] accesses go to video memory.

AXB800AHALCX0041CHCLBX0000BHBLDSB800B800:015C … 015F (video memory)015C20015D07015E20015F07

CL = 'A' = 41h (its ASCII code).

AXB800AHALCXDF41CHCLBX0000BHBLDSB800B800:015C … 015F (video memory)015C20015D07015E20015F07

CH = 11011111b = DFh: the color (attribute) byte.

AXB800AHALCXDF41CHCLBX015EBHBLDSB800B800:015C … 015F (video memory)015C20015D07015E20015F07

BX = 015Eh = 350: the offset of the screen position.

AXB800AHALCXDF41CHCLBX015EBHBLDSB800B800:015C … 015F (video memory)015C20015D07015E41015FDF

CX = DF41h is written as a word: [015Eh] = 41h ('A'), [015Fh] = DFh (color). Physical: B8000h + 15Eh = B815Eh.

AXB800AHALCXDF41CHCLBX015EBHBLDSB800B800:015C … 015F (video memory)015C20015D07015E41015FDF

RET: back to DOS; the 'A' stays on the screen.

ORG 100h
MOV AX, 0B800h
MOV DS, AX
MOV CL, 'A'
MOV CH, 11011111b
MOV BX, 15Eh
MOV [BX], CX
RET

Example Program

Text-Mode Video Memory

Acolumn 079024row 2, column 15
PositionOn the 80×25 text screen each cell is 2 bytes: character + color. Offset = (row × 80 + column) × 2 → (2 × 80 + 15) × 2 = 350 = 15Eh.
Color byte DFh = 1101 1111bBit 7: blink (bright background in emu8086) · bits 6–4 = 101: magenta background · bits 3–0 = 1111: bright white text.

MOV Examples · Step through the code

Moving a Value from Memory into a Register

AX0000AHALIP0100DS:1000 …1000CD1001AB100200

DS = 0700h. DS:1000h holds the bytes CD AB. IP = 0100h.

AXABCDAHALIP0103DS:1000 …1000CD1001AB100200

MOV AX,[1000h]: two bytes are read, little-endian → AX = ABCDh. The instruction is 3 bytes → IP = 0103h.

AXABCDAHALIP0000DS:1000 …1000CD1001AB100200

RET: IP = 0000h (the INT 20h in the PSP). Memory is unchanged; MOV only copies. Physical address: 07000h + 1000h = 08000h.

ORG 100h
MOV AX, [1000h]   ; A1 00 10
RET

MOV Examples

The View in emu8086

  • Left: registers (H/L halves shown separately). CS = DS = 0700h, IP = 0100h, SP = FFFEh.
  • Middle: memory (physical address 07100h = 0700:0100). A1 00 10 are the 3 bytes of the instruction.
  • Right: the disassembled code: MOV AX, [01000h], then RET (C3).
  • single step executes the instruction; changed registers are highlighted.
  • Memory is empty here, so AX stays 0000h on this screen.
emu8086 emulator window: registers, the bytes A1 00 10 at address 07100h and the instruction MOV AX, [01000h].

The emu8086 emulator window

MOV Examples · Step through the code

Moving a Register Value into Memory

BX0000BHBLIP0100DS:2000 …200000200100200200

DS:2000h is empty (00 00).

BX1234BHBLIP0103DS:2000 …200000200100200200

BX = 1234h; IP = 0103h.

BX1234BHBLIP0107DS:2000 …200034200112200200

BX is written to memory: [2000h] = 34h, [2001h] = 12h. The instruction is 4 bytes → IP = 0107h.

BX1234BHBLIP0000DS:2000 …200034200112200200

RET: IP = 0000h. BX is unchanged. Physical address: 07000h + 2000h = 09000h.

ORG 100h
MOV BX, 1234h     ; BB 34 12
MOV [2000h], BX   ; 89 1E 00 20
RET

MOV Examples · Step through the code

Swapping Two Registers

CX000ACHCLDX0000DHDL

CX = 10 = 000Ah (numbers are decimal by default).

CX000ACHCLDX0014DHDL

DX = 20 = 0014h.

CX0014CHCLDX000ADHDL

XCHG swaps the two operands in one instruction: CX = 0014h, DX = 000Ah. Flags are not affected.

MOV CX, 10   ; CX = 000Ah
MOV DX, 20   ; DX = 0014h
XCHG CX, DX  ; swap

MOV Examples

XCHG Rules

XCHG dest, source
  • Register ↔ register: XCHG AX, BX
  • Register ↔ memory: XCHG AL, [SI]
  • No memory ↔ memory.
  • No segment registers or immediates.
  • Sizes must match; flags are unchanged.
  • XCHG AX, reg is a one-byte instruction (XCHG AX, AX = NOP = 90h).

Without XCHG a swap would need a temporary register:

MOV AX, CX    ; AX ← CX (backup)
MOV CX, DX    ; CX ← DX
MOV DX, AX    ; DX ← old CX

That costs 3 instructions and an extra register; XCHG does it in one.

MOV Examples · Step through the code

Code Trace: Swapping with XCHG

ORG 100h
MOV SI, OFFSET num
MOV AL, 5Ah
XCHG AL, [SI]      ; AL ↔ [SI]
MOV CX, 1111h
MOV DX, 2222h
MOV AX, CX         ; backup
MOV CX, DX
MOV DX, AX         ; swapped
XCHG CX, DX        ; one instr.
RET
num DB 0A5h
AX0000hCX0000hDX0000hnum · 0116hA5h

SI = 0116h: the address of num; in memory num = A5h.

AX005AhCX0000hDX0000hnum · 0116hA5h

AL = 5Ah.

AX00A5hCX0000hDX0000hnum · 0116h5AhAL ↔ [SI]

XCHG AL, [SI]: AL ↔ memory. AL = A5h, num = 5Ah. No temporary register needed.

AX00A5hCX1111hDX0000hnum · 0116h5Ah

CX = 1111h.

AX00A5hCX1111hDX2222hnum · 0116h5Ah

DX = 2222h. Now the same swap without XCHG.

AX1111hCX1111hDX2222hnum · 0116h5Ah1. AX ← CX3 instr. + spare register

MOV AX, CX: a backup of CX in AX (AX’s old value is lost).

AX1111hCX2222hDX2222hnum · 0116h5Ah2. CX ← DX3 instr. + spare register

MOV CX, DX: CX = 2222h. The old CX survives only in AX.

AX1111hCX2222hDX1111hnum · 0116h5Ah3. DX ← AX3 instr. + spare register

MOV DX, AX: DX = 1111h. The swap took 3 instructions and a register.

AX1111hCX1111hDX2222hnum · 0116h5AhCX ↔ DX: 1 instruction

XCHG CX, DX: swapped back in one instruction: CX = 1111h, DX = 2222h; AX is untouched.

XCHG leaves the flags alone; there is no memory ↔ memory or segment-register exchange.

MOV Examples · Step through the code

Copying One Register into Another

SI3000DI0000AX0000AHALDS:3000 …30005A300100300200

SI gets a memory address (an offset): 3000h.

SI3000DI3000AX0000AHALDS:3000 …30005A300100300200

DI = SI = 3000h. What is copied is the address, not the data in memory.

SI3000DI3000AX005AAHALDS:3000 …30005A300100300200

SI and DI now point to the same cell: AL = [3000h] = 5Ah.

SI3000DI3000AX005AAHALDS:3000 …30005A30015A300200

AL is written to [DI+1] = 3001h → 5A 5A.

MOV SI, 3000h  ; SI = address
MOV DI, SI     ; DI = SI
MOV AL, [SI]   ; DS:3000h
MOV [DI+1], AL ; DS:3001h

MOV Examples · Step through the code

Writing a Constant to a Memory Address

IP0100DS:4000 …400000400199400200400399

DS:4000h … 4003h: 00 99 00 99.

IP0105DS:4000 …400041400199400200400399

65 = 41h = 'A' is written as a single byte. Machine code C6 06 00 40 41 (5 bytes) → IP = 0105h. [4001h] is unchanged.

IP010BDS:4000 …400041400199400241400300

WORD PTR: 0041h is written → [4002h] = 41h, [4003h] = 00h (the 99h is overwritten). The instruction is 6 bytes → IP = 010Bh.

IP0000DS:4000 …400041400199400241400300

RET: IP = 0000h. A constant has no size of its own; the PTR specifier sets it.

ORG 100h
MOV BYTE PTR [4000h], 65  ; 'A'
MOV WORD PTR [4002h], 65
RET

MOV Examples · Step through the code

Copying a Register’s Low Byte into Another

AX1234AHALBX0000BHBL

AX = 1234h: AH = 12h, AL = 34h.

AX1234AHALBXFFFFBHBL

BX = FFFFh, to make the effect visible.

AX1234AHALBXFF34BHBL

AL (the low byte of AX) is copied to BL: BL = 34h. BH is unchanged → BX = FF34h.

MOV AX, 1234h   ; AH = 12h, AL = 34h
MOV BX, 0FFFFh
MOV BL, AL      ; BL only

MOV Examples · Step through the code

Adding to a Register’s High Byte

AX00FFAHALFlagsCF=0ZF=0SF=0OF=0PF=0AF=0

AX = 00FFh.

AX01FFAHALFlagsCF=0ZF=0SF=0OF=0PF=0AF=0

AH = 00h + 01h = 01h → AX = 01FFh. Nonzero result, no carry.

AX0100AHALFlagsCF=1ZF=1SF=0OF=0PF=1AF=1

AL = FFh + 1 = 00h, CF = 1, ZF = 1. The carry does not reach AH: AX = 0100h.

AX01FFAHALFlagsCF=1ZF=1SF=0OF=0PF=1AF=1

For comparison, AX is 01FFh again. MOV leaves the flags alone.

AX0200AHALFlagsCF=0ZF=0SF=0OF=0PF=1AF=1

16-bit addition: 01FFh + 1 = 0200h; the carry passed from AL into AH, CF = 0.

MOV AX, 00FFh   ; AH = 00h, AL = FFh
ADD AH, 01h     ; AH only
ADD AL, 01h     ; AL only
MOV AX, 01FFh
ADD AX, 1       ; 16 bits

MOV Examples · Step through the code

Loading Binary, Octal and Hex Values

AX0005AHALBX0000BHBLCX0000CHCLFlagsCF=0ZF=0SF=0OF=0PF=0AF=0

00000101b = 5 → AL = 05h.

AX0005AHALBX000ABHBLCX0000CHCLFlagsCF=0ZF=0SF=0OF=0PF=0AF=0

0Ah = 10 → BL = 0Ah. It starts with a letter, hence the leading 0.

AX0005AHALBX000ABHBLCX0008CHCLFlagsCF=0ZF=0SF=0OF=0PF=0AF=0

10o (octal) = 1×8 + 0 = 8 → CL = 08h.

AX000FAHALBX000ABHBLCX0008CHCLFlagsCF=0ZF=0SF=0OF=0PF=1AF=0

AL = 5 + 10 = 15 = 0Fh. PF = 1 (0000 1111: four 1 bits).

AX0007AHALBX000ABHBLCX0008CHCLFlagsCF=0ZF=0SF=0OF=0PF=0AF=0

AL = 15 − 8 = 7 = 07h. No borrow → CF = 0; PF = 0 (three 1 bits).

mov al, 00000101b ; binary
mov bl, 0ah       ; hex
mov cl, 10o       ; octal
add al, bl        ; 5 + 10 = 15
sub al, cl        ; 15 - 8 = 7

MOV Examples

Writing Numbers

BaseSuffixExampleDecimal value
Decimalnone or d25, 25d25
Binaryb00011001b25
Octalo or q31o25
Hexadecimalh19h, 0FFh25, 255
Character' ''A'65 (41h)
A hex number that starts with a letter (A–F) needs a leading 0: 0Ah, 0B800h. Otherwise Ah clashes with the AH register and B800h with a label. emu8086 also accepts the 0x1000 form.

MOV Examples

Common Memory-Access Mistakes

WrongWhat happens?Correct
MOV SI, arrSI gets the value of the first element, not the array’s address.MOV SI, OFFSET arr or LEA SI, arr
INC SI (word array)Reads from the middle of a word: halves of two elements are combined.ADD SI, 2
MOV AL, [BP] for a variableReads from the SS segment; in an .EXE the wrong byte comes back.[BX], [SI] or DS:[BP]
MOV [BX], 5Size unknown; the assembler reports an error or guesses.MOV BYTE PTR [BX], 5
MOV AX, B800hB800h is taken for a label name.MOV AX, 0B800h
Changing DS and leaving itEvery later variable access goes to another segment.PUSH DS … POP DS or ES
Expecting 3412h from MOV AX, [0200h]Little-endian forgotten: if memory holds 34 12, AX = 1234h.Low address = low byte

Most of these are not assembly errors: the program runs but reads from the wrong address. In emu8086, check the EA and the physical address in the memory window to find them.

Lab · 8086 instructions step by step

Lab: Memory Access

Summary

Summary

Addressing[base + index + displacement]; base BX/BP, index SI/DI, displacement d8/d16, each optional.
Segment choiceSS if BP is used, otherwise DS; a prefix overrides it (ES:[BX]).
Physical addresssegment × 10h + EA; 1234:7890 → 19BD0h.
Sizebyte ptr / word ptr (b. / w.); a register operand sets the size. Little-endian.
MOVCopies and leaves the flags alone; no memory↔memory, no immediate into a segment register, no CS/IP destination.
XCHGSwaps two operands in one instruction; no segment registers or immediates.

Summary

Exercises

  1. DS = 3000h, BX = 0010h, SI = 0005h: EA and physical address of [BX+SI+20h]?
  2. SS = 4000h, BP = FFFEh: EA and physical address of [BP+4]?
  3. Which of [BX+BP], [DI+SI], [BX+DI+300], [DX] are valid?
  4. If [0500h] = 78h and [0501h] = 56h, what is AX after MOV AX,[0500h]? AL after MOV AL,[0501h]?
  5. Write code that puts a yellow 'X' on green at row 10, column 40 of the screen (color 2Eh).
  6. How would you change the previous program to write to video memory through ES without touching DS?
Answers
  1. EA = 0035h; physical = 30000h + 0035h = 30035h.
  2. EA = FFFEh + 4 = 0002h (wraps around); physical = 40002h.
  3. Only [BX+DI+300].
  4. AX = 5678h; AL = 56h.
  5. Offset (10×80+40)×2 = 1680 = 690h: MOV AX,0B800h · MOV DS,AX · MOV BX,690h · MOV WORD PTR [BX],2E58h.
  6. MOV AX,0B800h · MOV ES,AX · … · MOV ES:[BX],CX.

Summary

References

  • emu8086 documentation, 8086 assembler tutorial for beginners, part 2: memory access, MOV instruction.
  • Intel, 8086/8088 User's Manual, addressing modes and instruction encoding.
  • Barry B. Brey, The Intel Microprocessors, 8th ed., Pearson, Chapter 3 (Addressing Modes).
  • IBM PC documentation on text-mode video memory (B800h) and the attribute byte.

The End

Chapter 4.1: Memory Access
Previous: Chapter 3.2: Assembly Language · Next: Chapter 4.2: Variables
1 / 1 Sercan KÜLCÜ. All rights reserved.