\ Print segment:offset.
: S:O ( seg off)
   0 <# #S 2DROP [CHAR] : HOLD 0 #S #> TYPE SPACE ;

\ Long Fuller dump--  80-column format.
: LDUMP ( off seg n)
  ?DUP IF  BASE @ >R  HEX
           CR  >R  SWAP 2DUP S:O ." --"  R>
           OVER 16 MOD  DUP 3 * SPACES   ." /"
           NEGATE /STRING  15 +  -16 AND   OVER + SWAP
           DO  CR DUP I S:O SPACE  I 16 + I
              DO    I OVER LC@ 0 <# # # #> TYPE  SPACE
              LOOP  SPACE  I 16 + I
              DO    I OVER LC@  127 AND BL MAX EMIT
              LOOP  16
          +LOOP  CR  R> BASE !  0
       THEN  2DROP ;

VARIABLE BUF
  510 ALLOT

VARIABLE SAVE.FCB
  50 ALLOT

HEX
CREATE EXE.TBL
   5A4D ,        ( Signature)
   0 , 0101 ,    ( Header + 64K data + 64K code in sectors)
   1 ,           ( Only reloc item is DGROUP in Coldstart)
   20 ,          ( Header 32 paras = 512 bytes)
   0 , -1 ,      ( Min and max paras above program)
   0 ,           ( Stack relative segment)
   FFFE ,        ( Initial stack pointer)
   0 ,           ( Checksum not used)
   'SAVE ,       ( Initial instruction pointer)
   CSEG DSEG - , ( Code relative segment)
   1C ,          ( Offset of relocation table)
   0 ,           ( 0 = memory resident)
   'SAVE 2 + ,   ( Relocation table: )
   CSEG DSEG - ,
DECIMAL

: SAVE
   " SAVE.EXE" SAVE.FCB FMAKE  0= ABORT" Can't Save"
   BUF 512 ERASE  EXE.TBL BUF 32 MOVE
   BUF 512 SAVE.FCB WRITE-FILE
   SAVE.FCB CLOSE-FILE ;



