3 ms·
I even hacked some system utilities by dumping them out in hex The operating system had an instruction called "supervisor call", or SVC. When you needed the OS
by PhantomGremlin 11y ago
I even hacked some system utilities by dumping them out in hex
The operating system had an instruction called "supervisor call", or SVC. When you needed the OS to do something for you (like read from a file) you did an SVC. Much like making a system call into Linux.
The 2nd byte of SVC was an operand. It meant you could have up to 256 different requests to make of the OS. But IBM didn't define all of them.
So our school system programmers used some of the highest SVC numbers (255 on down) to do various custom things. But, these functions could also be dumped in hex and disassembled.
When you did that you found all sorts of magical things you could ask the OS to do for you. E.g. let you write anywhere in memory. From there it was a few instructions before you were "root", or what passed for the equivalent in those days.
Security thru obscurity. It didn't work in the early 1970s. It still doesn't work today.
- cmollis 11y agoI also took Assembly language on the mainframe. It was the only mainframe class I took (all the rest on pc's which, I guess for the time 25+ years ago, was interesting in and of itself), but I learned quite a bit about computer architecture. Cool!
- nickpsecurity 11y agoYep: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.9701&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93....
- YZF 11y agoNot sure when that came historically but I remember the diag instruction that was used to talk to the "hypervisor". E.g. diag 8 was used to issue CP commands from your program. That's at a lower level than CMS which ran in the user's space and interacted with the virtual hardware (and would handle something like file i/o)...
- greenyoda 11y agoThat's exactly right. CP trapped the "diagnose" instruction in the virtual machine to allow the VM to talk to the hypervisor. The "diagnose" instruction was convenient, since it was an opcode that was never used in normal programs - on a real (non-virtual) machine, it was used by IBM engineers to diagnose hardware problems and did different weird things on each different model of machine. The normal SVC (supervisor call) instruction was the API for programs to talk to CMS, the operating system that was most commonly run on top of the virtual machines. It was actually possible to run several different operating systems on the virtual machines, including CP (the hypervisor) itself. Systems programmers would do that for testing new versions of CP on a live system.