Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change
Quote from: sinsi on March 21, 2025, 07:15:06 AMI started to look into it but lost interest...invoke GdipGetPropertyItemSize,GpImage,PropertyTagFrameDelay,addr delaysize
invoke GdipGetPropertyItem,GpImage,PropertyTagFrameDelay,delaysize,addr delay
Quote from: zedd151 on March 21, 2025, 04:00:47 AMIs there any way to correlate the delay per frame in the code, to what the frame delay is in the gif file rather than a 'one size fits all' timer delay?
What I mean is, is there any way to get the information from the gif file, for the delay for each frame? As you might have noticed, I have only a slight clue about gdiplus functions. The MS documentation isn't a great help, either.
invoke GdipGetPropertyItemSize,GpImage,PropertyTagFrameDelay,addr delaysize
invoke GdipGetPropertyItem,GpImage,PropertyTagFrameDelay,delaysize,addr delay
Quote from: daydreamer on March 21, 2025, 06:48:50 AMIs it possible make old moonlander game,but with rotating a image of moonlander,instead of original vectorgraohics ?If you can get screenshots, sure. Maybe using DosBox or similar?
Quote from: NoCforMe on March 14, 2025, 07:15:20 AMIt worked much better than google translateQuote from: daydreamer on March 14, 2025, 07:10:51 AMI wrote several .doc files in english as parts of my fantasy novel and desided to translate it to swedish,for those who dont understand english
Google translate was dissppointment,chatgpt might do better ?
Well, try it and let us know. (It's free, innit?)
Or you could try DeepSeek.
include \masm32\include\masm32rt.inc
.data
string1 db 'Melon',0
string2 db 'Apple',0
string3 db 'Orange',0
string4 db 'Banana',0
strArray dd string1,string2
dd string3,string4
msg db 'Fruit %u = %s'
db 13,10,0
.code
start:
call main
invoke ExitProcess,0
main PROC uses esi ebx
xor ebx,ebx
mov esi,OFFSET strArray
@@:
inc ebx
invoke crt_printf,ADDR msg,\
ebx,DWORD PTR [esi]
add esi,4
cmp ebx,4
jne @b
ret
main ENDP
END start
| 1 2 3 |
| 4 5 6 |
| 7 8 9 |
| a11 a12 a13 |
A = | a21 a22 a23 |
| a31 a32 a33 |
0 1 2 3 | 11 12 13 |
4 5 6 => | 21 22 23 |
7 8 9 | 31 32 33 |
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; - - - EQUates. - - -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Element EQU 3 ; Number of elements in a column or row.
ElSize EQU 10 ; Ten bytes per floating point number.
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; - - - 3 x 3 matrices with leading zero element for addressing.
IdentWrk DT 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0
IdentTmp DT 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0
IdentRes DT 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0
MatrixWk DT 0.0, 3.0,-2.0, 2.0, 1.0, 2.0,-3.0, 4.0, 1.0, 2.0
MatrixW2 DT 0.0, 3.0,-2.0, 2.0, 1.0, 2.0,-3.0, 4.0, 1.0, 2.0
ColumnWk DT 10 DUP( 0.0 )
RowWork DT 10 DUP( 0.0 )
TempWork DT 10 DUP( 0.0 )
ColI DW 0
ColJ DW 0
RowI DW 0
IndxWrk DW 0
Matrix DD OFFSET MatrixWk ; Defines an OFFSET to the wanted matrix.
Three DW Element
Ten DW ElSize
; - - - Matrix OFFSETs for FMatMul
MatrixA DD OFFSET RowWork
MatrixB DD OFFSET MatrixWk
MatrixC DD OFFSET TempWork
; - - - Matrix elements are specified by row and column number.
IndexI DW 0
IndexJ DW 0
IndexK DW 0
; - - - Matrix elements are specified by one number, an offset
; from array start.
; C(I,J)=C(I,J)+(A(I,K)*B(K,J))
IndexIJ DW 0
IndexIK DW 0
IndexKJ DW 0
; - - - Matrix elements are specified by an address, one number,
; an offset from array start based on element size.
ADDR_IJ DD 0
ADDR_IK DD 0
ADDR_KJ DD 0
COMMENT !
28 August 2019
Implement a set of elementary matrix operations.
Type One: Interchange of (swap) the ith and jth columns denoted by
C(i,j).
Type Two: Multiplication of the ith column vector by the nonzero
constant c, denoted by cCi.
Type Three: Adding to the ith Col vector, k times the jth column
vector, denoted by Ci + kCj.
These can be done as an algorithm or by using a multiplcation by
an elementary matrix.
Reference: Basic Matrix Theory, Leonard E. Fuller, Dover edition
2017; Prentice-Hall edition 1962.
!
Note that there are the equivalent set of elementary row operations.
And column and row operations can be both be used.
The higher level routines then tend to look like the following code.
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ColT1 PROC
; Type One:
; Interchange of (swap) the ith and jth columns denoted by C(i,j).
;
; Change identity | 1 0 0 | | 1 0 0 |
; matrix to a swap | 0 ii 0 | -> | 0 0 ij |
; columns matrix. | 0 0 jj | | 0 ji 0 |
;
; INPUT: ColI
; ColJ
; Matrix
MOV EBX, OFFSET ColumnWk
CALL MkIdent
CALL ZeroII
CALL ZeroJJ
CALL OneIJ
CALL OneJI
RET
ColT1 ENDP
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1.0 0.0 0.0 |
| 0.0 1.0 0.0 |
| 0.0 0.0 1.0 |
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MkIdent PROC
; While matrix notation is one based, X86 addressing is
; easier as zero based. Either think or be confused?
; Element is the number of rows and columns
; in the square matrix, one based.
;
; INPUT: EBX = OFFSET Matrix
MOV CX,0 ; Column counter
MOV EDI,10 ; Offset in matrix IdentWrk
MId_1:
MOV BP,0 ; Row counter
MId_2:
CMP CX,BP ; I = J ?
JNE MId_3
FLD1
;- FSTP IdentWrk[EDI]
FSTP TBYTE PTR [EBX+EDI]
JMP MId_4
MId_3:
FLDZ
;- FSTP IdentWrk[EDI]
FSTP TBYTE PTR [EBX+EDI]
MId_4:
ADD EDI,10 ; Size of number...
INC BP
CMP BP,Element ; End of row?
JB MId_2
MOV BP,0
INC CX
CMP CX,Element ; End of Matrix?
JB MId_1
RET
MkIdent ENDP
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MkIndexIJ PROC
; INPUT: ColI
; ColJ
MOV AX,[ColI]
DEC AX ; One to zero based.
MUL Three
MOV DX,[ColJ]
DEC DX ; One to zero based.
ADD AX,DX
INC AX ; Zero to one based.
MUL Ten ; Array element size.
MOV [IndxWrk],AX
RET
MkIndexIJ ENDP
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quote from: sinsi on March 14, 2025, 04:48:14 AMMight try a bigger GIF with more frames next.I played around with your program today, sinsi.