Board index » delphi » Pascal & Pascal+BASM programs

Pascal & Pascal+BASM programs

Hi all,

I don't believe many of you will be overly interested in my normal
form of travel, by thumb, but there may be some interest in the
programs I use to process the records I keep.

Why?

Well, I keep two separate sets, one written in pure Pascal, with
one exception, the routine to get the system time, and a second set
that is very heavily BASM'ized, which makes the main program more
than twice as fast and 12k smaller.

I've announced their availability on the hitch-hikers mailing list
last week and tomorrow evening I will be sending out the archive.
If anyone else is interested, probably only using it as a learning
tool, please send me an email before tomorrow evening 21:00 BST
(20:00 GMT).

This is the message that went to the people on the hitch-hike mailing
list that requested the package:

Quote
>Yesterday (2002-05-26) I've spent some time trying to compress the
>system as much as possible. I managed to get it down to just under
>230k. However, you'll get almost 10k more, as I've used RAR (ZIP is
>hopeless) and managed to split off the RAR Self Extractor. Run an
>also included batch file to extract the whole lot.

>The files you will get, on Friday!, are:

>- LIFTRAR.RAR - Containing LIFT.RAR
>- RAR.SFX - The RAR Self Extraction stub (not needed if you've got
>RAR 2.06(+))
>- ILIFT.BAT - Run this to install the system

>Total size is about 240K, make sure your mailbox has enough free space
>to cope with files of this size!

>Suggested installation method:

>1) Save the above three files in a subdirectory
>2) CD to that subdirctory
>3) Run ILIFT.BAT

>ILIFT.BAT
>- will copy RAR.SFX + LIFTRAR.RAR to !TEMP!.EXE
>- will run !TEMP!.EXE, to extract LIFT.RAR
>- will copy RAR.SFX + LIFT.RAR to !TEMP!.EXE
>- will run !TEMP!.EXE, to extract the system. This will create
>the following directory structure _below_ the current subdirectory:

>-+- Current --- LIFT -+- ASM ----- BU
>                      +- ASM-NEW
>                      +- PAS ----- BU
>                      +- PAS-NEW
>                      +- DATA

>- will delete !TEMP!.EXE
>- will delete LIFT.RAR

