The MASM Forum

Microsoft 64 bit MASM => Examples => Topic started by: hutch-- on January 03, 2018, 11:15:25 AM

Title: Simple matrix 3x3 interface
Post by: hutch-- on January 03, 2018, 11:15:25 AM
This is the toy of the day, clean simple MASM dialog interface. There are many other ways to do this, a serious matrix application would probably store the data as an array of the correct data type and perform the conversions on the fly, this version simply works on the string data in the 9 edit controls.
Title: Re: Simple matrix 3x3 interface
Post by: jj2007 on January 03, 2018, 12:03:53 PM
Looks neat :t
Title: Re: Simple matrix 3x3 interface
Post by: hutch-- on January 07, 2018, 01:32:11 AM
This version has an extra function, converting rows to columns. Between the reverse and conversion you can get a number of interesting combinations of the matrix data. For the row to column procedure having so many registers made it a lot simpler in the the 6 pairs that needed to swapped could be loaded directly into registers without needing a stack frame of preserving the non volatile registers.

Vaguely somewhere in the back of my head there may be a shuffle type later instruction where you set a mask and use a shuffle instruction to perform the swaps but the number of items in the matrix may be too many for the instruction.

LATER : I should have mentioned that this version converts the string data from the edit controls into an array and does the conversions on the array before converting it back to string and placing it back into the edit controls.