nrw.social ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Wir sind eine freundliche Mastodon Instanz aus Nordrhein-Westfalen. Ob NRW'ler oder NRW-Sympathifanten, jeder ist hier willkommen.

Serverstatistik:

2,8 Tsd.
aktive Profile

#V80

0 Beiträge0 Beteiligte0 Beiträge heute
Kroc Camen<p>I feel like a madman -- my <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> assembler, <a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a>, assembles itself! This is it doing so on an <a href="https://oldbytes.space/tags/Amstrad" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Amstrad</span></a> <a href="https://oldbytes.space/tags/PCW" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PCW</span></a> emulator, a <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> CP/M machine from 1985. It's not optimised for speed on original hardware -- over 50% of the runtime will be just echoing text (thanks, CP/M) and I'm surprised by the amount of heap data needed in the end, but we are talking 335 KB of source code (8KB binary), and I can look into that</p><p><a href="https://github.com/kroc/v80" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/kroc/v80</span><span class="invisible"></span></a></p><p><a href="https://oldbytes.space/tags/asm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asm</span></a> <a href="https://oldbytes.space/tags/retrocomputing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retrocomputing</span></a></p>
Kroc Camen<p><a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> is released! I spent six months writing a <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> assembler... in z80! <a href="https://github.com/kroc/v80" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/kroc/v80</span><span class="invisible"></span></a></p><p>Why? Because I see too much 8-bit software on GitHub that requires a PC toolchain to build -- if a computer can't produce and deploy its own software then it's not a computer, it's an appliance!</p><p>These 8-bit machines should be *used*. What joy is there in retro or modern 8-bit hardware if you sit at your PC developing all day and deploying to it like so much throw-away web-scale infrastructure?</p><p>But nobody should give up PC-based development either, so I made v80 runnable on PC too, allowing for build automation but never removing the ability to reproduce the software on real 8-bit hardware.</p><p>Please, if your 8-bit software project can't be built on an 8-bit system, consider what you can do to change that. You don't have to use v80, but the idea should stick with you. Today's Windows XP is tomorrow's Windows 10. Your build system won't stop being a moving target you can't control.</p>
Kroc Camen<p>90% done with my <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> assembler, <a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a>. The last feature is conditionals (i.e. conditional assembly if-statements) and finish up the read me. Supporting all z80 opcodes was a slog but it's still less than 4KB of code + a 4KB static binary tree that routes instructions to opcodes</p>
Kroc Camen<p><a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> bros, your opinion on my z80 assembler's syntax please; <a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> doesn't use standard Zilog syntax to make it significantly simpler (and faster) to parse, but if I want to create a Notepad++ language definition I don't have the flexibility there to differentiate registers (`add.b`) and keywords (`.b ...`)</p><p>Please have a look at v80's syntax (<a href="https://github.com/Kroc/v80/blob/main/README.md" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Kroc/v80/blob/main/</span><span class="invisible">README.md</span></a>) and tell me what you think. Could keywords start with something other than "."? (which could be reserved for private labels in the future). Should constants be ALL_CAPS instead of using a `#` sigil? I could allow separation of instructions and registers with spaces by letting the parser read 1 space in the instruction name as being any-number of spaces but using dots means multiple instructions on one line are easier to read and there's less typing and formatting overall</p><p><a href="https://oldbytes.space/tags/asm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asm</span></a> <a href="https://oldbytes.space/tags/retrocomputing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retrocomputing</span></a> <a href="https://oldbytes.space/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a></p>
Kroc Camen<p>Guys, that's a <a href="https://oldbytes.space/tags/Z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Z80</span></a> <a href="https://oldbytes.space/tags/cpm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cpm</span></a> binary executing in the terminal on the right there. The incredible NTVCM is a program that runs your CP/M binaries right in the terminal like any other *nix program; <a href="https://github.com/davidly/ntvcm" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/davidly/ntvcm</span><span class="invisible"></span></a></p><p>It is necessary to grasp the full import of this -- software for 8-bit systems can be assembled on PC as part of any other build-script, makefile, GitHub Action, Docker, or whatever, but still retain the ability to build the software ON REAL 8-BIT HARDWARE.</p><p>This is my Z80 assembler <a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> (<a href="https://github.com/Kroc/v80" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/Kroc/v80</span><span class="invisible"></span></a>), written in Z80, running in <a href="https://oldbytes.space/tags/VSCode" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>VSCode</span></a> producing a test binary. In the future it'll assemble itself, and then the possibilities are limitless</p><p><a href="https://oldbytes.space/tags/asm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asm</span></a> <a href="https://oldbytes.space/tags/retrocomputing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retrocomputing</span></a> <a href="https://oldbytes.space/tags/retroprogramming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retroprogramming</span></a></p>
Kroc Camen<p>Despite this <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> code doing a neat math trick I'm going to drop it here because I don't think I'll be using it after all :(</p><p>Here, we're parsing an expression; `@paren` is jumped to with the ASCII code for either "(" or ")" in A. We twiddle the bits and +/-1 to a counter based on the parenthesis used but without any branches!</p><p><a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> <a href="https://oldbytes.space/tags/asm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asm</span></a> <a href="https://oldbytes.space/tags/retroprogramming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retroprogramming</span></a></p>
Kroc Camen<p>But Kroc, <a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> doesn’t even have a linker or macros, it can’t replace Z88DK &amp;c.!</p><p>v80 has a fixed level of complexity. Its goals are portability and cross-assembly; one day it will be Finished™️ rather than expanding forever. v80 is what you use to write a better assembler; macros, linker and all; or a C-compiler, whilst maintaining portability and the ability to bootstrap itself on new platforms.</p>
Kroc Camen<p>Why not just use existing CP/M assemblers &amp;| C-compilers from the past, eh, Kroc??</p><p>Because <a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> is more than that. Only 3KB is actual code. The other 3.7.KB is a static binary tree to map <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> CPU mnemonics to opcodes. What if we replaced this static table with one for... 6502 instructions?</p><p>Now we can assemble 6502 code on a Z80. Why would you even want to do that? Because you could use v80 to assemble a 6502 port of itself (v65?), even assembling z80 code on a 6502... and now you can bootstrap any code on any system using just 8-bit code runnable on 8-bit hardware using the same assembler syntax [but different CPU mnemonics], all whilst never giving up PC+GitHub but making it possible for anyone to develop 100% on retro hardware (if they choose) that can't hope to run Git and LLVM. Imagine being _productive_ on 8-bit hardware!</p>
Kroc Camen<p>If a computer can’t compile and deploy its own software then it’s an appliance and not a general purpose computer.</p><p>I see too much 8-bit software on GitHub require a PC tool chain (and God-forbid, LLVM) and this is bad because the 8-bit system can no longer speak for itself; the software may as well be proprietary for all that can be modified on the target.</p><p>8-Bit software *must* be buildable on 8-bit hardware… but nobody should be required to abandon their PC or their GitHub workflow.</p><p><a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> is the first, tiny step in solving this: A portable assembler and syntax that can assemble software on original hardware, but also on PC (and GitHub and Docker, or whatever) — currently via <a href="https://oldbytes.space/tags/RunCPM" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RunCPM</span></a> that runs <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> <a href="https://oldbytes.space/tags/cpm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cpm</span></a> executables in your terminal. (Please could someone make a <a href="https://oldbytes.space/tags/C" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>C</span></a> version of v80 so that extra step is removed)</p><p>Think about it — software written for 8-bit systems that can be assembled as easily on PC as current tool chains but doesn’t exclude doing so on real hardware too!</p>
Kroc Camen<p>A working <a href="https://oldbytes.space/tags/Z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Z80</span></a> assembler in 6.7KB. I'm not release-ready yet, but I'm getting there. The source code is extremely well commented so if you want to learn Z80 assembly and/or CP/M, start reading: <a href="https://github.com/Kroc/v80" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/Kroc/v80</span><span class="invisible"></span></a></p><p><a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> <a href="https://oldbytes.space/tags/asm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>asm</span></a> <a href="https://oldbytes.space/tags/cpm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cpm</span></a> <a href="https://oldbytes.space/tags/amstrad" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>amstrad</span></a> <a href="https://oldbytes.space/tags/pcw" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pcw</span></a></p>
Kroc Camen<p>Just checking my <a href="https://oldbytes.space/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> assembler would run on real hardware...</p><p>You won't find better commented, tighter, assembly code than this. <a href="https://oldbytes.space/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> has been meticulously crafted with every routine sweated over for compactness, simplicity and elegance with a view to understandability.</p><p><a href="https://github.com/Kroc/v80" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/Kroc/v80</span><span class="invisible"></span></a></p><p><a href="https://oldbytes.space/tags/amstrad" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>amstrad</span></a> <a href="https://oldbytes.space/tags/pcw" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pcw</span></a> <a href="https://oldbytes.space/tags/cpm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cpm</span></a> <a href="https://oldbytes.space/tags/retrocomputing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retrocomputing</span></a> <a href="https://oldbytes.space/tags/retroprogramming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retroprogramming</span></a></p>
Kroc Camen<p>Because the CPU-specific bits are limited to a static table and a small lookup function, they could easily be swapped with something else like… a 6502 table :)<br>Why would you want to assemble 6502 code on a Z80? Well what if we assembled a 6502-version of <a href="https://mstdn.social/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> (v65?) which could reuse the static tables, meaning now you have a native 6502 assembler that can assemble itself but was bootstrapped on a Z80…</p>
Kroc Camen<p>FINALLY. That was hell, but my Z80 assembler in Z80 now parses all Z80 opcodes (794!) and unlike other native assemblers it uses a static binary tree to match strings to opcodes so the lookup code is only 179 bytes and the table is 3'733 bytes! <a href="https://mstdn.social/tags/z80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>z80</span></a> <a href="https://mstdn.social/tags/v80" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>v80</span></a> <a href="https://mstdn.social/tags/cpm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cpm</span></a> <a href="https://mstdn.social/tags/retroprogramming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retroprogramming</span></a> <a href="https://mstdn.social/tags/retrocomputing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>retrocomputing</span></a></p>
Am WE unterwegs mim Zug<p>Was ich so zur Zeit mache?<br />Lokomotiven warten für eine Ausstellung in 5 Wochen. Sonntag hab ich mich hingesetzt und doch das Getriebe bei der Tesmo V80 (aus den 1960ern) gewechselt und sie Testrunden fahren lassen. Bis auf 5 Loks ist jetzt alles erledigt dann kommen die Waggons. 🤣<br />.<br /><a href="https://nrw.social/tags/Tesmo" class="mention hashtag" rel="tag">#<span>Tesmo</span></a> <a href="https://nrw.social/tags/V80" class="mention hashtag" rel="tag">#<span>V80</span></a> <a href="https://nrw.social/tags/Diesellok" class="mention hashtag" rel="tag">#<span>Diesellok</span></a> <a href="https://nrw.social/tags/dieselengine" class="mention hashtag" rel="tag">#<span>dieselengine</span></a> <a href="https://nrw.social/tags/modellbahn" class="mention hashtag" rel="tag">#<span>modellbahn</span></a> <a href="https://nrw.social/tags/modelleisenbahn" class="mention hashtag" rel="tag">#<span>modelleisenbahn</span></a> <a href="https://nrw.social/tags/eisenbahn" class="mention hashtag" rel="tag">#<span>eisenbahn</span></a> <a href="https://nrw.social/tags/h0" class="mention hashtag" rel="tag">#<span>h0</span></a> <a href="https://nrw.social/tags/1zu87" class="mention hashtag" rel="tag">#<span>1zu87</span></a> <a href="https://nrw.social/tags/1to87" class="mention hashtag" rel="tag">#<span>1to87</span></a> <a href="https://nrw.social/tags/modeltrains" class="mention hashtag" rel="tag">#<span>modeltrains</span></a> <a href="https://nrw.social/tags/modelrailroad" class="mention hashtag" rel="tag">#<span>modelrailroad</span></a> <a href="https://nrw.social/tags/tischbahn" class="mention hashtag" rel="tag">#<span>tischbahn</span></a></p>
Am WE unterwegs mim Zug<p>Modellbahn Abend!<br />Mit der V80 und der E63 beides mit passenden Waggons.<br /><a href="https://nrw.social/tags/M%C3%A4rklin" class="mention hashtag" rel="tag">#<span>Märklin</span></a> <a href="https://nrw.social/tags/Maerklin" class="mention hashtag" rel="tag">#<span>Maerklin</span></a> <a href="https://nrw.social/tags/Tesmo" class="mention hashtag" rel="tag">#<span>Tesmo</span></a> <a href="https://nrw.social/tags/V80" class="mention hashtag" rel="tag">#<span>V80</span></a> <a href="https://nrw.social/tags/1to87" class="mention hashtag" rel="tag">#<span>1to87</span></a> <a href="https://nrw.social/tags/Modelleisenbahn" class="mention hashtag" rel="tag">#<span>Modelleisenbahn</span></a> <a href="https://nrw.social/tags/H0" class="mention hashtag" rel="tag">#<span>H0</span></a> <a href="https://nrw.social/tags/modelrailway" class="mention hashtag" rel="tag">#<span>modelrailway</span></a> <a href="https://nrw.social/tags/modellbahn" class="mention hashtag" rel="tag">#<span>modellbahn</span></a> <a href="https://nrw.social/tags/modeltrain" class="mention hashtag" rel="tag">#<span>modeltrain</span></a> <a href="https://nrw.social/tags/E63" class="mention hashtag" rel="tag">#<span>E63</span></a> <a href="https://nrw.social/tags/elok" class="mention hashtag" rel="tag">#<span>elok</span></a> <a href="https://nrw.social/tags/diesellok" class="mention hashtag" rel="tag">#<span>diesellok</span></a> <a href="https://nrw.social/tags/DB" class="mention hashtag" rel="tag">#<span>DB</span></a></p>