匿名使用者
匿名使用者 發問時間: 電腦與網際網路程式設計 · 6 年前

組合語言的一些問題

請幫我解釋以下題目

感謝

1.After linking the following two modules into an exe program, the size of the CommonSeg is __20____h bytes, and the size of PublicSeg is __40____h bytes.

TITLE (K.asm)

; Test align and combination in segment directive

CommonSeg segment para COMMON 'data'

db 20h dup (0)

CommonSeg ends

PublicSeg segment para PUBLIC 'data'

db 15h dup (0)

PublicSeg ends

END

TITLE (K31.asm)

; Test combination in segment directive

CommonSeg segment para COMMON 'data'

db 15h dup (0)

CommonSeg ends

PublicSeg segment para PUBLIC 'data'

db 20h dup (0)

PublicSeg ends

END

2.Consider the following code. The instruction jmp ds:[xx] is a (a) direct near jump, (b) direct far jump, (c) indirect near jump, (d) indirect far jump.

The answer: __ d___.

TITLE (jmps.asm)

stkseg segment para stack 'stack'

db 1024 dup (?)

stkseg ends

dataseg segment para "data"

xx label dword

word 100h

word 2c00h

word 0c11h

word 200h

dataseg ends

codeseg segment para "code"

main:

mov ax,dataseg

mov ds,ax

jmp ds:[xx]

codeseg ends

END main

3.Consider the follow code. After jmp ds:[xx] being executed, cs= __2c00__h.

TITLE (jmps.asm)

stkseg segment para stack 'stack'

db 1024 dup (?)

stkseg ends

dataseg segment para "data"

xx label dword

word 2100h

word 2c00h

word 0c11h

word 200h

dataseg ends

codeseg segment para "code"

main:

mov ax,dataseg

mov ds,ax

jmp ds:[xx]

codeseg ends

END main

2 個解答

評分
還有問題?馬上發問,尋求解答。