Welcome, Guest. Please login or register.


Author Topic: HiSOFT Pascal (Read 2550 times)

Offline SlashNet

  • EP addict
  • *
  • Posts: 1208
  • Country: ua
  • Enterprise 128K | Cubietruck
    • My old site about Enterprise
HiSOFT Pascal
« on: 2016.June.07. 12:01:20 »
After long thinkings I want to try rewrite my game in Pascal.

And I have few questions:

  • what disadvantages has that compiler, in comparison with the IS-BASIC (or ZZZIPed BASIC);
  • what Pascal function/procedure can use instead Basic's DATA statement;
  • howto using channels: write/writeln to specified channel (because EP scecific functions has description only on magyar);
« Last Edit: 2016.June.07. 12:23:10 by SlashNet »

Offline endi

  • EP addict
  • *
  • Posts: 7298
  • Country: hu
  • grafikus, játékfejlesztõ, programozás, scifi, tudományok, vallás
    • Honlapom
Re: HiSOFT Pascal
« Reply #1 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 :)
Vigyázat! Szektás vagyok! :)

Offline SlashNet

  • EP addict
  • *
  • Posts: 1208
  • Country: ua
  • Enterprise 128K | Cubietruck
    • My old site about Enterprise
Re: HiSOFT Pascal
« Reply #2 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. :(

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1298
  • Country: hu
  • Stray cat from Commodore alley
Re: HiSOFT Pascal
« Reply #3 on: 2016.June.07. 13:04:16 »
Wouldn't defining constant arrays replace the BASIC DATA constructs?

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9926
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: HiSOFT Pascal
« Reply #4 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.
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline Povi

  • EP addict
  • *
  • Posts: 2297
  • Country: hu
    • http://povi.fw.hu
Re: HiSOFT Pascal
« Reply #5 on: 2016.June.07. 16:53:26 »
After long thinkings I want to try rewrite my game 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)




*** Speicherplatz zu klein