News:

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

Main Menu

Full screen mode under Windows 7-32

Started by Gunther, October 17, 2014, 08:23:04 AM

Previous topic - Next topic

Gunther

Is there a way to switch into the full screen mode (command prompt) under Windows 7-32?

Gunther
You have to know the facts before you can distort them.

Zen

Tricky question. I don't think so. Maybe you should ask a physicist.
You could, of course, have a sophisticated program that enables Full Screen Mode, that you invoke from the command prompt,...
...But, then you'll be stuck, and have no way back to 'Windowed' mode. It's kind of like time-travel, in that respect,...

If there is a way to do this, it's probably with: Windows Management Instrumentation Command-Line,...although, I don't know of a WMI class (and, it would probably be: Win32_DesktopMonitor Class) that has a method named: FULLSCREEN,...
...Just for fun,...here is a blog entry from Raymond Chen: How Do I Switch a Window Between Normal and Fullscreen ?, Apr 2010

I can't imagine why you'd want to do this,...do you have your high level clearances ??? Did you check your thunks ???
Zen

Gunther

Hi Zen,

Quote from: Zen on October 17, 2014, 09:00:45 AM
...Just for fun,...here is a blog entry from Raymond Chen: How Do I Switch a Window Between Normal and Fullscreen ?, Apr 2010

you're a little quipster.  :lol: But thank you for the link with Raymond Chen's blog post.  :t Interesting.

Gunther
You have to know the facts before you can distort them.

TouEnMasm


If there is a way to do what you want,search here:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx
the shellexecute allow command prompt and all windows commands
Fa is a musical note to play with CL

sinsi

Quote from: Gunther on October 17, 2014, 08:23:04 AM
Is there a way to switch into the full screen mode (command prompt) under Windows 7-32?

Gunther
NVidia and ATI, along with Microsoft, decided not to support full screen consoles (really, all text-modes) in their drivers from Vista onwards.

hutch--

Do the alternative, change the window size and placement with the standard settings for the console. Change the font sizes if you need to and you should get what you are after.

Gunther

Quote from: hutch-- on October 17, 2014, 07:24:46 PM
Do the alternative, change the window size and placement with the standard settings for the console. Change the font sizes if you need to and you should get what you are after.

That's a way to go, indeed.

Quote from: sinsi on October 17, 2014, 07:06:06 PM
NVidia and ATI, along with Microsoft, decided not to support full screen consoles (really, all text-modes) in their drivers from Vista onwards.

Is that true? With the old XP the full screen did work well.

Gunther
You have to know the facts before you can distort them.

six_L

Quote from: Zen on October 17, 2014, 09:00:45 AM
...Just for fun,...here is a blog entry from Raymond Chen: How Do I Switch a Window Between Normal and Fullscreen ?, Apr 2010
the way from Raymond Chen can't be go.
tested it here.
.586
.model flat, stdcall  ;32 bit memory model
option casemap :none  ;case sensitive
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
include \masm32\include\windows.inc                         
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\shell32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\gdi32.inc
include \masm32\include\advapi32.inc
include \masm32\include\comctl32.inc
include \masm32\include\masm32.inc
include \masm32\include\debug.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\advapi32.lib
includelib \masm32\lib\comctl32.lib
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\debug.lib
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
DlgProc PROTO :HWND,:UINT,:WPARAM,:LPARAM
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
include \masm32\macros\macros.asm
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
.const
IDD_DIALOG equ 1000
IDB_EXIT        equ 1001
IDB_CSET equ 1002
IDB_CRES equ 1003
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
.data
inbuf BYTE 256 dup (0)
hApp dd 0

;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
.data?
hInstance dd ?
hFont dd ?
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
.code
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
cCreateButton proc hParent:DWORD,lpText:DWORD,x:DWORD,y:DWORD,w:DWORD,h:DWORD,ID:DWORD

invoke CreateWindowEx,0,CTXT('BUTTON'),lpText,WS_CHILD or WS_VISIBLE ,
x,y,w,h,hParent,ID,
hInstance,NULL
push eax
invoke SendMessage,eax,WM_SETFONT,hFont, 0
pop eax
ret

