Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
21 May, 2013, 08:53:18 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2   Go Down
  Print  
Author Topic: Text Data -  (Read 806 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Quigibo
The Executioner
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 02:03:21
Date Registered: 22 January, 2010, 05:02:37
Location: Los Angeles
Posts: 2022


Total Post Ratings: +1019

View Profile
« on: 06 June, 2011, 16:54:15 »
+1

The Data command needs the r modifier after each entry if you're using pointers since each entry needs to be 2 bytes large.  But there is a more memory efficient way to store the text, which is to just have each entry right after each other like this:


1
2
3
4
5
:"Text1"[00]->Str1
:"Text2"[00]
:"More Text"[00]
:.etc

And then to get the Nth string, just write a routine that starts at Str1 and scans until it has read N-1 zeros


1
2
3
4
5
6
7
8
9
10
11
:Lbl NTH
:Str1->r2
:While r1
: While {r2}
:  r2++
: End
: r2++
: r1--
:End
:Return r2
« Last Edit: 06 June, 2011, 17:09:25 by Quigibo » Logged

___Axe_Parser___
Today the calculator, tomorrow the world!
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.29 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.