Skip to content

Commit

Permalink
2.34
Browse files Browse the repository at this point in the history
  • Loading branch information
nidud committed Jun 19, 2022
1 parent 3c715b3 commit 33834a2
Show file tree
Hide file tree
Showing 198 changed files with 16,968 additions and 81,931 deletions.
File renamed without changes.
File renamed without changes.
Binary file modified bin/asmc
Binary file not shown.
Binary file modified bin/asmc.exe
Binary file not shown.
Binary file modified bin/asmc64
Binary file not shown.
Binary file modified bin/asmc64.exe
Binary file not shown.
23 changes: 12 additions & 11 deletions include/dos/errno.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ifndef __ERRNO_INC
define __ERRNO_INC
ifndef __LIBC_INC
include libc.inc
include libc.inc
endif

ifndef _ERRNO_T_DEFINED
Expand All @@ -13,24 +13,25 @@ endif

ifndef _CRT_ERRNO_DEFINED
define _CRT_ERRNO_DEFINED
_errno proto __ctype
_set_errno proto __ctype :int_t
_get_errno proto __ctype :ptr int_t
_errno proto
_set_errno proto :int_t
_get_errno proto :ptr int_t
externdef errno:errno_t
endif

__doserrno proto __ctype
_set_doserrno proto __ctype :ulong_t
_get_doserrno proto __ctype :ptr ulong_t
__sys_errlist proto __ctype
__doserrno proto
_set_doserrno proto :ulong_t
_get_doserrno proto :ptr ulong_t
__sys_errlist proto

externdef _doserrno:errno_t
externdef _dos_errlist:array_t
externdef _sys_errlist:array_t
externdef _sys_nerr:int_t
osmaperr proto __ctype

__sys_nerr proto __ctype
_dosmaperr proto __ctype :ulong_t
osmaperr proto
__sys_nerr proto
_dosmaperr proto :ulong_t

