Share to: share facebook share twitter share wa share telegram print page

Windows Console

Other namesWin32 console
Developer(s)Microsoft
Repositorygithub.com/microsoft/terminal/tree/main/src/host
Written inC++
Operating systemMicrosoft Windows
PlatformIA-32, x86-64, ARM64
TypeTerminal emulator
LicenseMIT License
Websitedocs.microsoft.com/en-us/windows/console/

Windows Console is the infrastructure for console applications in Microsoft Windows. An instance of a Windows Console has a screen buffer and an input buffer. It allows console apps to run inside a window or in hardware text mode (so as to occupy the entire screen). The user can switch between the two using the Alt+↵ Enter key combination. The text mode is unavailable in Windows Vista and later. Starting with Windows 10, however, a native full-screen mode is available.

Windows Console instances are typically used for apps that do not need to display images but might use color. Examples include cmd.exe, Windows PowerShell, Far Manager, and Midnight Commander.

In 2019, the console host was open-sourced under the MIT License, alongside Windows Terminal.[1]

Window and full screen modes

Windows PowerShell on Windows Vista
Midnight Commander using box-drawing characters

In Windows, a console application may run in two modes.

One mode places the text in a window and uses an operating system's font rendering. In this mode, an application's interaction with user is controlled by the windowing system. This is analogous to X Window System applications such as xterm.

The second is the full-screen mode. In Windows XP and earlier, the full-screen console uses a hardware text mode and uploads a raster font to the video adapter. This is analogous to a text system console. This early full-screen mode only supports VGA-compatible text modes, giving it a maximum character resolution of 80 columns by 28 rows.[2] This mode was deprecated in Windows Vista.[3] It was possible to circumvent this issue by installing a Windows XP display driver;[3] however, Windows 8 and later do not accept them.[4] Windows 10 features a full-screen mode once again, but this implementation uses the native Windows rendering subsystem, instead of the text mode. It can have as many columns and rows as fits on the screen.[5]

Apps can be made to switch between the two modes using the Alt+↵ Enter key combination.

Details

The input buffer is a queue where events are stored (from keyboard, mouse etc.). The output buffer is a rectangular grid where characters are stored, together with their attributes. A console window may have several output buffers, only one of which is active (i.e. displayed) for a given moment. Apps may programmatically interact with Windows Console through Windows API, which exposes both high-level functions (such as ReadConsole and WriteConsole) and low-level functions (e.g. ReadConsoleInput and WriteConsoleOutput).[6]

Users can change the color palette or font, either on the system-wide level or app-level. Each instance of a console app themselves, however, cannot change its color palette or font on the fly.

Windows Console apps are distinct from MS-DOS apps, even though on Windows (especially on Windows 9x), they may not look different. Windows Console apps have access to entire Windows API and do not run on MS-DOS or compatible operating systems. DOS apps, however, cannot access Windows API and may only run on 32-bit versions of Windows with the aid of Virtual DOS machine (VDM).

Implementations

In Windows 3.1 and earlier, there is no native support for consoles. Because those version are merely a graphical interface for MS-DOS, most text programs that ran on earlier Windows versions were actually MS-DOS programs running in a window. To simplify the task of porting applications to Windows, early versions of Visual C++ are supplied with QuickWin, a library that implements basic console functionality inside a regular window. A similar library for Borland C++ was called EasyWin.

Windows 9x

Command.com running in a Windows console on Windows 95

Windows 9x support is relatively poor compared to Windows NT, because the console window runs in the system virtual DOS machine and so keyboard input to a Win32 console application had to be directed to it by conagent.exe running in a DOS VM that are also used for real DOS applications by hooking the keyboard interrupt. conagent.exe then calls Vcond (which is a VxD). Vcond then had to pass the keyboard input to the System VM, and then finally to the Win32 console application. Besides performance, another problem with this implementation is that drives that are local to a DOS VM are not visible to a Win32 console application. This can cause confusion.

Under Windows 9x, the screen buffer mirrors the structure of VGA text buffer, with two bytes per character cell: one byte for character code, one byte for attributes (the character must be in OEM character set, the attribute is with high-intensity background/no blinking). This speeds up operation considerably if the actual VGA text mode is used.

Windows NT and Windows CE

The Windows Subsystem for Linux running Bash on Windows 10
Cmd.exe running on Windows CE 3.0

