usable memory in assembly (Development Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 45 invitados y 1 miembro en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - usable memory in assembly

Ir a la página ( Página anterior 1 | 2 | 3 )
Autor

usable memory in assembly

ro
msx guru
Mensajes: 2347
Publicado: Mayo 10 2005, 15:49   
Atleast I learned something today, thanx aurora.

Well u don't HAVE to use dos2 (is was an example)...
ofcourse all this is while not using BASIC (as I stated.. oh, a few times) (atleast for beginners?!)
why not put an init routine somewhere in hi-mem which sets pages and then jump to your code. well these are examples to learn from. they're absolutely not mandetory ofcourse..

2 cents I guess.


AuroraMSX

msx master
Mensajes: 1262
Publicado: Mayo 11 2005, 09:03   
Quote:

ofcourse all this is while not using BASIC (as I stated.. oh, a few times)


Ah, but you also said:
Quote:

Wbass2 is a great development environment, especially for all the BASIC peeps (wb2 + basic runs smooth)


...which, to me, sounded like WBAss2 (and hence the program under development) runs in a BASIC environment. If that's not the case, I stand corrected. As said, I've never seen or used WBAss2.

2 cts, 2.

mth
msx freak
Mensajes: 193
Publicado: Mayo 11 2005, 19:31   
Assembling to another page will allow your source in WBASS to grow some more, but there is a point at which it is simply too large for WBASS to handle. When that happens, you either have to divide your code into smaller modules that can be assembled one at a time, or switch to another assembler.

If you want to have your assembler running on MSX, Compass is probably the best assembler for large projects. Otherwise, you can choose one of many cross assemblers (for C-BIOS we support Pasmo, SjASM and tniASM). I really prefer a cross assembler because it's much faster and has fewer limitations. Also you don't have to spend time setting up your development environment again after your program crashes the MSX.

I still use WBASS sometimes: it's very handy for small experiments, but not for large projects.

ro
msx guru
Mensajes: 2347
Publicado: Mayo 18 2005, 10:16   
it's ALWAYS good to split sources in modules... why?
- faster assembling time
- better debug posib.
- better overview
- less mem use in development mode
- keeps you focusted (!)

good luck.

norakomi
msx professional
Mensajes: 861
Publicado: Mayo 26 2005, 03:36   
hmmm, I see,

So maybe I should consider a cross assembler.
I made a routine which loads several files into memory (including an .sc5 file)
All files have to be loaded from page 2 on....... (which sucks !!)

So this means when I start Wbass, I type
Page 2,3,0,3 and then I can use memory locations

$8000-$C800 (more or less)

Because I load the files in page 2, I cannot use page 1 any more (I used to code from $4000 -

So in total I still have only 16 kb of memory to use.....
Is there a better way in Wbass (Im not giving Wbass up right away)
to clear more memory.........

norakomi
msx professional
Mensajes: 861
Publicado: Mayo 26 2005, 03:39   
Quote:

Otherwise, you can choose one of many cross assemblers (for C-BIOS we support Pasmo, SjASM and tniASM). I really prefer a cross assembler because it's much faster and has fewer limitations. Also you don't have to spend time setting up your development environment again after your program crashes the MSX

that sounds better !!!
How does it work, under windows? and.... you dont need an msx emulator anymore???
ro
msx guru
Mensajes: 2347
Publicado: Mayo 26 2005, 07:59   
Quote:

hmmm, I see,

So maybe I should consider a cross assembler.
I made a routine which loads several files into memory (including an .sc5 file)
All files have to be loaded from page 2 on....... (which sucks !!)

So this means when I start Wbass, I type
Page 2,3,0,3 and then I can use memory locations

$8000-$C800 (more or less)

Because I load the files in page 2, I cannot use page 1 any more (I used to code from $4000 -

So in total I still have only 16 kb of memory to use.....
Is there a better way in Wbass (Im not giving Wbass up right away)
to clear more memory.........



You clearly didn't grasp the whole concept yet.
A memorymapperblock (16k) can be set on ANY page like:
- page 1,3,0,3
This will set primairy slot 3 and secondairy slot 0 (for turbo R) to RAM mode and maps memorymapperblock 3 to it.
- page 2,3,0,3
does the same except this time on page 2
So now you'll have both page 1 and page 2 mapped with memorymapperblock 3 which basically means you'll end up having the SAME DATA on both pages.

So you're NOT limited to 16k. no mam! When using a memorymapper of, say, 128k you'll have the option to place memmap 0-7 on each page.

just remember that page 3 has page 0 mapped (standard variables etc) I should not ever change that if I were you. for the rest .. go ahead.

typically mem layout for me is:
page 0,3,0,3 ;F-kernel bios
page 1,3,0,2 ;F-kernel system (which will be called in BIOS)
page 1,3,0,4 ;CODE page (user)
page 2,3,0,1 ;Temp page for data transfer
page 2,3,0,5 ;DATA page (user)
page 3,3,0,0 ;Standard MSX vars etc

so the Kernel needs atleast:
page 0,3,0,3
page 1,3,0,2
page 2,3,0,1
page 3,3,0,0

whil MY program will use:
page 0,3,0,3 (partial left over space)
page 1,3,0,4
page 2,3,0,5
page 3,3,0,0

There's a lot of page switching involved during F-kernel calls. My code and data page are always in front. When using ANY f-kernel routines these pages MIGHT be changed temp. (but always reset while returning)

so you see; while using 128k I would STILL have 2 memmapblocks (32k) left for my RAMdisk! (block 6 and 7)
 
Ir a la página ( Página anterior 1 | 2 | 3 )
 







(c) 1994 - 2008 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation