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: 3043
Location: vpcmipstrm
bitRAKE
If you don't get stuck then you're obviously doing something wrong, lol. Laughing

_________________
¯\(°_o)/¯ unlicense.org
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: 4242
Location: 2018
edfed
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.