{"id":51018241,"url":"https://github.com/ericscharff/tinybasic","last_synced_at":"2026-07-09T14:00:35.690Z","repository":{"id":285285217,"uuid":"957604004","full_name":"ericscharff/tinybasic","owner":"ericscharff","description":"Tiny BASIC for 8080 from DDJ Issue 1","archived":false,"fork":false,"pushed_at":"2026-02-02T04:05:06.000Z","size":259,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-02T15:21:32.140Z","etag":null,"topics":["8080","altair-8800","basic","z80"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericscharff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-30T19:08:57.000Z","updated_at":"2026-02-02T04:05:10.000Z","dependencies_parsed_at":"2025-09-28T03:13:32.208Z","dependency_job_id":"8de38979-9d1e-4d2f-bc89-c1051f380ecf","html_url":"https://github.com/ericscharff/tinybasic","commit_stats":null,"previous_names":["ericscharff/tinybasic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericscharff/tinybasic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericscharff%2Ftinybasic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericscharff%2Ftinybasic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericscharff%2Ftinybasic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericscharff%2Ftinybasic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericscharff","download_url":"https://codeload.github.com/ericscharff/tinybasic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericscharff%2Ftinybasic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35301501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["8080","altair-8800","basic","z80"],"created_at":"2026-06-21T14:00:20.991Z","updated_at":"2026-07-09T14:00:35.679Z","avatar_url":"https://github.com/ericscharff.png","language":"JavaScript","funding_links":[],"categories":["Miscellaneous"],"sub_categories":[],"readme":"# Tiny BASIC Extended\n\n## [Try it in your browser!](https://ericscharff.github.io/tinybasic/js/)\n\n## What is this?\n\nThis is a reconstrucitonof Tiny BASIC Extended, by Dick Whipple and John Arnold.\nThe listing (as presented here) originally appeared in\n[SIGPLAN Notices, July 1976](https://doi.org/10.1145/987491.987494). The SIGPLAN\narticle is a reprint of an article that appeared in the January 1976 issue of\nDr. Dobb's Journal of Tiny BASIC Calisthenics \u0026 Orthodontia (the very first\nissue of Dr. Dobbs Journal.) A type-in of the binary was in the first issue, the\nsource code appeared in the second issue.\n\nThe file [tinybasic.oct](tinybasic.oct) is a recreation of the original split\noctal listing, and closely resembles how it appeared in the first issue of DDJ.\nThis version of Tiny BASIC is written in 8080 machine code. The listing was\nhand-typed from a PDF scan of a bad photocopy, so there are very likely errors.\nHowever, I was able to load this into an 8080 emulator and enter some very\nsimple programs. It is possible that this will work with an Altair 8800 (or an\nemulator.)\n\n## Bringing up Tiny BASIC\n\nIn order to bring up this version of Tiny BASIC, load the binary into memory at\n1000H. In addition, you will need to specify several routines in low memory:\n\n### Cold Start routine:\n\nAddress 0 of memory should initialize the stack pointer and jump to the Tiny\nBASIC entry point. I used the following code\n\n```\n    ADDR    INST   8080\n    000000  061\n    000001  377\n    000002  000    LD SP, 00FFH\n    000003  303\n    000004  254\n    000005  021    JP 11ACH\n```\n\n### Input routine:\n\nAddress 030 (18H) should read an ASCII character from the input device into\nregister A. If ESC is pressed, jump to the cold start routine. No registers\nshould be modified except A.\n\n### Output routine:\n\nAddress 050 (28H) should output the ASCII character stored in register A. No\nregisters should be modified.\n\n### CRLF routine:\n\nAddress 020 (10H) should output a CR followed by a LF. You can do whatever\nnewline processing you'd like instead. Only register A may be modified.\n\nIn my Z80 simulator, I entered the cold start routine into memory, and\nimplemented the other three routines as traps. I adopted a slightly different\nscheme for the JavaScript 8080 simulator included in this repository. In that\nversion, I used I/O so that input from port 0 fetches a character, output to\nport 0 outputs a character, and output to port 1 outputs a newline.\n\n## Example Run\n\nMultiplication table\n\n```\n 10 FOR I = 1 TO 12\n 20 FOR J = 1 TO 12\n 30 PR I*J;\n 40 NXT J\n 50 PR\n 60 NXT I\n 70 END\n```\n\nTranscript of session with Tiny BASIC\n\n```\n :NEW\n\n :10 FOR I = 1 TO 12\n :20 FOR J = 1 TO 12\n :30 PR I*J;\n :40 NXT J\n :50 PR\n :60 NXT I\n :70 END\n :LST\n\n 00010 FOR I = 1 TO 12\n 00020 FOR J = 1 TO 12\n 00030 PR I*J;\n 00040 NXT J\n 00050 PR\n 00060 NXT I\n 00070 END\n :LST 20\n\n 00020 FOR J = 1 TO 12\n :LST 20,40\n\n 00020 FOR J = 1 TO 12\n 00030 PR I*J;\n 00040 NXT J\n :RUN\n\n 1 2 3 4 5 6 7 8 9 10 11 12\n 2 4 6 8 10 12 14 16 18 20 22 24\n 3 6 9 12 15 18 21 24 27 30 33 36\n 4 8 12 16 20 24 28 32 36 40 44 48\n 5 10 15 20 25 30 35 40 45 50 55 60\n 6 12 18 24 30 36 42 48 54 60 66 72\n 7 14 21 28 35 42 49 56 63 70 77 84\n 8 16 24 32 40 48 56 64 72 80 88 96\n 9 18 27 36 45 54 63 72 81 90 99 108\n 10 20 30 40 50 60 70 80 90 100 110 120\n 11 22 33 44 55 66 77 88 99 110 121 132\n 12 24 36 48 60 72 84 96 108 120 132 144\n\n :\n```\n\n## JavaScript Simulator\n\nIn the `js/` directory, there is a very primitive simulator of an Intel 8080\nbased computer running Tiny BASIC. You can run this in the browser by loading\nindex.html. You can also\n[access a live demo](https://ericscharff.github.io/tinybasic/js/).\n\nThe Tiny BASIC prompt is the colon `:`. Before you enter a program, you _must_\ntype `NEW` at the prompt. If you don't, entering a program line will cause Tiny\nBASIC to hang.\n\nYou'll notice several differences from other BASICs, most importantly\n\n- Instead of `PRINT` or `?` Tiny BASIC uses `PR`\n- Instead of `NEXT` in a loop, Tiny BASIC uses `NXT`\n- Instead of `LIST` to list a program, Tiny BASIC uses `LST`\n- Instead of `INPUT` to prompt for input, Tiny BASIC uses `IN`\n- Input is numeric. Complete by hitting SPACE (most BASIC dialects complete\n  input by hitting RETURN/ENTER)\n- Instead of `:` to put multiple statements on a single line, Tiny BASIC uses\n  `$`\n- Programs should be terminated with `END`\n- Only 16 bit integers are supported\n- Only one letter variable names are supported\n\n## Credits\n\nOriginal specification by Dennis Allison\n\nOriginal listing by Dick Whipple and John Arnold\n\nJavaScript 8080 emulator by Alexander Demin's\n[i8080-js](https://github.com/begoon/i8080-js)\n\nTranscribed from the original by Eric Scharff, March 2007\n\nJavaScript 8080 simulator added by Eric Scharff, March 2025\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericscharff%2Ftinybasic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericscharff%2Ftinybasic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericscharff%2Ftinybasic/lists"}