ENOERR equ 0
EPERM equ 1
Expand Down
4 changes: 2 additions & 2 deletions include/linux/kernel.inc
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,15 @@ sys_lseek proto :int_t, :size_t, :uint_t {
mov eax,SYS_LSEEK
syscall
}
sys_mmap proto :ptr, :size_t, :size_t, :size_t, :size_t, :size_t {
sys_mmap proto syscall :ptr, :size_t, :size_t, :size_t, :size_t, :size_t {
add rsi,_GRANULARITY-1
and sil,-(_GRANULARITY)
mov r10,rcx
mov rcx,rsi
mov eax,SYS_MMAP
syscall
}
sys_munmap proto :ptr, :size_t {
sys_munmap proto syscall :ptr, :size_t {
mov eax,SYS_MUNMAP
syscall
}
Expand Down
117 changes: 114 additions & 3 deletions include/twindow.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,129 @@

ifndef __TWINDOW_INC
define __TWINDOW_INC

include wincon.inc
include winuser.inc

ifndef WM_MOUSEWHEEL
define WM_MOUSEWHEEL 0x020A
endif

ifdef _UNICODE
.pragma comment(lib, TWinW)
else
ifndef _UNICODE

define CFTEXT CF_TEXT

define _tlodsb <lodsb>
define _tscasb <scasb>
define _tstosb <stosb>
define _tal <al>

_tshr macro reg
endm
_tshl macro reg
endm

.pragma comment(lib, TWinA)

.enum BoxDrawing { ; ASCII code page 850

U_LIGHT_HORIZONTAL = 'Ä',
U_LIGHT_VERTICAL = '³',
U_LIGHT_DOWN_AND_RIGHT = 'Ú',
U_LIGHT_DOWN_AND_LEFT = '¿',
U_LIGHT_UP_AND_RIGHT = 'À',
U_LIGHT_UP_AND_LEFT = 'Ù',
U_LIGHT_VERTICAL_AND_RIGHT = 'Ã',
U_LIGHT_VERTICAL_AND_LEFT = '´',
U_LIGHT_DOWN_AND_HORIZONTAL = 'Â',
U_LIGHT_UP_AND_HORIZONTAL = 'Á',

U_DOUBLE_HORIZONTAL = 'Í',
U_DOUBLE_VERTICAL = 'º',
U_DOUBLE_DOWN_AND_RIGHT = 'É',
U_DOUBLE_DOWN_AND_LEFT = '»',
U_DOUBLE_UP_AND_RIGHT = 'È',
U_DOUBLE_UP_AND_LEFT = '¼',

U_UPPER_HALF_BLOCK = 'ß', ; Block elements
U_LOWER_HALF_BLOCK = 'Ü',
U_FULL_BLOCK = 'Û',
U_LIGHT_SHADE = '°',
U_MEDIUM_SHADE = '±',
U_DARK_SHADE = '²',

U_BLACK_RIGHT_POINTER = 0x10,
U_BLACK_LEFT_POINTER = 0x11,
U_BLACK_UP_TRIANGLE = 0x1E,
U_BLACK_DOWN_TRIANGLE = 0x1F,
U_BULLET_OPERATOR = 0x07,
U_MIDDLE_DOT = 'ú',

}

else

define CFTEXT CF_UNICODETEXT

define _tlodsb <lodsw>
define _tscasb <scasw>
define _tstosb <stosw>
define _tal <ax>

_tshr macro reg
shr reg,1
endm
_tshl macro reg
shl reg,1
endm

.pragma comment(lib, TWinW)

.enum BoxDrawing { ; Unicode

U_LIGHT_HORIZONTAL = 0x2500,
U_LIGHT_VERTICAL = 0x2502,
U_LIGHT_DOWN_AND_RIGHT = 0x250C,
U_LIGHT_DOWN_AND_LEFT = 0x2510,
U_LIGHT_UP_AND_RIGHT = 0x2514,
U_LIGHT_UP_AND_LEFT = 0x2518,
U_LIGHT_VERTICAL_AND_RIGHT = 0x251C,
U_LIGHT_VERTICAL_AND_LEFT = 0x2524,
U_LIGHT_DOWN_AND_HORIZONTAL = 0x252C,
U_LIGHT_UP_AND_HORIZONTAL = 0x2534,

U_DOUBLE_HORIZONTAL = 0x2550,
U_DOUBLE_VERTICAL = 0x2551,
U_DOUBLE_DOWN_AND_RIGHT = 0x2554,
U_DOUBLE_DOWN_AND_LEFT = 0x2557,
U_DOUBLE_UP_AND_RIGHT = 0x255A,
U_DOUBLE_UP_AND_LEFT = 0x255D,

U_LIGHT_ARC_DOWN_AND_RIGHT = 0x256D,
U_LIGHT_ARC_DOWN_AND_LEFT = 0x256E,
U_LIGHT_ARC_UP_AND_LEFT = 0x256F,
U_LIGHT_ARC_UP_AND_RIGHT = 0x2570,

U_UPPER_HALF_BLOCK = 0x2580, ; Block elements
U_LOWER_HALF_BLOCK = 0x2584,
U_FULL_BLOCK = 0x2588,
U_LIGHT_SHADE = 0x2591,
U_MEDIUM_SHADE = 0x2592,
U_DARK_SHADE = 0x2593,

U_BLACK_RIGHT_POINTER = 0x25BA,
U_BLACK_LEFT_POINTER = 0x25C4,
U_BLACK_UP_TRIANGLE = 0x25B2,
U_BLACK_DOWN_TRIANGLE = 0x25BC,

U_BULLET_OPERATOR = 0x2219,
U_MIDDLE_DOT = 0x00B7,

}

endif


.enum ColorAttrib : byte {

FG_TITLE, ; 0x00
Expand Down
5 changes: 5 additions & 0 deletions include/wingdi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5797,6 +5797,9 @@ define wglUseFontBitmaps <wglUseFontBitmapsW>
else
define wglUseFontBitmaps <wglUseFontBitmapsA>
endif

.pragma comment(lib, gdi32)

SwapBuffers proto WINAPI :HDC

_POINTFLOAT struct
Expand All @@ -5817,6 +5820,8 @@ GLYPHMETRICSFLOAT typedef _GLYPHMETRICSFLOAT
PGLYPHMETRICSFLOAT typedef ptr _GLYPHMETRICSFLOAT
LPGLYPHMETRICSFLOAT typedef ptr _GLYPHMETRICSFLOAT

.pragma comment(lib, opengl32)

define WGL_FONT_LINES 0
define WGL_FONT_POLYGONS 1
wglUseFontOutlinesA proto WINAPI :HDC, :DWORD, :DWORD, :DWORD, :FLOAT, :FLOAT, :sdword, :LPGLYPHMETRICSFLOAT
Expand Down
4 changes: 2 additions & 2 deletions source/asmc/OWLinux.mak
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ watcom = \watcom
all: asmc asmc64

asmc:
asmc -D__WATCOM__ -Iinc -nologo -elf -nolib -Zp4 -Cs x86\*.asm
asmc -D__WATCOM__ -Iinc -nologo -elf -nolib -Zp4 -Cs src\*.asm
linkw @<<
name asmc.
format elf runtime linux
Expand All @@ -16,7 +16,7 @@ file { *.o }
del *.o

asmc64:
asmc -DASMC64 -D__WATCOM__ -Iinc -nologo -elf -nolib -Zp4 -Cs x86\*.asm
asmc -DASMC64 -D__WATCOM__ -Iinc -nologo -elf -nolib -Zp4 -Cs src\*.asm
linkw @<<
name asmc64.
format elf runtime linux
Expand Down
2 changes: 1 addition & 1 deletion source/asmc/asmc.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackAlignmentBoundary>0</PackAlignmentBoundary>
<CallingConvention>0</CallingConvention>
<ErrorReporting>0</ErrorReporting>
<CommandLineTemplate Condition="'$(Platform)' == 'Win32'">asmc.exe /coff [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' == 'Win32'">asmc.exe [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' == 'X64'">asmc64.exe [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' != 'Win32' and '$(Platform)' != 'X64'">echo ASMC not supported on this platform
exit 1</CommandLineTemplate>
Expand Down
10 changes: 8 additions & 2 deletions source/asmc/asmc.sln
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30717.126
# Visual Studio Version 17
VisualStudioVersion = 17.2.32519.379
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asmc", "asmc.vcxproj", "{0040DBA9-EC22-43D3-B298-73504F3072B3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0040DBA9-EC22-43D3-B298-73504F3072B3}.Debug|Win32.ActiveCfg = Debug|Win32
{0040DBA9-EC22-43D3-B298-73504F3072B3}.Debug|Win32.Build.0 = Debug|Win32
{0040DBA9-EC22-43D3-B298-73504F3072B3}.Debug|x64.ActiveCfg = Debug|x64
{0040DBA9-EC22-43D3-B298-73504F3072B3}.Debug|x64.Build.0 = Debug|x64
{0040DBA9-EC22-43D3-B298-73504F3072B3}.Debug|x86.ActiveCfg = Debug|Win32
{0040DBA9-EC22-43D3-B298-73504F3072B3}.Debug|x86.Build.0 = Debug|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 2 additions & 0 deletions source/asmc/asmc.targets
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
BrowseFile="%(ASMC.BrowseFile)"
PreserveIdentifierCase="%(ASMC.PreserveIdentifierCase)"
WarningLevel="%(ASMC.WarningLevel)"
ObjectFileTypeCOFF="%(ASMC.ObjectFileTypeCOFF)"
ObjectFileTypeOMF="%(ASMC.ObjectFileTypeOMF)"
PackAlignmentBoundary="%(ASMC.PackAlignmentBoundary)"
CallingConvention="%(ASMC.CallingConvention)"
ErrorReporting="%(ASMC.ErrorReporting)"
Expand Down
Loading

0 comments on commit 33834a2

Please sign in to comment.