gfxlib test release

DOS specific questions.
Adigun A. Polack
Posts: 230
Joined: May 27, 2005 15:14

I tried patching up the code the way you just did it, and...

Postby Adigun A. Polack » Jun 21, 2005 4:00

Well well well, DrV! What a *surprising* turn of events right there for me, let me tell you!! ;)

Previously, I got the following error code:

Code: Select all : error 18: Syntax error

    screen_info = SCREENINFO

.......but, when I have now tried patching up the code the way you just did it, the whole demo actually WORKED in FB-DOS!! d=^_^=b

However, I ran into a few nasty problems that needs to be fixed pronto. Few to very several seconds or more into the demo, I ran into either a “frozen” DOS-based screen, or a “Page Fault” error which went like this:

Code: Select all

Page fault at eip=00007d3e, error=0004
eax=00000000 ebx=80000010 ecx=80000010 edx=0000000a esi=81ccff08 edi=ffc3a408
ebp=01c18f78 esp=01c18f38 program=C:\DOWNLO~1\NEWQBS~1\FREEBA~1\NEWDEM~1\NEW(JU~
cs: sel=00af  base=84e5e000  limit=ffc54fff
ds: sel=00b7  base=84e5e000  limit=ffc54fff
es: sel=00b7  base=84e5e000  limit=ffc54fff
fs: sel=00c7  base=00000000  limit=0010ffff
gs: sel=00c7  base=00000000  limit=0010ffff
ss: sel=00b7  base=84e5e000  limit=ffc54fff
App stack: [01c19000..01b99000]  Exceptn stack: [0003e234..0003c2f4]

Call frame traceback EIPs:

.....and on top of that, man, there were some “missing vertical lines” off of certain sprites as I was playing the demo. Other than all of that, the effects and all (including Mode-7) ran great ( ^_-=b ! ), I must confess!!

At first, I thought the problem has been that the ASM code was Windows-specific, but it turns out I was wrong! :o I was QUITE surprised myself at that, really. Rel truly did the right thing on all of the ASM codes there, and I do not even blame him one bit for that at all, my man. (^-^)//

Thank you once again for your wonderful report, DrV. Be seeing you! ;D
Site Admin
Posts: 842
Joined: Jun 16, 2005 19:50
Location: Germany

Postby mjs » Jun 21, 2005 7:33


to find the bug you might try using the "-g" switch during compilation/link of your application. After this has been done you can use GDB (I use v6.11) from the DJGPP project to debug your executable.

To show a back trace (the call stack) using GDB:
  • GDB --args executable.exe
    Starts GDB and loads the executable and its debug information
  • r
    Starts the execution of your application
  • bt
    Shows the backtrace

To leave GDB, enter "q".
To get help about all commands, enter "help".

The most important commands are on DOS:
  • r
    (Re)Start application
  • stepi
    Step one assembler instruction, Steps into function
  • step
    Step one C instruction (doesn't work with BASIC yet)
  • nexti
    Step one assembler instruction, Steps over function calls
  • next
    Step one C instruction (doesn't work with BASIC yet), Steps over function calls
  • list
    List the source around the current (active) source line
  • disassemble
    Disassemble the current function
  • bt
    Back trace (Call stack)
  • show registers
    Show contents of registers
  • print varname
    Prints the contents of a variable (might not work with BASIC code yet)
  • q
    Quit GDB

To get more information about a given command, you might use "help command".


PS: Anyone out there that wants to create a tutorial for GDB usage with FBC?
Last edited by mjs on Jun 21, 2005 7:34, edited 1 time in total.
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines

Postby relsoft » Jun 21, 2005 7:34

can I see some exe?
And bt is the momma of all gdb commands. it even reports what labels the error is. :*)
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA

Postby DrV » Jun 21, 2005 12:49

If you find that the backtrace still does not show the name of some of the functions, I could build gfxlib passing -g to gcc because the crash could occur within the gfxlib code. (Hopefully not, but it's certainly possible.)

Rel, here's a DOS executable (still without a decent vsync routine): Download space_impakto_dos.exe
Posts: 136
Joined: Jun 09, 2005 16:46
Location: Russia, Belgorod

Postby smagin » Jun 21, 2005 16:05

With vsync.
The link may not work outside Russia, check please.
Posts: 680
Joined: May 28, 2005 1:11

Postby dumbledore » Jun 21, 2005 19:41

it works, but the server must be hosted on a 14.4k modem or something... o_o

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 3 guests