11 /* the user has started to type in his/her UID. grab the last key and continue
12 * reading. Returns true if a UID was entered successfully.
13 * The UID will be entered as 5 digits. (shorter uids should be pre-padded
16 uid = last_key%10; /* 10 => 0, it was _not_ reset (hopefuly :) */
17 set_msg("UID? ", WRAP_NONE);
18 set_char((last_key%10)+'0', 5);
20 for (uidpos = 2; uidpos <= 5; uidpos++) {
22 if (last_key == KEY_RESET) {
26 uid = (uid*10) + (last_key%10);
27 set_char((last_key%10)+'0', 4+uidpos);
35 /* We ask for a pin, display a PIN: prompt. PINs must be a 4 digit number.
36 * Strictly, they must be 16-bit, but it's easier to use the guarantee that
37 * 4-digits numbers are < 65536
39 * Also display X's on screen as the pin is entered.
41 set_msg("PIN? ", WRAP_NONE);
42 for (pinpos = 1; pinpos <= 5; pinpos++) {
44 if (last_key == KEY_RESET) {
48 pin = (pin*10) + (last_key%10);
49 set_char('X', 4+pinpos);
56 set_msg("UNIVERSITY", WRAP_NONE);
58 set_msg(" COMPUTER ", WRAP_NONE);
60 set_msg(" CLUB ", WRAP_NONE);
63 set_msg("UCC *** INSERT COINS OR USER-ID", WRAP_SCROLL_L);
65 /* this needs to be a relatively tight loop to make sure we catch
69 if (keypad_pressed()) {
70 if (last_key != KEY_RESET) {
71 if (uid_enter() && pin_enter()) {
72 /* authenticate them */
84 /* Initialize Stuff. Particularly some memory locations that can only be
85 * written in the first 64 clock cycles upon reset.
89 /* enable RTI & set rate */