Sjasm 0.4 beta 6MSX Resource Center               
              
English Nederlands Espa�ol Portugu�s Russian         
 News
   Frontpage
  News archive
  News topics

 Resources
   MSX Forum
  Articles
  Reviews
  Fair reports
  Photo shoots
  Fairs and meetings
  Polls
  Links
  Search

 Software
   Downloads
  Webshop

 MRC
   Who we are
  Join our team
  Donate
  Policies
  Contact us
  Link to Us
  Statistics

 Search
 
  

  

 Login
 

Username

Password




Don't you have an account yet? Become an MSX-friend and register an account now!.


 Statistics
 

There are 55 guests and 1 MSX friend online

You are an anonymous user.
 

Sjasm 0.4 beta 6

Development - Sjasm 0.4 beta 6

 Tuesday, November 11, 2008 - 00:07
 Submitted by: wolf_
 Topic: Development
 
A new version of XL2s' cross assembler Sjasm has just been released! New in this version:
  • Fixed: 'unexpected' ascmap error
  • Fixed: error reports without list file
  • Fixed: more small bugs
  • Added: page range to PAGE command
  • Added: incbin.list, jr., djnz. and jp
Relevant link: XL2s
 
 


By Google

By ARTRAG on November 11 2008, 12:47
page range to PAGE command ?
Are you going to be a true MSX assembler ?

still I cannot see how sjasm can manage
roms, and in particular data to be allocated in RAM
you should try to get inspired by asMSX...

About RAM data, IMHO you should define segments for not initialized data
and segments for data that are initialized at boot time.

As sjasm now does a sort of linking and page management, sjasm should gather
data belonging to the two kinds of segments in the whole code and prepare accordingly the rom and ram.

I particular all the initial values are to be gathered and stored in a single ROM page, declaring ad hoc labels telling where they are.
You should also add a small standard boot code able to set to zero the not initialized variables and init the latter variables.
(very easy when you gather them in adjacent areas).


By Guillian on November 11 2008, 14:30
I love this assembler

ARTRAG, you can define RAM variables in this way:
MAP #C000
Var1: #1 ; 1 byte
Var2: #4 ; 4 bytes
Var3: #2 ; 2 bytes

Var1 = #c000, Var2 = #C001, Var3 = #C005
By ARTRAG on November 11 2008, 17:14
is map documented?
ok it is
http://home.wanadoo.nl/smastijn/sjasmman3.html#s4
I missed totally the use of this command...
BTW my propsal seems nicer
By sjoerd on November 11 2008, 18:07
The page command only specifies in which page the code should be assembled. It does not automatically insert page switching code or something like that. I thought about it, and about inserting some start-up code, but I decided against it. I do not think an assembler should generate code by itself.

Sjasm did have more kinds of segments (maybe data even still works, just like code), but it didn’t really treat them differently.

So, Sjasm does not manage roms, defpage and page (and code) only help to put your code in the right place in the file. The programmer has to do all slot switching and initializations himself.

I think ARTRAG’s proposal makes it too easy to program roms. Programming in assembler should be hard
By ARTRAG on November 12 2008, 14:34
but if you want thake care of page mapping, why not evolve sjasm toward something that is very close to a linker.

Define segments and add attribute to them
Gather data and code for each segment in all files
Displace them in the pages according to their dipendences
Manage apart RAM segments of initialized and uninitialized data...

By Edwin on January 12 2009, 01:03
In case the right party reads this

There is a highly annoying bug in the "page" system where:

defpage 2, $8000, 8192
defpage 3, *, 8192


together with a

page 2..3

will give an out of space error, but will work just fine if you change it to

defpage 2, $8000, 16384

page 2

Of course the second one is not what I want because I can't get the right bank number automatically. Any change of hunting this down?

[edit] Note that the same thing happens for "page 2, 3"
By sjoerd on January 13 2009, 14:34
No, that is probably not a bug. It might be annoying though

Code that starts in one page cannot continue in another.

Maybe something like this works for you:

defpage 0, 4000h, 16384
defpage 2, 8000h, 16384
defpage 4, 8000h, 16384

By Edwin on January 13 2009, 17:51
It's not code, but data. INCBIN's mainly.

And your suggestion doesn't really help because I want to identify the correct 8kb block with a :LABEL.

But if code/data can't cross page boundaries, then what on earth is the "page 0..3" syntax for?
By sjoerd on January 13 2009, 21:37
It's not code, but data. INCBIN's mainly.

But you do use the code command as follows, don’t you:
  code
label
  incbin blabla

  code
label
  incbin blabla
; and so on
 
Of course, if the data you include is larger than the page size, it will not fit.

And your suggestion doesn't really help because I want to identify the correct 8kb block with a :LABEL.

How do you identify the correct block if the data is in two pages?

But if code/data can't cross page boundaries, then what on earth is the "page 0..3" syntax for?

page 0..3 is just short for page 0,1,2,3. The following code or data could end up in any of the pages.
By Edwin on January 14 2009, 01:10
I don't really use the "code" keyword.

What I'm doing is making rom data pages like this:

Data:
    db :dat1
    dw dat1 & $1FFF
    db :dat2
    dw dat2 & $1FFF
    db :dat3
    dw dat3 & $1FFF

dat1: incbin "a"
dat2: incbin "b"
dat3: incbin "c"


That way I can store large chunks of data and not waste space. Incidentally, this way I also kill the use of any memory rom loader.

By sjoerd on January 23 2009, 12:21
You could make one large page at the end of the rom (or any other place) to put all data. Of course, you still can't use :label.

Anyway, I will put it on the nice to have list, along with ARTRAG's suggestions.
By Edwin on January 24 2009, 23:54
Thanks! That would be nice. Maybe as some option to the code command.

I have by now used the function in a way that you probably intended it for. Letting sjasm sort out where to place data blocks and building a table to find them. Works nicely! However, the other method is still valid for large data blocks.


 Recent news
 
SuperSoniqs announces Franky, a new VDP card for MSX1 and up 
Passion MSX2 contest - 2nd edition 
Passion MSX2 contest - 1st edition closed 
openMSX 0.7.2 
Sjasm 0.4 beta 7 
MRC forum goes Japanese and Cross-Development 
Shmup event 2009 
PT3 Player for Hi-Tech C 
Anty, TNT and Guardic in Project EGG English 
ZMA Player - New PSG player for MSX 

[ News archive ]

 Latest forum posts
 
Comptermates "The Secretary" for sale
SD v2.2 interface
Connecting a real MSX to an Altera DE1, and mouse/joystick schematics
Help to name the openMSX debugger!
WTB: XRGB Scan Doubler
How to start MSX-DOS 2
openMSX post-0.7.0 build available for beta testing
Brand New Turbo-R ST!
Super Rambo Special
MANY Msx Games for sale, take a look

[ View MSX forum ]

 Poll
 
Apart from MSX, what do you miss most from the 1980s?

The music
The movies
The TV-series
The clothing
The hairdos

[ View results ]

 Latest reactions
 
SuperSoniqs announces Franky, a new VDP card for MSX1 and up
Passion MSX2 contest - 2nd edition
openMSX 0.7.2
ZMA Player - New PSG player for MSX
Passion MSX2 contest - 1st edition closed
MRC forum goes Japanese and Cross-Development
Sjasm 0.4 beta 7
Big 10 emulator for MSX2
PT3 Player for Hi-Tech C
retroCRAP Competition 2009
 Affilates
 
WOOMB.net
Play-Asia
eBay
 Sponsored Links
 

(c) 1994 - 2009 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.