MSX (1) System Variables in Work Area

Página 2/7
1 | | 3 | 4 | 5 | 6 | 7

Por erwinmusik

Master (140)

Imagen del erwinmusik

09-06-2014, 00:00

i´ve tested a lot with my Assembler code, it accest 1-39 , if I use Zero, it puts anywhere. I use POSIT EQU 00C6h
like this:

	LD H,10h	;line
	LD L,07h	;row
	call POSIT
	LD A,72h	
 	call CHPUT

Por Grauw

Ascended (9683)

Imagen del Grauw

09-06-2014, 00:16

erwinmusik wrote:

hmm, in MSX1? 80 characters?

The CX5MII and SVI-738 are MSX1 computers with 80 columns modes. Also there are various “80 columns cartridges”, such as the SVI-727 and the Epcom one. I think 80 columns mode was foreseen while MSX1 was developed, given that other CP/M computer systems already had 80 columns modes and it was something they aspired to do later.

But perhaps, alternate theory, they just wanted to have longer function key combos longer than just 8 characters (e.g. “color 15,4,4”) so arbitrarily chose 16, and just display the first eight characters. Which happens to work out in 80 columns modes.

Por erwinmusik

Master (140)

Imagen del erwinmusik

09-06-2014, 00:15

Ok, thanks for that Explanation.

Does anyone uses the Oshonsoft Z80 Assembler?
It´s very fine, especially the "life" testing with Memory and registers.
But one thing I´m very frustrated about is, the .obj ( the bin file) is saved from Zero Memory up to my end of code.
So I have to truncate all up to my code starts ( at C000h minus the Header for bload) with Notepad first and then I can put it on the disk to bload it on bluemsx.
Does anyone have an idea?

Por flyguille

Prophet (3028)

Imagen del flyguille

09-06-2014, 00:24

if you already have it in the msx memory, just do a BSAVE "filename", &hc000, &h...., &hc000

the last one is the execution entry.

then run it with BLOAD "filename", R

Por erwinmusik

Master (140)

Imagen del erwinmusik

09-06-2014, 00:31

sorry, I forgot to mention I use the Assembler on my Windows computer. It´s much easier to write code, copy paste and those useful things....and the Assembler writes the whole Memory in the bin file. I found no entry to change this and wrote an email to the developer hours ago.
For now I have to use Notepad.....

Por flyguille

Prophet (3028)

Imagen del flyguille

09-06-2014, 00:42

if cross developing, I recommend to you the free version of TniASM, at tni.nl (IIRC)

so it needs to do this:

FNAME "filename"
DB $FE                 ; this output the BLOAD header to file.
DW start
DW end - 1
DW start

ORG $C000

start:

    ld hl, VarStart                               ; It initialize all variables to zero and/or null chars.
    ld de, VarStart+1
    ld bc, VarEnd-VarStart-1
    ld (hl), 0
    ldir


   ;   ..... code


end:

ORG $D000

VarStart:
variable:    RB   1   ; reserve 1 byte
variable2:  RW  1   ; reserve 1 word (2 bytes).
VarEnd:

save it as code.asm

compile it in the DOS console, "tniasm.exe code.asm", create a .BAT file to compile it automatically

Por erwinmusik

Master (140)

Imagen del erwinmusik

09-06-2014, 01:01

Sounds good! I will Check it out tomorrow.
Look at these:
http://www.oshonsoft.com/z80.html

Its a simulator too and extremly good.
I use the simulator very often, put some ROM stuff and system variables into there memory positions and go through the code in steps. Its Great for learning...

Por flyguille

Prophet (3028)

Imagen del flyguille

09-06-2014, 01:19

For debuging, the OpenMSX has a debug utility where you can see all MSX chips internals, memory, etc.

Por ToriHino

Hero (653)

Imagen del ToriHino

09-06-2014, 02:20

flyguille wrote:

For debuging, the OpenMSX has a debug utility where you can see all MSX chips internals, memory, etc.

And so does BlueMsx...

Por NYYRIKKI

Enlighted (5735)

Imagen del NYYRIKKI

09-06-2014, 08:59

erwinmusik wrote:

i´ve tested a lot with my Assembler code, it accest 1-39 , if I use Zero, it puts anywhere. I use POSIT EQU 00C6h
like this:

	LD H,10h	;line
	LD L,07h	;row
	call POSIT
	LD A,72h	
 	call CHPUT

I just tried the routine and it seems to work ok with values 1-40 in H

erwinmusik wrote:

So I have to truncate all up to my code starts ( at C000h minus the Header for bload) with Notepad first and then I can put it on the disk to bload it on bluemsx.
Does anyone have an idea?

I think part of your problem might be right here... I don't know what Notepad does for binary files when saving, but I would not really recommend it as binary editor. Use XVI32 or similar instead...

About other tools...

For developing on Windows I usually use SjASM... I think tniASM is good as well. If you want to understand what is happening ie. inside that POSIT routine then best tool is Super-X... It is for MSX2, but as you are using emulator anyway I think that's fine... Much more easy to jump around than trying to locate the routines from dissassembled sources. If you just want to follow what the computer is doing or what is in memory check out debugger features of BlueMSX. If these tools are not enough take a look at OpenMSX. It is a bit harder to use, but it has some very interesting programmable debug possibilities also.

Notepad I have replaced with Context because it has Z80 highlighter and I can compile the source with push of a button, but there are other options as well... That is more matter of what you are used to...

Página 2/7
1 | | 3 | 4 | 5 | 6 | 7