From 732dfddae7da5ef83592cdff9615c93f1b814880 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Fri, 7 May 2021 16:30:10 -0700 Subject: Delete no-longer-used hex file for pre-PDP-8 ISA. --- mem/mem.hex | 125 ------------------------------------------------------------ 1 file changed, 125 deletions(-) delete mode 100644 mem/mem.hex (limited to 'mem/mem.hex') diff --git a/mem/mem.hex b/mem/mem.hex deleted file mode 100644 index 8619b48..0000000 --- a/mem/mem.hex +++ /dev/null @@ -1,125 +0,0 @@ -@0 - -508 // jmp start -000 // i: 0 # outer loop index -000 // ascii0: 0 # ascii digits must be in consecutive incrementing addresses -000 // ascii1: 0 -000 // ascii2: 0 -000 // ascii3: 0 -000 // fib0: j: 0 # fib[n]; clobbered by ascii printer for inner loop index -000 // fib1: x: 0 # fib[n+1]; clobbered by ascii printer for digit being printed -000 // fib2: 0 # fib[n+2] -116 // start: acc= @echo # for the toy indirect jump to fib -307 // store @x -170 // acc= 0x70 -301 // store @i -001 // loop: cla -281 // ladd i @i -400 // ifeq 0 -587 // jmp i @x # toy indirect jump to fib -040 // tx -003 // cla ++acc -201 // ladd @i -301 // store @i -577 // jmp loop -080 // echo: rx -40a // ifeq 0x0a -504 // jmp fib -40d // ifeq 0x0d -502 // jmp fib -040 // tx -579 // jmp echo -10d // fib: acc= 0x0d -040 // tx -10a // acc= 0x0a -040 // tx -001 // cla -301 // store @i -370 // store 0x70 # 0x70 is now beginning of Fibonacci sequence (0) -003 // cla ++acc -371 // store 0x71 # 0x71 is 1 -170 // fibloop: acc= 0x70 -201 // ladd @i -306 // store @fib0 -001 // cla -286 // ladd i @fib0 # next fib number to print -602 // ascii @ascii0 # LSB of ASCII rep -603 // ascii @ascii1 -604 // ascii @ascii2 -605 // ascii @ascii3 # MSB of ASCII rep -104 // acc= 4 -306 // store @j -005 // scan: cla --acc -206 // ladd @j -4ff // ifeq -1 -508 // jmp print -306 // store @j -102 // acc= @ascii0 -206 // ladd @j -307 // store @x -001 // cla -287 // ladd i @x -430 // ifeq 0x30 -574 // jmp scan -102 // print: acc= @ascii0 -206 // ladd @j -307 // store @x -001 // cla -287 // ladd i @x -040 // tx -005 // cla --acc -206 // ladd @j -4ff // ifeq -1 -502 // jmp space -306 // store @j -574 // jmp print -120 // space: acc= 0x20 -040 // tx -170 // acc= 0x70 -201 // ladd @i -306 // store @fib0 -003 // cla ++acc -206 // ladd @fib0 # compute &fib[i+1] -307 // store @fib1 -003 // cla ++acc -207 // ladd @fib1 # compute &fib[i+2] -308 // store @fib2 -001 // cla -286 // ladd i @fib0 -287 // ladd i @fib1 # compute fib[i+2] -388 // store i @fib2 # store it -003 // cla ++acc -201 // ladd @i -432 // ifeq 50 -502 // jmp fullydone -301 // store @i -548 // jmp fibloop -121 // fullydone: acc= 0x21 -040 // tx -000 // halt - -@70 - -048 // H # later: start of in-memory Fib sequence -065 // e -06c // l -06c // l -06f // o -02c // , -020 // ' ' -077 // w -06f // o -072 // r -06c // l -064 // d -021 // ! -00d // \r -00a // \n -045 // E -063 // c -068 // h -06f // o -03a // : -020 // ' ' - -000 -- cgit v1.2.3