New coder need help, pls

Страница 1/2
| 2

By thegeps

Champion (272)

Аватар пользователя thegeps

05-06-2018, 23:04

Hi all! Started few months ago programming in assembly z80. Started with a weird assembler (called DOT assembler), in MSX (emulated via blueMSX cause my vg8020 is still boxed in my mother's house). Well, DOT assembler is very uncomfortable so I decided to use a cross assembler. Found some time ago Chaos Assembler 3 (read a very old post so I don't know if it's a free stuff now and can't found a related manual). Obtained a .bin file after compiled my source but don't know how to use it on blueMSX (think i have to put it on .cas file with bin2cas, that I can't find online). Also tried to open a folder as a disk on drive A but when I type bload"VSCROL.BIN" the only result is "bad file mode". What I have to do? Where's my fault? Sorry for my English, I'm Italian ;p

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By Wolverine_nl

Paragon (1037)

Аватар пользователя Wolverine_nl

05-06-2018, 23:33

Hi, welcome!
Could you show the starting address of the assembly source? Or a part of the first few source code lines?

By Pencioner

Paladin (951)

Аватар пользователя Pencioner

05-06-2018, 23:35

bload"VSCROL.BIN" assumes that file starts with magic byte (0FEh IIRC) following by start, end, and exec addresses (2 bytes little-endian values) before the actual content of file. that's why BLOAD doesn't recognize it

you can google/search forum/wiki for MSX specific tutorials on creating BLOAD-able files and ROMs, btw, there is some info around

By Wolverine_nl

Paragon (1037)

Аватар пользователя Wolverine_nl

05-06-2018, 23:45

By santiontanon

Paladin (834)

Аватар пользователя santiontanon

06-06-2018, 03:17

I find it's easier to compile to a ROM (which is the same as a bin file, but with a different header, so, you can load it in the emulator as a cartridge, without any bload, load, etc.). Do compile to a ROM file, just add this to the beginning of your assembler file:

    org #4000   ; the address in ROM where to put this program
    db "AB"     ; ROM signature
    dw Execute  ; start address
    db 0,0,0,0,0,0,0,0,0,0,0,0
Execute:
   ; here goes your assembler code

By thegeps

Champion (272)

Аватар пользователя thegeps

06-06-2018, 09:54

Thank you all! That's why the source assembled with DOT assembler works fine...
So I have to modify the default header on Chaos assembler... Or maybe you suggest another cross assembler?

By thegeps

Champion (272)

Аватар пользователя thegeps

06-06-2018, 09:53

Here's my code start:

ORG 55100
LOAD 55100
CALL DRAWSCR
LD HL,48768
LD B,96
MAIN: PUSH BC
PUSH HL
LD B,8
LOPCHR: PUSH BC
LD B,45
LD HL,46014
LD DE,46015
PXLSCR: PUSH BC

By NYYRIKKI

Enlighted (5382)

Аватар пользователя NYYRIKKI

06-06-2018, 10:37

Yes, to make it a proper BIN-file, just add something like:


	DB #FE
	DW BEGIN,THEEND,START

	ORG 55100
	LOAD 55100
BEGIN:
START:
	CALL DRAWSCR
	.
	.
	.
	.
	.
	.
THEEND:

By thegeps

Champion (272)

Аватар пользователя thegeps

06-06-2018, 12:11

Thank you folks! Think I Will have a loro to ask you in future XD

By Wolverine_nl

Paragon (1037)

Аватар пользователя Wolverine_nl

06-06-2018, 13:54

thegeps wrote:

Thank you all! That's why the source assembled with DOT assembler works fine...
So I have to modify the default header on Chaos assembler... Or maybe you suggest another cross assembler?

tniASM
sjasmplus
Glass
...and many more, if you search here on the site, you will find many other options :)

I myself use tniASM 1.0b, but if you are starting out, you could try a few to see which one fits you best.

By thegeps

Champion (272)

Аватар пользователя thegeps

06-06-2018, 15:04

I'll do!

Страница 1/2
| 2