-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support more of the C++11 library #52
Labels
Comments
I assume you mean https://github.com/lefticus/6502-cpp/blob/master/examples/pong.cpp After:
I get:
|
pfusik
added a commit
to pfusik/llvm-mos-sdk
that referenced
this issue
Dec 18, 2022
asiekierka
pushed a commit
to asiekierka/llvm-mos-sdk
that referenced
this issue
Jun 29, 2023
…lvm-mos#95) * Add partial implementations of <algorithm>, <array>, <iterator>, <utility> See llvm-mos#52. * Avoid #pragma once.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may be familiar with the CppCon 2016 talk "Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17".
The "compiler" implementation was a hack: letting
clang
translate to IA-32, and then translating a very small subset of IA-32 code to 6502 (while wrongly assuming that IA-32 is an 8-bit processor). Not all registers were supported, nor were function calls, if I remember correctly. The main point was to demonstrate that modern C++ allows zero-overhead abstraction, that is, lots of things can be evaluated at compilation time.In the video, there was one problem that my very first pull request lefticus/6502-cpp#2 addressed, by implementing
constexpr
constructors for sprite data.It would be great if the
pong.cpp
could be compiled onllvm-mos-sdk
with minimal source code modification. Currently, the compilation would fail like this:The
std::array
is only used for something during compilation time; in the object code, you would only see some immediate loads followed bysta
,stx
orsty
to some VIC-II registers between0xd020
and0xd02e
.The text was updated successfully, but these errors were encountered: