----------------------------------------------------------------------------------
@MSGID:
<ea5efeed-362c-4b95-964e-e7494f82ecf6n@googlegroups.com> 76c79cd2
@REPLYADDR muta...@gmail.com
<mutazilah@gmail.com>
@REPLYTO 2:5075/128 muta...@gmail.com
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID:
<ea5efeed-362c-4b95-964e-e7494f82ecf6n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
Hi.
We have previously discussed laying out the PM16
selectors. And I remember we agreed that the code
selectors and data selectors needed to be
intermingled to provide a somewhat flat (ie not
really flat, more consecutive) address space.
Anyway, I recently purchased Visual Studio 1.52
from ebay and it runs under Windows and produces
real memory code, and the huge memory model is
pretty good, and in fact, I think Microsoft C 5.1
generated the same/similar code.
However, I`m not sure whether this is sufficient to
do PM16 the way I want.
Apparently it IS sufficient to do PM16. There is a
AHSHIFT and an AHINCR (not generated in this
case). But just because it works for PM16 the way
Windows does it, doesn`t mean it will work for the
way I want to do PDOS/286.
Note that Watcom is completely flexible - it calls an
external function to manipulate huge pointers.
So my question is - is the Visual Studio-generated code
sufficient for a somewhat-flat address space that we
previously discussed? It`s flat from the perspective of
the C programmer, who has access to 16 MiB on an
80286 and access to (what did we say? 256 MiB I
think - on PM16 on an 80386 - and 512 MiB on PM32
with D-bits set to 16-bit, maybe?).
Thanks. Paul.
char *foo(char *in, long x)
{
return (in + x);
}
Microsoft (R) C/C++ Optimizing Compiler Version 8.00c
Copyright (c) Microsoft Corp 1984-1993. All rights reserved.
foo.c
; File foo.c
; Line 2
; in = 0006
; x = 000a
_foo:
push bp
mov bp,sp
mov ax,OFFSET L00106
call FAR PTR __aFchkstk
push si
push di
; Line 3
mov ax,WORD PTR 10[bp]
mov dx,WORD PTR 12[bp]
mov cx,WORD PTR 6[bp]
mov bx,WORD PTR 8[bp]
add ax,cx
adc dx,OFFSET 0
mov cx,OFFSET __AHSHIFT
shl dx,cx
add dx,bx
jmp L00105
; Line 4
; Line 4
L00105:
pop di
pop si
mov sp,bp
pop bp
ret OFFSET 0
--- G2/1.0
* Origin: usenet.network (2:5075/128)
SEEN-BY: 5005/49 5015/255 5019/40 5020/715 848 1042
4441 12000 5030/49 1081
SEEN-BY: 5058/104 5075/128 6078/80
@PATH: 5075/128 5020/1042 4441