flat assembler
Message board for the users of flat assembler.

Index > DOS > How to get into the other segment?

Author
Thread Post new topic Reply to topic
vhanla



Joined: 20 May 2004
Posts: 30
Location: Peru
vhanla
Hi, I need to use a segment which holds a VOC sound, but when I use

segment sound entry 16
that directive I guess creates a segment....

however, How can I access that place, using LEA AX,[sound]?

Should I use that segment label as a normal label... since I cannot use lea ax,[sound]

I need your help, because I want to play music from an entire Segment, I tried allocating memory, however it shows me some errors when I end my program, something like error in COMMAND.COM...

BTW: maybe you're interested in looking at my game in progress, it needs a lot of optimizations he he he Laughing

I compiled a source from here, from there, from wherever it came...

http://vhanla.googlepages.com/falix.rar Very Happy

_________________
I'm just trying to start, help me!!!


Last edited by vhanla on 30 May 2007, 20:01; edited 1 time in total
Post 28 May 2007, 22:40
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
Goplat



Joined: 15 Sep 2006
Posts: 181
Goplat
sound isn't a normal label though. The value of a label is usually a memory offset, but the value of a segment label is a segment and it makes no sense to be using it as an offset, so fasm disallows it. You shouldn't be using LEA when an ordinary MOV will do the job, anyway - just use "mov ax,sound".
Post 29 May 2007, 04:56
View user's profile Send private message Reply with quote
vhanla



Joined: 20 May 2004
Posts: 30
Location: Peru
vhanla
Ok, thanx.

BTW: I figure out that my link didn't work, so I uploaded a googlepages...

http://vhanla.googlepages.com/falix.rar

I need suggestions for handling well a long voc or wav sound...

I have troubles with the synchronization, I cannot figure out how to catch the right moment to change the sound so it plays a long time sound...

The function to assign a segment and offset for DMA is "procMusic", i guess that is correct, I'm not sure if the loaded bytes of the sound would be the sound length... HELP ME....

I'm using "ready db " to detect when the sound finishes Embarassed

_________________
I'm just trying to start, help me!!!
Post 30 May 2007, 20:23
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.