Coder Social home page Coder Social logo

5200bas_python's People

Contributors

james7780 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

scuttle130

5200bas_python's Issues

File Not Found Error

Thank you so much for creating a compiler to use 5200bas for MacOS! Below is error message I am getting from trying to compile the basic hello.bas file. Can you help me with what I might be doing wrong? I included an "ls" of all the files in the main directory. Thank you!

(base) Montos-MacBook-Air:5200BAS_python-master monto$ ls
5200BAS possible improvements.txt basic documentation
5200bas-sources.zip dasm.exe
5200bask.bas examples
5200bask.py go.bat
5200basl.bas hello.bas
5200basl.py helloworld.bas
ASCIISET.INC inc
EQUATES.INC pm.bas
HEADER.INC readme.txt
How it works.txt
(base) Montos-MacBook-Air:5200BAS_python-master monto$ python 5200basl.py /D hello.bas
5200BAS Basic Compiler, version 1.97. Copyright 2001-2002 by Jeffry Johnston.

Compiling 32k ROM for DASM 2.12
Input file : hello.bas
Output file : hello.ASM
Pre-include : hello.2
Post-include: hello.1
Traceback (most recent call last):
File "/Users/monto/Downloads/5200BAS_python-master/5200basl.py", line 2523, in
result, asmFileName = main(args)
File "/Users/monto/Downloads/5200BAS_python-master/5200basl.py", line 198, in main
inFile = open(inFileName, 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'hello.bas '
(base) Montos-MacBook-Air:5200BAS_python-master monto$

No such file "INC\\KEYPAD.INC"

You were right about the extra space. For some reason, on line 127 args.rstrip() did not actually strip the last space. I added

args = args.strip(" “)

on line 155, but it found another problem. There is a double “\” to dive into the inc directory and so the program can’t find the second directory. I tried deleting a “\” from lines

2415 (maybe 2414)
fileName = "INC\\" + fileName + ".INC"

and line 2464 (maybe 2463)
print ("Invalid include expression in INC\\", sFILENAME, ".INC")

and it caused the following error:
(base) Montos-MacBook-Air:5200BAS_python-master monto$ python3 5200basl.py /16 /D hello
File "/Users/monto/Downloads/5200BAS_python-master/5200basl.py", line 2415
fileName = "INC" + fileName + ".INC"
^
SyntaxError: EOL while scanning string literal
(base) Montos-MacBook-Air:5200BAS_python-master monto$

but with the double slash:
(base) Montos-MacBook-Air:5200BAS_python-master monto$ python3 5200basl.py /16 /D hello
5200BAS Basic Compiler, version 1.97. Copyright 2001-2002 by Jeffry Johnston.

Compiling 16k ROM for DASM 2.12
Input file : hello.BAS
Output file : hello.ASM
Pre-include : hello.2
Post-include: hello.1
PARSING 2: TITLE "joystick test"
PARSING 4: AUTHOR " (C) ANON 2112 "
PARSING 7: CLS
PARSING 8: PRINT "Hello World!"
Traceback (most recent call last):
File "/Users/monto/Downloads/5200BAS_python-master/5200basl.py", line 2525, in
result, asmFileName = main(args)
File "/Users/monto/Downloads/5200BAS_python-master/5200basl.py", line 485, in main
INCLUDEASM("KEYPAD") # KEYPAD
File "/Users/monto/Downloads/5200BAS_python-master/5200basl.py", line 2484, in INCLUDEASM
INCLUDEFILE(includeName)
File "/Users/monto/Downloads/5200BAS_python-master/5200basl.py", line 2418, in INCLUDEFILE
file = open(fileName, 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'INC\\KEYPAD.INC'
(base) Montos-MacBook-Air:5200BAS_python-master monto$

DASM on MacOS

Not sure if its because the dasm included in the directory is a .exe file, and .exe files don't work on Mac, but it seems when it tries to execute this line, it errors out. BUT!!! It creates the .asm file. If you have dasm installed on your Mac already, and run the line 5200bas is trying to run "dasm hello.asm -f3 -ohello.bin" dasm will create the hello.bin file as its supposed too. But it gives the following error:

hello.asm (100): error: Multi-line comment closed without open.

Unrecoverable error(s) in pass, aborting assembly!
Complete. (5)

BUT!!! Don't worry about that...it creates the hello.bin file anyways! Which is the file you need to run on your 5200 emulator (like Jum52), and it runs JUST FINE!!!!

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.