Traditionally, the Client/Server Runtime Subsystem (CSRSS) has been responsible for managing console windows on the Windows NT family of operating systems.[7] In Windows 7, CSRSS spawns one conhost.exe for each console window, to manage it. In Windows 8 and later, the console apps spawn their conhost.exe processes directly. This change has both security and usability implications. While CSRSS runs in a highly privileged security context, each conhost.exe runs in the same security context as the console app. In addition, in Windows 7, this change enabled console windows to have the features of the Aero Glass theme.[8]

On Windows NT and Windows CE, the screen buffer uses four bytes per character cell: two bytes for character code, two bytes for attributes. The character is then encoded in a 16-bit subset of Unicode (UCS-2).[9] For backward compatibility, the console APIs exist in two versions: Unicode and non-Unicode. The non-Unicode versions of APIs can use code page switching to extend the range of displayed characters (but only if TrueType fonts are used for the console window, thereby extending the range of codes available). Even UTF-8 is available as "code page 65001"[10] (displaying only from the UCS-2 subset of full Unicode[citation needed]).

As of the Windows 10 October 2018 update, the Windows Console has full Unicode support.[11]

See also

References

  1. ^ Cinnamon, Kayla (May 6, 2019). "Introducing Windows Terminal". Windows Command Line Tools For Developers. Microsoft. Retrieved May 10, 2019.
  2. ^ Julio Sanchez; Maria P. Canton (2003), "VGA Fundamentals, Part II: DOS Graphics", The PC Graphics Handbook (for C++ Programmers) (Book), CRC Press, p. 125, ISBN 0849316782
  3. ^ a b "Some 16-bit DOS-based Programs and the Command Prompt will not run in full-screen mode in Windows Vista and in Windows 7". Support. Microsoft. September 23, 2011.
  4. ^ "Roadmap for Developing Drivers for the Windows 2000 Display Driver Model (XDDM)". Windows Dev Center - Hardware. Microsoft. November 16, 2013. Retrieved December 16, 2013. XDDM and VGA drivers will not compile on Windows 8 and later versions
  5. ^ Tkachenko, Sergey (November 24, 2014). "Open command prompt fullscreen in Windows 10". Winaero. Retrieved July 31, 2019.
  6. ^ "Console Modes". Windows Console documentation. Microsoft. Retrieved October 13, 2020 – via Microsoft Docs.
  7. ^ Microsoft Security Advisory (930181): Exploit Code Published Affecting Windows Client Server Run-Time Subsystem
  8. ^ Yosifovich, Pavel; Ionescu, Alex; Russinovich, Mark E.; Solomon, David A. (May 15, 2017). Windows Internals, Part 1: System architecture, processes, threads, memory management, and more (7th ed.). Redmond, Washington: Microsoft Press. p. 67. ISBN 9780735684188.
  9. ^ "Console Reference". Microsoft. 2009. Retrieved January 1, 2010.
  10. ^ "Release Notes". docs.microsoft.com. Console: Fix for no output text being displayed in codepage 65001 (utf8)
  11. ^ Turner, Rich (November 15, 2018). "Windows Command-Line: Unicode and UTF-8 Output Text Buffer". Windows Command Line Tools For Developers. Microsoft. Retrieved June 14, 2019.

Read other articles:

Asosiasi Sepak Bola SloveniaUEFADidirikan1920Bergabung dengan FIFA1992Bergabung dengan UEFA1992PresidenAleksander ČeferinWebsitenzs.si Asosiasi Sepak Bola Slovenia (bahasa Slovenia: Nogometna zveza Slovenije (NZS)) adalah badan pengendali sepak bola di Slovenia. Kompetisi Badan ini menyelenggarakan beberapa kompetisi di Slovenia, yakni: Liga Pertama Slovenia Liga Kedua Slovenia Liga Ketiga Slovenia Liga Regional Slovenia Liga Wanita Slovenia Piala Sepak Bola Slovenia Piala Super Slovenia...

Este artigo ou seção parece estar escrito em formato publicitário ou apologético. Por favor ajude a reescrever este artigo para que possa atingir um ponto de vista neutro. (Fevereiro de 2022) Parque do Povo Parque do Povo (São Paulo) Localização Avenida Henrique Chamma, 420 (Itaim Bibi), São Paulo, SP Tipo Público Área 133.547 m² Inauguração 28 de setembro de 2008 (15 anos) Administração SVMA Patrimônio Cultural de São Paulo Nome oficial: Parque do Povo Categoria: In...

