Autor
| text with msx2 an assembler
|
super_castle msx novice Mensajes: 32 | Publicado: Marzo 25 2007, 21:14   |
this text "text1.com" not go in msx2 with dos :
assembler :
org &100
nolist
write"text1.com"
LD HL,PRTTXT
.PRNTLP LD A,(HL)
INC HL
OR A
RET
CALL &00A2
JR PRNTLP
.PRTTXT
defb "hallo, pebisoft !",&00
this text "text.com" go wonderfull under msx2 with dos :
assembler :
org &100
nolist
write"text.com"
LD DE,message
LD C,9
JP 5
.message
defb "hallo, pebisoft !$"
why is this ?
mfg peter
|
|
msd msx professional Mensajes: 625 | Publicado: Marzo 25 2007, 21:20   |
It's because in dos there is only ram mapped in the pages and no rom like in basic. Address &hA2 is routine in the rom which is mapped to page 0 in basic.
|
|
Prodatron msx master Mensajes: 1113 | Publicado: Marzo 25 2007, 21:20   |
Probably because of "RET" (after OR A). It will always return and never print anything. Try "RET Z".
|
|
Prodatron msx master Mensajes: 1113 | Publicado: Marzo 25 2007, 21:22   |
Ah, another issue.
@Super_castle: You should better post such questions into the "Development" forum, not in "General Discussion".
|
|
super_castle msx novice Mensajes: 32 | Publicado: Marzo 25 2007, 22:41   |
this program assemble :
org &c000
nolist
write"text.bin"
LD DE,message
LD C,9
JP 5
.message
defb "hallo pebisoft, es geht !$"
i'm load in basic : bload"text.bin"
error : bad file mode
why ist this?
org &c000
nolist
write"text1.bin"
LD HL,PRTTXT
.PRNTLP LD A,(HL)
INC HL
OR A
RET
CALL &00A2
JR PRNTLP
.PRTTXT
defb "hallo, pebisoft !",&00
i'm load in basic : bload"text1.bin"
error : bad file mode
mfg
|
|
flyguille msx master Mensajes: 1237 | Publicado: Marzo 26 2007, 00:07   |
The correct format of a BINARY file to be loaded with the BLOAD command is:
defb &hFE
defw start_addr
defw end_addr (the addr of the last byte used)
defw exec_addr
next is your code....
Is a header of 7 bytes in total.
so
in DUMP terms can be....
&HFE &H00 &HC0 &HFF &HC0 &H00 &HC0 <your code here>
the header is because the BLOAD command needs to knows where to load the BINARY file, and where starts to executing it....
PD: The header will be NOT be copy to RAM.
You can add the header to a COM file, editing it at DISK sector, or just use an utility for that....
|
|
cax
 msx master Mensajes: 1051 | Publicado: Marzo 26 2007, 08:11   |
Quote:
|
You can add the header to a COM file, editing it at DISK sector, or just use an utility for that....
|
I think assembler itself can be teached to calculate end address and create the BIN header, isn't it so ? |
|
super_castle msx novice Mensajes: 32 | Publicado: Marzo 26 2007, 08:12   |
hello thanks !!!
mfg peter
|
|
msd msx professional Mensajes: 625 | Publicado: Marzo 26 2007, 17:58   |
I recommend writing com files only
|
|
ro msx guru Mensajes: 2353 | Publicado: Marzo 27 2007, 08:33   |
I reccomend you stuff it, msd.
|
|
pitpan msx master Mensajes: 1418 | Publicado: Marzo 27 2007, 21:28   |
Better go for ROM files ;D
They are far more reliable than COM files nowadays!  |
|
msd msx professional Mensajes: 625 | Publicado: Marzo 27 2007, 22:35   |
shut up ro  |
|
AuroraMSX
 msx master Mensajes: 1277 | Publicado: Marzo 31 2007, 12:52   |
Quote:
| I think assembler itself can be teached to calculate end address and create the BIN header, isn't it so ?
|
Depends on the assembler...
|
|
|
|
|