| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | data segment woes |
Answering msg from Paul Edwards to rowan crowe,
on Wednesday May 24 1995 at 20:49
Howdy Paul.
rc>> Put in my original code "mov ax, seg _data" (with the leading
rc>> underscore)
PE> Ok, that compiles under both Watcom and Borland, but still doesn't
PE> work under Watcom with regards to drawing on the screen. However
PE> it still doesn't work. The C program is trying to use DS values of
PE> 6e65 and 5e64 (it flips between them, for some strange reason, as
PE> before). The override of the ds is loading a value of 5e66! Being
PE> different from both other values is someone of a concern!!! However,
Since you're using the Large memory model, that's not a surprise (I
think). Does Large allow far data? If so, then DS will change as you access
more than 64k of data. Also, it's not unusual for DS to change temporarily
during library calls and the link.
PE> P.P.S. Well, adding your code fixup to EVERY function in vio.asm
PE> (what a lot of work!) fixed the problem!!!!!!!!!!!!!!!! Now
Indeed a lot of work, and you didn't have to add it to every function even. ;-)
PE> would you mind telling me what I've done? I actually added the
That was just my suggestion to point correctly at the data segment.
BTW: remember that the same physical address can be expressed in several ways.
Example: 5e64:0020 is exactly the same location as 5e66:0000
PE> code to a couple of functions at a time, and it was amazing the
PE> dramatic effect it had! It inspired me to keep going, which
PE> eventually worked. It traps in a different bit of the code in
PE> one of the other message areas, and I will investigate that later,
PE> but that is most likely a different problem. I would like to know
PE> why the hell I had to add all that code!!!
How much time did you waste doing that? ;-)
PE> P.P.P.S. YIPPEE!!!! The problem was I hadn't put in the special
PE> prototype (...) to force Watcom to pass parameters on the stack
PE> before calling the assembler version of normalize, and now she's
PE> a little ripper!!!
Watcom passes by registers usually?? That's damn strange for a HLL.
Maybe it's half decent, even.
(Shudders at the thought of "push bp / mov bp, sp")
PE> P.P.P.P.S. If you know of a way of making Watcom (DOS, not OS/2,
PE> and 16-bit, not 32-bit) of passing parameters on the stack instead
PE> of in registers let me know, as I don't like having the watcom
PE> specific stuff in my source code like that.
I don't understand exactly what you're saying -- were you able to solve
the original problem and therefore remove my "quick fix" code?
And, RTFM Paul, if ya have one. ;-)
---
* Origin: Jelly-Bean software development. (3:635/727.1)SEEN-BY: 50/99 632/348 998 633/371 634/384 635/502 503 513 544 727 638/100 SEEN-BY: 640/230 690/718 711/401 410 430 807 808 809 933 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™.