Restaurant Pyongyang in Phnom Penh, Kambodscha Pyongyang ist eine nach der nordkoreanischen Hauptstadt Pjöngjang benannte Restaurantkette mit rund 130 Standorten weltweit.[1] Die Restaurants sind im Besitz der Haedanghwa Group und werden von ihr betrieben. Das Unternehmen ist mutmaßlich eine Tarnfirma der Organisation Office 39, die der Finanzierung des nordkoreanischen Regimes dient.[2] Inhaltsverzeichnis 1 Standorte 2 Angebot 3 Betrieb 4 Weblinks 5 Einzelnachweise Standort...

  Cavendishia Dibujo de Cavendishia costaricensis, por L Hughey (b.c.)TaxonomíaReino: PlantaeDivisión: Fanerógama / MagnoliophytaClase: MagnoliopsidaOrden: EricalesFamilia: EricaceaeSubfamilia: VaccinioideaeTribu: VaccinieaeGénero: CavendishiaLindl.Especies Ver texto Sinonimia Polyboea Proclesia Socratesia[1]​ [editar datos en Wikidata] Cavendishia es un género de plantas perennes leñosas, muchas de las cuales son epífitas. Es nativo de áreas tropicales en zonas m...

Maider Castellano Datos personalesNacimiento Vitoria (España)18 de junio de 2003Nacionalidad(es) EspañolaCarrera deportivaDeporte Baloncesto[editar datos en Wikidata] Maider Castellano Escolar (Vitoria, 18 de junio de 2003) es una jugadora española de baloncesto de Liga Femenina. Trayectoria Su madre jugaba a baloncesto, entrenaba a niñas y desde que estaba en su tripa, iba a los partidos del Baskonia. Comenzó probando la natación o el atletismo, hasta que con cinco o seis añ...

Andjar SungkowoKomandan Kodiklatau ke-43Masa jabatan24 Oktober 2018 – 17 Juni 2019PendahuluMarsda TNI Chairil AnwarPenggantiMarsda TNI Diyah Yudanardi Informasi pribadiLahir30 Juni 1961 (umur 62)Magelang, Jawa TengahKebangsaanIndonesiaAlma materAkademi Angkatan Udara (1986)Karier militerPihak IndonesiaDinas/cabang TNI Angkatan UdaraMasa dinas1986–2019Pangkat Marsekal Muda TNISatuanKorps PenerbangSunting kotak info • L • B Marsekal Muda TNI (Purn.)...

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada November 2022. ExamTheatrical posterSutradara Stuart Hazeldine Produser Stuart Hazeldine * Gareth Unwin Ditulis oleh Stuart Hazeldine * Simon Garrity Pemeran Adar Beck * Chris Carey * Gemma Chan * Nathalie Cox * John Lloyd Fillingham * Chuk Iwuji * Luke Mably * Poll...

Hindu temple in Tamil Nadu, India Sthalasayana Perumal TempleKriba Samudira perumalReligionAffiliationHinduismDistrictThiruvarurDeitySthalasayana Perumal(Vishnu) Thirumaamagal Naachiyar(Lakshmi)FeaturesTower: Nanda Vardhana VimanamLocationLocationSirupuliyurStateTamil NaduCountryIndiaLocation in Tamil NaduGeographic coordinates10°59′26″N 79°40′10″E / 10.99056°N 79.66944°E / 10.99056; 79.66944ArchitectureTypeDravidian architectureDirection of façadeBhujanga...

Swedish playwright and writer This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help to improve this article by introducing more precise citations. (June 2013) (Learn how and when to remove this template message) Augusta Braunerhjelm Beata Fredrika Augusta Braunerhjelm (2 November 1839, in Edebo församling – 1929), was a Swedish playwright and writer. She was the daughter of chamberlain n...

This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help to improve this article by introducing more precise citations. (December 2022) (Learn how and when to remove this template message) 15th-century Spanish nobleman For the later diplomat, see Alonso de Cárdenas (ambassador). Cross of the Order of Santiago. Alonso de Cárdenas was a Spanish noble who was the 44th and 47th (and last) Grand ...

