flat assembler
Message board for the users of flat assembler.
Index
> Non-x86 architectures > Assembler support for 8080 or Z80 on linux hosts |
Author |
|
al_Fazline 05 Jan 2023, 08:48
I have found a web based assembler, or actually three of them,
https://svofski.github.io/pretty-8080-assembler/ this one looks the best so far, however it's far from ideal since it's based on the web. https://www.asm80.com/index.html this one is a bit more complex, having an entire IDE. I'd say it's too complex. https://eliben.org/js8080/ this is the simplest one, however I didn't get anything useful out of it. PS https://rk86.ru/ this one is quite good and includes an emulator, but the update is lagging a bit, so you might be running old version of your code unknowingly. Same goes with hexdump views, they are not updated until you switch pages. GNU as seem to be able to support z80, however I'm not sure how usable it is going to be. as86, nasm and yasm only seem to support x86 code. There is a topic of fasmg plugin for 8085. I haven't tested it thoroughly, but it's not ideal because it does not support non-x86 hosts, such as arm64-based desktops without things like qemu-usermode. So, I guess GNU as is the way to go, since it supports binary output format and comes included with the operating system. However quick search didn't reveal any code examples, so I'm yet to learn how to use it.. So, here is my first program for Radio 86rk, which outputs HL register pair in hex first, to confirm the endianess, then uses a syscall to get the highest address of usable memory, then returns control to the MONITOR. Code: ; code for https://svofski.github.io/pretty-8080-assembler/ ; outputs end of available RAM in hex codes ; target file name and type (radio-86rk) .project ram_end.rk .tape rk-bin org 100h ; constants quit equ 0xf86c print_hex equ 0xf815 puts equ 0xf818 ram_size equ 0xf830 start: lxi hl, nline ; to avoid overwriting the prompt push h call puts ; make a line break pop h ; the syscall seems to alter the HL call print_hl ; this should print nline address call puts call ram_size ; end of available ram -> hl call print_hl jmp quit ; exit to monitor print_hl: mov a,h call print_hex ; print a in hex mov a,l call print_hex ret nline: db 0x0d, 0x0a, 0x00 I would appreciate help in translating this to as code, as well, as testing the code in various emulators or on a real machine if you have got one. |
|||
05 Jan 2023, 08:48 |
|
shoorick 08 Jan 2023, 18:26
try this in emu80:
Code: ;======================================================================= include "8085.inc" include "rks.inc" ;----------------------------------------------------------------------- rk_start ;----------------------------------------------------------------------- ; code for https://svofski.github.io/pretty-8080-assembler/ ; outputs end of available RAM in hex codes ; target file name and type (radio-86rk) ;.project ram_end.rk ;.tape rk-bin ;org 100h ; constants quit equ 0xf86c print_hex equ 0xf815 puts equ 0xf818 ram_size equ 0xf830 start: lxi h, nline ; to avoid overwriting the prompt push h call puts ; make a line break pop h ; the syscall seems to alter the HL call print_hl ; this should print nline address call puts call ram_size ; end of available ram -> hl call print_hl jmp quit ; exit to monitor print_hl: mov a,h call print_hex ; print a in hex mov a,l call print_hex ret nline: db 0x0d, 0x0a, 0x00 ;----------------------------------------------------------------------- rk_end ;=======================================================================
_________________ UNICODE forever! |
||||||||||||||||||||
08 Jan 2023, 18:26 |
|
shoorick 08 Jan 2023, 18:28
source has a typo: lxi hl
|
|||
08 Jan 2023, 18:28 |
|
shoorick 09 Jan 2023, 19:07
logical or not it is incompatible with standard intel instructions set for i8080
|
|||
09 Jan 2023, 19:07 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.