News:

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

Main Menu

DXF loader

Started by daydreamer, May 08, 2020, 10:01:38 PM

Previous topic - Next topic

daydreamer

started with switch$/case$ to try a newer version in asm
but I think I try a simplified version instead with structured data,which float is controlled by "10,11,12,13...", and "20,21,22,23..." and "30,31,32,33..." points to x1,x2,x3 and y1,y2,y3 and z1,z2,z3
cant get it right to dup thousands of xyz structures

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
    include \masm32\include\masm32rt.inc
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤





    ;    ----------------------------------------------------- *
   ; include \masm32\rcptest\dxfloader.inc
    .data?
      value dd ?
xyz struct ;offset 10=0,20=8,30=16
    xp real8 ?;10-19 ;x1-x9 =24* offset
    yp real8 ?;20-29 ;8+24*offset
    zp real8 ?;30-39 ;16+24*offset
xyz ends
    .data
    hFile dd 0
    hMem dd 0
    bWritten dd 0
    tmpbuf db 260 dup(0)
    objectn db 260 dup (0)
    material db 260 dup (0)
    coord1 xyz {0.0,0.0,0.0} ;dup (4096)
    coord2 xyz {0.0,0.0,0.0}
    coord3 xyz {0.0,0.0,0.0}
      item dd 0
      result real8 0.0
    .code

start:
   
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    call main
    inkey
    exit

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

main proc

    cls
    print "DXF file reader",13,10
    mov hFile, fcreate("gardenhouse1.dxf")
    ;mov hMem, halloc(4096000)
    mov hMem, alloc(4096000)
    inkey


    mov bWritten, fread(hFile,hMem,3000)
    print sstr$(hMem),10,13
    push ebx   
    lea esi,tmpbuf
   ;INVOKE StrToFloat, esi, ADDR result       
    pop ebx     





fclose hFile
;hfree hMem
free hMem

    ret

main endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end start
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding