... to crack German ice: codebreakers.


syrakusos

  

2 members have voted

  1. 1. My favorite programming language is (or was)

    • BASIC
      1
    • FORTRAN
      0
    • SNOBOL
      0
    • ALGOL
      0
    • PL/I
      0
    • ASSEMBLER
      1
    • JCL ( or DCL)
      0
    • LISP
      0
    • JOVIAL
      0
    • I did everthing in ohs and ells.
      0
    • Awright... COBOL...
      0


Recommended Posts

"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 2C

CD 21

B0 46

F6 EE

05 20 01

89 C2

B4 09

CD 21

BA 18 01

CD 21

CD 20

And, 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 21

B0 46 MOV AL,46

F6 EE IMUL DH

05 20 01 ADD AX, 0120

89 C2 MOV DX,AX

B4 09 MOV AH,09

CD 21 INT 21

BA 18 01 MOV DX, 0118

CD 21 INT 21

CD 20 INT 20

This is how that works.

B4 2C MOV AH,2C Get the clock

CD 21 INT 21 execute

B0 46 MOV AL,46 Get the seconds

F6 EE IMUL DH multiply the DH by the seconds

05 20 01 ADD AX, 0120 add 120 to that

89 C2 MOV DX,AX put that number in the DX register

B4 09 MOV AH,09 display to screen

CD 21 INT 21 execute

BA 18 01 MOV DX, 0118 end of line

CD 21 INT 21 execute

CD 20 INT 20 quit

So, 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 file

and everytime you start MS-DOS, the computer grabs one of 60 clever sayings

and give you your fortune.

Here are the fortunes that I wrote in 1990.

4 + 4 = 10&

8 + 8 = 10h

Forty-two.

A is A.

5 + 5 = 0Ah

Either-Or.

I love you.

5 + 5 = 12&

AuH2O in 64

Daisy Daisy gove me ur ans r tru. m lf crazy a f r

%-F-DCL-SYS$FAIL

HELLO, 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 earlier

He'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 by Michael E. Marotta
Link to comment
Share on other sites

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 LYZER

CHROMO ITIC

WASHINGTON ESTATES

GOOD MAGNETISM

RADIUS SHEKEL

Easy to change the data, of course, great for brainstorming.

Link to comment
Share on other sites

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

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

PERL, 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.html

in 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

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 by Merlin Jetton
Link to comment
Share on other sites

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,

N4 5 6 7

assigns the vector values 4 5 6 7 to N;

N + 4

adds 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);

+/N

prints 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 by Michael E. Marotta
Link to comment
Share on other sites

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,

N4 5 6 7

assigns the vector values 4 5 6 7 to N;

N + 4

adds 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);

+/N

prints 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 by Merlin Jetton
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now