samiam95124 / Pascal-P6

6th version of Niklaus Wirth's original Pascal language compiler system
Other
28 stars 9 forks source link

Mode lock instructions #148

Open samiam95124 opened 6 months ago

samiam95124 commented 6 months ago

Five new instructions are added to lock out unavailable modes

The present

Binary Pascal-P machine decks can be generated in any mode, 16, 32 or 64 bits and little or big endian. These decks can be read into pmach/cmach which are constructed in any mode. The result would be a crash.

The proposal

Five new instructions would be added:

  1. Bit16 - 16 bit machine.
  2. Bit32 - 32 bit machine.
  3. Bit64 - 64 bit machine.
  4. BIge - Big endian format.
  5. lite - Little endian format.

If the target pmach or cmach machine sees a mode that it is not compiled for, it halts with a hard error.