ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

159 lines
6.1 KiB

  1. Some Notes on Installation of the Bywater BASIC Interpreter:
  2. -----------------------------------------------------------
  3. 0. Quick-Start Guide For Compiling
  4. To use the default configuration (which is reasonable for most situations):
  5. On Unix, type "configure; make".
  6. On MS-DOS using QuickC, type "nmake -f makefile.qcl".
  7. You can skip the rest of this file unless you want to customize the
  8. BASIC dialect that is supported, or something goes wrong in the
  9. above commands.
  10. 1. Compiler Requirements
  11. Although earlier versions of bwBASIC would compile only with
  12. ANSI C compilers, versions 2.10 and higher can be compiled
  13. with "stock" C compilers, i.e., compilers that comply with
  14. the older Kernighan and Ritchie C standard.
  15. Section I-B of bwbasic.h allows you to specify some compiler
  16. features. If you have an ANSI C compiler, you needn't worry
  17. with this. For stock C compilers, the default configuration
  18. presumes that your compiler supports signal() and raise()
  19. with the signal.h header, supports setjmp() and longjmp()
  20. with the setjmp.h header, and has a separate string.h
  21. header. If your compiler does not have these features
  22. and the related header files, you can indicate this in
  23. section I-B by setting appropriate flags to FALSE.
  24. 2. Configuration of header files
  25. You may need to examine file "bwbasic.h" to make important
  26. changes for specific hardware and compiler configurations.
  27. You may also need to change "bwx_tty.h" if you are using the
  28. TTY implementation or "bwx_iqc.h" if you are using the version
  29. for PCs with Microsoft QuickC (see below on "implementations").
  30. If you want to redefine messages or even the BASIC command
  31. names, you will need to edit "bwb_mes.h".
  32. 3. Makefiles
  33. Several makefiles are provided: "makefile.qcl" will compile
  34. the program utilizing the Microsoft QuickC (tm) line-oriented
  35. compiler on DOS-based p.c.'s, and "makefile" will compile the
  36. program on Unix-based computers utilizing either a stock C
  37. compiler or Gnu C++. I have also compiled the program utilizing
  38. Borland's Turbo C++ (tm) on DOS-based machines, although I have
  39. not supplied a makefile for Turbo C++.
  40. If you try the "IQC" implementation, you will need to alter
  41. makefile.qcl to include bwx_iqc.c (and bqx_iqc.obj) instead
  42. of bwx_tty.*.
  43. 4. Implementations
  44. The present status of bwBASIC allows two major implementations
  45. controlled by the IMP_TTY and IMP_IQC flags in bwbasic.h.
  46. IMP_TTY is the base implementation and presumes a simple
  47. TTY-style environment, with all keyboard and screen input
  48. and output directed through stdin and stdout. If IMP_TTY is
  49. defined as TRUE, then the file bwx_tty.h will be included,
  50. and a makefile should include compilation of bwx_tty.c.
  51. IMP_IQC is a somewhat more elaborate implementation for
  52. the IBM PC and compatible microcomputers utilizing the
  53. Microsoft QuickC compiler. This allows some more elaborate
  54. commands (CLS and LOCATE) and the INKEY$ function, and
  55. allows greater control over output. If IMP_IQC is defined
  56. as TRUE in bwbasic.h, then bwx_iqc.h will be included and
  57. bwx_iqc.c should be compiled in the makefile.
  58. Only one of the flags IMP_TTY or IMP_IQC should be set
  59. to TRUE.
  60. 5. Flags Controlling Groups of Commands and Functions
  61. There are a number of flags which control groups of commands
  62. and functions to be implemented.
  63. (core) Commands and Functions in any implementation of
  64. bwBASIC; these are the ANSI Minimal BASIC core
  65. INTERACTIVE Commands supporting the interactive programming
  66. environment
  67. COMMON_CMDS Commands beyond ANSI Minimal BASIC which are common
  68. to Full ANSI BASIC and Microsoft BASICs
  69. COMMON_FUNCS Functions beyond the ANSI Mimimal BASIC core, but
  70. common to both ANSI Full BASIC and Microsoft-style
  71. BASIC varieties
  72. UNIX_CMDS Commands which require Unix-style directory and
  73. environment routines not specified in ANSI C
  74. STRUCT_CMDS Commands related to structured programming; all
  75. of these are part of the Full ANSI BASIC standard
  76. ANSI_FUNCS Functions unique to ANSI Full BASIC
  77. MS_CMDS Commands unique to Microsoft BASICs
  78. MS_FUNCS Functions unique to Microsoft BASICs
  79. 6. Configurations
  80. The file bwbasic.h includes a number of configuration options
  81. that will automatically select groups of commands and functions
  82. according to predetermined patterns. These are:
  83. CFG_ANSIMINIMAL Conforms to ANSI Minimal BASIC standard X3.60-1978.
  84. CFG_COMMON Small implementation with commands and functions
  85. common to GWBASIC (tm) and ANSI full BASIC.
  86. CFG_MSTYPE Configuration similar to Microsoft line-oriented
  87. BASICs.
  88. CFG_ANSIFULL Conforms to ANSI Full BASIC standard X3.113-1987
  89. (subset at present).
  90. CFG_CUSTOM Custom Configuration specified by user.
  91. Only one of these flags should be set to TRUE.
  92. 7. Adding Commands and Functions
  93. In order to add a new command to bwBASIC, follow the following
  94. procedure:
  95. (a) Write the command body using function bwb_null() in bwb_cmd.c
  96. as a template. The command-body function (in C) must receive a
  97. pointer to a bwb_line structure, and must pass on a pointer to
  98. a bwb_line structure. The preferred method for returning from
  99. a command-body function is: return bwb_zline( l ); this will
  100. discriminate between MULTISEG_LINES programs which advance to
  101. the next segment and those which advance to the next line.
  102. (b) Add prototypes for the command-body function in bwbasic.h;
  103. you'll need one prototype with arguments in the ANSI_C section
  104. and one prototype without arguments in the non-ANSI_C section.
  105. (c) Add the command to the command table in bwb_tbl.c in the
  106. group you have selected for it.
  107. (d) Increment the number of commands for the group in which
  108. you have placed your command.
  109. The procedure for adding a new function is parallel to this, except that
  110. you should use fnc_null() in bwb_fnc.c as the template, and the
  111. function name must be added to the function table in bwb_tbl.c.