inkboxsoftware / excelcpu Goto Github PK
View Code? Open in Web Editor NEW16-bit CPU for Excel, and related files
License: Creative Commons Zero v1.0 Universal
16-bit CPU for Excel, and related files
License: Creative Commons Zero v1.0 Universal
I can't find out what is wrong with this code. Can anyone help?
base_price = input("Enter cart total: ")
percent_discount = base_price - base_price * .15
fixed_discount = base_price - 12
final_price = min(fixed_discount, percent_discount)
print("Your best price is $" + final_price)
https://github.com/microsoft/MS-DOS/tree/master
Asm source publicly available.
Need to translate MS-DOS from asm to excel-asm16.
This "translator" would in theory allow any 16bit asm application to run.
I'd like to request an Excel file to do the compiling instead of the Python script.
And thank you for this project! Very interesting!
Basically adding support for calling functions.
Jump with return pushes the PC to the stack(whether accessible elsewhere or not) and jumps.
Return pops the value from the stack and jumps to this value.
Did you try running doom on it yet?
my steps:
on ubuntu
In compileExcelASM16.py, line 286 has a confusing not(line[1][0]) == line[2][0]
, though in fact it means not line[1][0] == line[2][0]
and makes sense. For clarity, it is better to use line[2][0] != "R"
or not(line[1][0] == line[2][0])
consistent with line 293, to make the code more understandable and maintainable.
Here is the unmodified snippet:
283 elif (opcode == "ROL"):
284 if (not(len(line) == 3)):
285 syntaxError(lineNumber)
286 if (not(line[1][0]) == line[2][0] and line[1][0] == "R"):
287 operand0 = int("1300", 16) + (parseNumber(line[1], lineNumber) * 16) + parseNumber(line[2], lineNumber)
288 else:
289 syntaxError(lineNumber)
290 elif (opcode == "ROR"):
291 if (not(len(line) == 3)):
292 syntaxError(lineNumber)
293 if (not(line[1][0] == line[2][0]) and line[1][0] == "R"):
294 operand0 = int("1400", 16) + (parseNumber(line[1], lineNumber) * 16) + parseNumber(line[2], lineNumber)
295 else:
296 syntaxError(lineNumber)
By the way, line 48 (varUseError message) should print both varName and lineNumber in my understanding, but it receives varName and prints lineNumber now.
47 def varUseError(varName):
48 print(RED + "\tVariable cannot be used like label, var: " + str(lineNumber) + ENDCOLOR)
49 compileResults()
Thanks for your reading.
After compiled bouncingBall.s , I use WPS or office2016 Microsoft Excel open CPU.xlsx and change "read ROM" , and use F9 key, but CPU.xlsx can not change Secreen area. what's wrong?
Are there any plans for including OpenDocument Spreadsheet support in the future? If not, would contributions achieving that goal be accepted?
I'm planning on working on OpenDocument Spreadsheet support myself sometime later in the year โ probably during the summer โ and would like to know if that would be welcome upstream. If not, that's fine too.
At any rate, thank you for making your project public and have a nice day!
In case you were wondering, yes, I use Linux.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.