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
25

Appendix V - Turbo To HiSoft

The whole primer on one page: each thing from the Turbo course, and what HiSoft Pascal has instead.

In the Turbo courseIn HiSoft PascalSection
TURBO, its menu and its editorXBAS to type the program as numbered lines; SAVE "NAME.ASC"; DOSS3
R to compile and run; C for a .COMHPEIN NAME makes NAME.COM; NAME runs itS4
Compiling againFile exists - Delete? - Y, or HPEIN NAME;YS4
A compile error opens the editor at the place*ERROR*, ^ and a number, by line; E to stop; fix it in XBASS4
Hello's .COM: 8,064 bytes3,584; 1,920 with ;RS4
Run-time error and a numberA message in words and at PC= an address; the listing shows the lineS5
A loop stops on CTRL-C only under {$U+}Stops on CTRL-C unless (*$C-*)S5
About 39,000 empty passes a secondAbout 1,440 by default; about 44,000 under (*$C-*)S5
{ } comments(* *) only - XBAS changes { and }S3
? in a messageCHR(63) - XBAS changes ?S3
IndentingNot kept by XBASS3
An integer written with no spaceA space after it, unless a width is givenS6
Overflow never caughtCaught for two variables and for *; not for a constant addedS6
div by zero gives -1/ by Zero stops the programS5, S6
Reals of 11 digits, 18 columnsAbout 7 digits, 12 columnsS6
Round(-2.5) is -3ROUND(-2.5) is -2; ENTIER rounds downS6
Sin, Cos, Exp... always thereOnly with ;TS6
Names in any casePascal's words in capitals; names case-sensitive - but XBAS makes everything capitalsS7
-Only eight characters of a name count; a name declared twice is not caughtS7
string[n], Length, Copy, Pos, +ARRAY[1..n] OF CHAR of exact-length texts; write your ownS8
-AND always works out both sidesS8
ReadlnREADLN before every READ of letters - input starts with an empty lineS9
DELETE does nothing while answeringDELETE rubs outS9
case ... else ... endCASE ... ELSE statement - no ENDS10
-A line starting with a digit needs (**) in front, in XBASS10
Recursion needs {$A-}Recursion works as it standsS10
Arrays of the same type assignOnly if declared together or with the same type nameS11
Index checked only under {$R+}Index checked by default; subranges neverS11
Assign, Rewrite, Close; typed filesREWRITE(F,'A:NAME .EXT'); text files only; no CloseS12
Reset of a missing file: I/O error 01No error: EOF at onceS12
-The first three characters of each piece read come back wrong: a buffer bigger than the file (TEXT[8]) and a spare first lineS12
Dispose, MemAvailMARK and RELEASE only; NEW never says fullS13
ClrScrPAGES14
GotoXY(Col, Row) from 1WRITE(CHR(29),CHR(col),CHR(row)) from 0 - or your own GOTOXYS14
-TCOL(f,b) for coloured textS14
Read(Kbd, Ch), KeyPressedINCH, under (*$C-*)S15
Random(n), RandomizeRANDOM 0-255, no seed - best taken after a key pressS16
No graphicsDRAW, PLOT, POINT, POLY, FILL, ORIGIN, GCOLS17
No soundPSG(register,value) - and 126 in register 7S18
Mem[a], AddrPEEK(a,type), POKE, ADDRS19
Port[n]OUT(n,CHR(v)), INP(n)S19
inline with a variable's nameINLINE of constants only; USER(a)S19

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.