Recent

Author Topic: BP preformed ilegal operation  (Read 2054 times)

jws338

  • Newbie
  • Posts: 3
BP preformed ilegal operation
« on: August 02, 2022, 10:21:48 pm »
I am running a dos program in a w98 box. Every day a 23:59 it preformed a illegal operation.

Error
Fault location 2030:22C1

Any ideas
John

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: BP preformed ilegal operation
« Reply #1 on: August 02, 2022, 10:31:47 pm »
Are you using any of the date functions or doing some math with the date time ?
The only true wisdom is knowing you know nothing

af0815

  • Hero Member
  • *****
  • Posts: 1291
Re: BP preformed ilegal operation
« Reply #2 on: August 03, 2022, 08:55:27 am »
The first qestion, have you the code ?
regards
Andreas

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: BP preformed ilegal operation
« Reply #3 on: August 03, 2022, 09:46:25 am »
I am running a dos program in a w98 box. Every day a 23:59 it preformed a illegal operation.

Error
Fault location 2030:22C1

When you say "BP", presumably this is Borland Pascal?

This forum supports the Free Pascal Compiler, FPC, so unless you try to recompile your program we are unlikely to be able to help.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jws338

  • Newbie
  • Posts: 3
Re: BP preformed ilegal operation
« Reply #4 on: August 03, 2022, 01:42:02 pm »
Jamie: I use date functions to show the date and to date stamp in files I make.

af0815: I wrote the code and I have it

MarkMLI: BP = Borland Pascal 7.0
The program is used to monitor a sump pumps and boiler usage. I do have inputs from a sump that shows how many seconds pump is on and off. This is display on the art and wrote to a file telling how many times a pump is on and total minutes for the day. The file is appended every day. This is done for 16 inputs. If a pump runs too long I get a email letting me know.

I have tried running the program using the IDE and the error exited the IDE. Usually running a program
using the IDE program it will stop at the line in the program that caused the error.



dseligo

  • Hero Member
  • *****
  • Posts: 1221
Re: BP preformed ilegal operation
« Reply #5 on: August 03, 2022, 01:48:31 pm »
Do you divide something by time in your program?
Maybe you are calculating something with time, and at midnight reset time to 0 and then divide it by that.

Why don't you try to compile your program in Free Pascal?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: BP preformed ilegal operation
« Reply #6 on: August 03, 2022, 01:55:04 pm »
I have tried running the program using the IDE and the error exited the IDE. Usually running a program
using the IDE program it will stop at the line in the program that caused the error.

/Which/ IDE: Free Pascal (FPC) or Borland? If FPC, what version?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

jws338

  • Newbie
  • Posts: 3
Re: BP preformed ilegal operation FIXED FIXED
« Reply #7 on: August 06, 2022, 09:01:47 pm »
 8) ::)I use the BP IDE. PROBLEM FIXED. The problem was a file that I write every night at 11:59 with totals for the day. Then file is read and stored in memory and It hast to be cleaned out every year. If I do not clean out the 5 files I write to once a year I will overload the memory and write sone garbage in the file. The next time I try and read that file it will and did crash.
Thanks John

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: BP preformed ilegal operation
« Reply #8 on: August 06, 2022, 11:26:56 pm »
I feel good that you've found it BUT if you want support from this community please use the FPC compiler.

We /can't/ support Borland Pascal: it's absolutely nothing to do with us and nobody here has the compiler etc. sources.

We /do/ support the Free Pascal compiler and Lazarus IDE, and I think you'd be pleasantly surprised at the number of target systems etc.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: BP preformed ilegal operation
« Reply #9 on: August 06, 2022, 11:42:07 pm »
I feel good that you've found it BUT if you want support from this community please use the FPC compiler.

We /can't/ support Borland Pascal: it's absolutely nothing to do with us and nobody here has the compiler etc. sources.

We /do/ support the Free Pascal compiler and Lazarus IDE, and I think you'd be pleasantly surprised at the number of target systems etc.

MarkMLl
FPC has a 16bit compiler?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: BP preformed ilegal operation
« Reply #11 on: August 07, 2022, 10:38:10 am »
8 and 16 bit processors are still widely used on an industrial scale and even intel flavors still in production, so 8 and 16 bit OS's are also readily available. And in principle they are supported by FPC.
They are mostly not called DOS or Windows 3.1 anymore  :D
Plz see the difference between desktop programming and industrial programming.

ON TOPIC:
BP has a timing issue since 2000 for which a patch is needed. It suffers from 2000 syndrome and also from an issue regarding processor speed, because it can't keep up with it. Also note TP mode in FPC does not suffer from this issue and is 99% + compatible.
So you can either apply the official Borland patch from ~1998 or switch to FPC.
Sidenote: why do you use Win98?
« Last Edit: August 07, 2022, 10:50:31 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: BP preformed ilegal operation
« Reply #12 on: August 07, 2022, 11:05:50 am »
Plz see the difference between desktop programming and industrial programming.

I don't need to: I've done at least as much of that sort of thing as you have.

However, whilst I really don't want to tell OP what he should be doing he appears to be in a situation where he's keeping an ageing PC going to run an app which could be fairly easily ported to e.g. a Raspberry Pi. And we know from his description of the problem he found (and that sort of feedback really is a refreshing change) that he needs a filesystem, so a completely bare-metal system probably isn't an option.

What we don't know from his description is what sort of I/O devices he's got and whether he's currently using a dedicated ISA or PCI card to handle that. However I'd hazard that they're probably volt-free contacts, and that any code reading bytes from a port or an absolute memory address could easily be modified to use an RPI's GPIO port.

Similar considerations apply to any existing user interface: changes will likely be needed, but that work will be balanced by the benefits of moving to a supported development tool with an active community of users.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: BP preformed ilegal operation
« Reply #13 on: August 07, 2022, 11:26:58 am »
I broadly agree with you. I only wanted to describe fit for purpose and application.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: BP preformed ilegal operation
« Reply #14 on: August 08, 2022, 11:41:54 am »
BP has a timing issue since 2000 for which a patch is needed. It suffers from 2000 syndrome and also from an issue regarding processor speed, because it can't keep up with it. Also note TP mode in FPC does not suffer from this issue and is 99% + compatible.
BP does NOT have a problem with any 2000 syndrome. I know because I still have about a dozen customers with an old BP program of mine (yes, really. and not my choice).

The only thing BP suffers, as you say, is the "Runtime Error 200: Divide by zero" problem with processors above 200Mhz (happens at the start of any program which uses CRT unit).
And that can easily be patched (as I have done in the mid '90).

But yes, if you currently still develop in BP you might as well convert to FPC.

 

TinyPortal © 2005-2018