diff --git a/Manual.docx b/Manual.docx index d7f0b80..b5c7066 100644 Binary files a/Manual.docx and b/Manual.docx differ diff --git a/Native.pas b/Native.pas index 780e3f4..96427f3 100644 --- a/Native.pas +++ b/Native.pas @@ -2547,13 +2547,15 @@ procedure InitFile {keepName: gsosOutStringPtr; keepFlag: integer; partial: bool SetDataBank; {set FPE slot, if using FPE} - if floatCard = 1 then - if floatSlot in [1..7] then begin - CnOut(m_pea); - CnOut2(floatSlot); - CnOut(m_jsl); - RefName(@'SETFPESLOT', 0, 3, 0); - end; {if} + if floatCard = 1 then begin + CnOut(m_lda_imm); + if floatSlot in [1..7] then + CnOut2(floatSlot) + else + CnOut2(0); + CnOut(m_jsl); + RefName(@'~INITFLOAT', 0, 3, 0); + end; {if} {write JSL to main entry point} CnOut(m_jsl); diff --git a/Scanner.pas b/Scanner.pas index b186283..78c7873 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -3151,6 +3151,8 @@ var floatSlot := token.ival; NextToken; end {if} + else if token.kind = eolsy then + floatSlot := 0 else Error(18); end; {DoFloat} diff --git a/cc.notes b/cc.notes index 035d9dc..646b273 100644 --- a/cc.notes +++ b/cc.notes @@ -687,7 +687,9 @@ A new #pragma optimize bit has now been introduced to control this behavior. Se Changes to #pragma float ------------------------ -If #pragma float is used to generate code for an FPE card, the slot number given in the pragma is now used to configure the FPE slot. This removes the need to call setfpeslot() in the program's code, although that can still be done to override the setting in #pragma float. If the specified slot number is not in the range 1-7, it will be ignored and setfpeslot() will still need to be used. You must also call setfpeslot() if you wish to use the FPE in any of the special types of programs that can be created using other pragmas. +The second numeric parameter to #pragma float is now optional. If it is provided, it specifies the slot number of the FPE card. If it is not provided or is not in the range 1-7, the FPE card is auto-detected instead. With these changes, it is generally no longer necessary to call setfpeslot() in programs that use the FPE card. + +If you use #pragma float in any of the special types of programs that can be created using other pragmas, the slot parameter will be ignored and the FPE will not be auto-detected. In those cases, the program will still need to call setfpeslot() to set the slot number before doing any floating-point operations. Additions to #pragma ignore