Search found 8 matches
- Tue Sep 21, 2021 4:07 pm
- Forum: Programming
- Topic: I wrote a zero page allocator for Kick Assembler.
- Replies: 6
- Views: 1175
Re: I wrote a zero page allocator for Kick Assembler.
Then don't you use macros in functions?
Actually no. Or rather, I haven't used functions at all so far, just macros.
Writing up how it works for a few real world test cases helps a great deal in understanding if it really works or where the pitfalls are.
Yes, I do TDD. I'll have to look ...
- Tue Sep 21, 2021 10:47 am
- Forum: Programming
- Topic: I wrote a zero page allocator for Kick Assembler.
- Replies: 6
- Views: 1175
Re: I wrote a zero page allocator for Kick Assembler.
fachat wrote:
It looks like you're allocating at build time, right?
fachat wrote:
How do you handle run time conflicts like one routine reusing the location reserved by another routine but calling each other?
- Mon Sep 20, 2021 10:01 pm
- Forum: Programming
- Topic: I wrote a zero page allocator for Kick Assembler.
- Replies: 6
- Views: 1175
I wrote a zero page allocator for Kick Assembler.
https://github.com/geon/zpallocator/blob/master/zpallocator.example.asm
The idea is to be able to use the zero page for all variables. You allocate a zp address when you need it, and when you are done with it (ie. at the end of the macro/function scope), you deallocate it.
// BackgroundColor ...
The idea is to be able to use the zero page for all variables. You allocate a zp address when you need it, and when you are done with it (ie. at the end of the macro/function scope), you deallocate it.
// BackgroundColor ...
- Sun Sep 19, 2021 5:16 pm
- Forum: Programming
- Topic: LLVM 6502 Codegen
- Replies: 154
- Views: 43360
Re: LLVM 6502 Codegen
It would be cleaner to have it take the exit condition back to the original != 0 check, but I'm not sure how to actually make that work. It's unlikely that I'm ever going to get *perfect* code out of LLVM, only better or worse.
Well, you can't expect a C compiler to output asm as a human would ...
Well, you can't expect a C compiler to output asm as a human would ...
- Wed Sep 15, 2021 7:36 pm
- Forum: Newbies
- Topic: Using ACME, how do I work with code in multiple files?
- Replies: 5
- Views: 1555
Re: Using ACME, how do I work with code in multiple files?
So, if file A depends on File B and C, and File B and C both depend on file D, What file should include what?
If they contain only macros, I guess they can use include guards and each file can include it's dependencies AT THE TOP, before the code using them.
But if they contain instructions or ...
If they contain only macros, I guess they can use include guards and each file can include it's dependencies AT THE TOP, before the code using them.
But if they contain instructions or ...
- Tue Sep 14, 2021 8:36 pm
- Forum: Programmable Logic
- Topic: FPGA Video Display Adapater
- Replies: 11
- Views: 3435
Re: FPGA Video Display Adapater
Is the photo of an LCD or a CRT?
- Tue Sep 14, 2021 6:09 pm
- Forum: Newbies
- Topic: Using ACME, how do I work with code in multiple files?
- Replies: 5
- Views: 1555
Using ACME, how do I work with code in multiple files?
Hi!
I want to organize my code in multiple files, and have them depend on each other.
Acme has a pseudo opcode for including source: "!src" But when including, you must be careful to JMP past the included instructions/data or include them *after* the main function entry point. But when including ...
I want to organize my code in multiple files, and have them depend on each other.
Acme has a pseudo opcode for including source: "!src" But when including, you must be careful to JMP past the included instructions/data or include them *after* the main function entry point. But when including ...
- Tue Sep 14, 2021 5:44 pm
- Forum: General Discussions
- Topic: Introduce yourself
- Replies: 716
- Views: 418556
Re: Introduce yourself
Hi!
I am trying to learn ASM on the c64, using ACME.
I'm a software developer by trade, but I do pretty much only web dev. Full stack typescript, react, graphql, postgres and all that good stuff.
Recently I wanted to get back to my roots. I grew up with a c64 in the early 90s, playing pirated ...
I am trying to learn ASM on the c64, using ACME.
I'm a software developer by trade, but I do pretty much only web dev. Full stack typescript, react, graphql, postgres and all that good stuff.
Recently I wanted to get back to my roots. I grew up with a c64 in the early 90s, playing pirated ...