Download Pelles C here: http://www.pellesc.se
QuoteOptional features
The library supports three compile-time flags to strip unused functionality and reduce binary size. All features are enabled by default -- if you just drop the source files into your project and compile, everything works as before.
.386
.model flat,stdcall
option casemap:none
include ConsoleScroll.inc
.data
Coordinates dw 30,5
message db ' This is a scroll test. ',0
.code
start:
invoke ClearScreen
call scroll
invoke ExitProcess,0
scroll PROC uses esi edi ebx
LOCAL hStd:DWORD
invoke GetStdHandle,STD_OUTPUT_HANDLE
mov hStd,eax
mov esi,OFFSET message
invoke lstrlen,esi
mov ebx,eax
mov edi,1
@@:
invoke SetConsoleCursorPosition,\
hStd,Coordinates
invoke StdOut,esi
invoke Sleep,200
add esi,edi
dec ebx
jnz @b
ret
scroll ENDP
ClearScreen PROC ; function from the Masm32 package
LOCAL hOutPut:DWORD
LOCAL noc :DWORD
LOCAL cnt :DWORD
LOCAL sbi :CONSOLE_SCREEN_BUFFER_INFO
invoke GetStdHandle,STD_OUTPUT_HANDLE
mov hOutPut, eax
invoke GetConsoleScreenBufferInfo,hOutPut,ADDR sbi
mov eax, sbi.dwSize
push ax
rol eax, 16
mov cx, ax
pop ax
mul cx
cwde
mov cnt, eax
invoke FillConsoleOutputCharacter,hOutPut,\
32,cnt,0,ADDR noc
invoke locate,0,0
ret
ClearScreen ENDP
locate PROC x:DWORD,y:DWORD ; function from the Masm32 package
LOCAL hOutPut :DWORD
invoke GetStdHandle,STD_OUTPUT_HANDLE
mov hOutPut, eax
; -----------------------------------
; make both co-ordinates into a DWORD
; -----------------------------------
mov ecx,x
mov eax,y
shl eax,16
mov ax,cx
invoke SetConsoleCursorPosition,hOutPut,eax
ret
locate ENDP
StdOut PROC lpszText:DWORD ; function from the Masm32 package
LOCAL hOutPut :DWORD
LOCAL bWritten :DWORD
LOCAL sl :DWORD
invoke GetStdHandle,STD_OUTPUT_HANDLE
mov hOutPut, eax
invoke lstrlen,lpszText
mov sl,eax
invoke WriteFile,hOutPut,lpszText,\
sl,ADDR bWritten,0
mov eax,bWritten
ret
StdOut ENDP
END start
Quote from: mid-kid on April 22, 2026, 09:50:18 PMI hope this helps solve the conundrumYes, it does. Thanks!![]()

#include <stdlib.h>
#pragma comment(lib, "zip.lib")
#define ZIP_DEFAULT_COMPRESSION_LEVEL 6
typedef struct zip_t zip_t;
extern zip_t __stdcall *zip_open(const char *zipname, int level, char mode);
extern int __stdcall zip_entry_open(zip_t *zip, const char *entryname);
extern int __stdcall zip_entry_fwrite(zip_t *zip, const char *filename);
extern int __stdcall zip_entry_close(zip_t *zip);
extern int __stdcall zip_close(zip_t *zip);
int __cdecl main(void)
{
zip_t *zip = zip_open("test.zip", ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
{
zip_entry_open(zip, "sample.docx");
{
zip_entry_fwrite(zip, "sample.docx");
}
zip_entry_close(zip);
}
zip_close(zip);
return 0;
}
Quotestdc_first_leaning_one finds the first 1 bit, searching from most significant to least significant. The index of this bit is returned such that the most significant bit is 1 and the least significant bit is w, where w is the amount of bits in the data type. 0 is returned when no match was found.
Page created in 0.061 seconds with 15 queries.