Decompiled Source - Nakazoto/CenturionComputer GitHub Wiki
Decompiled Source
Ren14500 has been building a phenomenally good disassembler to start taking apart system source files and turn them into genuine Centurion assembly. The resulting assembly is accurate enough that it can be reassembled using P.ASM. We do not have the source code for the original Operating System, so this is as close as we can get to peering into the inner workings and seeing how things function.
Example (XSMCB)
This is a decompiled example of the executable "XSMCB." The "X" stands for "eXecutable" and "SMCB" stands for "Set Mux Control Byte."
* Label naming:
* ENTRY = Main entry point
* ENTnn = Additional entry point
* B = Byte
* D = Displaced branch/jump target
* F = Function JSR target
* I = 32-bit integer
* J = Jump target
* L = Label (generic)
* N = Bignum
* P = Pointer
* S = String
* W = Word
*
8000: DB 0,100 ; =0x00,0x0064
*
* Function ENTRY
*
8064:ENTRY XFR= ENTRY,S ; =0x8064 =32868(-32668) [Transfer immediate to S]
8068: SVC X'5C' ; =92 [Service call GBKV - get OS block value]
806a: DB X'00' ; =0x00 =0 =NUL [TODO: arg1]
806b: DB X'01' ; =0x01 =1 [TODO: arg2]
806c: DB X'15' ; =0x15 =21 [TODO: arg3]
806d:W806D DW W806D ; =0x806d =32877(-32659) [address to store block value]
806f: LDB= W807C ; =0x807c =32892(-32644) [Load B with immediate]
8072: SVC X'5D' ; =93 [Service call PBKV - set OS block value]
8074: DW X'0101' ; =0x0101 =257 [TODO: arg1]
8076: DB X'19' ; =0x19 =25 [TODO: arg2]
8077: DW W806D ; =0x806d =32877(-32659) [address to read block value]
8079: SVC X'0A' ; =10 [Service call EXIT - exit to OJX00]
807b: DB X'FF' ; =0xff =255(-1) [completion code]
*
807c:W807C DW X'0000' ; =0x0000 =0 =NUL,NUL
807e:ENDPT
Decompiled Files
Boot
CPU5 OpSys
File |
Notes |
Link |
XPDIR |
Essential part of CPU5 OpSys |
Link |
CPU6 OpSys
File |
Notes |
Link |
OJX00 |
Main JCL parser. Prints "CRT0 READY", launches other @OJX files |
Link |
OJX02 |
JCL command .FSPEC and .DSPEC |
Link |
OJX03 |
JCL command .STA |
Link |
OJX04 |
JCL .START, .STOP, .LOG, .NOLOG, .PRI, .TIME, .NOTIME, .DUMP, .NODUMP, .MULTP |
Link |
OJX07 |
JCL command .IOA |
Link |
OJX11 |
JCL command .FORMAT |
Link |
OJX16 |
JCL command .REL and .CODE |
Link |
OJX17 |
JCL command .SETA and .SETC |
Link |
OJX18 |
JCL command .SKIP and .SKIPR |
Link |
OJX19 |
JCL command .JOB and .PARM |
Link |
OJX23 |
JCL command .VOL and .VSPEC |
Link |
OJX24 |
JCL command .PAUSE, .ENTER, .GUARD, .NOGUARD |
Link |
TX002 |
OpSys transient file: |
Link |
TX003 |
OpSys transient file: |
Link |
TX004 |
OpSys transient file: get string date |
Link |
TX009 |
OpSys transient file: load private library |
Link |
TX010 |
OpSys transient file: get integer date |
Link |
TX011 |
OpSys transient file: convert date in GRIN to INTEGER |
Link |
TX012 |
OpSys transient file: gets the current date of a file into the A register |
Link |
TX013 |
OpSys transient file: sets the date on a file from the A register |
Link |
TX014 |
OpSys transient file: open file by name/disk |
Link |
TX015 |
OpSys transient file: performs low level disk I/O |
Link |
PD000 |
OpSys predriver for MUX terminal |
Link |
PD001 |
OpSys predriver for MUX terminal |
Link |
PD002 |
OpSys predriver for MUX terminal |
Link |
PD003 |
OpSys predriver for MUX terminal |
Link |
PD004 |
OpSys predriver for MUX terminal |
Link |
PD005 |
OpSys predriver for MUX terminal |
Link |
PD006 |
OpSys predriver for MUX terminal |
Link |
P Folder Assembler/Compiler Related
File |
Notes |
Link |
OSLIB6 |
Implements a variety of CPL functions (LEN, MOD, MIN, MAX, etc.), as well as other useful functions |
Link |
Executables
File |
Notes |
Link |
BASIC Monitor |
Called to load the BASIC monitor to allow BASIC executables to run |
Link |
KOMPOZ |
Executable for the KOMPOZ text editor |
Link |
XASSM |
Assembler that builds CPU6 machine code from Assembly code |
Link |
XASSM5 |
Assembler that builds CPU5 machine code from Assembly code |
Link |
XBCOM |
Called to compile a BASIC program into pseudocode |
Link |
XEJECT |
Simply clears the screen |
Link |
XHEXLST |
Hexadecimal viewer |
Link |
XLINK |
Interactive linker used when compiling executables |
Link |
XSDUMP |
Hex dumper and editor |
Link |
ZSDUMP |
Recreated CPL source code for XSDUMP |
Link |
XSMCB |
Sets the control byte of the MUX board to change baud rate, data, etc. |
Link |