Nội dung text Lecture:4 - Part 1 - [Addressing Modes]
MOV CL, [BX + 4H] Register Relative Addressing 10304H PA = 1000 * 10H + (0300 +4) = 10304H CL MOV ARRAY[BX +SI], DX Base-relative-plus-index Addressing DX 11500H DS*10H + (0300+0200+ 1000) = 11500H 2) Addressing Program Codes **Used with JMP or CALL instructions usually. Addressing codes again has 3 sub-classifications: i) Direct ii) Indirect iii) Relative To calculate the Physical address of these instructions: CS : IP [Following the table] PA = CS * 10h + IP; // here the offset/ IP will vary: ● If IP is given in BX/DI/SI registers as offset then first we have to find out DS*10h + [BX/DI/SI] (this is the physical address where IP is located) first then add this IP with CS*10h ● If IP is given in BP register as offset the first we have to find out SS*10h + [BP] (this is the physical address where IP is located) then add this with CS*10h [Check examples for better understanding] 1.Direct: JMP BX; // any general purpose register can be here AX/BX/CX/DX or SP/BP/DI/SI, here, AX/BX/CX/DX/SP/BP/DI/SI