added fasm2 as well

This commit is contained in:
2024-11-25 00:04:53 -05:00
parent 8a974e9c89
commit dceb330571
165 changed files with 78512 additions and 0 deletions

View File

@ -0,0 +1,79 @@
; UTF-8
macro WCHAR arg
local count,current,__input,char,wide
if arg eqtype ''
virtual at 0
__input::
db arg
count = $
end virtual
current = 0
while current < count
load char byte from __input:current
wide = char
current = current + 1
if char > 0C0h
if char < 0E0h
wide = char and 11111b
load char byte from __input:current
wide = wide shl 6 + (char and 111111b)
current = current + 1
else if char < 0F0h
wide = char and 1111b
load char byte from __input:current
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+1
wide = wide shl 6 + (char and 111111b)
current = current + 2
else if char < 0F8h
wide = char and 111b
load char byte from __input:current
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+1
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+2
wide = wide shl 6 + (char and 111111b)
current = current + 3
else if char < 0FCh
wide = char and 11b
load char byte from __input:current
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+1
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+2
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+3
wide = wide shl 6 + (char and 111111b)
current = current + 4
else
wide = char and 1
load char byte from __input:current
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+1
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+2
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+3
wide = wide shl 6 + (char and 111111b)
load char byte from __input:current+4
wide = wide shl 6 + (char and 111111b)
current = current + 5
end if
end if
if wide < 10000h
dw wide
else
dw 0D7C0h + wide shr 10,0DC00h or (wide and 3FFh)
end if
end while
else
wide = arg
if wide < 10000h
dw wide
else
dw 0D7C0h + wide shr 10,0DC00h or (wide and 3FFh)
end if
end if
end macro

View File

