{"id":19399654,"url":"https://github.com/ksherlock/mdbasicxx","last_synced_at":"2026-07-03T09:39:57.979Z","repository":{"id":145892501,"uuid":"99177296","full_name":"ksherlock/mdbasicxx","owner":"ksherlock","description":"MD-BASIC++","archived":false,"fork":false,"pushed_at":"2026-03-04T23:46:08.000Z","size":46,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-23T20:30:59.665Z","etag":null,"topics":["appleii","applesoft","basic","mdbasic"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/ksherlock.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}},"created_at":"2017-08-03T01:35:47.000Z","updated_at":"2026-03-04T23:46:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2c7cf14-9ab6-4a1b-8381-601e410a96a7","html_url":"https://github.com/ksherlock/mdbasicxx","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ksherlock/mdbasicxx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksherlock%2Fmdbasicxx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksherlock%2Fmdbasicxx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksherlock%2Fmdbasicxx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksherlock%2Fmdbasicxx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksherlock","download_url":"https://codeload.github.com/ksherlock/mdbasicxx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksherlock%2Fmdbasicxx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35081254,"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-03T02:00:05.635Z","response_time":110,"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":["appleii","applesoft","basic","mdbasic"],"created_at":"2024-11-10T11:10:45.871Z","updated_at":"2026-07-03T09:39:57.973Z","avatar_url":"https://github.com/ksherlock.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MD-BASIC++\n\nA pre-processor for MD-BASIC.\n\n## Roadmap:\n\n\n### Mini Assembler\n\nGenerates appropriate `DATA` or `\u0026 POKE` (AmperWorks) statements.\nIt can also generate a binary payload appended to the end of the file\n(`.inline`).  In inline mode, `.org` is not allowed (or necessary); the\norg will be calculated based on the file size.\n\n\n#### Example\n\ninput:\n\n    function1:\n        for i = F_START to F_END\n            read x\n            poke i,x\n        next i\n        call $300\n        return\n    #asm\n            .org $300\n            .export f_start, f_end\n    f_start\n            lda #0\n            rts\n    f_end   .equ *-1\n    #endasm\n    \n    function2:\n    #asm\n            .org $300\n            .poke\n    \n            lda #0\n            rts\n    \n    #endasm\n        call $300\n        return\n\noutput (before MD-BASIC):\n\n    ' generated by mdbasic++ 0.0.3\n    #define __MDBASICXX__\n    #define __DATE__ \"Aug 11 2017\"\n    #define __TIME__ \"23:38:14\"\n    #define F_START 768\n    #define F_END 770\n    \n    function1:\n        for i = F_START to F_END\n            read x\n            poke i,x\n        next i\n        call $300\n        return\n        DATA 169,0,96\n    \n    function2:\n        \u0026 POKE 768,169,0,96\n        call $300\n        return\n\n\noutput (after MD-BASIC):\n\n    1  FOR A = 768 TO 770: READ B: POKE A,B: NEXT A: CALL 768: RETURN : DATA 169,0,96\n    2  \u0026  POKE 768,169,0,96: CALL 768: RETURN \n\n\n#### Directives\n\n            .machine    [6502 | 65c02 | 65816]      ; specify machine (default 6502)\n            .org        expr                        ; set origin\n            .long       [mx]                        ; '816 - assume long m or x\n            .short      [mx]                        ; '816 - assume short m or x\n            .data                                   ; use DATA (default)\n            .poke                                   ; use \u0026 POKE\n            .inline                                 ; generate a binary blob at the end of file\n    label   .equ        expr\n            .export     label [, label ...]         ; export label (as #define)\n    label   .export                                 ; define and export label\n\n\n##### Data Directives\n\n            .db         expr [, expr ...]           ; 8-bit data\n            .dw         expr [, expr ...]           ; 16-bit data\n            .da         expr [, expr ...]           ; 24-bit data\n            .dl         expr [, expr ...]           ; 32-bit data\n\n            .dci        string [, string ...]       ; dextral character inverted string\n            .str        string [, string ...]       ; string\n            .pstr       string [, string ...]       ; pascal string\n\n_n.b._: `.str`, `.pstr`, and `.dci` accept a list of strings (\"like this\",'or this') or expressions (which will generate bytes).\nFor `.pstr`, the length prefix is the length of all strings and expressions.  For `.dci`, only the last byte of the last string\n(or expression) is inverted.\n\n\n#### Address Modes\n\n`\u003c`, `|`, and `\u003e` are address mode selectors, not unary operators.  If no address mode is explicitly\nspecified, the Mini Assembler will default to absolute address mode.  If the operand size can be\ndetermined (i.e., an integer constant or symbol value is known), it will default to zp, absolute, or\nabsolute long based on the operand size.\n\n\n#### Expressions\n##### Terminals\n\n            {basic-expression}                      ; inserted as-is. only valid with .poke\n            symbol                                  ; symbol\n            %10                                     ; binary integer\n            10                                      ; decimal integer\n            $10                                     ; hexadecimal integer\n            0x10                                    ; hexadecimal integer\n            '10'                                    ; low-ascii string (or character constant)\n            \"10\"                                    ; high-ascii string (or character constant)\n\n##### Unary Operators\n\n            + - ^ ~\n\n_n.b._: Unary ^ is right shift 16.\n\n##### Binary Operators\n\n            + - * / % \u0026 | ^ \u003e\u003e \u003c\u003c\n\n_n.b._: Binary operations use same precedence as `C`. Parenthesis are not supported within expressions.\n\n\n\n\n\n\n\n### More command-line flags\n\n    -D macroname[=value]             Define a macro\n    -E                               Pre-processor only\n    -S                               Decompile generated code\n    -I directory                     Specify include path (not yet ....)\n    -o outfile                       Specify outfile\n    -O level                         Specify optimization level (0,1,2)\n    -v, --verbose                    Be verbose\n    -V, --version                    Display version\n        --[no-]declare               Require declarations\n        --[no-]progress              Print progress\n        --[no-]summary               Print summary\n        --[no-]xref                  Print Cross References\n    -h, --help                       Display help information\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksherlock%2Fmdbasicxx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksherlock%2Fmdbasicxx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksherlock%2Fmdbasicxx/lists"}