mirror of
https://github.com/rzzzwilson/pymlac.git
synced 2025-06-10 09:32:41 +00:00
Preparing for full emulation
This commit is contained in:
parent
6ea6737619
commit
c845138bef
@ -408,6 +408,11 @@ setreg ac 0; setreg pc 0100; mount ptr test.ptr;
|
||||
rununtil 0105; checkreg ac 0; checkreg pc 0105
|
||||
rununtil 0105; checkreg ac 1; checkreg pc 0105
|
||||
rununtil 0105; checkreg ac 2; checkreg pc 0105;
|
||||
rununtil 0105; checkreg ac 3; checkreg pc 0105;
|
||||
rununtil 0105; checkreg ac 4; checkreg pc 0105;
|
||||
rununtil 0105; checkreg ac 5; checkreg pc 0105;
|
||||
rununtil 0105; checkreg ac 6; checkreg pc 0105;
|
||||
rununtil 0105; checkreg ac 7; checkreg pc 0105;
|
||||
# HOF
|
||||
# HON
|
||||
# STB
|
||||
@ -421,7 +426,12 @@ setreg ac 0; setreg pc 0100; mount ptp test.ptp;
|
||||
rununtil 0104; checkreg ac 1;
|
||||
rununtil 0104; checkreg ac 2; checkreg pc 0104
|
||||
checkfile test.ptp test.ptr
|
||||
setreg pc 0100; mount ptp test.ptp;
|
||||
setmem 0100 [LWC 10|DAC 1|LAW 0|PSF|JMP 0103|PPC|IAC|ISZ 1|JMP 0103|HLT]
|
||||
rununtil 0111; checkreg ac 013; checkreg pc 0111
|
||||
checkfile test.ptp test.ptr
|
||||
# and lots of IOT instructions
|
||||
|
||||
# check multiple assemblerinstructions in DSL
|
||||
setmem 0100 [LAW 1|HLT]; setreg pc 0100; RUNUNTIL 0102; checkcycles 2; checkreg pc 0102; checkreg ac 1
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
test: test.ptr
|
||||
rm -f test.ptp
|
||||
rm -f test.ptp CPU.test.trace test_CPU.log
|
||||
python test_CPU.py CPU.test
|
||||
|
||||
test.ptr:
|
||||
|
||||
@ -11,13 +11,13 @@ Usage: test_Display.py [-h]
|
||||
import wx
|
||||
import Display
|
||||
|
||||
# if we don't have log.py, don't crash
|
||||
try:
|
||||
import log
|
||||
log = log.Log('test.log', log.Log.DEBUG)
|
||||
except ImportError:
|
||||
def log(*args, **kwargs):
|
||||
pass
|
||||
# if we don't have log.py, don't crash
|
||||
try:
|
||||
import log
|
||||
log = log.Log('test.log', log.Log.DEBUG)
|
||||
except ImportError:
|
||||
def log(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
######
|
||||
|
||||
@ -424,4 +424,4 @@ setreg ac 0; setreg pc 0100; mount ptp test.ptp;
|
||||
# and lots of IOT instructions
|
||||
|
||||
# check multiple assemblerinstructions in DSL
|
||||
setreg pc 0100; setmem 0100 [LAW 1|HLT]; RUNUNTIL 0102; checkcycles 2; checkreg pc 0102; checkreg ac 1
|
||||
setmem 0100 [LAW 1|HLT]; setreg pc 0100; RUNUNTIL 0102; checkcycles 2; checkreg pc 0102; checkreg ac 1
|
||||
|
||||
@ -3,83 +3,12 @@
|
||||
*/
|
||||
|
||||
#include "vimlac.h"
|
||||
#include "bootstrap.h"
|
||||
#include "memory.h"
|
||||
#include "ptr.h"
|
||||
#include "ptrptp.h"
|
||||
#include "cpu.h"
|
||||
|
||||
|
||||
void
|
||||
error(char *msg, ...)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
WORD PtrROMImage[] = {0060077, /* start lac base ;40 get load address */
|
||||
0020010, /* dac 10 ;41 put into auto-inc reg */
|
||||
0104100, /* lwc 0100 ;42 -0100 into AC */
|
||||
0020020, /* dac 20 ;43 put into memory */
|
||||
0001061, /* hon ;44 start PTR */
|
||||
0100011, /* wait cal ;45 clear AC+LINK */
|
||||
0002400, /* hsf ;46 skip if PTR has data */
|
||||
0010046, /* jmp .-1 ;47 wait until is data */
|
||||
0001051, /* hrb ;50 read PTR -> AC */
|
||||
0074075, /* sam what ;51 skip if AC == 2 */
|
||||
0010045, /* jmp wait ;52 wait until PTR return 0 */
|
||||
0002400, /* loop hsf ;53 skip if PTR has data */
|
||||
0010053, /* jmp .-1 ;54 wait until is data */
|
||||
0001051, /* hrb ;55 read PTR -> AC */
|
||||
0003003, /* ral 3 ;56 move byte into high AC */
|
||||
0003003, /* ral 3 ;57 */
|
||||
0003002, /* ral 2 ;60 */
|
||||
0102400, /* hsn ;61 wait until PTR moves */
|
||||
0010061, /* jmp .-1 ;62 */
|
||||
0002400, /* hsf ;63 skip if PTR has data */
|
||||
0010063, /* jmp .-1 ;64 wait until is data */
|
||||
0001051, /* hrb ;65 read PTR -> AC */
|
||||
0120010, /* dac *10 ;66 store word, inc pointer */
|
||||
0102400, /* hsn ;67 wait until PTR moves */
|
||||
0010067, /* jmp .-1 ;70 */
|
||||
0100011, /* cal ;71 clear AC & LINK */
|
||||
0030020, /* isz 20 ;72 inc mem and skip zero */
|
||||
0010053, /* jmp loop ;73 if not finished, jump */
|
||||
0110076, /* jmp *go ;74 execute loader */
|
||||
0000002, /* what data 2 ;75 */
|
||||
0003700, /* go word 03700H;76 */
|
||||
0003677 /* base word 03677H;77 */};
|
||||
|
||||
WORD TtyROMImage[] = {0060077, /* start lac base ;40 get load address */
|
||||
0020010, /* dac 10 ;41 put into auto-inc reg */
|
||||
0104100, /* lwc 0100 ;42 -0100 into AC */
|
||||
0020020, /* dac 20 ;43 put into memory */
|
||||
0001061, /* hon ;44 start PTR */
|
||||
0100011, /* wait cal ;45 clear AC+LINK */
|
||||
0002400, /* hsf ;46 skip if PTR has data */
|
||||
0010046, /* jmp .-1 ;47 wait until is data */
|
||||
0001051, /* hrb ;50 read PTR -> AC */
|
||||
0074075, /* sam what ;51 skip if AC == 2 */
|
||||
0010045, /* jmp wait ;52 wait until PTR return 0 */
|
||||
0002400, /* loop hsf ;53 skip if PTR has data */
|
||||
0010053, /* jmp .-1 ;54 wait until is data */
|
||||
0001051, /* hrb ;55 read PTR -> AC */
|
||||
0003003, /* ral 3 ;56 move byte into high AC */
|
||||
0003003, /* ral 3 ;57 */
|
||||
0003002, /* ral 2 ;60 */
|
||||
0102400, /* hsn ;61 wait until PTR moves */
|
||||
0010061, /* jmp .-1 ;62 */
|
||||
0002400, /* hsf ;63 skip if PTR has data */
|
||||
0010063, /* jmp .-1 ;64 wait until is data */
|
||||
0001051, /* hrb ;65 read PTR -> AC */
|
||||
0120010, /* dac *10 ;66 store word, inc pointer */
|
||||
0102400, /* hsn ;67 wait until PTR moves */
|
||||
0010067, /* jmp .-1 ;70 */
|
||||
0100011, /* cal ;71 clear AC & LINK */
|
||||
0030020, /* isz 20 ;72 inc mem and skip zero */
|
||||
0010053, /* jmp loop ;73 if not finished, jump */
|
||||
0110076, /* jmp *go ;74 execute loader */
|
||||
0000002, /* what data 2 ;75 */
|
||||
0003700, /* go word 03700H;76 */
|
||||
0003677 /* base word 03677H;77 */};
|
||||
|
||||
void
|
||||
run(WORD pc)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user