cCreateButton endp
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
cSetFullScreen proc uses ebx hwnd:DWORD
LOCAL dwStyle:DWORD
LOCAL mi:MONITORINFO
LOCAL g_wpPrev:WINDOWPLACEMENT

comment * ---------------------------------------------------------------
DWORD dwStyle = GetWindowLong(hwnd, GWL_STYLE);
if (dwStyle & WS_OVERLAPPEDWINDOW) { MONITORINFO mi = { sizeof(mi) };
if (GetWindowPlacement(hwnd, &g_wpPrev) && GetMonitorInfo(MonitorFromWindow(hwnd,MONITOR_DEFAULTTOPRIMARY), &mi))
{ SetWindowLong(hwnd, GWL_STYLE, dwStyle & ~WS_OVERLAPPEDWINDOW);
  SetWindowPos(hwnd, HWND_TOP, mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left,
mi.rcMonitor.bottom - mi.rcMonitor.top,SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
}
else { SetWindowLong(hwnd, GWL_STYLE,dwStyle | WS_OVERLAPPEDWINDOW);
SetWindowPlacement(hwnd, &g_wpPrev);
SetWindowPos(hwnd, NULL, 0, 0, 0, 0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
}
}
        --------------------------------------------------------------- *

invoke GetWindowLong, hwnd,GWL_STYLE
mov dwStyle,eax
.if eax && WS_OVERLAPPEDWINDOW
invoke GetWindowPlacement, hwnd,addr g_wpPrev
mov ebx,eax
invoke MonitorFromWindow,hwnd,MONITOR_DEFAULTTOPRIMARY
mov ecx,eax
mov eax,sizeof mi
mov mi.cbSize,eax
invoke GetMonitorInfo,ecx,addr mi
.if eax && ebx
mov ecx,dwStyle
and ecx,WS_OVERLAPPEDWINDOW
invoke SetWindowLong,hwnd,GWL_STYLE,ecx
mov eax,mi.rcMonitor.right
sub eax,mi.rcMonitor.left
mov ecx,mi.rcMonitor.bottom
sub ecx,mi.rcMonitor.top

invoke SetWindowPos,hwnd,HWND_TOP,mi.rcMonitor.left,mi.rcMonitor.top,eax,ecx,SWP_NOOWNERZORDER or SWP_FRAMECHANGED
.endif
.else
mov ecx,dwStyle
or ecx,WS_OVERLAPPEDWINDOW
invoke SetWindowLong,hwnd,GWL_STYLE,ecx
invoke SetWindowPlacement,hwnd,addr g_wpPrev
xor ecx,ecx
invoke SetWindowPos,hwnd,NULL,ecx,ecx,ecx,ecx,SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_NOOWNERZORDER or SWP_FRAMECHANGED
.endif

ret
cSetFullScreen endp
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
DlgProc proc hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM

.if uMsg == WM_CREATE

invoke  CreateFont,14,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE, \
ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, \
DEFAULT_QUALITY,DEFAULT_PITCH, CTXT("Microsoft YaHei UI")
mov hFont,eax
invoke SendMessage,hWnd,WM_SETFONT,eax, 0

invoke cCreateButton,hWnd,CTXT('SetSCR'),7,56,56,20,IDB_CSET
invoke cCreateButton,hWnd,CTXT('ResSCR'),65,56,56,20,IDB_CRES
invoke cCreateButton,hWnd,CTXT('Exit'),183,56,56,20,IDB_EXIT
.elseif uMsg == WM_COMMAND
.if wParam == IDB_EXIT
invoke DestroyWindow, hWnd
.elseif wParam==IDB_CSET
invoke FindWindow, CTXT("ConsoleWindowClass"),0
;invoke FindWindow, CTXT("Notepad"),0
mov hApp,eax
.if hApp == 0
invoke WinExec,CTXT("cmd.exe"),SW_SHOW
;invoke WinExec,CTXT("notepad.exe"),SW_SHOW
invoke Sleep,200
invoke FindWindow, CTXT("ConsoleWindowClass"),0
;invoke FindWindow, CTXT("Notepad"),0
mov hApp,eax
.endif

invoke SetForegroundWindow, hApp
invoke cSetFullScreen,hApp
.elseif wParam==IDB_CRES
invoke MessageBeep,MB_OK
.endif
.elseif uMsg == WM_CLOSE
invoke DestroyWindow, hWnd
.elseif uMsg == WM_DESTROY
invoke PostQuitMessage, NULL
.else
invoke DefWindowProc, hWnd, uMsg, wParam, lParam
ret
.endif
        xor    eax, eax
        ret

DlgProc endp
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
TopXY proc wDim:DWORD, sDim:DWORD

shr sDim, 1     
shr wDim, 1     
mov eax, wDim   
sub sDim, eax   

mov eax, sDim
ret

TopXY endp
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
WinMain proc hInst:DWORD, hPrevInst, CmdLine, CmdShow
LOCAL wc:WNDCLASSEX
LOCAL msg:MSG
LOCAL Wwd:DWORD
LOCAL Wht:DWORD
LOCAL Wtx:DWORD
LOCAL Wty:DWORD
LOCAL hWnd:HANDLE

        mov wc.cbSize, sizeof WNDCLASSEX
        mov wc.style, CS_BYTEALIGNCLIENT or CS_BYTEALIGNWINDOW
        mov wc.lpfnWndProc, offset DlgProc
        mov wc.cbClsExtra, NULL
        mov wc.cbWndExtra, NULL
        m2m wc.hInstance,hInst
        mov wc.hbrBackground, COLOR_BTNFACE+1
        mov wc.lpszClassName, CTXT("cmdFullSCR")
invoke LoadIcon, NULL, IDI_APPLICATION
        mov wc.hIcon, eax
        mov wc.hIconSm, eax
invoke LoadCursor, NULL, IDC_ARROW
        mov wc.hCursor, eax

invoke RegisterClassEx, addr wc
mov Wwd, 250
mov Wht, 110

invoke GetSystemMetrics,SM_CXSCREEN
invoke TopXY,Wwd,eax
mov Wtx, eax

invoke GetSystemMetrics,SM_CYSCREEN
invoke TopXY,Wht,eax
mov Wty, eax

invoke CreateWindowEx, NULL, CTXT("cmdFullSCR"),\
CTXT("cmdFullSCR"), WS_MINIMIZEBOX or WS_SYSMENU or WS_OVERLAPPED,\
Wtx,Wty,Wwd,Wht,NULL, NULL, hInst, NULL
        mov hWnd, eax

invoke ShowWindow, hWnd, SW_SHOWNORMAL
invoke UpdateWindow, hWnd

.while TRUE
invoke GetMessage, addr msg, NULL, 0, 0
.break .if (!eax)
invoke TranslateMessage, addr msg
invoke DispatchMessage, addr msg
.endw
        mov eax, msg.wParam
        ret

WinMain endp
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke GetCommandLine
invoke WinMain, hInstance ,NULL, eax, SW_SHOWDEFAULT
invoke ExitProcess,0
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end start
Say you, Say me, Say the codes together for ever.

TWell

That g_wpPrev:WINDOWPLACEMENT should be global ?

dedndave

when you use a full-screen console under XP, the OS uses the fonts that are inside the VGA BIOS ROM
which is faster, i guess   :redface: (no stretching of chars)
also, you can use graphics modes like 13h, etc and program the VGA registers under 16-bit code, of course
but, if the VGA manufacturers quit supporting the BIOS fonts - that all goes away
and, under 64-bit windows, you can't use the other graphics modes in 16-bit code - lol

you can make a full-screen GUI window and emulate a console, though
which probably isn't as hard as it might sound

here's a routine i use for display (no keyboard input, for now)
you'll have to work out the font, colors, and buffer stuff, of course

;*************************************************************************************************************

        OPTION  PROLOGUE:None
        OPTION  EPILOGUE:None

dTxtOut PROC    lpTxt:LPSTR

;intended to more-or-less emulate the console StdOut function
;some elements of behaviour mock that of the console - others mock that of a text editor like notepad
;
; 1) The FormFeed character (12) may be used to clear the screen.
; 2) The Bell character (7) is not expanded to a sound; It is a visible character.
; 3) Tabs are expanded to spaces that overwrite existing text, similar to the console.
;    Text editors simply move the cursor or, perhaps, insert spaces.
; 4) Spaces (32) at the end of a line count as visible; Nulls (0) do not.
;    This primarily affects scrollbar behaviour, which is similar to a text editor.
; 5) Because Nulls are used as string terminators, there is no convenient way to clear an area.
;    For this reason, a ClearLine function is provided that will clear to end-of-line from a given position.
;    The ClearLine function does not alter the location counters.
; 6) The dTxtOut function line-wraps and updates location counters, similar to a console.
;    However, I never liked the way the console (or VT-100) handled line-wrap and CR/LF.
;    Therefore, the X location counter has special properties:
;   a) We allow the X location to be equal to the row length (normally, the max is row length - 1).
;      This indicates that the last char on the line has been written, and no more.
;   b) If the current X location is equal to the row length:
;      1) If the buffer location is calculated to stream the next visible char, a NextLine is generated.
;      2) CarriageReturn and LineFeed behave as desired, without inserting extra blank lines.
;      3) A NextLine is generated prior to expanding a Tab.
;   c) Care must be taken if retrieving the current location.
;      The caller must be aware of the maximum valid X position.
; 7) When a line feed is streamed in a console window, the viewable portion is scrolled so
;    that the last line is visible. This behaviour can be irritating if you are trying to view
;    older screen text. In this implementation, a single line is scrolled, instead. This permits
;    the viewing of older text while still letting the viewer know that an update has occured.
; 8) Unlike the console, all text uses the same 2 colours; foreground and background.
;    This version does not implement character attributes.

;----------------------

;prologue

        push    esi
        call    Justify
        push    ebx
        mov     esi,[esp+12]
        push    edi
        dec     esi
        push    ebp

;----------------------

;string scan

dTxtO0: inc     esi
        call    StrScan
        jz      dTxtOC

        or      edx,edx
        jz      dTxtOD

dTxtO1: push    edx

;----------------------

;output to buffer

        mov     ebp,rvs.LocCntX
        mov     ebx,dbi.BufferColumns
        sub     ebx,ebp
        jnz     dTxtO3

        xchg    ebx,ebp

dTxtO2: push    eax
        push    edx
        call    dNewLine
        pop     edx
        pop     eax

dTxtO3: cmp     edx,8
        mov     edi,dbi.RowLength
        mov     ecx,rvs.LocCntY
        jnz     dTxtO5

        cmp     dh,rvs.BufDisable
        jnz     dTxtO4

        mov     eax,ebp
        and     eax,7
        neg     eax
        add     eax,edx
        cmp     eax,ebx
        jbe     dTxtO6

        mov     eax,ebx
        jmp short dTxtO6

dTxtO4: pop     edx
        pop     eax
        pop     eax
        pop     esi
        jmp     dTxtOJ

dTxtO5: cmp     dh,rvs.BufDisable
        jz      dTxtO6

        pop     edx
        jmp     dTxtOJ

dTxtO6: imul    edi,ecx
        mov     dl,dh
        add     edi,dbi.lpDisplayBuf
        cmp     ecx,cg.v.CellsUsed
        jb      dTxtO8

        inc     ecx
        or byte ptr rvs.dUpdateFlags,3
        cmp     dx,[edi]
        mov     cg.v.CellsUsed,ecx
        mov     edx,cg.v.NewPos
        jnz     dTxtO8

        cmp     edx,cg.v.CurPos
        jnz     dTxtO8

        push    ebx
        sub     ecx,edx
        mov     ebx,cg.v.CellSize
        imul    ecx,ebx
        cmp     ecx,pvs.TxtHeight
        jb      dTxtO7

        inc     edx
        mov     cg.v.NewPos,edx
        imul    ebx,edx
        mov     cg.v.s.nPos,ebx

dTxtO7: pop     ebx

dTxtO8: add     edi,2
        mov     ecx,ebx
        push    edi
        add     edi,ebp
        cmp     eax,ebx
        jae     dTxtO9

        mov     ecx,eax
        mov     ebx,eax

dTxtO9: rep     movsb
        add     ebp,ebx
        pop     edi
        mov     rvs.LocCntX,ebp
        mov     edx,edi
        mov     ebp,dbi.BufferColumns
        add     edx,ebp

