flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > Nested structure comparsion.

Author
Thread Post new topic Reply to topic
Posetf



Joined: 01 Mar 2004
Posts: 35
Location: London
Posetf 03 Feb 2006, 19:48
I have a nested structure scheme where a structure (aka sequence, list,
table) contains N items, each of which can be an integer, a float, or
a nested structure of the same format.

Without boring you too much with the nitty-gritty, what I want to do is
compare two arbitrary such objects, potentially deeply nested.

Obviously I need a recursive routine, tad harder in assembly but doable,
my real question is about the intermediate results, which I am thinking
of leaving in ah.

Two integers will compare on the CPU, and need signed set/jump opcodes,
whereas if either or both is a float, the comparison must be done on the
FPU, followed by fnstcw/sahf, and unsigned set/jump opcodes (cmiiw).
If I am right about that, should I somehow translate ah in the FPU case,
to match a lahf done after a compare on the CPU?
Post 03 Feb 2006, 19:48
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:  


< 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.