Enterprise Forever

:UK => Programming => Topic started by: SlashNet on 2016.June.07. 12:01:20

Title: HiSOFT Pascal
Post by: SlashNet on 2016.June.07. 12:01:20
After long thinkings I want to try rewrite my game (https://enterpriseforever.com/games/devils-basic/) in Pascal.

And I have few questions:

Title: Re: HiSOFT Pascal
Post by: endi on 2016.June.07. 12:20:52
I think the zzipped version runs on good speed. why you want to rewrite in pascal? write a new game instead :)
Title: Re: HiSOFT Pascal
Post by: SlashNet on 2016.June.07. 12:27:46
Zzziped version has problem.
One sunny day zzzip compiler said me: "Too many labels".
And I can't finish game in full size. :(
Title: Re: HiSOFT Pascal
Post by: ergoGnomik on 2016.June.07. 13:04:16
Wouldn't defining constant arrays replace the BASIC DATA constructs?
Title: Re: HiSOFT Pascal
Post by: szipucsu on 2016.June.07. 13:45:35
One sunny day zzzip compiler said me: "Too many labels".
If the program is too long you can take out some parts, create a loader and put the parts taken out into the loader. E.g. envelope number, set character can go to the loader.
You can try to contract some lines into one line, e.g.:
10 SET STATUS OFF
20 SET KEY CLICK OFF
30 SET BORDER 0
They can be conctracted and you can get a single line instead of three ones:
10 SET STATUS OFF:SET KEY CLICK OFF:SET BORDER 0
(These are only examples.)
If you use more DATA lines, you can contract them too.

You can try to use shorter variable numbers (I don't really know if it counts.)
If you use variables that are needed only in certain parts of the program (so you don't need them any more), you can use the same variable name for this function. So you can reduce the total number of variables used.
These are my suggestions.
Title: Re: HiSOFT Pascal
Post by: Povi on 2016.June.07. 16:53:26
After long thinkings I want to try rewrite my game (https://enterpriseforever.com/games/devils-basic/) in Pascal.

Hi,

first of all, you should use the HiSoft Pascal version 1.2, it is a bugfixed and imporved version of the original Pascal:

80 char wide screen,
allows lower case typing
some added functions

to call exos function there are predefined variables for the registers: RA, RB, RC, RD, RE, RH, RL

and then exos(n)

there is an added function SETVAR

it can be used to set exos variable, eg:

setvar(26,0);    { set staus off }

for DATA use should use arrays (or may be a better solution exists)