Assembler Gems & Reference
              
Back to Home Page
 
l2incA & l2incU
These are a pair of identical executable files except that the "A" version produces ANSI functions prototypes  and the "U" version produces UNICODE prototypes. These versions are slightly faster than the previous  one, they are designed to be used with the PLATFORMSDK import libraries but have also been tested with the VS98 set of libraries and work OK. They test if a library is only a static library or if it contains no imports and will not write an empty include file.
 
Opcodes2.hlp Local file
A windows help file that has both hex opcodes and mnemonics. The technical data in this help file is current to i486 hardware but contains a list of later hex opcodes for more specialised applications.
 
symbiote.zip
This is a very clever piece of DOS assembler programming. It was written by the TASM master gthorne using an old virus technique for adding functionality to an existing EXE or COM file. If you have old DOS utilities where the source code has been lost years ago and you want to extend its functionality, this very clever piece of code is capable of doing it. You can for example, add the code to clear the screen first before running the utility by writing the code into symbiote. This version has been directly downloaded from gthorne's page so it is safe to use.
 
vgalign
VG's cute little toys for trimming the fat of a TASM 32 bit EXE file. This comes with TASM 5 source code.
 
vgimport
Need to know how to get the address of a windows API without needing to use GetProcAddress() ? VG's latest toy complete with TASM 5 source code will show you how.
 
Intel Developer Manuals Link to Intel
The best documented and most detailed design and technical data available for writing in assembler. There is an optimisation manual and a three volume set of software developer's manuals. The files are in PDF format.
 
Assembler code Optimisation  Link to Agner Fog's home page
Very good and recently updated documentation on optimising code for pentium processors. This is advanced material but well worth reading if fast assembler interests you.
 
MASM32 procedure for framing areas of a window

; ########################################################################
 
Frame3D proc hDC:DWORD,btn_hi:DWORD,btn_lo:DWORD,
             tx:DWORD, ty:DWORD, lx:DWORD, ly:DWORD,bdrWid:DWORD
 
  ; ---------------------------------------------
  ; example usage code for calling this procedure
  ; ---------------------------------------------
 
  ; LOCAL btn_hi   :DWORD
  ; LOCAL btn_lo   :DWORD
 
  ; invoke GetSysColor,COLOR_BTNHIGHLIGHT
  ; mov btn_hi, eax
 
  ; invoke GetSysColor,COLOR_BTNSHADOW
  ; mov btn_lo, eax
 
  ; invoke Frame3D,hDC,btn_lo,btn_hi,50,50,150,100,2
  ; invoke Frame3D,hDC,btn_hi,btn_lo,47,47,153,103,2
  ; --------------------------------
 
    LOCAL hPen     :DWORD
    LOCAL hPen2    :DWORD
    LOCAL hpenOld  :DWORD
 
    invoke CreatePen,0,1,btn_hi
    mov hPen, eax
 
    invoke SelectObject,hDC,hPen
    mov hpenOld, eax
 
    ; ------------------------------------
    ; Save copy of parameters for 2nd loop
    ; ------------------------------------
    push tx
    push ty
    push lx
    push ly
    push bdrWid
 
    ; ------------
 
       lpOne:
 
        invoke MoveToEx,hDC,tx,ty,NULL
        invoke LineTo,hDC,lx,ty
 
        invoke MoveToEx,hDC,tx,ty,NULL
        invoke LineTo,hDC,tx,ly
 
        dec tx
        dec ty
        inc lx
        inc ly
 
        dec bdrWid
        cmp bdrWid, 0
        je lp1Out
        jmp lpOne
      lp1Out:
 
    ; ------------
    invoke CreatePen,0,1,btn_lo
    mov hPen2, eax
    invoke SelectObject,hDC,hPen2
    mov hPen, eax
    invoke DeleteObject,hPen
    ; ------------
 
    pop bdrWid
    pop ly
    pop lx
    pop ty
    pop tx
 
       lpTwo:
 
        invoke MoveToEx,hDC,tx,ly,NULL
        invoke LineTo,hDC,lx,ly
 
        invoke MoveToEx,hDC,lx,ty,NULL
        inc ly
        invoke LineTo,hDC,lx,ly
        dec ly
 
        dec tx
        dec ty
        inc lx
        inc ly
 
        dec bdrWid
        cmp bdrWid, 0
        je lp2Out
        jmp lpTwo
      lp2Out:
 
    ; ------------
    invoke SelectObject,hDC,hpenOld
    invoke DeleteObject,hPen2
 
    ret
 
Frame3D endp

; #########################################################################

 
 Back to Home Page