syrakusos Posted February 28, 2011 Share Posted February 28, 2011 (edited) "I got a pair of shoes older than you, so what the fuck should I expect you to know? They built the first computers to crack German ice, right? Codebreakers. So, there was ice before there was computers, you want to think of it like that." -- The Finn in William Gibson's Count Zero.Here is my Fortune Cookie program. You load it with Debug.B4 2CCD 21B0 46F6 EE05 20 0189 C2B4 09CD 21BA 18 01CD 21CD 20And, yes, when everyone was talking about "Dot Com" I thought they were talking about hex code. I'm slow.This is what it does.B4 2C MOV AH,2C CD 21 INT 21B0 46 MOV AL,46F6 EE IMUL DH05 20 01 ADD AX, 012089 C2 MOV DX,AXB4 09 MOV AH,09CD 21 INT 21BA 18 01 MOV DX, 0118CD 21 INT 21CD 20 INT 20This is how that works.B4 2C MOV AH,2C Get the clockCD 21 INT 21 executeB0 46 MOV AL,46 Get the secondsF6 EE IMUL DH multiply the DH by the seconds 05 20 01 ADD AX, 0120 add 120 to that89 C2 MOV DX,AX put that number in the DX registerB4 09 MOV AH,09 display to screenCD 21 INT 21 executeBA 18 01 MOV DX, 0118 end of lineCD 21 INT 21 executeCD 20 INT 20 quitSo, you also have to load in all the fortunes. By hand. In hex. Making sure that they are spaced 120 bytes apart from the start byte. You have only 80 characters on the screen, of course.Then save it with a filename such as cookie.com -- But... when you are done, you can make that a line in the STARTUP.BAT fileand everytime you start MS-DOS, the computer grabs one of 60 clever sayingsand give you your fortune.Here are the fortunes that I wrote in 1990. 4 + 4 = 10&8 + 8 = 10hForty-two.A is A.5 + 5 = 0AhEither-Or.I love you.5 + 5 = 12&AuH2O in 64Daisy Daisy gove me ur ans r tru. m lf crazy a f r%-F-DCL-SYS$FAILHELLO, DAVE, IT'S GOOD TO BE WORKING WITH YOU AGAIN.This is P-1. Don't say anything. They are watching me.%-VMS-W-UNDERWEAR Undocumented error warning earlierHe's dead, Jim.What would Julius Caesar say about CTRL-S for No-Scroll?(A is A) .OR. (LET X = X + 1)Free trade and all other political prisoners.... or ask another man to live for mine.After Dr. Watson founded IBM he de-coded DNA.After Dr. Watson worked with Sherlock Holmes he founded IBM.You still have the paradigms print gave you.... never to live for the sake of another man ...Four legs good; two legs bad.Lord what fools these mortals be!Gifted is for life.Socrates was executed by majority rule.Marconi plays the Mamba -- Listen to your radio. Edited February 28, 2011 by Michael E. Marotta Link to comment Share on other sites More sharing options...
syrakusos Posted February 28, 2011 Author Share Posted February 28, 2011 Then, I wrote a program called NOMINYM.BAS that mixed and matched prefixes and suffixes and roots with nouns and adjectives to let you randomly generate new words and phrases such as MICRO LYZERCHROMO ITICWASHINGTON ESTATESGOOD MAGNETISMRADIUS SHEKELEasy to change the data, of course, great for brainstorming. Link to comment Share on other sites More sharing options...
BaalChatzaf Posted February 28, 2011 Share Posted February 28, 2011 I posted Assembler as my favorite language in the sense I wrote more lines in assembler than in any other particular language. It was assembler for the IBM 360 and IBM 370 mostly. The language I loved the most was PERL.Ba'al Chatzaf Link to comment Share on other sites More sharing options...
syrakusos Posted February 28, 2011 Author Share Posted February 28, 2011 I posted Assembler as my favorite language in the sense I wrote more lines in assembler than in any other particular language. It was assembler for the IBM 360 and IBM 370 mostly. The language I loved the most was PERL.Ba'al ChatzafPERL, an early Object Oriented language.I had to look that up. I recognized the name, but know nothing about it.http://www.perl.org/docs.htmlin the early days, there were many languages. And we still create them. Last month at a local meeting, one programmer said to another that he considers Java a fad. Link to comment Share on other sites More sharing options...
merjet Posted February 28, 2011 Share Posted February 28, 2011 (edited) Being retired, I do very little programming these days. When I do, it's Visual Basic (VB) or Visual Basic for Applications (VBA). A lot can be done with VB/VBA, Excel, and Access databases in combination.Over the course of my work career I used Basic, Fortran, PL/I, APL, C and C++, and Visual Basic. APL is powerful for math, but trying to understand somebody else's code, or even your own after not looking at it for a few months, is daunting. Documenting with comment statements really helps, but few programmers like to document. Visual Basic code is much easier to read and easy to modify. The largest app I wrote was in VB, had more than 25,000 lines of code and about 80 classes, and used databases for both input and output. Edited February 28, 2011 by Merlin Jetton Link to comment Share on other sites More sharing options...
syrakusos Posted February 28, 2011 Author Share Posted February 28, 2011 (edited) APL is powerful for math, but trying to understand somebody else's code, or even your own ... I forgot about APL: A Programming Language by Ken Iverson. Wikipedia has a single concise example:The APL environment is called a workspace. In a workspace the user can define programs and data, i.e. the data values exist also outside the programs, and the user can manipulate the data without the necessity to define a program. For example,N ← 4 5 6 7assigns the vector values 4 5 6 7 to N;N + 4adds 4 to all values (giving 8 9 10 11) and prints them (a return value not assigned at the end of a statement to a variable using the assignment arrow ← is displayed by the APL interpreter);+/Nprints the sum of N, i.e. 22.This HTML presentation is based on the book itself by Ken Iverson, with a linked index, but not complete.http://www.jsoftware.com/papers/APL.htm Edited February 28, 2011 by Michael E. Marotta Link to comment Share on other sites More sharing options...
merjet Posted February 28, 2011 Share Posted February 28, 2011 (edited) I forgot about APL: A Programming Language by Ken Iverson. Wikipedia has a single concise example:The APL environment is called a workspace. In a workspace the user can define programs and data, i.e. the data values exist also outside the programs, and the user can manipulate the data without the necessity to define a program. For example,N ← 4 5 6 7assigns the vector values 4 5 6 7 to N;N + 4adds 4 to all values (giving 8 9 10 11) and prints them (a return value not assigned at the end of a statement to a variable using the assignment arrow ← is displayed by the APL interpreter);+/Nprints the sum of N, i.e. 22.The above assignment to N could also be done with N ← 3+ι4 where the symbol after + is the lower case Greek iota.Many of APL's operators are Greek characters. So a special keyboard such as the one here is needed.In APL matrices can be made and used in one line that would take loops and multiple lines in most other languages. Suppose you wanted a 10x10 matrix of the integers 1-100.M ← 10 10ρι100 or M ← ∅10 10ρι100 would do it. The first would put 1-10 in the first row and the second would put 1-10 in the first column (∅ means transpose).M ← 10 10ρ1,10ρ0 would make a 10x10 identity matrix.Matrix operations, e.g. adding matrices M and N, can be written at the matrix level, e.g. M + N. Most other languages require writing a loop and doing the elements one-by-one.Other languages with this kind of power are Matlab and Mathematica. Edited March 1, 2011 by Merlin Jetton Link to comment Share on other sites More sharing options...
syrakusos Posted March 2, 2011 Author Share Posted March 2, 2011 Back in 1977, I had a class in BASIC, a 2-credit Science department "Seminar" at Lansing Community College. Programming was then in the Data Processing department of the Business Division. This in the Science department was so radical a concept that we could take it for no credit because instead of punching cards submitted to an IBM 360 for two turn-arounds per day, we programmed directly into two desktop machines. One was a Hewlett Packard 9830 and the other was an IBM 5100. The IBM 5100 also had APL in ROM. According to legend, IBM intended the 5100 as an office machine. Someone thought that secretaries could use APL for word processing. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now