Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FABS - Qbasic
#21
(08-11-2022, 05:31 PM)G43 Wrote: sorry it has taken me so long to get back here.  Things have been crazy the last couple of months and i havent had time to get back to it.  Here is where it is called in the program.


1310 CMND$=",Y,2" : GOSUB 56000
    CMND$=",O,PRICHIST.KEY,1" : GOSUB 56000

    OPEN "PRICHIST.DAT" FOR RANDOM ACCESS READ WRITE SHARED AS #7 LEN=61
    FIELD 7, 18 AS LNPT$, 6 AS INV$, 8 AS DAT$, 25 AS NME$, 4 AS QUAN$ : RETURN



'--------------- Main CALL to FASBP ---------------------------
56000    CALL FABSMB(CMND$,ERRF%,RECNO%,ADRKEY%):RECLOW!=RECNO%
56010    IF RECLOW!< 0 THEN RECLOW!=RECLOW!+65536!
CALL FABSMB("X",DUM%,RECNO%,DUM%):RECHI!=RECNO%
IF RECHI!< 0 THEN RECHI!=RECHI!+65536!
RECNO!=RECHI!*65536+RECLOW!
56020    RETURN

If you describe some line of your program that uses the "S" command (search for exact key) or the command "G" (search for part of the key) it could guess which of the data is the key by which they are sorted.

Similar to this...

KEY$="ARTICLE"
CMND$=",S,KEY$,1,1" : GOSUB 56000

IF there is any line in which the "C" command is used, there we can see the type, length and number of keys that the database has and I could write you a small program that will create a new key file because it is Of course the current one is broken.
Reply
#22
ok, i will check it out and hopefully get back to you later today.

Thanks
Reply
#23
I have sent you a private message
Reply
#24
I can't find a c command but i did find the g command in the following line

CMND$ = ",G,1,1," + KY1$ : GOSUB 56000

KY1$ appears to be the part number your looking for the history

how many commands are there for fabs, is there any documentation anywhere for different commands?
Reply
#25
Indeed, the G command is used to make partial searches of the key.
The only page that has information is http://gcssoft.de/
Reply
#26
Hi
about using a 16bit program (FABS.COM  tsr program) and machine code calls

I think your solution in Windows 64bit is only to use DosBox or similar emulator of 16bit machine...

You cannot get work QB64 and FABS, IMHO, you must access to memory by Call Absolute instructions

Code: (Select All)
The FABS routine would be this:

SUB fabs (cmnd$, recno, fseg, errf%, adrkey%)
    '------------------------------------ FABSP ROUTINE ---------------- ----------------
    DEF SEG = fseg
    offset% = &H8
    CALL ABSOLUTE(cmnd$, errf%, recno%, adrkey%, offset%)
    rnlo = recno%: IF rnlo < 0 THEN rnlo = rnlo + 65536
    cmnd$ = "X"
    CALL ABSOLUTE(cmnd$, dum%, recno%, dum%, offset%)
    rnhi = recno%: IF rnhi < 0 THEN rnhi = rnhi + 65536
    recno = rnlo + rnhi * 65536
    DEF SEG
END SUB

that in QB64 are emulated (?) or forbidden for incompatibility with 64bit OS.

A workaround can be using  _MEM to access memory for reading and for writing, but it lasts that FABS.COM is a 16bit program TSR of DOS era.

It needs to be rewritten in QB64, if it is possible or with reverse engineering.

Good Luck
Reply




Users browsing this thread: 1 Guest(s)