> The p-System had the concept of a segment and even had a SEGMENT keyword > for SEGMENT PROCEDURE or SEGMENT FUNCTION -- a procedure or function > belonging to a program or unit, but whose code is not loaded with that > program or unit's code until it is called. This is demand loading of > program code. Yes, I remember that. I first ran into Load On Call (LOCAL) with the IBM 1130, my first 'personal' computer, back in '69. I really loved that machine and Fortran is still a favorite. It was 'personal' in that the company paid me to do things with it and I had unlimited use during the off hours. It was a great tool while stumbling through college. > Then why not try Pascal-S? > http://www.moorecad.com/standardpascal/pascals.html I guess I am looking at the whole experience. I'm trying to get past all of the OS related issues and just look at programming from the viewpoint of "Algorithms + Data Structures = Programs" by Niklaus Wirth. This is my all time favorite book on how programming should be done. But, opinions vary on that. > > I still have this book which describes the P4 compiler > http://homepages.cwi.nl/~steven/pascal/. Got it. And the original Manual and Report and a few other classic texts on Pascal. But, I don't plan to take it that far. This is going to be a lot like 16k Basic with structure. > > > I had actually thought to do Lee Chen Wang's Tiny Basic but I don't > > think Basic promotes good program structure and it would be a waste > > of an ARM processor. But it sure worked well on an 8080 and 8085. > > I don't think this is necessarily true--good program structure is > learned, and it would not be a waste of an ARM processor given that RISC > OS and Arthur ran a nice BASIC. It certainly wouldn't take much effort to get it running. And it would really RUN! Maybe I'll do that next week. I think the original fit in 1k bytes of assembly code. I imagine I'll do it in C but it would be a good exercise to do it in assembly. And, I really need to learn ARM assembly... > > My personal introduction to microcomputers was with Commodore PETs and > Acorn Atoms (yes, my first personal computer was an Acord Atom with a > 6502, and THAT Acorn). Both these had BASIC as an operating system and > language combo. I find it astounding that people denegrate BASIC yet > BASIC kicked off the microcomputer revolution by letting people have > *something* to write programs in that wasn't daunting and didn't need a > compile-linkedit-run-crash-debug process. It's astounding how > resourceful you become when you have limited RAM to write programs in. All true. I don't mean to denegrate Basic and he will have to learn it sooner or later. I couldn't wait to get enough RAM in my Altair 8800 so I could run 8k Basic. I remember paying $400 for a 4k board! That was more than the machine cost. I still have the Altair with a pair of 8" floppies and a home built floppy controller. I also have a CompuPro industrial Z80 machine with dual 8" floppies. A year or so back I implemented the T80 core on an FPGA and I now have CP/M running silently using 2 CF devices to implement the 16 logical drives. It's fun to visit with old friends: ED, MAC, FORTRAN, PL/I, MicroShell and, yes, WordStar. > > Good programming is learned over time--it's not easily taught. You > write good programs by looking at good programming style. I find it > rather like learning a natural language, there is no substitute for > going out and using and talking to natives, it doesn't matter how long > you spend in the classroom being "taught" good grammar and vocabulary. Absolutely! I had a side project of writing an 8080 assembler in PL/I in grad school. In the end my advisor thought the code looked a lot like Fortran, with semicolons. I also had to write a tiny Algol compiler in Basic for a compiler class. It was ugly. I wouldn't wish that kind of program on anyone. I had a 110 baud acoustic coupler for a while and upgraded to a 300 baud modem. But, it worked! > > BASIC might not cut it in ivory towers, but hell, it's a great way to > get started with programming and get some use out of a computer. I'd > rather start my children off with BASIC on a micro they can directly > control rather than with Logo or C or Pascal on a PC which they really > can't. Exactly my point. Get past all the system related issues. Keep it simple. In fact, Pascal with only the main program block isn't a lot different than Basic except that variables have to be predefined. Ignoring CONST and TYPE for a while and using only integers and strings makes Pascal look a lot like Basic, with semicolons. I also have to change the P4 implementation of strings. I think they were limited to 10 6-bit chars to fit the CDC 6400 60 bit word. Maybe multiples of 10, I'll have to look. > I am *not* a fan of universities that teach highbrow stuff as a > first language--ETH's approach is absolutely right, the staff know what > they're talking about because they know how to construct custom hardware > to run their custom software on, and they [used to] do it all > themselves. Bravo! There's certainly nothing wrong with starting with Basic but it isn't what I have in mind. We can move to Basic as implemented for Stamps in fairly short order. In fact, we have already played with that a little and we'll be doing more as his interest in robotics grows. That Tiny Basic is sounding better all the time. I had added a MEM array and MEM function to implement POKE and PEEK. That could be pretty neat with the ARM. It would be possible to POKE to the IO devices by doing something like: MEM(Port0) = SomeValue There's nothing like flashing LEDs to add interest! Richard
Message
Re: Tiny Text Editor For LPC
2006-01-01 by rtstofer
Attachments
- No local attachments were found for this message.