Swedish-Norwegian actress This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Maria Bonnevie – news · newspapers · books · scholar · JSTOR (July 2009) (Learn how and when to remove this template mes...

Investment portfolio which occupies the efficient parts of the risk-return spectrum This article is about a financial mathematical concept. For other frontiers described as efficient, see Production possibilities frontier and Pareto frontier. Efficient Frontier. The hyperbola is sometimes referred to as the Markowitz bullet, and its upward sloped portion is the efficient frontier if no risk-free asset is available. With a risk-free asset, the straight capital allocation line is the efficient ...

This article is about the school. For the heritage-listed school buildings, see MacRobertson Girls' High School buildings. School in AustraliaMac.Robertson Girls' High SchoolLocationSouth Melbourne, VictoriaAustraliaCoordinates37°50′11″S 144°58′16″E / 37.83639°S 144.97111°E / -37.83639; 144.97111InformationFormer nameMelbourne Continuation SchoolTypeGovernment-funded single-sex selective secondary day schoolMottoLatin: Potens Sui(Mastery of self)Established...

Scottish theologian (1940–2023) Not to be confused with A. Donald Macleod. Donald MacleodMacleod at the 2015 Lectures in the FaithBorn(1940-11-24)24 November 1940Habost, LewisDied21 May 2023(2023-05-21) (aged 82)EdinburghNationalityScottishEducationFree Church CollegeOccupation(s)Pastor, theologianSpouseMary MacleanChildrenJohn, Murdo, AngusTheological workLanguageEnglish, Scottish GaelicTradition or movementPresbyterianism Donald Macleod (24 November 1940 – 21 May 2023) was a Scotti...

Hira UmerBorn26 September 1998Karachi, PakistanNationalityPakistaniEducationMaster of Business AdministrationOccupationActress‚ ModelYears active2020 – present Hira Umer is a Pakistani actress and model. She is better known for her role in ARY Digital's drama serial Mere Humsafar. She is currently playing pivotal role in ARY Digital's drama serial Jaise Aapki Marzi. In 2021, she paired opposite to Faizan Shaikh for a lead role in Pakistan's first horror-comedy feature film Udham Path...

Conversion of forest to non-forest for human use in Nepal Map of Nepal Deforestation in Nepal has always been a serious issue, which has a severe effect on the lives of poor people.[1][2][3][4][5][6][7] In the past, Nepal was a widely forested nation. However now with the requirement for the extension of rural areas, migration of hills people to the plains, the developing regional interest for timber, and the local residents dependence o...

Masjid AslanhaneArslanhane CamiiAgamaAfiliasi agamaIslam – SunniProvinsiAnkaraLokasiLokasiAnkaraNegara TurkiKoordinat39°56′21″N 32°51′46″E / 39.93917°N 32.86278°E / 39.93917; 32.86278Koordinat: 39°56′21″N 32°51′46″E / 39.93917°N 32.86278°E / 39.93917; 32.86278ArsitekturArsitekEbubekir MehmetJenisMasjidGaya arsitekturTurki dengan sedikit sentuhan arsitektur SeljukDidirikan1290Menara1 Masjid Aslanhane (bahasa Turki: ...

Kota Cadiz component city (en) Tempat Negara berdaulatFilipinaRegion of the Philippines (en) Western Visayas (en) Provinsi di FilipinaNegros Occidental NegaraFilipina PendudukTotal158.544  (2020 )Tempat tinggal39.146  (2020 )Bahasa resmiHiligaynon, Tagalog dan Cebu GeografiLuas wilayah524,57 km² [convert: unit tak dikenal]Ketinggian115 m Berbatasan denganSilay SejarahPembuatan1861 Informasi tambahanKode pos6121 Zona waktuUTC+8 Kode telepon34 Lain-lainSitus webLaman resmi Cadiz...

Airport in Texas, U.S.El Paso International AirportIATA: ELPICAO: KELPFAA LID: ELPSummaryAirport typePublicOwnerCity of El PasoOperatorEl Paso Aviation DepartmentServes El Paso, Texas, U.S. Las Cruces, New Mexico, U.S. Ciudad Juárez, Chihuahua, Mexico LocationEl Paso, Texas, U.S.Opened1928; 95 years ago (1928)Elevation AMSL3,961.6 ft / 1,207.5 mCoordinates31°48′26″N 106°22′39″W / 31.80722°N 106.37750°W / 31.80722; -106.3775...

Europa Ευρώπη, Európê Europa Oorsprong Griekse en Fenicische mythologie Gedaante Oceanide Associatie Fenicische prinses, ontvoering van Europa door Zeus Kunstvormen Europa en de stier van Gustave Moreau, Ontvoering van Europa (Peter Paul Rubens) Literaire bronnen Homerus Verwantschap Ouders Agenor en Telephassa Siblings Cadmus Partner Zeus Nakomelingen Minos Europa en de stier (ca. 1869) van Gustave Moreau Portaal    Religie Ontvoering van Europa, Peter Paul Rubens (1577-164...

Kembali kehalaman sebelumnya