Subversion Repositories Krakow BASIC

Rev

Rev 36 | Rev 38 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36 Rev 37
Line 1... Line 1...
1
/* $Id: basic.c 36 2024-09-05 15:37:50Z nishi $ */
1
/* $Id: basic.c 37 2024-09-05 15:59:22Z nishi $ */
2
 
2
 
3
/* Krakow BASIC - Multi-platform simple BASIC */
3
/* Krakow BASIC - Multi-platform simple BASIC */
4
 
4
 
5
#if defined(PLATFORM_SHIROI)
5
#if defined(PLATFORM_SHIROI)
6
 
6
 
Line 441... Line 441...
441
 
441
 
442
#ifndef LINES
442
#ifndef LINES
443
#define LINES (1024)
443
#define LINES (1024)
444
#endif
444
#endif
445
 
445
 
446
unsigned char basicbuffer[BUFFER_SIZE];
446
unsigned char basicbuffer[BUFFER_SIZE / 2];
-
 
447
unsigned char varbuffer[BUFFER_SIZE / 2];
447
char linebuf[LINE_BUFFER_SIZE];
448
char linebuf[LINE_BUFFER_SIZE];
448
 
449
 
449
int hexnum(char c) {
450
int hexnum(char c) {
450
	if('0' <= c && c <= '9') {
451
	if('0' <= c && c <= '9') {
451
		return c - '0';
452
		return c - '0';
Line 993... Line 994...
993
	putstr(" Max ");
994
	putstr(" Max ");
994
	putnum(LINES);
995
	putnum(LINES);
995
	putstr(" lines");
996
	putstr(" lines");
996
	putstr(NEWLINE);
997
	putstr(NEWLINE);
997
	putstr(" ");
998
	putstr(" ");
-
 
999
	putstr("Variable buffer ");
-
 
1000
	putnum(BUFFER_SIZE / 2);
-
 
1001
	putstr(" bytes");
-
 
1002
	putstr(NEWLINE);
-
 
1003
	putstr(" ");
998
#endif
1004
#endif
999
	putnum(BUFFER_SIZE);
1005
	putnum(BUFFER_SIZE / 2);
1000
	putstr(" bytes free");
1006
	putstr(" bytes free");
1001
	putstr(NEWLINE);
1007
	putstr(NEWLINE);
1002
	putstr(NEWLINE);
1008
	putstr(NEWLINE);
1003
 
1009
 
1004
	for(i = 0; i < BUFFER_SIZE; i++) {
1010
	for(i = 0; i < BUFFER_SIZE / 2; i++) {
1005
		basicbuffer[i] = 0;
1011
		basicbuffer[i] = 0;
1006
	}
1012
	}
1007
	putstr("Ready");
1013
	putstr("Ready");
1008
	putstr(NEWLINE);
1014
	putstr(NEWLINE);
1009
 
1015