***** CONSOLE & TIME ROUTINES *****
***** by Genji OKADA  12/15/91

*** Get console input ***
SubRoutine conin
        /Byte &b4,7,&cd,&21
        /Byte &b4,0,&c3 :*-->ax
SubEnd

*** Get console input at uppercase ***
SubRoutine up_conin
        Call conin
@upper  /Byte &3c,&61,&72,@upper0 :*<--al
        /Byte &3c,&7b,&73,@upper0
        /Byte &24,&5f
@upper0 Return
SubEnd

*** Convert to uppercase for call to_upper(string) ***
SubRoutine to_upper(n)
        Integer N
        Value N :/Byte &93,&b0,0
  100   /Byte &88,&c4,&8a,&07,&08,&c0,&74,@300
        /Byte &43,&08,&e4,&78,@400
  200   /Byte &3c,&61,&72,@100
        /Byte &3c,&7b,&73,@100,&80,&67,&ff,&5f,&eb,@100
  300   /Byte &c3

  400   /Byte &80,&fc,&a0,&72,@100
        /Byte &80,&fc,&e0,&73,@100,&eb,@200
SubEnd

*** Get time$ for call time, date$ for call date ***
SubRoutine time
        time$="  :  :  "
        /Byte &b4,&2c,&cd,&21,&51,&8a,&c5
        GoSub 200 :/Byte &58 :GoSub 200
  100   /Byte &8a,&c6
  200   /Byte &b4,0,&b1,10,&f6,&f1
        /Byte &05,&30,&30,&89,&07
        /Byte &83,&c3,3,&c3

@date   date$="  -  -  "
        /Byte &b4,&2a,&cd,&21
        /Byte &91,&b1,&64,&f6,&f1,&88,&e0
        GoSub 200 :GoSub 100
        /Byte &8a,&c2,&eb,@200
SubEnd

End
