Compare commits

..

2 Commits

Author SHA1 Message Date
fdac11e922 Krn: The IDE controller initialization code has been rewritten.
This commit is not compiled!!!
2024-10-19 02:18:22 +05:00
1aa272b2e9 Krn: The fdd driver code has been cleared and unused files have been deleted 2024-06-10 02:21:11 +05:00
613 changed files with 62982 additions and 63511 deletions

View File

@ -31,11 +31,10 @@ A1. Fine. You will need a corresponding compiler, obviously.
If the compiler produces an error "file not found" regarding 'lang.inc',
the program can be compiled using different languages of interface.
Create a file 'lang.inc' in the same folder as <input.asm> like follows:
lang fix en_US
lang fix en
Here the last word selects the language. Valid languages are
en_US, ru_RU, et_EE, it_IT, es_ES, ca_ES. Not all programs provide all
translations, en_US should always be available, ru_RU is the most frequent
after en_US.
en, ru, et, it, sp. Not all programs provide all translations,
en should always be available, ru is the most frequent after en.
* For a NASM program, get NASM at http://www.nasm.us/.
To compile, find the main .asm file of the program and run
@ -43,7 +42,7 @@ A1. Fine. You will need a corresponding compiler, obviously.
Multi-language is rarely supported in this category, but you could still
see sometimes an error "file not found" regarding 'lang_nasm.inc'. If so,
create a file 'lang_nasm.inc' in the same folder as <input.asm> like follows:
%define lang 'en_US'
%define lang 'en'
Read the entry about fasm for description of valid languages.
* For a c-- program, try to avoid compiling it and instead rewrite the code

View File

