News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Test Junk

Started by MichaelW, December 19, 2004, 11:16:44 AM

Previous topic - Next topic

MichaelW

Seems to work OK, but I liked the appearance of the old forum much better. Maybe they have a phpbb2 skin available ;D [edit] I assume the attachment feature is disabled.[/edit]

; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

    .486                       ; create 32 bit code
    .model flat, stdcall       ; 32 bit memory model
    option casemap :none       ; case sensitive

    include \masm32\include\windows.inc
    include \masm32\include\masm32.inc
    include \masm32\include\user32.inc
    include \masm32\include\kernel32.inc
    include \masm32\include\shlwapi.inc
    includelib \masm32\lib\masm32.lib
    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\shlwapi.lib
    include \masm32\macros\macros.asm

    printv MACRO varname:VARARG
      FOR arg, <varname>
        invoke StdOut, reparg(arg)
      ENDM
    ENDM
    NL  EQU SADD(13,10)
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    .data
        buffer      db 40 dup(0)
        freeSpace   dd 0,0
        totalSize   dd 0,0
    .code
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

start:
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
    invoke GetDiskFreeSpaceEx,NULL,ADDR freeSpace,ADDR totalSize,NULL

    invoke StrFormatByteSize64, freeSpace, freeSpace+4, ADDR buffer, 40
    printv chr$("Free Space: "), ADDR buffer, NL

    invoke StrFormatByteSize64, totalSize, totalSize+4, ADDR buffer, 40
    printv chr$("Total Size: "), ADDR buffer, NL

    printv NL, chr$("Press enter to exit..."), NL
    invoke StdIn, addr buffer, 1
    exit
; ««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start

Quote
BOOL GetDiskFreeSpaceEx(
  LPCTSTR lpDirectoryName,
  PULARGE_INTEGER lpFreeBytesAvailable,
  PULARGE_INTEGER lpTotalNumberOfBytes,
  PULARGE_INTEGER lpTotalNumberOfFreeBytes
);

Parameters
lpDirectoryName
[in] Pointer to a null-terminated string that specifies a directory on the disk of interest. If this parameter is NULL, the function uses the root of the current disk. If this parameter is a UNC name, it must include a trailing backslash (for example, \\MyServer\MyShare\).
Note that this parameter does not have to specify the root directory on a disk. The function accepts any directory on the disk.

lpFreeBytesAvailable
[out] Pointer to a variable that receives the total number of free bytes on the disk that are available to the user associated with the calling thread. This parameter can be NULL.
If per-user quotas are in use, this value may be less than the total number of free bytes on the disk.

lpTotalNumberOfBytes
[out] Pointer to a variable that receives the total number of bytes on the disk that are available to the user associated with the calling thread. This parameter can be NULL.
If per-user quotas are in use, this value may be less than the total number of bytes on the disk.

lpTotalNumberOfFreeBytes
[out] Pointer to a variable that receives the total number of free bytes on the disk. This parameter can be NULL.


eschew obfuscation

hutch--

 ;D

Michael,

I will get there, I have about 5 minute longer in this forum than the current members. Its REALLY different logic in its setup to the PHPBB2 stuff.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Mark_Larson


I like some of the parts of this forum better, and some from the old.  The /quoting and /code from the old forum was easier to read.  I like most of the ways this new board is set up over the old one.  For example typing in my message is nicer because you have a longer window to do the typing.  You can also do more tricks with your message.  I think this is definitely a better choice.
BIOS programmers do it fastest, hehe.  ;)

My Optimization webpage
htttp://www.website.masmforum.com/mark/index.htm

Bieb

Looky here, it has seb and superscripts!
2A16
28

And teletype, whatever that is...