>If you don't trust running the !TEMP! files, you'll have to download
>RAR from <http://www.rarlab.com/>. 950K for the Windoze version,
>410k for the DOS/OS2 version, which (it's an SFX) abends when I try
>to run it on my PC running PC DOS 2000.

>If you want LIFT to reside below the root, you'll have to MOVE it,
>or save everything in the root directory and run it from there.

>Contents of the various directories:

>LIFT
>- The ubiquitous COPYING file accompanying GPL software
>- LIFT(C).PAS, describing the programs and, more important, the format
>of the input file.
>- A few batch files I use when working with the system. You'll have to
>change the drive designations in them and the two environment
>variables pointing to my two RAM disks.
>- Pre-compiled executables of all five programs, you cannot recreate
>these yourself as they have been made with a patched version of the
>(TP6) compiler and a patched version of the RTL. They are a tiny bit
>faster than the ones you would be able to produce. (They're compiled
>with G+, but my compiler is patched to emit normal 8086 stack frame
>code, rather than the slower ENTER/LEAVE stuff)
>- Two utilities from PC Magazine.

>LIFT\ASM
>- The full sources. Pascal with loooooads of BASM

>LIFT\PAS
>- The full sources. Pure Pascal (except one routine to get the system
>time)

>LIFT\ASM-NEW
>LIFT\PAS-NEW
>- Empty. I use them to keep new versions of changed files until I'm
>satisfied that they work.

>LIFT\DATA
>LIFT.DAT, my 23 years on the road

>LIFT\ASM\BU
>LIFT\PAS\BU
>I use these two BU subdirectories to save the backups I create with
>SOLID.BAT. They're not fancy incremental backups, but simply double
>ZIPped archives of all .PAS files on a certain date.

>BTW, it wouldn't hurt to make back-ups of ILIFT.BAT, LIFTRAR.RAR &
>RAR.SFX on a floppy! (I keep _two_ copies of the current set-up and
>two copies of all yyyymmdd.zip backup files...)

>Finally, have fun with the programs! If you find any bugs, don't be
>afraid to ask me for help, but make sure it's not your input that's
>wrong - I spent about two hours trying to find a "bug" after adding
>trip 45, only to finally discover that I put in a wrong waiting time!
>ChkDat, now seriously being thought of, will be able to catch such
>problems...

Please don't tell me what I already know:

- that I should not use so many globals
- that I should use units
- that I should add more comments

The main program dates back to 1987 & TP 3.01a. I normally work on
mainframes and in the mainframe environment there is rarely, if ever,
time to rewrite programs. You just add extra code...

Regards,

Robert

PS: FWIW, LIFT is also available as a 10,020 line PL/I program, as is
EFONT, a 2,180 line REXX exec which combines the functions of REORDER,
DAYFORM and H-H2RTF. (And in the very unlikely event that you want it,
the first(?) TP 3.01a version is also available...)
--
Robert AH Prins
pr...@bigfoot.com

 

Re:Pascal & Pascal+BASM programs


Quote
Robert Prins wrote in message <3cf68...@212.67.96.135>...
>Hi all,

>I don't believe many of you will be overly interested in my normal
>form of travel, by thumb, but there may be some interest in the
>programs I use to process the records I keep.

>Why?

>Well, I keep two separate sets, one written in pure Pascal, with
>one exception, the routine to get the system time, and a second set
>that is very heavily BASM'ized, which makes the main program more
>than twice as fast and 12k smaller.

>I've announced their availability on the hitch-hikers mailing list
>last week and tomorrow evening I will be sending out the archive.
>If anyone else is interested, probably only using it as a learning
>tool, please send me an email before tomorrow evening 21:00 BST
>(20:00 GMT).

<snip>

I received three requests for these programs from c.l.p.b, from
lurkers in this group. I haven't heard back from one of them, but
here's what the others had to say:

Quote
> I'm not pleased by what you sent me, it wasn't 240k, but more than
> 300k. [RAHP: MIME...] I probably lost other emails. [RAHP: This went
> to a Hotmail account] The code is also useless, I do not hitchhike,
> and there are no routines that can be used for anything else.

He obviously did not read my announcement (was it really so unclear)
and missed the point.

and the other

Quote
> I received ur three files and instaled them on my PC. I dont hike
> but was interested that u called them a learning tool to convert
> Pascal in asembler. I use asm in a few places in my own program but
> my use of asm is only for a few lines u use it to convert whole
> files. I have a program DUMPPROG [RAHP: DMP21.ZIP(?) on Garbo] and
> have used it to compare the code from the compiler I use BP7 with ur
> code. I use the MAP file to see what routines are a lot shorter and
> had a look at them 1st some of them are less than half the length of
> the same Pascal code. Their are few that are longer why havent u
> kept the Pascal 4 them? [RAHP: They are longer because they contain
> data that is in typed constants in the Pascal version]

<big snip of routine compares>

Quote
> I also want to know why u have all those {$ifdef PRINS} condtionals
> in ur code. I tried to compile with /DPRINS but then I get a syntax
> error on a rep movsd statement. Have u got a compiler that supports
> this instructions? [RAHP: Yes, I patched my compiler] I like ur
> constants 4 unsupported instruction its better than my db
> $xx,$xx,$xx data. I had to change ur bat files 4 BP7 and see that u
> dont use the FPU. I try compiling them with the FPU for faster speed
> and they dont work. Why? [RAHP: The programs date back to TP 3
> times. My father never bought the TP3 compiler that supported the
> 8087. I never took the trouble to update them]

<snip another truckload of questions>

Quote
> I have a close look at ur code later, I hope ur OK if I ask more.

His English may not be entirely standard, but it's nice to get at least
one positive reply...

Robert
--
Robert AH Prins
pr...@bigfoot.com

Other Threads