0000 ; 16:57:59 THURSDAY AUG 09 2001 0010 0020 ; This program will enter a line of text into 0030 ; RAE's input buffer, and from there into the 0040 ; Text File. Each line must be < 72 chars & 0050 ; chars must not have bit 7 set. Line must 0060 ; start with a number (0 to 9) or RAE will 0070 ; assume the returned input is a command. 0080 ; Commands may, of course, also be used, but 0090 ; if invalid will generate an error message. 0100 ; When used this way, the operation is 0110 ; analogous to RIN (from the monitor) 0120 0130 ADDPAD .DE $11A 0140 ; # of chars in RAE's input buffer, 0150 ; including line #, +1. 0160 0170 BUFFER .DE $135 0180 ; RAE's input buffer 0190 0200 TOUT .DE $8AA0 0210 ACCESS .DE $8B86 0220 TECHO .DE $A653 0230 OUTVEC .DE $A663 0240 0250 TXEN/DL .DE $B264 0260 ; Calls CRTI which processes special chars 0270 ; (such as BS), and returns with # of chars 0280 ; in ADDPAD. Then decides if line is text 0290 ; or a command. If text, falls through to 0300 ; XX.. at $B275, which inserts line and 0310 ; returns to command level. 0320 0330 OUT.CRLF .DE $E3CA 0340 ; Saves regs and prints CRLF. 0350 0360 TIME .DE $F000 0370 ; Real-Time Clock/Calender program. 0380 ; Returns what you see here in line #0. 0390 0400 .BA $1000 ; or wherever 0410 .LS 0420 1000- 20 86 8B 0430 JTIME JSR ACCESS 1003- A9 30 0440 LDA #'0 ; 1 digit line # 1005- 8D 35 01 0450 STA BUFFER 1008- A9 3B 0460 LDA #'; ; Make a comment 100A- 8D 36 01 0470 STA BUFFER+1 100D- A9 20 0480 LDA #' ; Add space for clarity 100F- 8D 37 01 0490 STA BUFFER+2 1012- A9 03 0500 LDA #3 ; 3 chars so far 1014- 8D 1A 01 0510 STA ADDPAD 1017- A9 3C 0520 LDA #L,TIME>BUF 1019- 8D 64 A6 0530 STA OUTVEC+1 ; Point OUTVEC into buffer 101C- A9 10 0540 LDA #H,TIME>BUF 101E- 8D 65 A6 0550 STA OUTVEC+2 1021- 20 00 F0 0560 JSR TIME ; Output TIME and DATE 1024- A9 A0 0570 LDA #L,TOUT 1026- 8D 64 A6 0580 STA OUTVEC+1 1029- A9 8A 0590 LDA #H,TOUT ; Restore OUTVEC 102B- 8D 65 A6 0600 STA OUTVEC+2 102E- EE 1A 01 0610 INC ADDPAD ; Add 1 1031- 20 CA E3 0620 JSR OUT.CRLF 1034- A9 00 0630 LDA #0 1036- 8D 53 A6 0640 STA TECHO 1039- 4C 67 B2 0650 JMP TXEN/DL+3 ; Let RAE process 0660 103C- AC 1A 01 0670 TIME>BUF LDY ADDPAD ; Get current 103F- 29 7F 0680 AND #$7F ; Strip bit 7 1041- C9 0A 0690 CMP #$0A ; Ignore line feeds 1043- F0 0A 0700 BEQ NXTBUF 1045- C9 0D 0710 CMP #$0D ; and carriage returns 1047- F0 06 0720 BEQ NXTBUF 1049- 99 35 01 0730 STA BUFFER,Y ; Put in buffer 104C- EE 1A 01 0740 INC ADDPAD ; Ready for next 104F- 60 0750 NXTBUF RTS 0760 0770 .EN 0000,1050,1050 >