Article ID: 111877
Article Last Modified on 10/14/2003
; assembly options needed: /Zi /Fl /Sa
.model large,c
.386
junktest PROTO
junk1 struct
a BYTE 255 DUP (?)
junk1 ends
junk2 struct
a BYTE 256 DUP (?)
junk2 ends
.stack 10000
.data
j1 junk1 <>
j2 junk2 <>
.CODE
.STARTUP
mov ax, sizeof junk1 ; correct sizes here
mov ax, sizeof j1
mov ax, size j1
mov ax, sizeof junk2
mov ax, sizeof j2
mov ax, size j2
invoke junktest
.EXIT
junktest PROC
LOCAL j1L:junk1 ; correct amount allocated 255 bytes
LOCAL j2L:junk2 ; correct amount allocated 256 bytes
LOCAL j3L[256]:BYTE ; correct amount allocated 256 bytes
mov ax,0
mov ax, sizeof junk1 ; correct -- 0FFh
mov ax, sizeof j1L ; correct -- 0FFh
mov ax, size j1L ; correct -- 0FFh
mov ax, type j1L ; correct -- 0FFh
mov ax, sizeof junk2 ; correct -- 0100h
mov ax, sizeof j2L ; high byte lost -- returns 00h
mov ax, size j2L ; high byte lost -- returns 00h
mov ax, type j2L ; OK -- returns 0100h
mov ax, sizeof j3L ; high byte lost -- returns 00h
mov ax, size j3L ; high byte lost -- returns 00h
mov ax, type j3L * lengthof j3L ; OK - returns 0100h
ret
junktest ENDP
END
Additional query words: 6.00 6.00a 6.00b 6.10 6.10a 6.10b 6.11 ml buglist6.11
Keywords: KB111877