This program was written for the purpose of switching the contents of 2 matrices without having to use a third matrix. It does however use 6 of the alphabetical variables,
and the program does assume that the dimensions of the matrices are equal. You can of course change the program as you see fit. I am not responsible for loss of memory or damage that this program may cause. Have a nice day!
Prgm1:MTRXSWAP
Disp "MATRIX SWAP"
Disp "1=[A]-[B]"
Disp "2=[B]-[C]"
Disp "3=[A]-[C]"
Input D
If D<3
Brow -> F
If D<3
Bcol -> E
If D=3
Crow -> F
If D=3
Ccol -> E
1 -> A
Lbl 1
1 -> B
Lbl 2
If D=2
Goto 3
If D=3
Goto 4
[A](A,B) -> C
[B](A,B) -> [A](A,B)
C -> [B](A,B)
Lbl 5
IS>(B,E)
Goto 2
IS>(A,F)
Goto 1
End
Lbl 3
[B](A,B) -> C
[C](A,B) -> [B](A,B)
C -> [C](A,B)
Goto 5
Lbl 4
[A](A,B) -> C
[C](A,B) -> [A](A,B)
C -> [C](A,B)
Goto 5