@ -0,0 +1,37 @@
; Windows 1250
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,201Ah,?,201Eh,2026h,2020h,2021h,?,2030h,160h,2039h,15Ah,164h,17Dh,179h
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,161h,203Ah,15Bh,165h,17Eh,17Ah
dw 0A0h,2C7h,2D8h,141h,0A4h,104h,0A6h,0A7h,0A8h,0A9h,15Eh,0ABh,0ACh,0ADh,0AEh,17Bh
dw 0B0h,0B1h,2DBh,142h,0B4h,0B5h,0B6h,0B7h,0B8h,105h,15Fh,0BBh,13Dh,2DDh,13Eh,17Ch
dw 154h,0C1h,0C2h,102h,0C4h,139h,106h,0C7h,10Ch,0C9h,118h,0CBh,11Ah,0CDh,0CEh,10Eh
dw 110h,143h,147h,0D3h,0D4h,150h,0D6h,0D7h,158h,16Eh,0DAh,170h,0DCh,0DDh,162h,0DFh
dw 155h,0E1h,0E2h,103h,0E4h,13Ah,107h,0E7h,10Dh,0E9h,119h,0EBh,11Bh,0EDh,0EEh,10Fh
dw 111h,144h,148h,0F3h,0F4h,151h,0F6h,0F7h,159h,16Fh,0FAh,171h,0FCh,0FDh,163h,2D9h
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,36 @@
; Windows 1251
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 401h,403h,201Ah,453h,201Eh,2026h,2020h,2021h,20ACh,2030h,409h,2039h,40Ah,40Ch,40Bh,40Fh
dw 452h,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,459h,203Ah,45Ah,45Ch,45Bh,45Fh
dw 0A0h,40Eh,45Eh,408h,0A4h,490h,0A6h,0A7h,401h,0A9h,404h,0ABh,0ACh,0ADh,0AEh,407h
dw 0B0h,0B1h,406h,456h,491h,0B5h,0B6h,0B7h,451h,2116h,454h,0BBh,458h,405h,455h,457h
repeat 40h
dw 410h+%-1
end repeat
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,34 @@
; Windows 1252
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,160h,2039h,152h,?,17D,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,161h,203Ah,153h,?,17Eh,178h
repeat 60h
dw 0A0h+%-1
end repeat
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,36 @@
; Windows 1253
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,?,2030h,?,2039h,?,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,?,203Ah,?,?,?,?
dw 0A0h,385h,386h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,?,0ABh,0ACh,0ADh,0AEh,2015h
dw 0B0h,0B1h,0B2h,0B3h,384h,0B5h,0B6h,0B7h,288h,389h,38Ah,0BBh,38Ch,0BDh,38Eh,38Fh
repeat 40h
dw 390h+%-1
end repeat
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,39 @@
; Windows 1254
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,160h,2039h,152h,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,161h,203Ah,153h,?,?,178h
repeat 30h
dw 0A0h+%-1
end repeat
dw 11Eh,0D1h,0D2h,0D3h,0D4h,0D5h,0D6h,0D7h,0D8h,0D9h,0DAh,0DBh,0DCh,130h,15Eh,0DFh
repeat 10h
dw 0E0h+%-1
end repeat
dw 11Fh,0F1h,0F2h,0F3h,0F4h,0F5h,0F6h,0F7h,0F8h,0F9h,0FAh,0FBh,0FCh,131h,15Fh,0FFh
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,37 @@
; Windows 1255
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,?,2039h,?,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,?,203Ah,?,?,?,?
dw 0A0h,0A1h,0A2h,0A3h,20AAh,0A5h,0A6h,0A7h,0A8h,0A9h,0D7h,0ABh,0ACh,0ADh,0AEh,0AFh
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0F7h,0BBh,0BCh,0BDh,0BEh,0BFh
dw 5B0h,5B1h,5B2h,5B3h,5B4h,5B5h,5B6h,5B7h,5B8h,5B9h,?,5BBh,5BCh,5BDh,5BEh,5BFh
dw 5C0h,5C1h,5C2h,5C3h,5F0h,5F1h,5F2h,5F3h,5F4h,?,?,?,?,?,?,?
dw 5D0h,5D1h,5D2h,5D3h,5D4h,5D5h,5D6h,5D7h,5D8h,5D9h,5DAh,5DBh,5DCh,5DDh,5DEh,5DFh
dw 5E0h,5E1h,5E2h,5E3h,5E4h,5E5h,5E6h,5E7h,5E8h,5E9h,5EAh,?,?,200Eh,200Fh,?
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,37 @@
; Windows 1256
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,67Eh,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,679h,2039h,152h,686h,698h,688h
dw 6AFh,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,6A9h,2122h,691h,203Ah,153h,200Ch,200Dh,6BAh
dw 0A0h,60Ch,0A2h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,6BEh,0ABh,0ACh,0ADh,0AEh,0AFh
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0BAh,0BBh,0BCh,0BDh,0BEh,0BFh
dw 6C1h,621h,622h,623h,624h,625h,626h,627h,628h,629h,62Ah,62Bh,62Ch,62Dh,62Eh,62Fh
dw 630h,631h,632h,633h,634h,635h,636h,0D7h,637h,638h,639h,63Ah,640h,641h,642h,643h
dw 0E0h,644h,0E2h,645h,646h,647h,648h,0E7h,0E8h,0E9h,0EAh,0EBh,649h,64Ah,0EEh,0EFh
dw 64Bh,64Ch,64Dh,64Eh,0F4h,64Fh,650h,0F7h,651h,0F9h,652h,0FBh,0FCh,200Eh,200Fh,6D2h
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,37 @@
; Windows 1257
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,201Ah,?,201Eh,2026h,2020h,2021h,?,2030h,?,2039h,?,0A8h,2C7h,0B8h
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,2122h,?,203Ah,?,0AFh,2DBh,?
dw 0A0h,?,0A2h,0A3h,0A4h,?,0A6h,0A7h,0D8h,0A9h,156h,0ABh,0ACh,0ADh,0AEh,0C6h
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0F8h,0B9h,157h,0BBh,0BCh,0BDh,0BEh,0E6h
dw 104h,12Eh,100h,106h,0C4h,0C5h,118h,112h,10Ch,0C9h,179h,116h,122h,136h,12Ah,13Bh
dw 160h,143h,145h,0D3h,14Ch,0D5h,0D6h,0D7h,172h,141h,15Ah,16Ah,0DCh,17Bh,17Dh,0DFh
dw 105h,12Fh,101h,107h,0E4h,0E5h,119h,113h,10Dh,0E9h,17Ah,117h,123h,137h,12Bh,13Ch
dw 161h,144h,146h,0F3h,14Dh,0F5h,0F6h,0F7h,173h,142h,15Bh,16Bh,0FCh,17Ch,17Eh,2D9h
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,37 @@
; Windows 1258
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,201Ah,192h,201Eh,2026h,2020h,2021h,2C6h,2030h,?,2039h,152h,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,2DCh,2122h,?,203Ah,153h,?,?,178h
dw 0A0h,0A1h,0A2h,0A3h,0A4h,0A5h,0A6h,0A7h,0A8h,0A9h,0AAh,0ABh,0ACh,0ADh,0AEh,0AFh
dw 0B0h,0B1h,0B2h,0B3h,0B4h,0B5h,0B6h,0B7h,0B8h,0B9h,0BAh,0BBh,0BCh,0BDh,0BEh,0BFh
dw 0C0h,0C1h,0C2h,102h,0C4h,0C5h,0C6h,0C7h,0C8h,0C9h,0CAh,0CBh,300h,0CDh,0CEh,0CFh
dw 110h,0D1h,309h,0D3h,0D4h,1A0h,0D6h,0D7h,0D8h,0D9h,0DAh,0DBh,0DCh,1AFh,303h,0DFh
dw 0E0h,0E1h,0E2h,103h,0E4h,0E5h,0E6h,0E7h,0E8h,0E9h,0EAh,0EBh,301h,0EDh,0EEh,0EFh
dw 111h,0F1h,323h,0F3h,0F4h,1A1h,0F6h,0F7h,0F8h,0F9h,0FAh,0FBh,0FCh,1B0h,20ABh,0FFh
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define

View File

@ -0,0 +1,34 @@
; Windows 874
macro define
local encoding
virtual at 0
encoding::
repeat 80h
dw %-1
end repeat
dw 20ACh,?,?,?,?,2026h,?,?,?,?,?,?,?,?,?,?
dw ?,2018h,2019h,201Ch,201Dh,2022h,2013h,2014h,?,?,?,?,?,?,?,?
repeat 60h
dw 0E00h+%-1
end repeat
end virtual
macro WCHAR arg
if arg eqtype ''
local data,char
data db arg
rb ($-data)
repeat ($-data)/2
load char:byte from data+%%-%
load char:word from encoding:char*2
store char:word at data+(%%-%)*2
end repeat
else
dw arg
end if
end macro
end macro
define
purge define