BANCStar (2000)
web.archive.org
web.archive.org
8607,,,1 ; deactivate F7
11547,15475,22002,22002 ; clear pause flag # var1547 is the pause flag
1316,1629,1,1649 ; var1316 = displayPromptAndGetInput(loc: [29,16], numChars: 1, cursorLoc: [49,16])
3001,1316,3,30078 ; if var1316 == 'N'
11528,22052,22002,22002 ; var1528 = 5
9301,0,1528,1528 ; ??? put to data model, prompt1: var1528, prompt2: var1528
31568,10001,800,107 ; var1568 = tableTransfer(800, 10).item ?
8560,,,1568 ; execDOSCommand(var1568)
8550,210,, ; ??? Combination goto
3001,,, ; end if
3100,1316,3,30089 ; proceedIf var1316 == 'Y'
11547,15475,22002,22002 ; clear pause flag
3001,1316,3,30089 ; if var1316 == 'Y'
3001,1317,3,10000 ; and if len(var1317) == 0
8400,,, ; save address # for return
8550,700,801, ; ??? Combination goto
3001,,, ; end
9301,0,522,522 ; ??? put to data model, prompt1: var522, prompt2: var522
3000,1284,3,10001 ; if var1284 == -1
8500,,3, ; goto label3
8500,,5, ; goto label5
1547,,1,-2301 ; ??? pauseFlag = getInput(numChars: -2301?)What on earth is going on with the commas? For example, the line
11528,22052,22002,22002 ; var1528 = 5
The only pert of this I can vaguely get is that the 11528 refers to a variable #1528. It's the only variable assignment in the above snippet, but 22002 appears several times, twice as the last argument. I don't quite get why; the two lines are doing very different things.Enlighten us!
------- Edit -------
From the Esolang wiki (https://esolangs.org/wiki/BANCStar) it transpires that, for the example given above, we can actually understand the opcode above. BANCStar is fairly similar to an assembly language of the form (opcode, arg1, arg2, arg3) where not all opcodes require arguments (leading to blank commas) and the numerical form of each opcode is sometimes parsed characterwise (and sometimes not). So, for the 'add 5' example that the OP correctly provides above, the "rules" seem to be:
The most complicated type of instruction seems to be arithmetic instructions. Here, the first number is 10000+d, where d is the address of one of the 2000 variable cells ("prompts") as the destination operand.
The other three numbers are of the form (10v+p) or (22000+10n+p) where p is an operation code, v is a variable cell in the range [1, 2000], and n is a constant literal integer.
When a parameter is unneeded, it is usually set to 22002 (i.e. "add 0").
In this case, I think we're literally doing the following: 11528,
^variable 1528 =
2205
^ (int)5 is the argument of the forthcoming operation
2,
^ ... and that operation is "+"
22002,22002
^ +0, +0
Malboge has a more human friendly syntax.But not everything is documented. I also found some GitHub page with more code. Maybe it’s fun to create something that can actually parse this.
According to that info, 22002 is add 0 (essentially noop). Not sure why all operands are required instead of leaving them blank. The 22052 means set to 5.
Probably because Malbolge was kinda sorta expected to be written by humans.
BANCStar "code" is really IL/bytecode, it just happened to be ASCII bytecode (initially anyway, according to the wiki it became binary with BANCStar 10).
On_your_orders_your_troops_sack_the_village,_pillaging_everything_of_any_value,_and_then_put_the_buildings_to_the_torch._From_the_coins_and_valuables_that_are_found,_you_get_your_share_of_{reg1}_denars. none 37 370 3 1224979098644774912 30 0 370 3 1224979098644774913 30 1 2105 2 1224979098644774912 1 371 3 30 0 1224979098644774912 4 0 30 2 1224979098644774912 3 30 2 1224979098644774913 3 372 1 30 3 0 521 3 1224979098644774914 144115188075856213 7 4 0 32 2 1224979098644774914 0 1 3 936748722493063439 1224979098644774914 -5 3 0 2136 3 1224979098644774915 -35 -25 1 3 936748722493063440 144115188075856213 1224979098644774915 2204 2 1224979098644774916 144115188075856213 2190 3 1224979098644774917 1224979098644774916 432345564227567630 4 0 2147483678 2 1224979098644774917 0 1 3 936748722493063441 1224979098644774916 -3 3 0 2133 2 1224979098644774918 50 521 3 1224979098644774919 144115188075856213 50 2122 3 1224979098644774920 1224979098644774919 5 2105 2 1224979098644774918 1224979098644774920 1 3 936748722493063602 360287970189639680 1224979098644774918 2133 2 1224979098644774921 3 2123 3 1224979098644774922 1224979098644774918 100 2105 2 1224979098644774921 1224979098644774922 1 2 936748722493063447 1224979098644774921 522 3 1224979098644774923 1224979098644774916 99 2122 3 1224979098644774924 1224979098644774921 200 2106 2 1224979098644774923 1224979098644774924 502 3 1224979098644774916 99 1224979098644774923 1 3 936748722493063604 3 216172782113784226 2133 2 72057594037927937 1224979098644774918 1
> BANCStar actually came with a "screen generator" that was supposed to be used to construct applications. But the 5.1c version of the generator was so limited that experienced programmers soon began to pry off the covers and modify directly the intermediate code that the run-time module actually executed.
In that sense, they're basically editing the raw bytecode files, for something with less than great semantics but those semantics wouldn't really be visible / a concern if a generator program would be managing them.
TFA talks about BANKStar 5.1c but the wikipedia article mentions that BANCStar 10 switched the screencode (bytecode) to binary, so it looks like the thing kept on trucking for a while.
And the programmer kept stretching the thing for purposes it was not really intended to (possibly because it was difficult to get approval for better techs), as reading between the line and other articles on the subject it looks like BancSTAR was really a glorified forms creator / manager, which makes some of the limitations make more sense e.g. 2000 labels, choices and fields in a single form (even across multiple screens) seems like a pretty generous limit at first glance.
Hey, at least they had documentation.
Necessity is the mother of documentation.
The other had ops like '74' which were coordinates of the key which activated the given function.
Getting the full screen of the ZX Spectrum surely spoiled me :)
But sometimes I'll flip through it and notice:
- mis-spelled table names, usually duplicate tables
- missing FKs
- missing unique keys, most commonly for early RoR apps
- developer-specific EAV tables with 1 row.
The benefit always outweighs the dead trees, but printing once a year is typical. Back in the day, more frequenctly on 25-line terminals where there was too much scrolling.
Note that the verdict by HN moderator dang talks of a regular ban: https://news.ycombinator.com/item?id=25011268
Moderation does not care about right or wrong, truthful or fake, moral or immoral.
Moderation cares about harmonic or controversial. There isn't even a "group think", as that would imply direction and consistency.
I suppose there were and are many of these kinds of things going around in save files etc. You just would never predict or hope that people go and reverse engineer it to write directly in it.
It could be for incrementally building onto and evolving the legacy system in a higher-level language.
Or it could be used for reverse-engineering the legacy system, as reference documentation for developing new implementations from scratch.
Excellent.
It’s a little unfair that people are referring to this as a bad programming language where it’s actually effectively a save-file that has been reverse engineered to edit it beyond its original scope and functionality.
Compiled java bytecode is also not the best programming language, albeit admittedly much better than this!
The hard limit of 2000 variables / constants is little different from the hard limit of <some amounts of kbytes> of memory you get in various systems.
Similarly I don't think there's anything wrong with generated code not having a notion of scope.
Vendor Engineers: “Who would possibly need more than 2000 variables to make a few custom screens in our new drag and drop screen editor feature?”
Customer Engineers: “Hey we can exploit this new custom screen editor to inject our own arbitrary code! Why have they only allowed for 2000 variables? Idiots!”
It’s just as likely it was intended to scale the way it had and it was just poorly implemented from the outset. I’ve seen this happen plenty of times in the past where an extremely rudimentary POC is rushed into production and the official workaround is a scary chain of kludges. It was especially common in the era this BANCStar originates because compute time was expensive so it was often cheaper to code by hand and then hire typists who’d input your code and compile it, passing you a print out of any errors raised. Starting again from scratch if your basic premise sucked often wasn’t an option. Man do I not miss those days.
You make it sound like they decided to do that for fun. They decided to do that because the drag-and-drop editor was unfit for purpose.
Unfit for their purpose - it probably satisfied the purpose that BANCStar was selling it for.
It sounds like they just realised that this feature of BANCStar would let them inject their own arbitrary code to allow deeper modification of the system than what was intended, which was not within the scope of the original feature.
My actual first thought was that this was a language designed by someone who didn't know that programming languages exist.
My second actual thought, after reading over my first actual thought, was that it could be a language designed by someone who decided to take that programming languages assignment from back in school and this time do it right.
https://en.m.wikipedia.org/wiki/Society_for_Worldwide_Interb...
Besides that article's subject, it has enough links to keep you busy for months. Be sure to read the "Security" section.
"Banking" is a huge subject. If you really want to learn (part of) it, best would be to find an area that interests you, and work in it. That's one of the best parts of programming, it's not really about programming, it's about the industries that use it.
As for "key words," I think better is to follow links, and soak in any keywords that gradually come from what you find that's interesting.
Mirage had three major components: Chart, Ego, and Autumn. Chart was a menu-driven business chart package. Bar charts, pie charts, bullet lists, standard stuff. Notably, it made it very easy to add gradients, which Mirage called "sweeps", to your chart, because it was the style at the time. Ego stood for "Edit Graphic Objects" and was menu- or command-driven, like AutoCAD, and served as a general vector graphics editor. I forgot what Autumn did, something about importing data? Like from spreadsheets and stuff?
One of the features of Ego was that it could be scripted. Zenographics provided some example scripts, and some of them had really odd commands, just DO with numbers after them.
It turns out that "Mirage" was the runtime and abstract machine, and Chart, Ego, and Autumn were applications running on it. The numbers in the DO commands were opcodes for their VM's instruction set, which was called "MAD" for Mirage Application Development. MAD had primitives for doing stuff like picking stuff from the screen with the mouse, menus, and so on. Mirage could be put into a debug mode that flashed the opcodes as they were being executed. Using the information that provided, as well as the numbers from the example scripts, I was able to figure out what some of the opcodes did and use that to write new commands. Like I added a rectangle command to Ego that worked much like the built-in rectangle command, but it created a rectangle that could be rotated. (It created a four-segment polyline rather than a rectangle object defined by diagonally opposite corners.)
Mirage was a fascinating program but it is little known today. Zenographics got out of the application software business to focus on printer drivers a long time ago. Today they are a subsidiary of Marvell, the chip company.
Condolences to the poor souls who had to maintain that system...
If anyone has to use this, why not simply use assembly? Learnt COBOL and S360 Assembly which are obviously not great but widely used by almost all banks. COBOL is way too chatty, S360 Assembly is just like any other assembly language. But even S360 Assembly is much more readable than this. So it would be incredible that someone really completed a core banking application with it.