Skip to content

Instantly share code, notes, and snippets.

@sergev
Created November 20, 2016 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergev/f8aa7fad912ce17d56a3a236e7ba4d92 to your computer and use it in GitHub Desktop.
Save sergev/f8aa7fad912ce17d56a3a236e7ba4d92 to your computer and use it in GitHub Desktop.
Start of micro-BESM with empty RAM
-------RCONST:
;===== ЧТЕНИЕ ЛЮБОЙ CONST ИЗ ПЗУ В СУММАТОР ДЛЯ КОНТРОЛЯ! (АДРЕС МОЖНО МЕНЯТЬ!)
(32976) 662: loop 1aa alus=DZ H alud=B rb=A dsrc=PROM cond=ARBRDY
(32976) Read Const[426] = 0000000003e41000
(32976) Write alu.A = 0000000003e41000
(32976) Write cu.SP = 0
(32978) 663: cont alus=DA ra=WR2 func=EXOR H CEN ECA ara=RG2
(32978) Write alu.uSR = 1000
(32980) 664: cjp 664 map=PE stopc=/NZ ffcnt=CLREI cond=CT
;
;СБРАСЫВАЕМ ВНЕШНИЕ ПРЕРЫВАНИЯ, ИДЕМ НА ВКС
(32982) 665: cont 1a6 ALU alus=DZ H alud=B rb=PC dsrc=PROM ydst=ADRREG
(32982) Read Const[422] = 00000000fff80860
(32982) Write alu.PC = 00000000fff80860
(32982) Write UREG = fff80860
;ЕСЛИ ПРИ ПУСКЕ УСТАНОВЛЕН HLT, ПОСЛЕ ВКС - ПРЕРЫВАНИЕ
(32984) *** Arbiter op=BIRD not implemented yet!
(32984) 666: push 84b map=PE arbi=BIRD ydev=PHYSAD
(32984) Write cu.SP = 1
(32984) Write cu.Cnt = 84b
(32984) Write cu.Stack1 = 667
(32984) Write ARBOPC = f (BIRD)
(32986) 667: loop 00b alus=DZ H alud=B rb=BYTE dsrc=PROM cond=ARBRDY
(32986) Read Const[11] = 00000000000000ff
(32986) Write alu.BYTE = 00000000000000ff
(32986) Write cu.SP = 0
(32986) Write bus.RG3 = 00:00000000000000a2
(32988) 668: cont ALU alus=DZ H alud=B rb=INTR ECB WRB bra=RG3 ECA ara=RG2
(32988) Write alu.INTR = 00000000000000a2
(32990) *** Arbiter op=BICLR not implemented yet!
(32990) 669: cont 007 alus=DZ H alud=B rb=HALF dsrc=PROM arbi=BICLR ydev=PHYSAD ffcnt=CLRTR1
(32990) Read Const[7] = 00000000ffffffff
(32990) Write alu.HALF = 00000000ffffffff
(32990) Write ARBOPC = e (BICLR)
(32992) 66a: jrp 66a map=PE ICC ffcnt=SETEI cond=ARBRDY
(32992) Write RR = 03c5f000
-------LCWPH:
;ФИЗ.АДРЕС - В RG0, ЗАПУСК АРБИТРА; АДРЕС КОМАНДЫ - В ИАОП ДЛЯ ПРОГР.ПРЕРЫВАНИЙ!
(32994) 84b: cont arbi=FETCH ECB WRB bra=RG0 ydev=PHYSAD
(32994) Write ARBOPC = 8 (FETCH)
(32994) Write bus.RG0 = 0000000000000060
;ЖДЕМ ГОТ. АРБИТРА
(32996) 84c: cjp 84c map=PE ICC cond=ARBRDY
(32998) 84c: cjp 84c map=PE ICC cond=ARBRDY
(32998) Memory Load [00060] = xx:xxxxxxxxxxxxxxxx
(33000) 84c: cjp 84c map=PE ICC cond=ARBRDY
(33002) 84c: cjp 84c map=PE ICC cond=ARBRDY
;АК В Q, ПЕРЕХОД ПО КОП; УСТАНОВКА ТГ.TR1 В "1"+ ISE ДЛЯ ОСТАНОВА ПОСЛЕ ВКС
;!!!!
;Т.К.В НЕКОТОРЫХ КОМАНДАХ В 1-Й МК TR1 СБРАСЫВАЕТСЯ, А TR0 НЕ ЗАВЕДЕН НА
;УСЛОВИЯ, ДА И ТОЖЕ В НЕКОТОРЫХ КОМАНДАХ СБРАСЫВАЕТСЯ В 1-Й МК,
;ПОСЛЕ ВКС ДЕЛАЕМ ISE (ДЛЯ ШАГОВОГО РЕЖИМА), А В СЛЕД.КОМАНДЕ - ПЕРЕХОД ПО КОП!
(33004) 84d: cjp 846 map=PE ISE ffcnt=SETTR1
-------JQ:
;===== ПЕРЕХОД НА ПК С ЧТЕНИЕМ АК В Q, НО БЕЗ ПМИ
(33006) 846: cjp map=ME alus=DZ alud=Q dsrc=COMA LETC
(33006) *** Unknown state: cpu.opcode=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
----- Fatal Error! -----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment