On Sun, 21 Apr 2002 at 22:10:24, Dilwyn Jones wrote:
(ref: <00bc01c1e97c$c8a29800$bf065cc3@default>)
>>>Unfortunately neither Turbo itself not its output is very "clean":
>It is
>>>neither ROMable not Thingable ;(
>>Given Simon's Assembly background I would think that the output from
>TURBO
>>would be fairly clean (but I've never looked at it and I really don't
>know
>Turbo, as one of its "speed-up" tricks, generates self-modifying code,
>so a Turbo compiled program could never run from ROM in its DP form at
>least. Example: machine code loops were speeded up with a series of
>consecutive move.l ... type instructions in succession and the loop
>generated a jmp or jsr to the appropriate number of move.l
>instructions, so it had to modify the parameter for the jump
>instruction to tell itself how far into the loop to jump to generate
>the correct number of move.l instructions!
>
>In brief, the code modified itself to some extent as it ran, so it
>couldn't modify itself while executing from a ROM, and if it were
>HOT_RES'ed for example, chaos would ensue if two or more copies of the
>program running from the same place tried to modify the same code!
>
>That's what's meant by by non-rommable and non-thingable code.
It also uses RESPR space to store transient data.
We had a midnight session with Freddy in Eindhoven sorting out issues
like this. Users used to change RESPR to LRESPR.
This failed often, 'cos the procedure space was _larger_ than the code
size, ie RESPR area reserved was larger than the code size.
Awful.
--
QBBS (QL fido BBS 2:252/67) +44(0)1442-828255
tony@<surname>,demon.co.uk http://www.firshman.demon.co.uk
Voice: +44(0)1442-828254 Fax: +44(0)1442-828255
TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG