Re: Adresses
- Posted by Robert Craig <rds at MSN.COM> Aug 12, 1997
- 846 views
Eduardo Uemura Okada asks: > Please, I am a very beginner in programming with memory adresses of > graphic mode 19, can anyone tell me where are the fre memory spaces that > can be used to place , for example, a virtual screen? Please, if it isn't > too much, send me the starting and ending adresses, it will be very useful! Memory for graphics mode 19 starts at #A0000 and there are 200*320 bytes. Each byte contains an 8-bit color number from 0 to 255. I think what you are really asking though is: where are the free areas of memory that you can use for a "virtual" screen. The answer is that these free areas are not always the same. You must call Euphoria's allocate() routine (contained in machine.e): start = allocate(size) this will return the starting address of an unused area of memory containing size bytes. You can store anything that you like into this memory area. If you say: atom virtual_screen virtual_screen = allocate(200 * 320) You will get an address of a block of memory that is 200*320 = 64000 bytes long. You could use this for storing your virtual screen. You can copy your entire virtual screen to the "real" screen with: mem_copy(#A0000, virtual_screen, 64000) Regards, Rob Craig Rapid Deployment Software P.S. to Jacques: I too have been getting a bounced mail message from an address on CompuServe lately. I'm just ignoring it for now. P.S. to CompuServe members: You can reduce the number of those silly "=" signs added to your messages by removing any blanks at the end of each line of your message. Also, do not send long lines (greater than about 60 characters).