$CPU 8086 ' make compatible with XT systems $LIB ALL OFF ' turn off all PowerBASIC libraries $ERROR ALL OFF ' turn off all PowerBASIC error checking $OPTIMIZE SIZE ' optimize for smaller code $COMPILE UNIT ' compile to a UNIT (.PBU) '$COMPILE EXE ' compile to a UNIT (.PBU) DEFINT A-Z ' Required for all numeric functions, forces PB to not ' include floating point in UNIT (makes it smaller) '/*------------------------------------------------------------------*/ $CODE SEG "MLIB11" '/*------------------------------------------------------------------*/ SUB STUFFKEY(CHARS$) PUBLIC DEF SEG = &H40 Tail% = PEEK(&H1C) FOR I% = 1 TO LEN(CHARS$) IF Tail% > &H3C THEN Tail% = &H1E POKE Tail%, ASC(MID$(CHARS$, I%)) Tail% = Tail% + 2 NEXT IF Tail% > &H3C THEN Tail% = &H1E POKE &H1C, Tail% DEF SEG END SUB '/*------------------------------------------------------------------*/ ' STUFFKEY "TSO D;SWAP;BOT"