All Projects → udhos → basgo

udhos / basgo

Licence: MIT License
basgo compiles BASIC-lang to Golang. Then 'go build' can translate code to native executable binary.

Programming Languages

go
31211 projects - #10 most used programming language
Yacc
648 projects
basic
69 projects

Projects that are alternatives of or similar to basgo

Nexe
🎉 create a single executable out of your node.js apps
Stars: ✭ 10,565 (+33980.65%)
Mutual labels:  binary, executable
Cs2cpp
C# to C++ transpiler (Cs2Cpp) (Powered by Roslyn)
Stars: ✭ 155 (+400%)
Mutual labels:  native, binary
Nar
node.js application archive - create self-contained binary like executable applications that are ready to ship and run
Stars: ✭ 428 (+1280.65%)
Mutual labels:  binary, executable
HatVenom
HatVenom is a HatSploit native powerful payload generation tool that provides support for all common platforms and architectures.
Stars: ✭ 84 (+170.97%)
Mutual labels:  binary, executable
mem64
Run Any Native PE file as a memory ONLY Payload , most likely as a shellcode using hta attack vector which interacts with Powershell.
Stars: ✭ 26 (-16.13%)
Mutual labels:  native, executable
lookpath
The minimum and most straightforward way to check if command exists and where the executable is, without spawning child_process.
Stars: ✭ 49 (+58.06%)
Mutual labels:  binary, executable
ezinject
Modular binary injection framework, successor of libhooker
Stars: ✭ 47 (+51.61%)
Mutual labels:  native, binary
parcl
Gradle plugin for bundling your Java application for distribution on Windows, Mac and Linux
Stars: ✭ 52 (+67.74%)
Mutual labels:  native, executable
wasm-joey
Serverless Wasm - A lightweight Node.js application for deploying and executing WebAssembly(Wasm) binary-code via HTTP
Stars: ✭ 48 (+54.84%)
Mutual labels:  binary, executable
xbedump
Tool to dump header information or sign original Xbox executables
Stars: ✭ 18 (-41.94%)
Mutual labels:  binary, executable
get-bin-path
Get the current package's binary path
Stars: ✭ 25 (-19.35%)
Mutual labels:  binary, executable
ELFDump
ELFDump is a C parser for ELF64 object files.
Stars: ✭ 15 (-51.61%)
Mutual labels:  binary, executable
hs-packer
Fast serialization in haskell
Stars: ✭ 13 (-58.06%)
Mutual labels:  binary
mdict
node.js mdict (*.mdx, *.mdd) file reader
Stars: ✭ 39 (+25.81%)
Mutual labels:  binary
mjuzik
Curated Music app build on React Native
Stars: ✭ 44 (+41.94%)
Mutual labels:  native
titanium-arkit
Use the iOS 11 ARKit API in Axway Titanium
Stars: ✭ 28 (-9.68%)
Mutual labels:  native
xgadget
Fast, parallel, cross-variant ROP/JOP gadget search for x86/x64 binaries.
Stars: ✭ 33 (+6.45%)
Mutual labels:  binary
react-tinder-card
A npm react module for making react elements swipeable like in the dating app tinder.
Stars: ✭ 184 (+493.55%)
Mutual labels:  native
Multiplatform-LiveData
Multiplatorm implementation of LiveDatas / MVVM in kotlin android & native ios
Stars: ✭ 95 (+206.45%)
Mutual labels:  native
IPC.Bond
IPC.Bond is an extension of IPC library that provides inter-process communication using shared memory on Windows with Bond serialization.
Stars: ✭ 26 (-16.13%)
Mutual labels:  native

license Go Report Card

basgo compiles BASIC-lang to Golang.

basgo compiles BASIC-lang to Golang. Then go build can translate the code to native executable binary.

Created by gh-md-toc

Requirements

In order to build the 'basgo-build' compiler, a recent version of Go is required.

If your system lacks Go, this recipe will install a current release of Go:

git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh

For Windows systems, get the Go installer here: https://golang.org/dl/

Version 0.5 requires GCC

Versions up to 0.4 of 'basgo-build' compiler did not require GCC.

In version 0.5 the experimental support for graphics introduced GCC as requirement.

Windows

If you want to run the basgo compiler on Windows, see the file README-windows.md.