dTxtOA: dec     edx
        cmp     cl,[edx]
        jz      dTxtOA

        inc     edx
        inc     ecx
        sub     edx,edi
        cmp     edx,cg.h.CellsUsed
        mov     [edi-2],dx
        jbe     dTxtOB

        or      ecx,2
        mov     cg.h.CellsUsed,edx

dTxtOB: or      rvs.dUpdateFlags,cl
        sub     eax,ebx
        push    0
        mov     ebx,ebp
        pop     ebp
        jnz     dTxtO2

;----------------------

;special char dispatch

        pop     edx

dTxtOC: or      edx,edx                  ;form feed
        jz      dTxtOE

        sub     edx,8                    ;tab complete
        jz      dTxtOF

        inc     edx                      ;line feed
        jz      dTxtOG

        inc     edx                      ;carriage return
        jz      dTxtOH

        inc     edx                      ;tab
        jnz     dTxtOI                   ;otherwise, it's the null terminator

;----------------------

;special char = tab

        mov     eax,20202020h
        push    esi
        push    eax
        push    eax
        mov     edx,8                    ;special char indicator = tab complete
        mov     esi,esp
        jmp     dTxtO1

;----------------------

;special char = form feed (clear screen)

dTxtOD: add     esi,eax

dTxtOE: mov     edi,dbi.lpDisplayBuf
        xchg    eax,edx
        mov     ecx,dbi.BufCalc4         ;RowLength*BufferRows/4
        mov     rvs.LocCntX,eax
        rep     stosd
        mov     rvs.LocCntY,eax
        or byte ptr rvs.dUpdateFlags,7
        jmp     dTxtO0

;----------------------

;special char = tab complete

dTxtOF: pop     eax
        pop     edx
        pop     esi
        jmp     dTxtO0

;----------------------

;special char = line feed

dTxtOG: call    NextLine
        jmp     dTxtO0

;----------------------

;special char = carriage return

dTxtOH: mov     rvs.LocCntX,edx
        jmp     dTxtO0

;----------------------

;display update

;EAX = 0

dTxtOI: mov     al,DMODE_TEXTOUT
        call    mcUpdate

;----------------------

;epilogue

dTxtOJ: pop     ebp
        xchg    eax,esi
        pop     edi
        pop     ebx
        sub     eax,[esp+8]
        pop     esi
        ret     4

dTxtOut ENDP

        OPTION  PROLOGUE:PrologueDef
        OPTION  EPILOGUE:EpilogueDef

;*************************************************************************************************************

Gunther

Dave,

Quote from: dedndave on October 18, 2014, 05:20:05 AM
here's a routine i use for display (no keyboard input, for now)
you'll have to work out the font, colors, and buffer stuff, of course

but the idea is good. On the other hand, for 16-bit code under 64-bit Windows you can set up a virtual machine with DOS and all old standard VGA modes are useable, including ModeX.

Gunther
You have to know the facts before you can distort them.

TouEnMasm

Fa is a musical note to play with CL

Gunther

Hi ToutEnMasm,

unfortunately, the entire site is in French. The EXE works under Windows 7-64, but nothing happens.

Gunther
You have to know the facts before you can distort them.

TouEnMasm


A brief translate:
1° soluce)Open a  dos window and press Alt+enter,you go full screen with the prompt message.
2° soluce) Modify a register key (use regedit):
       HKEY_CURRENT_USER\Console\FullScreen = 1
Fa is a musical note to play with CL

Gunther

Quote from: ToutEnMasm on October 23, 2014, 05:41:32 PM
A brief translate:
1° soluce)Open a  dos window and press Alt+enter,you go full screen with the prompt message.
2° soluce) Modify a register key (use regedit):
       HKEY_CURRENT_USER\Console\FullScreen = 1

thank you, I'll give it a try.

Gunther
You have to know the facts before you can distort them.