Background: I started with computing as an adjunct to mathematics at Princeton (BA ’64) and Columbia (MA ’66), continued intermittently with independent study, and finished an applications programming certificate ( A- average) at Ryerson (‘98): C, OOP (C++, Smalltalk),UNIX, Systems (logic circuits & CPU architecture, 6809 asm), Data Structures, X-Windows, Data Communications. One of my favourite development environments is provided by Forth, which is available for most OSs, occupies a secure niche in embedded systems, and is receiving renewed interest as the core of the Open Firmware Standard. Along the way I have also become familiar with FORTRAN, APL, Intel asm, DOS, BASIC, Windows API. Winter 2002: TDSB course in Quark XPress.
Projects:
Permutation lister (FORTRAN, APL, Forth): 1st item is placed, 2nd item is placed before or after 1st item, etc., generating a sequence of numbers for each permutation - converts to a single integer via variable-base encoding (as yd. ft. in. <--> in.). The procedure is obviously invertible.
Better graphics.com (prototyped in Forth, finished as a TSR in 8086 asm): improving emulation of 4 colours in printout to a B&W Panasonics dot matrix printer; each pixel going to a 2-high x 3-wide matrix of printer dots. TSR building self-taught (N.B. : Whole environment should be saved on the stack, none in predetermined locations; the interrupt service routine must check not only system devices, but also itself for busy status.)
Graphics record display (dBASE IV, 8086 asm): Done on an XT, with the attendant memory restrictions - test graphic and save routine in BASIC (image saved as ASCII symbols for hex codes to subvert the complications of DOS video memory); image display in ASM, dBASE record contains image file name, dBASE program shells out to image display program.
Interactive repeat-record search/edit (dBASE IV): BROWSE inside SCAN, index on SURNAME+POSTAL CODE.
Implementation of the APL outer product in lower level functions: Reshape one vector into the shape of the table, reshape the other vector into the shape of the table’s transpose and transpose that, combine the two layers according to the operation for which one is building the table.
Updating a commercial embedded system, writing host comm’s, data conversion (Forth, asm, BASIC): The principal device was a shop-floor V25 (extended 8086) box which accepted data from various plug-in measuring devices. I added several device profiles to the embedded Forth system, wrote single- and multiple-client serial programs in QuickBASIC 4.5 for host data collection, others to convert data in original format to formats required by a popular data analysis package.
Improvements to a well-known random number generator (LMI WinForth, incl. visual scatter test): The random number generator in question builds a pool by linear congruence and then generates new results with XOR and replaces pool elements. Scatter tests of my original implementation were unsatisfactory, so I flipped some bytes to get a good scatter test. I used floating-point functions to bypass integer overflow problems (LMI WinForth’s hardware floating point was the only one up to the job - out of several I tried in various languages).
A Forth kernel (8086 asm - tiny but live and extensible): The result was a 1233-byte .com file. Two key items are an asm macro to build dictionary links at assembly time and the writing of asm according to the internal format of high-level Forth as the kernel nears completion.
Paper on token-threaded Forth (1992 Rochester Forth Conf.): Token tables can be used to manage relocatable compiled code. The issuse of tokenized branch destinations eventually led to the next item in this project list.
Presentation on fixed-length control structures in Forth ( Apr. ’98 Southern Ontario Forth Interest Group): It is quite easy to fix the length of the TRUE code block of IF/THEN at 1. Results of this strategy are at least the simplification of compile-time activity and the facilitation of control structures in interpretive mode.
A new(?) pseudoternary line-encoding algorithm: Stumbled on during the data comm’s course at Ryerson - not guaranteed balanced (but close), simple; totally self-clocking, or has built-in error checking (depending on details).
OpenGL screensaver written in Forth Inc.'s SwiftForth for Windows: Using code from SwiftForth samples, posts by Charles Melice and various net resources, I have written a simple screensaver which is pretty and very unlikely lock the screen (as several of the ones that come with Windows eventually do).
Also (in SwiftForth): password generator (careful choice of font); music performance program - sets up two random file streams and mixes/mangles them with a little arithmetic before output. I should add a volume control because it and some of the other music software I use can share Windows' audio output.