To use this file copy and paste this:
// #URL-lib "http://pin1.org/forthlib/flb/IASI2/BV4505-keypad.flb" into BV Terminal 3
or here to download.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// BV4505 - IASI Keypad Default address 'b'
// This will load as a stand alone file or can be used as a library
// providing the parent file includes the files in the REQUIRES
// section
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// HISTORY:
// Nov 2008 *Preliminary
// REQUIRES:
// #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=0
// #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=101
// #URL-lib "http://pin1.org/forthlib/flb/General/strings.flb"
// #URL-lib "http://pin1.org/forthlib/flb/IASI2/IASI2-b.flb"
// CONSTANTS:
integer i-keypad-adr // set this before using
Full Contents of File
integer  i-keypad-adr         
: i-key-adr
        =>  i-keypad-adr
; 
     
: i-init-key
        i-key-adr
        i-connect
;                       
: i-key?
        i-cbuff               
        i-keypad-adr  emit1  [char]  b  emit1  cr1  i-send
        i-gn
        0=  if 
                ."  device  error"  abort
        then               
;
: i-key
        begin
                i-key?
        until       
        i-keypad-adr  emit1  [char]  g  emit1  cr1  i-send
        i-gn  drop
;   
: i-keydown?
        i-keypad-adr  emit1  [char]  d  emit1  cr1  i-send
        i-buffer  c@
        48  -
;
: i-keydownk?
        i-keydown?
        if
                i-key
        else
                -1
        then
;
                       
: i-keyclear
        i-keypad-adr  emit1  [char]  c  emit1  cr1  i-send
;