flat assembler
Message board for the users of flat assembler.

Index > DOS > Shortest access to two-dimensional array?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 4046
Location: vpcmpistri
bitRAKE 08 Jun 2008, 23:56
If you don't get stuck then you're obviously doing something wrong, lol. Laughing

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 08 Jun 2008, 23:56
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4347
Location: Now
edfed 09 Jun 2008, 00:44
if something still assumed...
Code:
mov si,array
mov bl,x
mov bh,y
mov al,[ds:si+bx]
    

or
assuming array is accesed like CHS sectors (or something like that)
Code:
mov bx,x
mov al,y
xlat
    

or
Code:
mov al,[x*256+y]
    

or
Code:
mov al,[y*256+x]
    
Post 09 Jun 2008, 00:44
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.