TIP: Click on subject to list as thread! ANSI
echo: public_domain
to: Paul Edwards
from: rowan crowe
date: 1995-06-29 21:37:08
subject: spawn.asm

Answering msg from Paul Edwards to rowan crowe,
on Wednesday June 28 1995 at 00:07

 rc>> If it's the same spawn.asm that came with the other releases,
 rc>> then I already have it:

 PE> I have changed it slightly with 3.1, here is the diff...

 PE> 112,123c112
 PE> <  IFDEF  PASCAL
 PE> <  .model  tpascal
 PE> < ;
 PE> <  extrn  prefixseg: word
 PE> < ;
 PE> < ptrsize  =  1
 PE> <  ELSE
 PE> <  IFNDEF  MODL
 PE> <  .model  small,c
 PE> <  ELSE
 PE> < %   .model  MODL,c
 PE> <  ENDIF
 PE> -+-
 >> .model  large,c
 PE> 128d116
 PE> <  ENDIF

    I presume this is meant to be processed by a machine, but I managed to
work out what you meant. Delete all the "<" lines and add the
">" line, right?

 rc>> It's bloody 45k in size! But I'll have a look. Are you
 rc>> assembling it correctly?

 rc>> ; Assemble with
 rc>> ;
 rc>> ; tasm  /DPASCAL spawn,spawnp           - Turbo Pascal (Tasm
 rc>> only), near ; tasm  /DPASCAL /DFARCALL spawn,spawnp - Turbo Pascal
 rc>> (Tasm only), far ; ?asm  spawn;                          - C,
 rc>> default model (small) ; ?asm  /DMODL=large spawn              - C,
 rc>> large model

 PE> I am using wasm, not tasm.

    That's why the "?asm" .. presumably for MASM compatible assemblers.

 rc>> I presume you'd use /DMODL=large spawn

 PE> I'm just going "wasm spawn.asm".  I think I've already changed all
 PE> that crap to get around that model and pascal stuff.

    Does compiling with the switches change any error messages?

 rc>> What sort of errors is the assembler giving you, are they
 rc>> "global" or does it spit out line numbers. I can't help much
 rc>> unless I know where to start looking....

 PE> Below is the messages that I get.  If you can tell me what exactly
 PE> is non-MASM conforming about the lines in error, maybe I can do
 PE> something about it.

    I won't be able to tell you exactly, because I know fuck all about
MASM. I can try, though.

 rc>> I don't have MASM so I can't test its "MASMablity" ... which
 rc>> is a pity as I'll need it soon to play with the compiler I'm
 rc>> working on. Anyone got a copy of MASM they'd like to give me? ;-)

 PE> I've never seen a copy of MASM in my life.  Probably because
 PE> they don't bundle it with Microsoft C.  BFN.  Paul.

    Costs about $100 or so from what I can work out. $US probably.



 PE> spawn.asm(197): Error! E149: This instruction is not supported

mcbdesc         struc
addr            dw      ?       ; paragraph address of the MCB
msize           dw      ?       ; size in paragraphs (excluding header)
swoffset        dw      ?       ; swap offset (0 in all blocks except first)
swsize          dw      ?       ; swap size (= msize + 1 except in first)
num_follow      dw      ?       ; number of following MCBs
                dw      3 dup(?) ; pad to paragraph (16 bytes)
mcbdesc         ends

    I think I got my diff slightly wrong; line 197 is the "msize"
line in my "modified" source, but I would guess that
"addr" is the problem line due to a reserved keyword. Change
globally to something else, like "addr1"


 PE> spawn.asm(251): Error! E102: Operator is expected
 PE> spawn.asm(251): Error! E081: Offset cannot be smaller than WORD size

expar           db      TYPE exec_block dup (?) ; exec-parameter-block

    What the fuck is this? TYPE? Hmmm. I think this means reserve  bytes. From around line 159:

