Skip to main content

Posts

Showing posts with the label Matrix Multiplication

Program 10: Matrix Multiplication

     ** Program 10: Matrix Multiplication ** ```assembly .model small .stack 100h .data     matrix1 dw 1, 2, 3, 4     matrix2 dw 5, 6, 7, 8     result dw 0, 0, 0, 0 .code     main proc         mov ax, 0              ; Initialize AX to 0              outer_loop:         mov cx, 2              ; Set loop counter for rows              inner_loop:         mov bx, ax             ; Copy AX to BX (row index)         add bx, cx             ; Add CX to BX (row index + column index)                  mov dx, 0              ; Initialize DX (column index)        ...