cpu3502: a 5-trit balanced ternary cpu

Уравновешенная троичная система счисления - форум переехал с http://ternary.info

Moderator: haqreu

User avatar
askfind
Devil
Posts: 822
Joined: 04 Jan 2016 09:15
Location: Russia, S.- Peterburg

cpu3502: a 5-trit balanced ternary cpu

Post by askfind »

Assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.

1. https://github.com/thirdcoder/cpu3502.git
A 5-trit balanced ternary central processing unit simulator
Build Status npm version
Includes an assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.
2. https://github.com/thirdcoder/tritmapped-terminal.git
Tricolor tritmapped 45x28 character 9x14 terminal display
3. https://libraries.io/github/thirdcoder/cpu3502
Includes an assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.
Run npm test and examine test.js for example usage and supported functionality.
Dependencies
4. Онлайн запуск виртуального троичного процессора cpu3502 http://thirdcoder.github.io/tca5
You do not have the required permissions to view the files attached to this post.
"Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
User avatar
askfind
Devil
Posts: 822
Joined: 04 Jan 2016 09:15
Location: Russia, S.- Peterburg

Re: cpu3502: a 5-trit balanced ternary cpu

Post by askfind »

Визуальное представление тритов

https://github.com/thirdcoder/tritmapped-canvas
Displays a visual representation of balanced-ternary using three colors (trichromatic, comparable to monochrome on binary systems, but with red/black/green instead of black/white). The display is "tritmapped" (comparable to bitmapped), meaning each trit (base 3 digit) represents a pixel.
Посмотреть онлайн - http://thirdcoder.github.io/tritmapped-canvas/
You do not have the required permissions to view the files attached to this post.
"Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
User avatar
askfind
Devil
Posts: 822
Joined: 04 Jan 2016 09:15
Location: Russia, S.- Peterburg

Re: cpu3502: a 5-trit balanced ternary cpu

Post by askfind »

Тест эмулятора троичного процессора cpu3502
A 5-trit balanced ternary central processing unit simulator
Build Status npm version
Includes an assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.
Run npm test and examine test.js for example usage and supported functionality.

Code: Select all

> cpu3502@1.3.0 test /home/vladimir/work_SETUN/REPO/thirdcoder/cpu3502
> babel-node test.js

TAP version 13
# halts
initial flags= undefined
XOP di.operation -39 undefined

pc= 0  opcode= -118 disasm= HALTZ
misc -39
flags: RHUVSDCIL
flags: i0 A=0(^@), X=0, Y=0
Halted with status 0
# branch instruction decoding
branch opcode=BRSNZ, flag=0/S, direction=1/N compare=0/Z
emit 101
emit 11111
assembled 1 lines into 2 trytes
{ family: 1, flag: 0, compare: 0, direction: 1 }
ok 1 should be equal
ok 2 should be equal
ok 3 should be equal
...
...
...
 'LDA #%ii1i0',
  'DNOP A',
  'DNOP #%iiiii',
  'DNOP 29524',
  'BNE #-1',
  'BEQ #+2',
  'BRDEZ #-3',
  'HALTN',
  'HALTP',
  'LDA #%1iii0',
  'STA 0',
  'PTI A',
  'TAX',
  'LDA (29282),Y',
  'LDA 29282,X',
  'LDA 29282,Y',
  'JMP 4444',
  'JSR 5555',
...
...
1..240
# tests 240
# pass  240

# ok

"Ученье свет, а неученье — тьма. Дело мастера боится, и коль крестьянин не умеет сохою владеть — хлеб не родится." (С)
User avatar
Shaos
Admin
Posts: 24088
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: cpu3502: a 5-trit balanced ternary cpu

Post by Shaos »

Смахивает на Тунгуску:

http://tunguska.sourceforge.net/docs.html

Там тоже был сэмулирован троичный процессор по мотивам 6502 с графическим экраном...

P.S. Сам автор Тунгуски на этом форуме про неё писал: http://www.nedopc.org/forum/viewtopic.php?f=62&t=93
Я тут за главного - если что шлите мыло на me собака shaos точка net