GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tmssngr/BLikeLang: BLikeLang is a primitive compiler for a sub-set of C for the Zilog Z8 in Java.

BranchesTags
Open more actions menu

Latest commit

 

History

288 Commits
288 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
config
config
 
 
examples
examples
 
 
src/main
src/main
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.xml
build.xml
 
 
findings.txt
findings.txt
 
 
issues.txt
issues.txt
 
 
vs-env.cmd
vs-env.cmd
 
 

Repository files navigation

B-like Lang

This is my first approach of writing a primitive compiler from a sub-set of the C-language to Z8 assembly. It can be used together with Z8ASM to compile to binary.

The syntax is close to C (or Java), semicolons are optional. At the moment there is only support for 16 bit signed integer (int) variables - like the built-in Tiny-Basic of the UB8830 processor, an east-german derivative of the Zilog Z8, used in the JU+TE computer. But you also may use var instead.

This project is not meant to be a ready-to-use project, but rather for Java developers. The main class is Compiler. It accepts a source file and writes output.asm in the same directory as the source file. The generated asm file will start with .org %8000, so the program will start be compiled to address 0x8000.

To be able to interact with the operating system, some methods are known by default:

  • void printChar(int character)
  • void printInt(int value)
  • int getMem(int address) - reads the byte from address
  • void setMem(int address, int value) - writes the lower byte of value to address
  • int readInt()

These methods are also configured in the Compiler class as builtInFunctions.

Features ;)

  • var
  • optional ;
  • optional braces for the if expression

Limitations

  • just 16-bit signed integer
  • just a single source file (no includes)
  • no array, no string support

About

BLikeLang is a primitive compiler for a sub-set of C for the Zilog Z8 in Java.

Topics

asmcompilerjavaz8

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.