Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Simple matrix 3x3 interface

Started by hutch--, January 03, 2018, 11:15:25 AM

Previous topic - Next topic


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.



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.