Install git for Windows

https://gitforwindows.org/

Install mingw64 to provide GCC for Windows

This is a quick recipe on how to install mingw64 on Windows.

  • Download x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0.7z from:

https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/sjlj/x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0.7z

  • Extract the folder 'mingw64' as c:\mingw64

  • Add c:\mingw64\bin to %PATH%

  • Test GCC:

Open CMD.exe and run 'gcc --version':

C:\Users\evert>gcc --version
gcc (x86_64-posix-sjlj-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


C:\Users\evert>

Install

If you don't want to hack the compiler, you can download a precompiled binary release here:

https://github.com/udhos/basgo/releases

Install only the 'basgo-build' compiler

The recipe below will install 'basgo-build' under "~/go/bin".

# if you don't have goyacc yet
go get -d modernc.org/goyacc         ;# if Go < 1.17
go install modernc.org/goyacc@latest ;# if Go >= 1.17

git clone https://github.com/udhos/basgo
cd basgo
go generate ./basparser
go install ./basgo-build

Full install for development

If you want to hack the compiler, perform a full build (including tests):

git clone https://github.com/udhos/basgo
cd basgo
./build.sh

Run the Compiler

Run the script 'basc'

The utility 'basc' performs the full compilation steps automatically:

# On Linux
echo '10 print "hello world"' > hello.bas
basc hello.bas                            ;# compile hello.bas to ./hello/hello
./hello/hello                             ;# execute the resulting binary

rem On Windows
echo 10 print "hello world" > hello.bas
basc hello.bas                            ;# compile hello.bas to .\hello\hello.exe
.\hello\hello                             ;# execute the resulting binary

Run the compiler manually

basgo-build < program.bas > program.go
go run program.go                      ;# builds and runs program.go

Status and Limitations

The compiler currently can handle many simple programs.

Limitations include lack of support for sound, graphics and hardware-specific instructions (POKE, PEEK, etc).

See also known issues: https://github.com/udhos/basgo/issues

Example

basgo-build < examples/game.bas > game.go
go run game.go                            ;# builds and runs game.go

Sample - Hello World

$ echo '10 print "hello world!"' | basgo-build > a.go
$
$ go run a.go
hello world!
$

Use _GOFUNC to call Go function from BASIC code

_GOFUNC() is a BASIC keyword introduced by the 'basgo' compiler in order to call a Go function from BASIC code.

10 result = _GOFUNC("func_name", arg1, arg2, ..., argN)
20 print result

See gofunc

Run the Interpreter

Status: the interpreter currently can only parse simple programs, but is unable to execute anything.

# interpreter interactively reads from stdin
basgo-run

BASIC References

BASIC programs and games

https://www.completelyfreesoftware.com/old_games.html - A Collection Of 1980s Games

http://www.dunnington.info/public/startrek/index.html - Star Trek

https://sparcie.wordpress.com/tag/gwbasic/ - Few GW-BASIC games

http://www.eddiesegoura.com/Games/ - BASIC Games

http://peyre.x10.mx/GWBASIC/ - A page about GWBASIC Games & Other Programs

http://www.ifarchive.org/indexes/if-archive/games/source/basic/

http://www.moorecad.com/classicbasic/index.html - Classic Basic Games Page

http://www.classicbasicgames.org/ - Classic BASIC Games

http://www.vintage-basic.net/games.html - BASIC Computer Games

BASIC documentation

https://hwiegman.home.xs4all.nl/gw-man/ - GW-BASIC User's Guide

http://www.antonis.de/qbebooks/gwbasman/ - GW-BASIC User's Guide

http://www.antonis.de/qbebooks/gwbasman/chapter%206.html - Operators

https://robhagemans.github.io/pcbasic/doc/1.2/#guide - Language Guide

http://www.worldofspectrum.org/ZXBasicManual/ - SINCLAIR ZX SPECTRUM - BASIC Programming

BASIC interpreters and compilers

https://github.com/robhagemans/pcbasic - GW-BASIC emulator

https://github.com/skx/gobasic/ - BASIC interpreter in Golang

2D Graphics Packages

https://github.com/fyne-io/fyne - UI toolkit

https://github.com/faiface/pixel - 2D game library

https://github.com/fogleman/gg - 2D rendering only, does not send to screen

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].