   10REM SAVE"BYTEDIAG"
   20REM Simple OSBYTE intercept
   30DIM Code &100
   40ByteV = &20A
   50FOR Pass=4 TO 6 STEP 2
   60P%=&2F00:O%=Code
   70[OPT Pass
   80.Entry
   90  Lda ByteV:Sta MyByteV
  100  Lda ByteV+1:Sta MyByteV+1
  110  Lda #MyByte MOD 256:Sta ByteV
  120  Lda #MyByte DIV 256:Sta ByteV+1
  130  Rts
  140.MyByteV NOP:NOP
  150.MyByte
  160  PHP:PHY:PHA:PHX
  170  Jsr Phex:PLA:PHA:Jsr Phex:Lda #13:Jsr &E7E6:Lda #10:Jsr &E7E6
  180  PLX:PLA:PLY:PLP
  190  Jmp (MyByteV)
  200.Phex
  210  Pha
  220  Lsr A:Lsr A:Lsr A:Lsr A
  230  Jsr Pn
  240  Pla
  250.Pn
  260  And #15
  270  Cmp #10
  280  Bcc zz1
  290  Adc #6
  300.zz1
  310  Adc #ASC("0")
  320  Jmp &E7E6
  330]
  340NEXT Pass
  350OSCLI("SAVE XXX "+STR$~(Code)+" +100 FFFF2F00 FFFF2F00")