@ -1223,10 +1223,10 @@ KOSAPI void _ksys_debug_puts(const char* s)
KOSAPI void ksys_draw_bitmap_palette(void* bitmap, int x, int y, int w, int h, int bpp, void* palette, int offset)
{
asm_inline(
"pushl %%ebp\n\t" // save EBP register
"movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param
"pushl %%ebp,\n\t" // save EBP register
"movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param
"int $0x40\n\t"
"popl %%ebp" // restore EBP register
"popl %%ebp" // restore EBP register
:
: "a"(65),
"b"(bitmap),

View File

@ -884,17 +884,13 @@ for i,v in ipairs(img_files) do
if tup.getconfig("INSERT_COMMIT_ID") ~= ""
then
if build_type == "ru_RU"
then str='$(LANG=ru_RU.utf8 date -u +"[автосборка %d %b %Y %R, $(get-current-cmtid|grep -oE [a-z0-9]{7}$)]"|iconv -f utf8 -t cp866)'
else str='$(date -u +"[auto-build %d %b %Y %R, $(get-current-cmtid|grep -oE [a-z0-9]{7}$)]")'
then str='$(LANG=ru_RU.utf8 date -u +"[автосборка %d %b %Y %R, r$(get-current-cmtid)]"|iconv -f utf8 -t cp866)'
else str='$(date -u +"[auto-build %d %b %Y %R, r$(get-current-cmtid)]")'
end
str = string.gsub(str, "%$", "\\$") -- escape $ as \$
str = string.gsub(str, "%%", "%%%%") -- escape % as %%
cmd += " && str=" .. str
cmd += ' && echo -n $str | dd status=none of=%o bs=1 seek=`expr 274 - length "$str"` conv=notrunc'
str2='$(get-current-cmtid|grep -oE "\\+[0-9]+")'
str2 = string.gsub(str2, "%$", "\\$") -- escape $ as \$
cmd += " && str2=" .. str2
cmd += ' && echo -n $str2 | dd status=none of=%o bs=1 seek=216 conv=notrunc'
end
local_file = VAR_KERNEL .. "/.kernel.mnt"
tup.definerule{inputs = {v[2]}, command = cmd, outputs = {local_file}}

View File

@ -1 +1 @@
lang fix ca_ES
lang fix ca

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language ca_ES
language ca
;just comment
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix en_US
lang fix en

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language en_US
language EN
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix es_ES
lang fix sp

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language es_ES
language SP
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix et_EE
lang fix et

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language et_EE
language ET
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix it_IT
lang fix it

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language it_IT
language IT
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix ru_RU
lang fix ru

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language ru_RU
language RU
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1,6 +1,6 @@
FASM=fasm
FLAGS=-m 65536
languages=en_US|ru_RU|de_DE|et_EE|es_ES
languages=en|ru|ge|et|sp
.PHONY: all kernel bootloader clean

View File

@ -12,13 +12,6 @@
; Source code author - Kulakov Vladimir Gennadievich.
; Adaptation and improvement - Mario79.
give_back_application_data_1:
mov esi, FDD_BUFF;FDD_DataBuffer ;0x40000
mov ecx, 128
cld
rep movsd
ret
take_data_from_application_1:
mov edi, FDD_BUFF;FDD_DataBuffer ;0x40000
mov ecx, 128
@ -717,18 +710,38 @@ endg
; This function is called in boot process.
; It creates filesystems /fd and/or /fd2, if the system has one/two floppy drives.
proc floppy_init
; search for FDDs and add them to the list of disks
; author - Mario79
mov al, 0x10
out 0x70, al
mov cx, 0xff
.wait_cmos:
dec cx
test cx, cx
jnz .wait_cmos
in al, 0x71
test al, al
jz .no_fdd
push eax ; b[esp]=al [esp+1..3]- ??
stdcall attach_int_handler, 6, FDCInterrupt, 0
DEBUGF 1, "K : Set Floppy IRQ6 return code %x\n", eax
mov ecx, floppy_mutex
call mutex_init
; First floppy is present if [DRIVE_DATA] and 0xF0 is nonzero.
test byte [DRIVE_DATA], 0xF0
; First floppy is present if [esp] and 0xF0 is nonzero.
test byte [esp], 0xF0
jz .no1
stdcall disk_add, floppy_functions, floppy1_name, 1, DISK_NO_INSERT_NOTIFICATION
.no1:
; Second floppy is present if [DRIVE_DATA] and 0x0F is nonzero.
test byte [DRIVE_DATA], 0x0F
; Second floppy is present if [esp] and 0x0F is nonzero.
test byte [esp], 0x0F
jz .no2
stdcall disk_add, floppy_functions, floppy2_name, 2, DISK_NO_INSERT_NOTIFICATION
.no2:
add esp, 4
.no_fdd:
ret
endp

View File

@ -315,7 +315,7 @@ end if
int 0x10
if lang eq ru_RU
; Load & set Russian VGA font 'bootfont-ru_RU'
; Load & set russian VGA font (RU.INC)
mov bp, RU_FNT1 ; RU_FNT1 - First part
mov bx, 1000h ; 768 bytes
mov cx, 30h ; 48 symbols
@ -329,8 +329,8 @@ if lang eq ru_RU
mov dx, 0E0h ; 224 - position of first symbol
mov ax, 1100h
int 10h
; End set VGA russian font
else if lang eq et_EE
; Load & set Estonian VGA font 'bootfont-et_EE'
mov bp, ET_FNT ; ET_FNT1
mov bx, 1000h ;
mov cx, 255 ; 256 symbols

View File

@ -24,25 +24,24 @@ org 0
; struct kernel_header
jmp start_of_code ; jump
db 'KolibriOS ' ; signature
db 'v0.7.7.0 ',13,10,13,10,0 ; FIXME: get distribution version from git tag
db 'v0.7.7.0+ ',13,10,13,10,0 ; version
dd B32-KERNEL_BASE ; offset of the kernel's 32-bit entry point
include "boot/bootstr.inc" ; language-independent boot messages
include "boot/preboot.inc"
; Language support for locales: de_DE, es_ES, ru_RU (CP866), et_EE, en_US.
if lang eq de_DE
include "boot/bootstr-de_DE.inc" ; German system boot messages
include "boot/bootge.inc" ; german system boot messages
else if lang eq es_ES
include "boot/bootstr-es_ES.inc" ; Spanish system boot messages
include "boot/bootsp.inc" ; spanish system boot messages
else if lang eq ru_RU
include "boot/bootstr-ru_RU.inc" ; Russian system boot messages
include "boot/bootfont-ru_RU.inc" ; Russian font
include "boot/bootru.inc" ; russian system boot messages
include "boot/ru.inc" ; Russian font
else if lang eq et_EE
include "boot/bootstr-et_EE.inc" ; Estonian system boot messages
include "boot/bootfont-et_EE.inc" ; Estonian font
include "boot/bootet.inc" ; estonian system boot messages
include "boot/et.inc" ; Estonian font
else
include "boot/bootstr-en_US.inc" ; English system boot messages (default)
include "boot/booten.inc" ; english system boot messages
end if
include "boot/bootcode.inc" ; 16 bit system boot code

View File

@ -11,7 +11,7 @@ pause
goto :eof
:Target_kernel
rem valid languages: en_US ru_RU de_DE et_EE es_ES
rem valid languages: en ru ge et sp
set lang=en_US
echo *** building kernel with language '%lang%' ...

View File

@ -6,7 +6,7 @@ KERPACK=$HOME/kolibrios/programs/other/kpack/kerpack_linux/kerpack
KOLIBRI_IMG=$HOME/nightly/kolibri.img
replace=0; # Replace kernel in the image file?
echo 'lang fix en_US' > lang.inc
echo 'lang fix en' > lang.inc
fasm -m 65536 bootbios.asm bootbios.bin
fasm -m 65536 kernel.asm kernel.mnt
$KERPACK kernel.mnt kernel.mnt

View File

@ -851,37 +851,6 @@ struct PCIDEV
owner dd ? ; pointer to SRV or 0
ends
struct IDE_DATA
ProgrammingInterface dd ?
Interrupt dw ?
RegsBaseAddres dw ?
BAR0_val dw ?
BAR1_val dw ?
BAR2_val dw ?
BAR3_val dw ?
dma_hdd_channel_1 db ?
dma_hdd_channel_2 db ?
pcidev dd ? ; pointer to corresponding PCIDEV structure
ends
struct IDE_CACHE
pointer dd ?
size dd ? ; not use
data_pointer dd ?
system_data_size dd ? ; not use
appl_data_size dd ? ; not use
system_data dd ?
appl_data dd ?
system_sad_size dd ?
appl_sad_size dd ?
search_start dd ?
appl_search_start dd ?
ends
struct IDE_DEVICE
UDMA_possible_modes db ?
UDMA_set_mode db ?
ends
; The following macro assume that we are on uniprocessor machine.
; Serious work is needed for multiprocessor machines.

View File

@ -45,7 +45,6 @@ keymap_alt:
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
; Language support for locales: ru_RU (UTF-8), es_ES (data32sp.inc), et_EE (data32et.inc), en_US.
if lang eq ru_RU
boot_initirq cp866 'Инициализация IRQ',0
@ -93,7 +92,7 @@ else if lang eq es_ES
include 'data32sp.inc'
else if lang eq et_EE
include 'data32et.inc'
else ; Default to en_US
else
boot_initirq db 'Initialize IRQ',0
boot_picinit db 'Initialize PIC',0
boot_v86machine db 'Initialize system V86 machine',0
@ -199,27 +198,27 @@ MIN_DEFAULT_DLL_ADDR = 0x70000000
dll_cur_addr dd MIN_DEFAULT_DLL_ADDR
if lang eq en_US ; English (American)
if lang eq en_US
SYSLANG = 1
else if lang eq fi_FI ; Finnish
else if lang eq fi_FI
SYSLANG = 2
else if lang eq de_DE ; German
else if lang eq de_DE
SYSLANG = 3
else if lang eq ru_RU ; Russian
else if lang eq ru_RU
SYSLANG = 4
else if lang eq fr_FR ; French
else if lang eq fr_FR
SYSLANG = 5
else if lang eq et_EE ; Estonian
else if lang eq et_EE
SYSLANG = 6
else if lang eq uk_UA ; Ukrainian
else if lang eq uk_UA
SYSLANG = 7
else if lang eq it_IT ; Italian
else if lang eq it_IT
SYSLANG = 8
else if lang eq nl_BE ; Flemish
else if lang eq nl_BE
SYSLANG = 9
else if lang eq es_ES ; Spanish
else if lang eq es_ES
SYSLANG = 10
else if lang eq ca_ES ; Catalan
else if lang eq ca_ES
SYSLANG = 11
else
display 'unsupported language specified',13,10

View File

@ -1,36 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;***************************************************
; clear the DRIVE_DATA table,
; search for FDDs and add them into the table
; author - Mario79
;***************************************************
xor eax, eax
mov edi, DRIVE_DATA
mov ecx, DRIVE_DATA_SIZE/4
cld
rep stosd
mov al, 0x10
out 0x70, al
mov cx, 0xff
wait_cmos:
dec cx
test cx, cx
jnz wait_cmos
in al, 0x71
mov [DRIVE_DATA], al
test al, al
jz @f
stdcall attach_int_handler, 6, FDCInterrupt, 0
DEBUGF 1, "K : Set IDE IRQ6 return code %x\n", eax
call floppy_init
@@:

View File

@ -1,13 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2024. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include 'dev_fd.inc'
include 'dev_hdcd.inc'
include 'getcache.inc'
include 'sear_par.inc'

File diff suppressed because it is too large Load Diff

View File

@ -729,7 +729,7 @@ end if
;-----------------------------------------------------------------------------
mov esi, boot_detectfloppy
call boot_log
include 'detect/dev_fd.inc'
call floppy_init
;-----------------------------------------------------------------------------
; create pci-devices list
;-----------------------------------------------------------------------------
@ -2288,7 +2288,7 @@ endg
iglobal
version_inf:
db 0,7,7,0 ; FIXME: Get distribution version from git tag
db 0,7,7,0 ; version 0.7.7.0
db 0
.rev dd __REV__
.size = $ - version_inf

View File

@ -8,5 +8,5 @@
; Éste archivo debe ser editado con codificación CP866
version cp850 'KolibriOS versión 0.7.7.0 ',13,10,13,10,0 ; FIXME: Get distribution version from git tag
version cp850 'KolibriOS versión 0.7.7.0+ ',13,10,13,10,0
diff16 "fin del código del kernel",0,$

View File

@ -37,7 +37,7 @@ goto :eof
:MAIN
set languages=en_US ru_RU de_DE et_EE
set languages=en ru ge et
set __CPU_type=p5 p6 k6
set BIN=bin

View File

@ -62,7 +62,6 @@ char *actions[] = {
#define T_FD "„¨áª¥â  "
#define T_HD "†¥á⪨© ¤¨áª "
#define T_SATA "SATA ¤¨áª "
#define T_NVME "NVMe disk "
#define T_USB "USB ¤¨áª "
#define T_RAM "RAM ¤¨áª "
#define T_UNC "<22>¥¨§¢¥áâ­® "
@ -161,7 +160,6 @@ char *actions[] = {
#define T_FD "Floppy disk "
#define T_HD "Hard disk "
#define T_SATA "SATA disk "
#define T_NVME "NVMe disk "
#define T_USB "USB disk "
#define T_RAM "RAM disk "
#define T_UNC "Unknown "
@ -254,7 +252,6 @@ char *devinfo = {
"hd", 4, T_HD,
"bd", 4, T_HD,
"sd", 4, T_SATA,
"nv", 4, T_NVME,
"tm", 5, T_RAM,
"us", 6, T_USB,
0

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"3DCUBE2.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2")

View File

@ -1,4 +1,4 @@
lang equ ru_RU
lang equ ru
;
; Assembler

View File

@ -1,4 +1,4 @@
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
lang equ ru ; ru en fr ge fi
;
; Assembler

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"3DETX60B.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DETX60B")

View File

@ -1,4 +1,4 @@
lang equ ru_RU
lang equ ru
;
; Assembler

View File

@ -1,4 +1,4 @@
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
lang equ ru ; ru en fr ge fi
;
; Assembler

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm 3detx60b.asm 3detx60b
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm 3detx60b.asm 3detx60b
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"3DTCUB10.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DTCUB10")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm 3dtcub10.asm 3dtcub10
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm 3dtcub10.asm 3dtcub10
@erase lang.inc
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm ScreenRuler.asm ScreenRuler
@kpack ScreenRuler
@erase lang.inc
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm ScreenRuler.asm ScreenRuler
@kpack ScreenRuler
@erase lang.inc
@pause
@pause

View File

@ -1,295 +1,294 @@
;---------------------------------------------------------------------
; Screen Ruler v1.0
; Version for KolibriOS 2005-2023
;---------------------------------------------------------------------
; last update: 11.09.2023
; created by: Subbotin Anton aka Spaceraven
;---------------------------------------------------------------------
use32
org 0x0
db 'MENUET01'; 8 byte id
dd 1 ; header version
dd START ; program start
dd I_END ; program image size
dd 0x1000 ; required amount of memory
dd 0x1000 ; esp
dd 0, 0 ; no parameters, no path
;---------------------------------------------------------------------
include 'lang.inc' ; Language support for locales: ru_RU (UTF-8), en_US.
include '..\..\macros.inc'
delay = 20
magnify_width = 48
magnify_height = 30
magnify_halfwidth = magnify_width / 2
magnify_halfheight = magnify_height / 2
aim0 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth - 1
aim1 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth + 1
aim2 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth - 1
aim3 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth + 1
;------------------------- Main cycle
START:
redraw:
call draw_window
still:
call draw_magnify
wtevent:
mcall 23, delay ; wait here for event with timeout
dec eax
js still
jz redraw
dec eax
jnz button
; key in buffer
mov eax, 2
mcall
cmp ah, 32
jnz wtevent
mov eax, [mouse_x]
mov [pix1_x], eax
mov eax, [mouse_y]
mov [pix1_y], eax
jmp wtevent
;---------------------------------------------------------------------
button:
; we have only one button, close
or eax, -1
mcall
;------------------------- Window draw
draw_window:
mcall 12, 1
mov al, 48 ; function 48 : graphics parameters
mov bl, 4 ; subfunction 4 : get skin height
mcall
; DRAW WINDOW
mov ebx, 100*65536 + 4*magnify_width + 9
lea ecx, [eax + 100*65536 + 4*magnify_height + 128]
mov edx, 0x34000000 ; color of work area RRGGBB
mov edi, labelt ; header
xor eax, eax ; function 0 : define and draw window
mcall
mcall 71, 1, labelt
mcall 12,2
ret
;------------------------- Magnify draw
draw_magnify:
mcall 9, procinfo, -1
mov eax, [procinfo+70] ;status of window
test eax,100b
jne .end
mcall 14 ; get screen size
movzx ecx, ax
inc ecx
mov [screen_size_y], ecx
shr eax, 16
inc eax
mov [screen_size_x], eax
xor ebx, ebx
mcall 37 ; get mouse coordinates
mov ecx, eax
shr ecx, 16 ; ecx = x
movzx edx, ax ; edx = y
mov [mouse_x], ecx
mov [mouse_y], edx
add ecx, magnify_halfwidth
add edx, magnify_halfheight
mov [magnify_area_end_x], ecx
mov [magnify_area_end_y], edx
sub ecx, magnify_width
sub edx, magnify_height
mov [magnify_area_start_x], ecx
mov [magnify_area_start_y], edx
.loop_y:
.loop_x:
xor eax, eax ; assume black color for invalid pixels
test ecx, ecx
js .nopix
cmp ecx, [screen_size_x]
jge .nopix
test edx, edx
js .nopix
cmp edx, [screen_size_y]
jge .nopix
mov ebx, edx
sub ebx, [magnify_area_start_y]
shl ebx, 16
mov bx, cx
sub ebx, [magnify_area_start_x]
cmp ebx, aim0
jz .nopix
cmp ebx, aim1
jz .nopix
cmp ebx, aim2
jz .nopix
cmp ebx, aim3
jz .nopix
mov ebx, edx
imul ebx, [screen_size_x]
add ebx, ecx
mcall 35 ; read pixel
.nopix:
push ecx edx
sub ecx, [magnify_area_start_x]
sub edx, [magnify_area_start_y]
mov ebx, ecx
shl ebx, 2+16
mov bl, 4
mov ecx, edx
shl ecx, 2+16
mov cl, 4
mov edx, eax
mcall 13 ; draw rectangle 8x8
pop edx ecx
inc ecx
cmp ecx, [magnify_area_end_x]
jnz .loop_x
mov ecx, [magnify_area_start_x]
inc edx
cmp edx, [magnify_area_end_y]
jnz .loop_y
;------------------------- Measure labels draw
mov eax, 4
mov ebx, 8*65536 + 124
mov ecx, 11110000111100001111000011110000b
mov edx, start_pix
xor edi, edi
mcall 4
add ebx, 20
mov edx, end_pix
mcall 4
add ebx, 20
mov edx, measure_x
mcall 4
add ebx, 20
mov edx, measure_y
mcall 4
add ebx, 20
mov edx, measure_d
mcall 4
add ebx, 20
mov edx, inf
mcall 4
mov ebx, 0x80040000
mov ecx, [mouse_x]
mov edx, 12*8*65536 + 144
mov esi, 0x50FFFFFF
xor edi, edi
mcall 47
sub ecx, [pix1_x]
jns .sign1
neg ecx
.sign1:
mov edx, 14*8*65536 + 164
mov [dist_x], ecx
mcall 47
mov ecx, [mouse_y]
mov edx, 18*8*65536 + 144
mcall 47
sub ecx, [pix1_y]
jns .sign2
neg ecx
.sign2:
mov [dist_y], ecx
mov edx, 14*8*65536 + 184
mcall 47
mov ecx, [pix1_y]
mov edx, 18*8*65536 + 124
mcall 47
mov ecx, [pix1_x]
mov edx, 12*8*65536 + 124
mcall 47
mov eax, [dist_x]
mov ebx, eax
mul bx
mov cx, dx
shl ecx, 16
mov cx, ax
mov eax, [dist_y]
mov ebx, eax
mul bx
mov si, dx
shl esi, 16
mov si, ax
add ecx, esi
mov [diag_l], ecx
finit
fild [diag_l]
fsqrt
fistp [diag_l]
mov ebx, 0x80040000
mov ecx, [diag_l]
mov edx, 12*8*65536 + 204
mov esi, 0x50FFFFFF
xor edi, edi
mcall 47
.end:
ret
;------------------------- Data area
if lang eq ru_RU
labelt:
db 3, 'Измеритель', 0
start_pix:
db 'Пиксель 1 ( , )', 0
end_pix:
db 'Пиксель 2 ( , )', 0
measure_x:
db 'Дистанция x ( )', 0
measure_y:
db 'Дистанция y ( )', 0
measure_d:
db 'Диагональ ( )', 0
inf:
db 'Нажмите пробел', 0
else ; Default to en_US
labelt:
db 3, 'Ruler', 0
start_pix:
db 'Pixel 1 ( , )', 0
end_pix:
db 'Pixel 2 ( , )', 0
measure_x:
db 'Distance x ( )', 0
measure_y:
db 'Distance y ( )', 0
measure_d:
db 'Diagonal ( )', 0
inf:
db 'Press Space', 0
end if
I_END:
align 4
magnify_area_start_x dd ?
magnify_area_start_y dd ?
magnify_area_end_x dd ?
magnify_area_end_y dd ?
screen_size_x dd ?
screen_size_y dd ?
mouse_x dd ?
mouse_y dd ?
pix1_x dd 0
pix1_y dd 0
dist_x dd 0
dist_y dd 0
diag_l dd 0
;---------------------------------------------------------------------
procinfo:
rb 1024
;---------------------------------------------------------------------
;---------------------------------------------------------------------
; Screen Ruler v1.0
; Version for KolibriOS 2005-2023
;---------------------------------------------------------------------
; last update: 11.09.2023
; created by: Subbotin Anton aka Spaceraven
;---------------------------------------------------------------------
use32
org 0x0
db 'MENUET01'; 8 byte id
dd 1 ; header version
dd START ; program start
dd I_END ; program image size
dd 0x1000 ; required amount of memory
dd 0x1000 ; esp
dd 0, 0 ; no parameters, no path
;---------------------------------------------------------------------
include 'lang.inc'
include '..\..\macros.inc'
delay = 20
magnify_width = 48
magnify_height = 30
magnify_halfwidth = magnify_width / 2
magnify_halfheight = magnify_height / 2
aim0 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth - 1
aim1 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth + 1
aim2 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth - 1
aim3 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth + 1
;------------------------- Main cycle
START:
redraw:
call draw_window
still:
call draw_magnify
wtevent:
mcall 23, delay ; wait here for event with timeout
dec eax
js still
jz redraw
dec eax
jnz button
; key in buffer
mov eax, 2
mcall
cmp ah, 32
jnz wtevent
mov eax, [mouse_x]
mov [pix1_x], eax
mov eax, [mouse_y]
mov [pix1_y], eax
jmp wtevent
;---------------------------------------------------------------------
button:
; we have only one button, close
or eax, -1
mcall
;------------------------- Window draw
draw_window:
mcall 12, 1
mov al, 48 ; function 48 : graphics parameters
mov bl, 4 ; subfunction 4 : get skin height
mcall
; DRAW WINDOW
mov ebx, 100*65536 + 4*magnify_width + 9
lea ecx, [eax + 100*65536 + 4*magnify_height + 128]
mov edx, 0x34000000 ; color of work area RRGGBB
mov edi, labelt ; header
xor eax, eax ; function 0 : define and draw window
mcall
mcall 71, 1, labelt
mcall 12,2
ret
;------------------------- Magnify draw
draw_magnify:
mcall 9, procinfo, -1
mov eax, [procinfo+70] ;status of window
test eax,100b
jne .end
mcall 14 ; get screen size
movzx ecx, ax
inc ecx
mov [screen_size_y], ecx
shr eax, 16
inc eax
mov [screen_size_x], eax
xor ebx, ebx
mcall 37 ; get mouse coordinates
mov ecx, eax
shr ecx, 16 ; ecx = x
movzx edx, ax ; edx = y
mov [mouse_x], ecx
mov [mouse_y], edx
add ecx, magnify_halfwidth
add edx, magnify_halfheight
mov [magnify_area_end_x], ecx
mov [magnify_area_end_y], edx
sub ecx, magnify_width
sub edx, magnify_height
mov [magnify_area_start_x], ecx
mov [magnify_area_start_y], edx
.loop_y:
.loop_x:
xor eax, eax ; assume black color for invalid pixels
test ecx, ecx
js .nopix
cmp ecx, [screen_size_x]
jge .nopix
test edx, edx
js .nopix
cmp edx, [screen_size_y]
jge .nopix
mov ebx, edx
sub ebx, [magnify_area_start_y]
shl ebx, 16
mov bx, cx
sub ebx, [magnify_area_start_x]
cmp ebx, aim0
jz .nopix
cmp ebx, aim1
jz .nopix
cmp ebx, aim2
jz .nopix
cmp ebx, aim3
jz .nopix
mov ebx, edx
imul ebx, [screen_size_x]
add ebx, ecx
mcall 35 ; read pixel
.nopix:
push ecx edx
sub ecx, [magnify_area_start_x]
sub edx, [magnify_area_start_y]
mov ebx, ecx
shl ebx, 2+16
mov bl, 4
mov ecx, edx
shl ecx, 2+16
mov cl, 4
mov edx, eax
mcall 13 ; draw rectangle 8x8
pop edx ecx
inc ecx
cmp ecx, [magnify_area_end_x]
jnz .loop_x
mov ecx, [magnify_area_start_x]
inc edx
cmp edx, [magnify_area_end_y]
jnz .loop_y
;------------------------- Measure labels draw
mov eax, 4
mov ebx, 8*65536 + 124
mov ecx, 11110000111100001111000011110000b
mov edx, start_pix
xor edi, edi
mcall 4
add ebx, 20
mov edx, end_pix
mcall 4
add ebx, 20
mov edx, measure_x
mcall 4
add ebx, 20
mov edx, measure_y
mcall 4
add ebx, 20
mov edx, measure_d
mcall 4
add ebx, 20
mov edx, inf
mcall 4
mov ebx, 0x80040000
mov ecx, [mouse_x]
mov edx, 12*8*65536 + 144
mov esi, 0x50FFFFFF
xor edi, edi
mcall 47
sub ecx, [pix1_x]
jns .sign1
neg ecx
.sign1:
mov edx, 14*8*65536 + 164
mov [dist_x], ecx
mcall 47
mov ecx, [mouse_y]
mov edx, 18*8*65536 + 144
mcall 47
sub ecx, [pix1_y]
jns .sign2
neg ecx
.sign2:
mov [dist_y], ecx
mov edx, 14*8*65536 + 184
mcall 47
mov ecx, [pix1_y]
mov edx, 18*8*65536 + 124
mcall 47
mov ecx, [pix1_x]
mov edx, 12*8*65536 + 124
mcall 47
mov eax, [dist_x]
mov ebx, eax
mul bx
mov cx, dx
shl ecx, 16
mov cx, ax
mov eax, [dist_y]
mov ebx, eax
mul bx
mov si, dx
shl esi, 16
mov si, ax
add ecx, esi
mov [diag_l], ecx
finit
fild [diag_l]
fsqrt
fistp [diag_l]
mov ebx, 0x80040000
mov ecx, [diag_l]
mov edx, 12*8*65536 + 204
mov esi, 0x50FFFFFF
xor edi, edi
mcall 47
.end:
ret
;------------------------- Data area
if lang eq ru
labelt:
db 3, 'Измеритель', 0
start_pix:
db 'Пиксель 1 ( , )', 0
end_pix:
db 'Пиксель 2 ( , )', 0
measure_x:
db 'Дистанция x ( )', 0
measure_y:
db 'Дистанция y ( )', 0
measure_d:
db 'Диагональ ( )', 0
inf:
db 'Нажмите пробел', 0
else
labelt:
db 3, 'Ruler', 0
start_pix:
db 'Pixel 1 ( , )', 0
end_pix:
db 'Pixel 2 ( , )', 0
measure_x:
db 'Distance x ( )', 0
measure_y:
db 'Distance y ( )', 0
measure_d:
db 'Diagonal ( )', 0
inf:
db 'Press Space', 0
end if
I_END:
align 4
magnify_area_start_x dd ?
magnify_area_start_y dd ?
magnify_area_end_x dd ?
magnify_area_end_y dd ?
screen_size_x dd ?
screen_size_y dd ?
mouse_x dd ?
mouse_y dd ?
pix1_x dd 0
pix1_y dd 0
dist_x dd 0
dist_y dd 0
diag_l dd 0
;---------------------------------------------------------------------
procinfo:
rb 1024
;---------------------------------------------------------------------

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"ScreenRuler.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "ScreenRuler")

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"bcdclk.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "bcdclk")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm bcdclk.asm bcdclk
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm bcdclk.asm bcdclk
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"colorref.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "colorref")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm colorref.asm colorref
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm colorref.asm colorref
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"crownscr.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "crownscr")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm crownscr.asm crownscr
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm crownscr.asm crownscr
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"cslide.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "cslide")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"eyes.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "eyes")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm eyes.asm eyes
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm eyes.asm eyes
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"free3d04.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "free3d04")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm free3d04.asm free3d04
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm free3d04.asm free3d04
@erase lang.inc
@pause
@pause

View File

@ -1,4 +1,4 @@
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
lang equ ru ; ru en fr ge fi
;
; Assembler

View File

@ -1,4 +1,4 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm life.asm life
@pause
@pause

View File

@ -1,4 +1,4 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm life.asm life
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"magnify.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "magnify")

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm magnify.asm magnify
@kpack magnify
@erase lang.inc
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm magnify.asm magnify
@kpack magnify
@erase lang.inc
@pause
@pause

View File

@ -19,7 +19,7 @@
dd 0x1000 ; esp
dd 0, 0 ; no parameters, no path
;---------------------------------------------------------------------
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include 'lang.inc'
include '..\..\..\macros.inc'
delay equ 20
@ -52,7 +52,7 @@ button:
;---------------------------------------------------------------------
draw_window:
mcall 12,1
mov al, 48 ; function 48 : graphics parameters
mov bl, 4 ; subfunction 4 : get skin height
mcall
@ -63,7 +63,7 @@ draw_window:
mov edi, labelt ; header
xor eax, eax ; function 0 : define and draw window
mcall
mcall 12,2
ret
;---------------------------------------------------------------------
@ -80,7 +80,7 @@ draw_magnify:
shr eax, 16
inc eax
mov [size_x], eax
xor ebx, ebx
mcall 37 ; get mouse coordinates
mov ecx, eax
@ -134,10 +134,10 @@ draw_magnify:
;---------------------------------------------------------------------
; DATA AREA
;---------------------------------------------------------------------
if lang eq ru_RU
if lang eq ru
labelt:
db 'Magnifier - <20>ªà ­­ ï «ã¯ ', 0
else ; Default to en_US
else
labelt:
db 'Magnifier', 0
end if
@ -153,4 +153,4 @@ size_y dd ?
;---------------------------------------------------------------------
procinfo:
rb 1024
;---------------------------------------------------------------------
;---------------------------------------------------------------------

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"movback.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "movback")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"plasma.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "plasma")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"ray.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "ray")

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"timer.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "timer")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm timer.asm timer
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm timer.asm timer
@erase lang.inc
@pause
@pause

View File

@ -16,7 +16,7 @@ use32
dd 0x1000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include 'lang.inc'
include '..\..\..\macros.inc'
START: ; start of execution
@ -137,9 +137,9 @@ draw_window:
; DATA AREA
if lang eq ru_RU
if lang eq ru
title db '€‰Œ…<C592>',0
else ; Default to en_US
else
title db 'TIMER',0
end if

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"tinyfrac.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "tinyfrac")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm tinyfrac.asm tinyfrac
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm tinyfrac.asm tinyfrac
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"transp.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "transp")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm transp.asm transp
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru_RU >lang.inc
@echo lang fix ru >lang.inc
@fasm transp.asm transp
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"trantest.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "trantest")

View File

@ -1,4 +1,4 @@
lang equ ru_RU
lang equ ru
;
; Assembler

View File

@ -1,4 +1,4 @@
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
lang equ ru ; ru en fr ge fi
;
; Assembler

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en_US >lang.inc
@echo lang fix en >lang.inc
@fasm trantest.asm trantest
@erase lang.inc
@pause
@pause

Some files were not shown because too many files have changed in this diff Show More