Download Pelles C here: http://www.pellesc.se
Quote from: John Z on April 24, 2026, 07:22:46 PMThat was fast, thanks!Some things went quicker than I thought, but I have no problem with that...

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!![]()

Page created in 0.041 seconds with 15 queries.