Author Topic: Simple matrix 3x3 interface  (Read 173 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5039
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Simple matrix 3x3 interface
« 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 7884
  • Assembler is fun ;-)
    • MasmBasic
Re: Simple matrix 3x3 interface
« Reply #1 on: January 03, 2018, 12:03:53 PM »
Looks neat :t

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5039
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Simple matrix 3x3 interface
« Reply #2 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.
« Last Edit: January 07, 2018, 10:44:57 AM by hutch-- »
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: