GithubHelp home page GithubHelp logo

aouwt / stupidc Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 65 KB

Stupid programming language that vaguely resembles C and compiles directly to 6502 assembly

VBA 75.44% Scala 15.69% Assembly 4.01% SuperCollider 4.77% Makefile 0.10%
quickbasic esoteric 6502 programming-language stupid vbdos

stupidc's Introduction

stupidc

stupid programming language that vaguely resembles C and compiles directly to 6502 assembly

compiling

open MAIN.MAK in QB71 or VB for DOS and press F5. it is important that you use QBX or VB4DOS; it cannot run in QBasic, QB45, or QB64 due to issues with UDTs. it also cannot run in any other versions of VisualBasic because they are completely different languages (confusing, right?)

code structures

everything is pretty straightfoward, really. it's organized like this:

  • MAIN.BAS is the main module. it has the parser and controls everything
    • COMMON.BI is the declarations for the common variables and subs. it MUST be INCLUDEd into EVERY module
    • SETUP.BI sets up all the variables, arrays, and parses the command-line options. I used it as an INCLUDE because it makes it neater, and makes it separate from the actual compiler. for ...reasons it also has all the INCLUDE and DECLARE statements for the main module
    • DEFAULTS.BI is the configuration for the compiler. nothing important, really.
  • SCS.BAS is the module that handles parsing SCS files. pretty straightfoward.
  • SCMODS.BAS is the stupidc "modules," as i like to call them. they are the things that turn the commands in the inputted program (after they're parsed) and outputs assembly code
    • SCMODS.BI is to be deleted later, the SUBs used in SCMODS.BAS aren't needed outside it except for ModRun.R and ModRun.F

keep in mind that this is supposed to run in a DOS enviroment, so filenames should keep to the limitations of most DOS enviroments: no special charaters, no_spaces, 8.3 filenames, and UPPERCASE only. the only exception to this is the .git folder (i think it's case-sensitive, but i need to check that) and .gitignore, but you really shouldn't be editing those from DOS.

sample programs

doesnt work quite yet but you can find samples in the SAMPLES folder. (i know they're labled as Scala programs, but 'cmon, what other extension should i have chosen?)

stupidc's People

Contributors

aouwt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

stupidc's Issues

Change extensions

So that GH doesnt show the wrong languages (shows up as a scala repository lol)

This is mostly a note to self though

  • stupidc programs: stc stu
  • stupidc system definitions: sys sts
  • cant do anything for .BAS and .MAK tho

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.