1 / 5

CS344-321 Assembly Language Programming

CS344-321 Assembly Language Programming. Period 18. Segment Overrides ตัวอย่าง data segmentvar1 db 1 data ends buffer segment var2 db 2 buffer ends code segment var3 db 3 assume cs:code, ds: data , es:buffer inc var1

buzz
Download Presentation

CS344-321 Assembly Language Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS344-321 Assembly Language Programming Period 18

  2. Segment Overrides ตัวอย่าง data segmentvar1 db 1 data ends buffer segment var2 db 2 buffer ends code segment var3 db 3 assume cs:code, ds:data, es:buffer inc var1 inc var2 inc var3 code ends end

  3. Microsoft MACRO Assembler Version 3.00 Page 1-1 09-28-99 0000 data segment 0000 01 var1 db 1 0001 data ends 0000 buffer segment 0000 02 var2 db 2 0001 buffer ends 0000 code segment 0000 03 var3 db 3 assume cs:code, ds:data, es:buffer 0001 FE 06 0000 R inc var1 0005 26: FE 06 0000 R inc var2 000A 2E: FE 06 0000 R inc var3 000F code ends end หมายเหตุ26:หมายถึง segment override ES: และ 2E:หมายถึง CS:

  4. ตัวอย่าง data segment var1 db 1 data ends buffer segment var2 db 2 buffer ends code segment var3 db 3 ; assume cs:code, ds:data, es:buffer inc var1 inc var2 inc var3 code ends end

  5. 0000 data segment 0000 01 var1 db 1 0001 data ends 0000 buffer segment 0000 02 var2 db 2 0001 buffer ends 0000 code segment 0000 03 var3 db 3 ; assume cs:code, ds:data, es:buffer 0001 FE 06 0000 R inc var1 E r r o r --- 68:Can't reach with segment reg 0005 FE 06 0000 R inc var2 E r r o r --- 68:Can't reach with segment reg 0009 FE 06 0000 R inc var3 E r r o r --- 68:Can't reach with segment reg 000D code ends end

More Related