
80 THE x86 MICROPROCESSORS
Example 2.8
.MODEL TINY
0000 .CODE
0000 50 NUM1 DB 50H ;place 50H into NUM1
0001 210A NUM2 DW 210AH ;place 210AH into NUM2
0003 0789 NUM3 DW 0789H ;place 0789H into NUM3
.STARTUP
0100 A0 0000 R MOV AL, NUM1 ;move NUM1 to AL
0103 8B 1E 0001 R MOV BX, NUM2 ;move NUM2 into BX
0107 8B C8 MOV CX, AX ;copy AX to CX
0109 8B 1E 0003 R MOV BX, NUM3 ;move NUM3 into BX
.EXIT
END
Example 2.8 is a listing, which shows data being placed in the code segment itself. In the tiny
model, we can have data and code in the same segment, with the restriction that the size of the
segment should not exceed 64 Kbytes. NUM1, ...