exec_block      struc
envseg  dw      ?               ; environment segment
ppar    dw      ?               ; program parameter string offset
pparseg dw      ?               ; program parameter string segment
fcb1    dw      ?               ; FCB offset
fcb1seg dw      ?               ; FCB segment
fcb2    dw      ?               ; FCB offset
fcb2seg dw      ?               ; FCB segment
exec_block      ends

    The size of the structure is 14 bytes. So, try this on line 251:

expar           db      14 dup (?) ; exec-parameter-block

    Just as a workaround. If that works then we'll see about another way to
figure out the size of the structure.

 PE> spawn.asm(259): Error! E102: Operator is expected
 PE> spawn.asm(259): Error! E081: Offset cannot be smaller than WORD size
 PE> spawn.asm(260): Error! E102: Operator is expected
 PE> spawn.asm(260): Error! E081: Offset cannot be smaller than WORD size
 PE> spawn.asm(261): Error! E102: Operator is expected
 PE> spawn.asm(261): Error! E081: Offset cannot be smaller than WORD size

lprep           db      TYPE prep_block dup(?)  ; the swapping variables
lcurrdesc       db      TYPE mcbdesc dup(?)     ; the current MCB descriptor
lxmsctl         db      TYPE xms_control dup(?)

    Again the same problem. Do this:

lprep           db      100 dup(?)    ; the swapping variables
lcurrdesc       db      16 dup(?)     ; the current MCB descriptor
lxmsctl         db      16 dup(?)



 PE> spawn.asm(268): Error! E102: Operator is expected
 PE> spawn.asm(269): Error! E102: Operator is expected

param_len       =       ((TYPE parseg + 1) / 2) * 2     ; make even
codebeg         =       param_len

    Same fucking problem. Surely you must have noticed this yourself Paul,
you're not that stupid are you? ;-) I would guess that assigning the value
of param_len to codebeg is failing because param_len was not able to be
calculated. If it still doesn't work then just duplicate the expression for
both lines.

param_len       =       ((755 + 1) / 2) * 2     ; make even

    I *think* that's the right length of the structure.


 PE> spawn.asm(298): Error! E102: Operator is expected
 PE> spawn.asm(298): Error! E065: Invalid instruction operands
 PE> spawn.asm(299): Error! E102: Operator is expected
 PE> spawn.asm(299): Error! E065: Invalid instruction operands

        mov     ax,lmem lprep.first_mcb
        mov     bx,lmem lcurrdesc.addr

    Probably the reference to "lmem". Elsewhere the code says this:

;       All references to low-core variables from low-core itself
;       are made through DS, so we define a text macro "lmem" that
;       expands to "ds:". When setting up low core from the normal

lmem    equ     

    WASM may be literally replacing "lmem" with the text string
"" when it should be "ds:"

    First, try changing "" in the line above (about
line 235) to "ds:"

    If that doesn't work, then comment out that line, and just replace all
occurrences of "lmem" with "ds:"


 PE> spawn.asm(320): Error! E102: Operator is expected
 PE> spawn.asm(320): Error! E065: Invalid instruction operands

        mov     ax,lmem lcurrdesc.addr

    Same as above.


 PE> spawn.asm(328): Error! E102: Operator is expected
 PE> spawn.asm(328): Error! E065: Invalid instruction operands

        mov     ax,lmem lcurrdesc.addr

    Same again.

 PE> spawn.asm(349): Error! E102: Operator is expected

        cmp     ax,lmem lcurrdesc.msize ; needed size

    And again.

    Note that the changes I have suggested (particularly the
"DS:" reference) may actually make the code no longer MASM
compatible. Hope this helps.

---
* Origin: Jelly-Bean software development. (3:635/727.1)
SEEN-BY: 50/99 632/348 998 633/371 634/384 635/503 513 544 727 638/100
SEEN-BY: 640/230 690/718 711/401 410 430 807 808 809 934 713/888 800/1
SEEN-BY: 7877/2809
@PATH: 635/727 632/348 635/503 50/99 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.