Some time back I blogged about how someone wrote a one page program in Just BASIC that draws a colorful fractal image.
And I quote (myself):
"What's great about BASIC and languages like it is that you don't have a write a lot of code that has nothing to do with what you're trying to create (like Java for example). It should be really easy to throw together a little code and play with graphics. Programming should be fun, not a burden.
Here is a thread that shows how to draw fractals in less than a page of BASIC."
But the link is now broken because the forum site shut down and we lost a lot of good stuff.
Here's where we make it right. A few months ago I found a fractal example for the Apple II written in Applesoft BASIC. I thought it was pretty cool, so I adapted it for Liberty BASIC.
startMS = time$("ms")
WindowHeight = 230
open "mandelbrot set" for graphics as #gr
#gr down()
#gr fill("black")
color$ = "red orange yellow green blue red orange yellow green black"
for x = 0 to 279
for y = 0 to 95
x1 = x / 280 * 3 - 2 : y1 = y / 191 * 2 - 1
i = 0:s = x1:t = y1
while i < 20 AND s * s + t * t < 4
s1 = s * s - t * t + x1
t = 2 * s * t + y1:s = s1: i = i + 1
wend
c = i/2
#gr color(word$(color$, c + 1))
if c <> 0 then #gr set(x, y) : #gr set(x, 191-y)
next y
next x
print "done in "; time$("ms")-startMS; " milliseconds"
Note: This is written to run on Liberty BASIC v5 to be one of the example programs. LB5 is as of the time of this writing is in alpha test. Click to visit the Liberty BASIC v5 board in our forum.
Showing posts with label applesoft. Show all posts
Showing posts with label applesoft. Show all posts
Thursday, September 19, 2019
Saturday, October 27, 2018
Jobs vs Woz - The Closed vs Open Hand
Most people know who Steve Jobs was. He was the charismatic and visionary frontman for Apple for many years. He even managed a friendly coup at Apple when he took back the company he was ousted from. He was a controversial person. He had his fans and his detractors. I think he certainly had his good points, but I am really more of a fan of the other less well known Steve of Apple, Steve Wozniak affectionately known as Woz.
Woz was the designer of the original line of Apple II computers. He had a vision of computers as computers, for everyone. A hippy vision of computing? ;-)
What appeals to me more about Woz is that he was generous and wanted to give people something great. His ambition lay more in personal accomplishment and also in sharing his knowledge with others. When he created the Apple II computer he wanted it to be open. He provided a schematic so that users could understand the computer, and so that they could modify it. People even wrote books about how to do this. Another example of this is that Woz included expansion slots so that people could extent the computer in this way.
When you turn on an Apple II you can program it right away. There is a built in machine language monitor. Depending on the model you can either use Woz's Integer BASIC or you can run Applesoft BASIC.
This version of an Apple computer is a real computer, for computing, by programming. A computer is a device for a computer user.
Enter the computer as appliance. :-/
Steve Jobs had a vision of computer as appliance. This is purely a business perspective. Sell more computers by marketing to the fat middle of the bell curve.
Of course he is not the only one to think this way. Somehow progress in computing tends towards reducing it down to a touchscreen and away from programming and true computer literacy. The Macintosh was a step in this direction. This has a certain irony because the form of the Mac user interface was inspired directly by the Smalltalk windowing user interface, a programming system. In addition to the appliance-like format of the Mac software, the computer itself was meant to be closed unit. You need a special screwdriver to open it, and there are no expansion slots.
So the Mac was a closed machine, and it pointed other systems in this direction (i.e. Microsoft Windows). You could purchase programming software for the Mac, but unlike other computers on the market there was no direct path to programming when you turned on the machine. Why was there no easy programming option on the desktop when you started the Mac OS? For more on this issue see Why Johnny Can't Code which is a popularly referenced article on this topic.
HyperCard eventually was made available on the Mac as an easy and fun programming tool and it was included free of charge for some years, but now it is gone.
Microsoft followed suit with Windows and they too also did not include even a version of their famous BASIC as an icon on the desktop of their new system. I wrote Liberty BASIC back in the early 1990s as a response to this. Microsoft eventually provided Visual Basic, but I strongly suggest the this should have been included, for free, and an icon to start Visual Basic should have appeared on the Windows desktop on startup.
I'm not going to suggest that there is some sort of conspiracy to dumb down the computer. What I will say is that this amounts to a stupid and harmful mistake. The computer is so powerful and wonderful as a creative too. These new computers as appliances are depriving people of so much by simply omitting an easy and friendly programming tool. A desktop icon to entice the curious to try something simple enough for children and powerful enough for casual applications programming.
So, what is really better? How do you define progress? What of the early 6502 and Z80 computers when compared to what we have today? The new computers dwarf these charming old timers, but they are less powerful in terms of the concepts they omit from the user.
Woz was the designer of the original line of Apple II computers. He had a vision of computers as computers, for everyone. A hippy vision of computing? ;-)
What appeals to me more about Woz is that he was generous and wanted to give people something great. His ambition lay more in personal accomplishment and also in sharing his knowledge with others. When he created the Apple II computer he wanted it to be open. He provided a schematic so that users could understand the computer, and so that they could modify it. People even wrote books about how to do this. Another example of this is that Woz included expansion slots so that people could extent the computer in this way.
When you turn on an Apple II you can program it right away. There is a built in machine language monitor. Depending on the model you can either use Woz's Integer BASIC or you can run Applesoft BASIC.
This version of an Apple computer is a real computer, for computing, by programming. A computer is a device for a computer user.
Enter the computer as appliance. :-/
Steve Jobs had a vision of computer as appliance. This is purely a business perspective. Sell more computers by marketing to the fat middle of the bell curve.
Of course he is not the only one to think this way. Somehow progress in computing tends towards reducing it down to a touchscreen and away from programming and true computer literacy. The Macintosh was a step in this direction. This has a certain irony because the form of the Mac user interface was inspired directly by the Smalltalk windowing user interface, a programming system. In addition to the appliance-like format of the Mac software, the computer itself was meant to be closed unit. You need a special screwdriver to open it, and there are no expansion slots.
So the Mac was a closed machine, and it pointed other systems in this direction (i.e. Microsoft Windows). You could purchase programming software for the Mac, but unlike other computers on the market there was no direct path to programming when you turned on the machine. Why was there no easy programming option on the desktop when you started the Mac OS? For more on this issue see Why Johnny Can't Code which is a popularly referenced article on this topic.
HyperCard eventually was made available on the Mac as an easy and fun programming tool and it was included free of charge for some years, but now it is gone.
Microsoft followed suit with Windows and they too also did not include even a version of their famous BASIC as an icon on the desktop of their new system. I wrote Liberty BASIC back in the early 1990s as a response to this. Microsoft eventually provided Visual Basic, but I strongly suggest the this should have been included, for free, and an icon to start Visual Basic should have appeared on the Windows desktop on startup.
I'm not going to suggest that there is some sort of conspiracy to dumb down the computer. What I will say is that this amounts to a stupid and harmful mistake. The computer is so powerful and wonderful as a creative too. These new computers as appliances are depriving people of so much by simply omitting an easy and friendly programming tool. A desktop icon to entice the curious to try something simple enough for children and powerful enough for casual applications programming.
So, what is really better? How do you define progress? What of the early 6502 and Z80 computers when compared to what we have today? The new computers dwarf these charming old timers, but they are less powerful in terms of the concepts they omit from the user.
Thursday, January 21, 2010
The Apple II+
My job with Mr. Alessi started out with a software project he called Forecaster-Buy. The idea was to create a trend following inventory management system for distributors and manufacturers so that overstocking was a thing of the past. The computer we did all our initial development was:
An Apple II+ with 48K RAM and Applesoft BASIC in ROM
Two 143K Apple Disk II floppy drives
An Epson MX-100 dot matrix printer
Later we added a Microsoft Z-80 Softcard but didn't do much with it
I learned so much about programming with Mr. Alessi. We worked in the basement. There was a small room at the bottom of the basement stairs where the computer was kept, and in the larger basement space there was a TV and some chairs. We would talk about the software (and politics) and I would go into room and write software. Mr. Alessi would come in and ask me how I was doing. He'd make suggestions to which I would sometimes respond "That's impossible!" Of course it wasn't impossible, but if I didn't know how to do it, that is what I sometimes said. Then we'd talk and I'd think it over and come up with some sort of code to do the previously impossible.
Working with Mr. Alessi was a great experience. He was smart enough to know what sort of software to create. He'd bring me endless coffee and cookies. On Saturdays he would make me breakfast. He made very nice scrambled eggs. His two sons Tom and Michael were a little older than me and they'd always be around. I remember I used to play with them (and with all the other kids around the block) up at the park at the end of my street; kickball, pickle, keepaway, capture the flag, and hide and seek with the whole neighborhood as our hiding place. :-)
Yeah, working with Mr. Alessi was a great opportunity. It didn't pay much, but I learned a ton!
An Apple II+ with 48K RAM and Applesoft BASIC in ROM
Two 143K Apple Disk II floppy drives
An Epson MX-100 dot matrix printer
Later we added a Microsoft Z-80 Softcard but didn't do much with it
I learned so much about programming with Mr. Alessi. We worked in the basement. There was a small room at the bottom of the basement stairs where the computer was kept, and in the larger basement space there was a TV and some chairs. We would talk about the software (and politics) and I would go into room and write software. Mr. Alessi would come in and ask me how I was doing. He'd make suggestions to which I would sometimes respond "That's impossible!" Of course it wasn't impossible, but if I didn't know how to do it, that is what I sometimes said. Then we'd talk and I'd think it over and come up with some sort of code to do the previously impossible.
Working with Mr. Alessi was a great experience. He was smart enough to know what sort of software to create. He'd bring me endless coffee and cookies. On Saturdays he would make me breakfast. He made very nice scrambled eggs. His two sons Tom and Michael were a little older than me and they'd always be around. I remember I used to play with them (and with all the other kids around the block) up at the park at the end of my street; kickball, pickle, keepaway, capture the flag, and hide and seek with the whole neighborhood as our hiding place. :-)
Yeah, working with Mr. Alessi was a great opportunity. It didn't pay much, but I learned a ton!
Labels:
Apple,
apple II,
applesoft,
capture the flag,
hide and seek,
keepaway,
kickball,
microsoft,
pickle,
programming,
softcard,
z-80,
Zilog
Thursday, June 7, 2007
Applesoft BASIC
So settling down to programming on the Apple II+, we had several books to help me with the process. Of course there was the standard green covered Applesoft book, and Mr. Alessi also has another book but I can't remember the title. I tried to find a shot of the book cover on Google but no luck.
Before we started writing inventory management software I tried my hand at creating some graphics. The Apple II had hi-res graphics (for that day), and Applesoft had high level commands for drawing so you didn't need to POKE and PEEK as much as in other BASICs. We had only a green phosphor monitor without color, but this was appropriate for business software development.
When editing a program in Applesoft BASIC, you could type some escape sequences to move the cursor around. If you moved the cursor up to the start of a line on the screen you could then reenter the line by moving the cursor to the right, and you could substitute some characters to change the line of code. This was crude compared to the way you did things on a VIC-20 where you just moved the cursor to the line you wanted to edit, changed just what was needed and hit Return.
Also, I had never written software before that used a floppy disk. This was another thing that I needed to become comfortable with. Our Apple II had 3 floppy drives, each was 143K. We also had a 16K card and a Z80 Softcard so the machine could run CP/M, but this was something we rarely did.
Before we started writing inventory management software I tried my hand at creating some graphics. The Apple II had hi-res graphics (for that day), and Applesoft had high level commands for drawing so you didn't need to POKE and PEEK as much as in other BASICs. We had only a green phosphor monitor without color, but this was appropriate for business software development.
When editing a program in Applesoft BASIC, you could type some escape sequences to move the cursor around. If you moved the cursor up to the start of a line on the screen you could then reenter the line by moving the cursor to the right, and you could substitute some characters to change the line of code. This was crude compared to the way you did things on a VIC-20 where you just moved the cursor to the line you wanted to edit, changed just what was needed and hit Return.
Also, I had never written software before that used a floppy disk. This was another thing that I needed to become comfortable with. Our Apple II had 3 floppy drives, each was 143K. We also had a 16K card and a Z80 Softcard so the machine could run CP/M, but this was something we rarely did.
Subscribe to:
Posts (Atom)