aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2019-03-15 07:09:39 -0400
committerB. Watson <yalhcru@gmail.com>2019-03-15 07:09:39 -0400
commit2fdf74c2c6a7d0d819a601410fd8c8be0e8ea411 (patch)
tree03b2f6593a191a9d4a11b02c92cdf9159a0c5965
parent48a239ff2177696f795070968f3d012a372e7dc5 (diff)
downloadfujichat-2fdf74c2c6a7d0d819a601410fd8c8be0e8ea411.tar.gz
cruft removal
-rw-r--r--src/getsmess.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/getsmess.c b/src/getsmess.c
deleted file mode 100644
index 1a8494b..0000000
--- a/src/getsmess.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <stdio.h>
-#include <peekpoke.h>
-
-
-void getlnasm(char *buf, char len) {
- asm("ldy #$00");
- asm("lda (sp),y");
- asm("sta $e2");
-
- asm("ldy #$02");
- asm("jsr ldaxysp");
- asm("sta $e0");
- asm("stx $e0+1");
-
- asm("@loop: lda _stdin");
- asm("ldx _stdin+1");
- asm("jsr _fgetc");
-
- asm("cmp #$9B");
- asm("beq @out");
-
- asm("ldy #$00");
- asm("sta ($e0),y");
- asm("inc $e0");
- asm("bne @noinc");
- asm("inc $e0+1");
- asm("@noinc:");
-
- asm("dec $e2");
- asm("bne @loop");
-
- asm("@out:");
- asm("ldy #$00");
- asm("tya");
- asm("sta ($e0),y");
-}
-
-void getln(char *buf, char len) {
- char *p = buf;
-
- do {
- *p = fgetc(stdin);
- if(*p == '\n') break;
- } while(++p, --len);
- *p = '\0';
-}
-
-void main(void) {
- char buf[100] = "HELLO";
- while(1) {
- /*
- puts("gets");
- gets(buf);
- puts(buf);
- puts("fgets");
- fgets(buf, 99, stdin);
- puts(buf);
- puts("getln");
- getln(buf, 99);
- puts(buf);
- */
- puts("getlnasm");
- getlnasm(buf, 99);
- puts(buf);
- }
-}