clausecker / 8bc Goto Github PK
View Code? Open in Web Editor NEWB compiler for the PDP-8
License: Other
B compiler for the PDP-8
License: Other
8bc -- B compiler for the PDP-8 8bc is a B compiler for the PDP-8. It compiles standard B for the PDP-8/E or later computers with or without an EAE. Programs are compiled to BIN formatted tapes with an entry point at 0200. To run programs compiled with 8bc, use the PDP-8 emulator supplied by the SIMH project. For example, to compile and run hello.b from the examples, first compile hello.b into hello.bin: $ 8bc hello.b Then run SIMH: load hello.bin and jump to address 0200 to start the program. $ pdp8 PDP-8 simulator V4.0-0 Current git commit id: 6554e0a4 sim> l hello.bin sim> g 200 HELLO, WORLD HALT instruction, PC: 00321 (JMP 200) sim> exit Goodbye To build 8bc, first edit Makefile according to your system's needs. Typically, nothing needs to be adjusted. You need the following prerequisites: * an ANSI C compiler * lex (e.g. flex) with libl.a * yacc (e.g. bison) with liby.a * groff Then type make all to compile 8bc and make install to install the distribution. You may need to manually update the manual database afterwards. If you are a maintainer, read Makefile carefully for instructions. Please mark SIMH as an optional dependency/recommended package if your distribution ships it. If you perform nontrivial modifications to the codebase, please have the courtesy to change the version string in 8bc such that it is clearly visible that the code has been modified and by whom. Please report bugs on github or by mail to [email protected]. Please do not send patches without prior communication. While I'm willing to fix any bug you find, I prefer to write the patches myself. (c) 2019 Robert Clausecker <[email protected]>
This requires a changed exit function and a different program entry point.
Related to #3, with the help of an assembler that doesn't suck, it's possible to split the zero page among all the functions, getting rid of the whole zero page template nonsense. This would also be possible without help from the assembler, but currently we spam the zero page with a bunch of constants, making larger programs exceed the available space. A better assembler could place these constants in line with the code, making a static zero page allocation worthwhile.
A custom assembler would give us a number of advantages:
L####
naming scheme. It sucks.ENTER
and LEAVE
Left out due to time concerns. Really should be present.
With case and default labels.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.