GithubHelp home page GithubHelp logo

skx / z80-cpm-scripting-interpreter Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 83 KB

A trivial I/O language, with repl, written in z80 assembler to run under CP/M.

Makefile 100.00%
cpm io repl retro scripting scripting-language z80

z80-cpm-scripting-interpreter's Issues

Allow RAM read/write

Suggest we use "M" to set the memory-address, "R"/"W" to allow reading/writing and use J to jump to new code.

  • NOTE: This requires 16-bit temporary storage - #1

This would look like this:

3000M ; set the memory address to be 3000
c30W   ; write 30 to 3000
c40W   ; write 40 to 3001

c3000MJ  ; Jump to the code at address 3000

NOTE: We auto-increment the memory-address when (r)eading or (w)riting.

Allow easy porting

We use the CP/M bios for:

  • Reading input into a buffer
  • Writing a single character to the console.
  • Writing a string to the console.

We should ensure we make it easy to swap those out, to ease porting to single-board computers that run standalone, without CP/M.

Save bytes via the IX register

Something like this:

  ld IX, a_register
  ld h, (IX+0)
  ld l, (IX+1)

Is shorter than the indirect use we use right now.

It might also be worth thinking about register usage more generally; currently we go through a dance to preserve the contents of the string to interpret - which we keep in hl - but we don't do anything for the other registers which get juggled back and forth..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.