Search found 1264 matches

by pixel
Mon Apr 22, 2024 12:52 pm
Forum: Emulation and Cross Development
Topic: Small-C running on the VIC – here's how
Replies: 6
Views: 205

Re: Small-C running on the VIC – here's how

Good old Dr Dobbs Small-C! A port from a BBC version seems a good fit for the VIC20 - both 32K in normal max memory config. But what you are trying to do is ambitious. Would it also compile on a PC so it can act as a cross compiler? Back in the day, in early BYTE magazines Small-C was advertised by...
by pixel
Mon Apr 22, 2024 6:21 am
Forum: Emulation and Cross Development
Topic: Small-C running on the VIC – here's how
Replies: 6
Views: 205

Re: Small-C running on the VIC – here's how

Oh dude. What a heritage tree. Makes it hard to apply a version number. One repo with all versions in it should be least one could do about it. Could just happen in a minute (minutes v1.0). The BBC thing seems to have very, very useful additions that are dearly missing in the VIC version. * Separate...
by pixel
Sun Apr 21, 2024 4:40 pm
Forum: Emulation and Cross Development
Topic: Small-C running on the VIC – here's how
Replies: 6
Views: 205

Re: Small-C running on the VIC – here's how

You could just port the atari version (which later became cc65) :) News to me. Also just found David Wheeler's 6502 language page which has "news". https://dwheeler.com/6502/ But take a look at this: small-cir2txt.png The tiny C fragment got compiled to byte code at the bottom which the '...
by pixel
Sun Apr 21, 2024 4:39 am
Forum: Emulation and Cross Development
Topic: Small-C running on the VIC – here's how
Replies: 6
Views: 205

Re: Small-C running on the VIC – here's how

Kay. Now it is generating some IR/object kind of thingy. 76 virtual instructions now need to get translated to tested assembly macros. A direct translation to machine code would basically make a linker. That's a hell of a lot of test cases, ideal to be eaten away in small increments as a hobby proje...
by pixel
Sun Apr 21, 2024 4:26 am
Forum: Programming
Topic: Unixoid VIC
Replies: 22
Views: 1536

Re: Unixoid VIC

Happily crashing along while progressing. Found some pleasure in writing docs and am developing a habit of having BLOG files in projects instead of spoiling boards. ;) Found a book about "systems programming" last night, documenting some University lecture. Didn't know its there. But: ther...
by pixel
Sat Apr 20, 2024 12:50 pm
Forum: Emulation and Cross Development
Topic: Small-C running on the VIC – here's how
Replies: 6
Views: 205

Small-C running on the VIC – here's how

Small-C ran on the Intel 8080, 8085, 6809, 68000, VAX and I might be missing one or two other CPUs. It can handle a subset of the C programming language, but the best part of it all: that subset is powerful enough to have Small-C compile itself. That's what I want on the VIC. I have refurbished the ...
by pixel
Fri Apr 19, 2024 10:49 am
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

Pfff. Beginners. My 6502 assembler https://github.com/SvenMichaelKlose/TMA/tree/master/EXAMPLES/GENESIS written with my self-hosting x86 assembler https://github.com/SvenMichaelKlose/TMA . 8) EDIT: Just remembered my first 8086 assembler: it was written in gwbasic on an IBM-XT. The "assembler&q...
by pixel
Fri Apr 19, 2024 8:23 am
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

scc-6502.png
SmallC with 6502 backend using assembly macros but with no optimization whatsoever.
by pixel
Fri Apr 19, 2024 2:15 am
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

groepaz wrote: Thu Apr 18, 2024 2:53 pm Yeah good luck :) What makes cc65 strong is the library and its ecosystem anyway, and if you rely on the optimizer of a 8bit compiler, you are doing it wrong :)
:D No, I mean 'lcc' is worth a look if interested in compiler design. I'd port Small-C to run natively if I could (for TUNIX).
by pixel
Thu Apr 18, 2024 2:48 pm
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

cc65 cant really do more than it does now (peephole optimizations) - it has to be rewritten to use an IR first - acqn has been working on it iirc, check his repos There's just so much stuff that should've never been written manually, it looks easier to port lcc to 6502 (Latest version is worth a lo...
by pixel
Thu Apr 18, 2024 12:43 pm
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

What i i really would like to see would be something similar, which can suggest alternative instructions (ie undocumented opcodes) for certain code sequences - because those things are often not obvious. That would even be nice without undocumented ones. I'd break them down into a bit-level IR and ...
by pixel
Wed Apr 17, 2024 2:24 pm
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

orac81 wrote: Wed Apr 17, 2024 5:48 am As a side note, the 6502 lacks a really good optimising C compiler , particularly for byte manipulation, nice as cc65 is..
There's a LLVM with 6502 target but lacking a stdlib AFAIR.
by pixel
Wed Apr 17, 2024 2:45 am
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

wimoos wrote: Wed Apr 17, 2024 1:41 am If I can make a suggestion for a "new" assembler: why not one that optimizes automatically ?
Very good idea. Would be quite a win when using lots of macros.
by pixel
Tue Apr 16, 2024 4:12 pm
Forum: Programming
Topic: Unixoid VIC
Replies: 22
Views: 1536

Re: Unixoid VIC

tunix-userlandtest.png
(VIC with switcheritis.)

Still not stable enough for the console switcher.
by pixel
Tue Apr 16, 2024 9:58 am
Forum: Emulation and Cross Development
Topic: ASM502 - a new 6502 assembler.. (WIP)
Replies: 22
Views: 625

Re: ASM502 - a new 6502 assembler.. (WIP)

You're right. There are enough assemblers nobody uses already. ;) I like it for being small and written in C. And the parsing part with expressions. What I do not like is that the code *looks* unstructured and could be readable better (after a treatment with dos2unix and "indent -kr -i4")....