{"id":50779960,"url":"https://github.com/picocomputer/msbasic","last_synced_at":"2026-06-12T02:30:40.264Z","repository":{"id":356158362,"uuid":"1223071924","full_name":"picocomputer/msbasic","owner":"picocomputer","description":"Microsoft BASIC for the Picocomputer 6502","archived":false,"fork":false,"pushed_at":"2026-06-11T07:47:57.000Z","size":131,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T09:22:32.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","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/picocomputer.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":"2026-04-28T01:34:39.000Z","updated_at":"2026-06-11T07:48:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/picocomputer/msbasic","commit_stats":null,"previous_names":["picocomputer/msbasic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/picocomputer/msbasic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picocomputer%2Fmsbasic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picocomputer%2Fmsbasic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picocomputer%2Fmsbasic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picocomputer%2Fmsbasic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picocomputer","download_url":"https://codeload.github.com/picocomputer/msbasic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picocomputer%2Fmsbasic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34226629,"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-06-12T02:00:06.859Z","response_time":109,"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":[],"created_at":"2026-06-12T02:30:39.580Z","updated_at":"2026-06-12T02:30:40.260Z","avatar_url":"https://github.com/picocomputer.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microsoft BASIC for the Picocomputer 6502\n\n - `INSTALL basic.rp6502` then `HELP basic` for usage.\n - `INFO basic.rp6502` for usage without installing.\n\nOriginal source: https://github.com/microsoft/BASIC-M6502\n\u003cbr/\u003e\nPorted to cc65: https://github.com/mist64/msbasic\n\n## Launch arguments\n\n```\nbasic [-c0|-c1|-c2] [\u003cfilename\u003e]\n```\n\n| Flag       | Effect                                                      |\n| ---------- | ----------------------------------------------------------- |\n| `-c0`      | Caps mode off — characters echo as typed                    |\n| `-c1`      | Caps mode on (default) — letters always upper case          |\n| `-c2`      | Caps mode invert — swap upper/lower case                    |\n| `\u003cname\u003e`   | Auto-`LOAD` the file, then `RUN` it                         |\n\nThe same modes are reachable at runtime via `CAPS \u003cexpr\u003e`.\n\n## File I/O\n\nUp to sixteen files may be open at once. Logical file numbers (lfn) are integers in the range `0..15`.\n\n```basic\nOPEN \u003clfn\u003e, \u003cname$\u003e [, \u003cmode$\u003e]\nCLOSE \u003clfn\u003e\n```\n\n`\u003cmode$\u003e` is a Unix-style string. If omitted, the default is `\"r\"`.\n\n| Mode      | Flags                          |\n| --------- | ------------------------------ |\n| `\"r\"`     | read-only (default)            |\n| `\"w\"`     | write, create, truncate        |\n| `\"a\"`     | write, create, append          |\n| `\"rw\"` / `\"r+\"` | read/write                |\n| `\"w+\"`    | read/write, create, truncate   |\n| `\"a+\"`    | read/write, create, append     |\n\nOnce a file is open, the lfn drives I/O redirection on CBM-style statements:\n\n```basic\nPRINT# \u003clfn\u003e, \u003cexpr-list\u003e      : write to the file\nINPUT# \u003clfn\u003e, \u003cvar-list\u003e       : read from the file (newline-delimited)\nGET#   \u003clfn\u003e, \u003cvar\u003e            : read one byte from the file\nCMD    \u003clfn\u003e [, \u003cexpr-list\u003e]   : redirect subsequent PRINT output\n```\n\nReads return EOF when the OS returns fewer bytes than requested. `INPUT#` then bails cleanly to the caller; `GET#` simply returns an empty value, so polling a pipe in BASIC is a normal `GET#` loop.\n\n`LOAD` and `SAVE` operate on plain ASCII — the same byte stream `LIST` emits — so program files are interchangeable with anything that produces text:\n\n```basic\nSAVE \"prog.bas\"\nLOAD \"prog.bas\"\n```\n\n`SAVE` always overwrites; `LOAD` replaces the program in memory.\n\n## Other statements\n\n```basic\nCAPS \u003cexpr\u003e\n```\n\nSets the readline editor's caps mode at runtime: `0` off, `1` on, `2` invert. Same modes as the `-c\u003cn\u003e` launch flag.\n\n## Time functions\n\n```basic\nCLOCK(\u003cexpr\u003e)\nTIME$(\u003cformat$\u003e)\n```\n\n`CLOCK(0)` returns seconds since reset as a float with 0.001s resolution. The argument is evaluated and discarded.\n\n`TIME$(f$)` returns the local time formatted by the OS's `strftime`, e.g. `TIME$(\"%\"+CHR$(99))` for `\"%c\"`. The format string is passed to `strftime` unchanged, and its specifiers are case-sensitive.\n\n## Editor and runtime conveniences\n\n - `CTRL-C` interrupts a running program or `LIST`.\n - Type a line number then press `TAB` to recall that line into the editor for in-place editing.\n - Keywords and variable names may be entered in lower case; they are normalized for tokenization and listing.\n - `RND()` is seeded with hardware entropy at cold start, so `RND` produces a different sequence on each boot without needing a manual seed.\n - `CTRL-ALT-DEL` (or `BREAK`) drops to the RP6502 monitor — useful for listing/changing directories or managing files. Type `RESET` at the monitor prompt to warm-start the interpreter while preserving program memory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicocomputer%2Fmsbasic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicocomputer%2Fmsbasic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicocomputer%2Fmsbasic/lists"}