Video display modes: Difference between revisions

m
Alphabetize entries
(Scala solution added)
m (Alphabetize entries)
Line 46:
<lang gwbasic>10 REM GW Basic can switch VGA modes
20 SCREEN 18: REM Mode 12h 640x480 16 colour graphics</lang>
 
=={{header|ERRE}}==
ERRE language (for PC) supports these modes (accessible with SCREEN procedure of PC.LIB library):
* SCREEN(0) => text 80x25 or 40x25 -- standard
* SCREEN(1) => 320x200 4 colors
* SCREEN(2) => 640x200 2 colors
* SCREEN(7) => 320x200 16 colors
* SCREEN(8) => 640x200 16 colors
* SCREEN(9) => 640x350 16 colors
* SCREEN(10) => 640x350 for MDA monitors (if you have one .....)
It's possible to activate all VGA and SVGA modes using DOS interrupts. On the distribution disk there is an example to activate 320x200 - 256 colors.
 
ERRE language (for C-64) support high resolution graphic (320x200) using HGR.LIB library.
 
=={{header|Icon}} and {{header|Unicon}}==
 
The following works in both languages on X-windows based systems and assume
<tt>xrandr</tt> is installed:
 
{{trans|UNIX Shell}}
<lang unicon>procedure main(A)
mode := A[1]
if \mode then system("xrandr -s " || \mode || " >/dev/null")
else system("xrandr -q") # Display available modes
end</lang>
 
Output with no arguments:
 
<pre>
->vdm
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 60.0*+
1600x1200 75.0 70.0 65.0 60.0
1280x1024 75.0 60.0
1280x960 60.0
1152x864 75.0
1024x768 75.0 70.1 60.0
800x600 75.0 72.2 60.3 56.2
640x480 75.0 72.8 59.9
TV-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 60.0*+
1680x1050 60.0
1600x1200 60.0
1280x1024 75.0 60.0
1280x960 75.0
1024x768 75.0 60.0
800x600 75.0 60.3
640x480 75.0 59.9
->
</pre>
 
=={{header|Kotlin}}==
Line 105 ⟶ 158:
<lang qbasic>'QBasic can switch VGA modes
SCREEN 18 'Mode 12h 640x480 16 colour graphics</lang>
 
=={{header|ERRE}}==
ERRE language (for PC) supports these modes (accessible with SCREEN procedure of PC.LIB library):
* SCREEN(0) => text 80x25 or 40x25 -- standard
* SCREEN(1) => 320x200 4 colors
* SCREEN(2) => 640x200 2 colors
* SCREEN(7) => 320x200 16 colors
* SCREEN(8) => 640x200 16 colors
* SCREEN(9) => 640x350 16 colors
* SCREEN(10) => 640x350 for MDA monitors (if you have one .....)
It's possible to activate all VGA and SVGA modes using DOS interrupts. On the distribution disk there is an example to activate 320x200 - 256 colors.
 
ERRE language (for C-64) support high resolution graphic (320x200) using HGR.LIB library.
 
=={{header|Icon}} and {{header|Unicon}}==
 
The following works in both languages on X-windows based systems and assume
<tt>xrandr</tt> is installed:
 
{{trans|UNIX Shell}}
<lang unicon>procedure main(A)
mode := A[1]
if \mode then system("xrandr -s " || \mode || " >/dev/null")
else system("xrandr -q") # Display available modes
end</lang>
 
Output with no arguments:
 
<pre>
->vdm
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 60.0*+
1600x1200 75.0 70.0 65.0 60.0
1280x1024 75.0 60.0
1280x960 60.0
1152x864 75.0
1024x768 75.0 70.1 60.0
800x600 75.0 72.2 60.3 56.2
640x480 75.0 72.8 59.9
TV-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 60.0*+
1680x1050 60.0
1600x1200 60.0
1280x1024 75.0 60.0
1280x960 75.0
1024x768 75.0 60.0
800x600 75.0 60.3
640x480 75.0 59.9
->
</pre>
 
=={{header|REXX}}==
10,333

edits