{"id":13444563,"url":"https://github.com/nanochess/bootBASIC","last_synced_at":"2025-03-20T19:30:32.920Z","repository":{"id":41523149,"uuid":"199484649","full_name":"nanochess/bootBASIC","owner":"nanochess","description":"bootBASIC is a BASIC language in 512 bytes of x86 machine code.","archived":false,"fork":false,"pushed_at":"2023-02-28T17:24:36.000Z","size":32,"stargazers_count":335,"open_issues_count":1,"forks_count":27,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-02-17T06:33:26.303Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nanochess.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-07-29T15:59:33.000Z","updated_at":"2024-02-03T17:43:32.000Z","dependencies_parsed_at":"2024-01-13T16:43:36.334Z","dependency_job_id":"53f34720-01cb-44ce-8279-00fdfd3b1c73","html_url":"https://github.com/nanochess/bootBASIC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanochess%2FbootBASIC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanochess%2FbootBASIC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanochess%2FbootBASIC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanochess%2FbootBASIC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nanochess","download_url":"https://codeload.github.com/nanochess/bootBASIC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244676454,"owners_count":20491828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-07-31T04:00:30.334Z","updated_at":"2025-03-20T19:30:32.420Z","avatar_url":"https://github.com/nanochess.png","language":"Assembly","readme":" _                 _  ______  ___   _____ _____ _____ \n| |               | | | ___ \\/ _ \\ /  ___|_   _/  __ \\\n| |__   ___   ___ | |_| |_/ / /_\\ \\\\ `--.  | | | /  \\/\n| '_ \\ / _ \\ / _ \\| __| ___ \\  _  | `--. \\ | | | |    \n| |_) | (_) | (_) | |_| |_/ / | | |/\\__/ /_| |_| \\__/\\\n|_.__/ \\___/ \\___/ \\__\\____/\\_| |_/\\____/ \\___/ \\____/\n\nbootBASIC interpreter in 512 bytes (boot sector or COM file)\nby Oscar Toledo G. Jul/22/2019\n\nhttp://nanochess.org\nhttps://github.com/nanochess\n\nThis is an integer BASIC language interpreter.\n\nIt's compatible with the 8088 processor (the original IBM PC). \n\nIf you want to assemble it, you must download the Netwide Assembler\n(nasm) from www.nasm.us\n\nUse this command line:\n\n  nasm -f bin basic.asm -Dcom_file=1 -o basic.com\n  nasm -f bin basic.asm -Dcom_file=0 -o basic.img\n\nTested with VirtualBox for Mac OS X running Windows XP running this\ninterpreter, it also works with DosBox and probably with qemu:\n\n  qemu-system-x86_64 -fda basic.img\n\nEnjoy it!\n\n\n _   _             _      __  __                    _ \n| | | |___ ___ _ _( )___ |  \\/  |__ _ _ _ _  _ __ _| |\n| |_| (_-\u003c/ -_) '_|/(_-\u003c | |\\/| / _` | ' \\ || / _` | |\n \\___//__/\\___|_|   /__/ |_|  |_\\__,_|_||_\\_,_\\__,_|_|\n\n        \nLine entry is done with keyboard, finish the line with Enter.\nOnly 19 characters per line as maximum.\n        \nBackspace can be used, don't be fooled by the fact\nthat screen isn't deleted (it's all right in the buffer).\n        \nAll statements must be in lowercase.\n\nLine numbers can be 1 to 999.\n\n26 variables are available (a-z)\n\nNumbers (0-65535) can be entered and display as unsigned.\n       \nTo enter new program lines:\n  10 print \"Hello, world!\"\n        \nTo erase program lines:\n  10\n        \nTo test statements directly (interactive syntax):\n  print \"Hello, world!\"\n        \nTo erase the current program:\n  new\n        \nTo run the current program:\n  run\n        \nTo list the current program:\n  list\n        \nTo exit to command-line:\n  system\n        \nStatements:\n  var=expr        Assign expr value to var (a-z)\n        \n  print expr      Print expression value, new line\n  print expr;     Print expression value, continue\n  print \"hello\"   Print string, new line\n  print \"hello\";  Print string, continue\n        \n  input var       Input value into variable (a-z)\n        \n  goto expr       Goto to indicated line in program\n        \n  if expr1 goto expr2\n              If expr1 is non-zero then go to line,\n              else go to following line.\n        \nExamples of if:\n        \n  if c-5 goto 20  If c isn't 5, go to line 20\n        \nExpressions:\n        \n  The operators +, -, / and * are available with\n  common precedence rules and signed operation.\n  Integer-only arithmetic.\n        \n  You can also use parentheses:\n        \n     5+6*(10/2)\n        \n  Variables and numbers can be used in expressions.\n\n  The rnd function (without arguments) returns a\n  value between 0 and 255.\n        \nSample program (counting 1 to 10):\n        \n10 a=1\n20 print a\n30 a=a+1\n40 if a-11 goto 20\n        \nSample program (Pascal's triangle, each number is the sum\nof the two over it):\n        \n10 input n\n20 i=1\n30 c=1\n40 j=0\n50 t=n-i\n60 if j-t goto 80\n70 goto 110\n80 print \" \";\n90 j=j+1\n100 goto 50\n110 k=1\n120 if k-i-1 goto 140\n130 goto 190\n140 print c;\n150 c=c*(i-k)/k\n160 print \" \";\n170 k=k+1\n180 goto 120\n190 print\n200 i=i+1\n210 if i-n-1 goto 30\n\nSample program of guessing the dice:\n\n10 print \"choose \";\n20 print \"a number \";\n30 print \"(1-6)\"\n40 input a\n50 b=rnd\n60 b=b-b/6*6\n70 b=b+1\n80 if a-b goto 110\n90 print \"good\"\n100 goto 120\n110 print \"miss\"\n120 print b\n\n\n\u003e\u003e LINKS \u003c\u003c\n\nTaisuke Fukuno made a 64-bit version of bootBASIC for\nMac OS X, a small article about it is available at:\n\n    https://fukuno.jig.jp/2853\n\n  Source code:\n    https://github.com/taisukef/bootBASIC_64bit\n\ndlinyj has created a fork of bootBASIC that can run from\nthe ROM of a network card. It is available here:\n  \n    https://github.com/dlinyj/bootBASIC\n\n\n\u003e\u003e ATTENTION \u003c\u003c        \n\nDo you would like more details on the inner workings? This program\nis fully commented in my new book Programming Boot Sector Games\nand you'll also find a 8086/8088 crash course!\n\nNow available from Lulu:\n\n  Soft-cover\n    http://www.lulu.com/shop/oscar-toledo-gutierrez/programming-boot-sector-games/paperback/product-24188564.html\n\n  Hard-cover\n    http://www.lulu.com/shop/oscar-toledo-gutierrez/programming-boot-sector-games/hardcover/product-24188530.html\n\n  eBook\n    https://nanochess.org/store.html\n\nThese are some of the example programs documented profusely\nin the book:\n\n  * Guess the number.\n  * Tic-Tac-Toe game.\n  * Text graphics.\n  * Mandelbrot set.\n  * F-Bird game.\n  * Invaders game.\n  * Pillman game.\n  * Toledo Atomchess.\n  * bootBASIC language.\n\n","funding_links":[],"categories":["Assembly","Dialects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanochess%2FbootBASIC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanochess%2FbootBASIC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanochess%2FbootBASIC/lists"}