HiSoft Pascal Primer cover: a square, a triangle and a circle drawn and filled by a HiSoft Pascal program on the Tatung Einstein
← Back to Courses
module
20

Where You Go From Here

Introduction

That is the primer. You came to it knowing Pascal from the Turbo course; you can now write the same programs in HiSoft Pascal on the same machine, and a few - pictures and sound - that Turbo could not. This last section puts the differences in one place, points at what was left out, and says where to go next.

What Changed

The ones that will catch you, in the order they will:

  • There is no editor. Type the program into XBAS as numbered lines, SAVE "NAME.ASC", DOS, HPEIN NAME;Y, NAME. Four steps for every change - save before you compile.
  • XBAS changes five characters: ? { | } ~. Use CHR(63) for a question mark and (* *) for comments. A line whose Pascal starts with a number needs (**) in front.
  • CTRL-C works - and costs. The check is on unless you write (*$C-*), and loops run thirty times faster without it. Programs using INCH, or talking to the screen chip, need it off.
  • Every integer is written with a space after it.
  • Sums past 32767 stop the program - except a constant added, which wraps. Array indexes are checked; subranges are not.
  • No strings: arrays of characters, exact-length texts, your own LEN. And AND always works out both sides.
  • CASE ends with ELSE or END, not both.
  • Recursion just works.
  • Two arrays assign only if they share a type name.
  • Files are text only, named in RESET and REWRITE, never closed - and read with a big buffer and a spare first line.
  • No Dispose: MARK and RELEASE.
  • PAGE, and CHR(29), column, row, counting from 0 - or your own GOTOXY.
  • RANDOM is 0 to 255 - best taken after a key press.

Appendix V has the whole list as a table, Turbo on one side and HiSoft on the other.

What This Primer Left Alone

HiSoft Pascal's manual covers some things this primer did not. Each is worth reading about there - and, as the manual is a guide rather than the last word, trying on the machine:

  • Including a file of source into a program as it compiles - the manual's option F, for building up a library of procedures.
  • The printer: PRON and PROFF, and the option that sends the compiler's listing to it.
  • The file buffer F^ with GET and PUT - reading and writing a character at a time below READ and WRITE.
  • How HiSoft Pascal keeps its data in memory - the manual's Appendix 3, for anyone mixing Pascal with machine code.
  • The manual's example programs, in its Appendix 4. The file programs there will meet the reading problem from S12.

Where Next

The Turbo course's S39 pointed at the Z80 assembly course, and so does this one - more directly. S19's INLINE and USER are machine code inside a Pascal program; the assembly course is where you learn what the bytes mean, and how to write your own.

Found A Mistake?

Please tell us. Nothing in this primer has yet been tried on a real Einstein, and a report from one would be the most useful thing of all.

Get the Newsletter

New guides, disk images and community finds, roughly once a quarter. No spam, we promise, this isn't Tatung's marketing department.
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.