option "check, diag"  ; ! I have modified pass1-flat.c to extract the string and assign it to char OPTION_STRING[256]

option "#pragma push_macro(""macro_name"")"  ; ! Thinking this might help communicate with C... Better syntax than using '*' to pretend it is machine code...

option "
int zxcv(void) {
  return 42;
}  
"

option "-last-man-standing"   ; ! for now only the last parameter to %option will be available to the caller of pass1 when it exits.

! The next two are passed into the ICode.  They only accept 16-bit integers.

diagnose 16_5678  ; ! only affects compiler reporting, should not make any change to generated code

control 16_abcd   ; ! control code generation.

! Some meanings of some bits from some previous compilers.  They are far from being standardised.

! %control 0           ; ! NO CHECKING
! %control 1           ; ! CHECK SWITCHES
! %control X'10000000' ; ! Decode to machine code in listing file. (EMAS, 32-bit parameter accepted)


! ABD 80386:

!CONTROL BITS
constinteger  check capacity = 1
constinteger  check unass    = 2
constinteger  check array    = 4
constinteger  check bits     = check array;   ! The only one that does anything so far

! PDP11:
constinteger Trusted     = 1<< 0,
              No Eis      = 1<< 8,
              Stack Check = 1<< 9,
              Profiling   = 1<<10,
              Check Jumps = 1<<11

! Early ICL 4/75 imp compiler:

! K=J     &15; LINENOS = K    %UNLESS K=15
! K=J>> 4 &15; DIAGS1  = K    %UNLESS K=15
! K=J>> 8 &15; CHECKS  = K    %UNLESS K=15
!              CHECKSP = K&14 %UNLESS K=15
! K=J>>12 &15; UNASS   = K    %UNLESS K=15
!      16      unknown
!      20      unknown
!      24      unknown
! K=J>>28;     DCOMP   = K    %UNLESS K=15

! INTERDATA

!  COMPILER CONTROL OPTIONS (DEFAULT MARKED *)
CONSTINTEGER TEST SWITCH = 1;    !* CHECK SWITCH JUMPS
CONSTINTEGER STKDIAG     = 2;    !* CHECK EXTENT OF STACK
CONSTINTEGER ARRAY DIAG  = 4;    !* CHECK ARRAY BOUNDS
CONSTINTEGER FORDIAG     = 8;    !* VALIDATE %FOR PARAMETERS
CONSTINTEGER ASS DIAG    =16;    !* TEST FOR TRUNCATION
CONSTINTEGER UNASS DIAG  =32;    !* CHECK FOR UNASSIGNED VARIABLES
!
CONSTINTEGER TRUSTED diag     =4096;  !  ENABLE DIRTY OPTIMISATIONS
! %CONTROL 0 GIVES TIGHTEST CODE (NO CHECKING AT ALL!)

!----------------------------------------------------------------------------------------
! %diagnose is also somewhat compiler-specific


! VAX: (pass 2)

! %diagnose significance
!
!   diag bit:      monitors:
!            1  =  stack procedures
!            2  =  load
!            4  =  hazard/claim/release
!            8  =  assign/array ref
!           16  =  call/push
!           32  =  address
!           64  =  amap/vmap
!          128  =  put code/operand
!          256  =  operate
!
!         2048  =  I-code main symbols
!         4096  =  stack dump on MONITOR
!         8192  =  %monitor on MONITOR


! Early Imp77 v4.12 (1978)  pass1
!  %DIAGNOSE FLAGS (2¬¬N)
!
!  0  -  GRAMMAR TRACE
!  1  -  RECORD USE
!  2  -  APP DEFN.
!  3  -  RECORD DEFN.
!

! later pass1:

!%diagnose 16_800F  { Mon Codes ! Mon ICode | Mon Line | Mon Debug }
!diagnostic trace routine (diagnose&1 # 0)


! The Perkin-Elmer compiler encodes the pass number that the %diagnose refers to
! in the top two bits of the 16-bit word.  This probably explains the 800F
! above, which means those codes were intended for Pass1...

! c('y'):                         ! %diagnose n
!    j = tag
!    diagnose = 0
!    %if (j>>14)&3 = 2 %start;    ! it's for pass 2
                  

endoffile