From f87fcd87dcb23bfc2342af2c9b13f3fd9e4e07b5 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Fri, 2 Apr 2021 04:22:22 +0300 Subject: [PATCH] Wrap is_region_userspace with a macro, update logs. --- README | 2 +- makefile | 6 +++--- shell.c | 1 + test/016_#f01_#draw_all.ref.log | 4 ++-- test/016_#f01_#draw_all.ref.png | Bin 2370 -> 2326 bytes umka.asm | 18 ++++++++++-------- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/README b/README index 1e56510..e13f8ff 100644 --- a/README +++ b/README @@ -53,7 +53,7 @@ lfbviewx BUILD ----- -$ KOLIBRI=/path/to/kolibrios make +$ KOLIBRIOS=/path/to/kolibrios make /path/to/kolibrios is where you checked out 'svn co svn://kolibrios.org'. diff --git a/makefile b/makefile index 89b7c65..927f167 100644 --- a/makefile +++ b/makefile @@ -29,7 +29,7 @@ umka_os: umka_os.o umka.o shell.o lodepng.o vdisk.o vnet.o trace.o trace_lbr.o \ $(CC) $(LDFLAGS_32) $^ -o $@ -static -T umka.ld umka.o umka.fas: umka.asm - INCLUDE="$(KOLIBRI)/kernel/trunk;$(KOLIBRI)/programs/develop/libraries/libcrash/trunk" \ + INCLUDE="$(KOLIBRIOS)/kernel/trunk;$(KOLIBRIOS)/programs/develop/libraries/libcrash/trunk" \ $(FASM) $< umka.o -s umka.fas -m 1234567 shell.o: shell.c @@ -44,10 +44,10 @@ pci.o: linux/pci.c lodepng.o: lodepng.c lodepng.h $(CC) $(CFLAGS_32) -c $< -default.skn: $(KOLIBRI)/skins/Leency/Shkvorka/default.asm +default.skn: $(KOLIBRIOS)/skins/Leency/Shkvorka/default.asm $(FASM) $< $@ -skin.skn: $(KOLIBRI)/skins/Leency/Octo_flat/default.asm +skin.skn: $(KOLIBRIOS)/skins/Leency/Octo_flat/default.asm $(FASM) $< $@ umka.prp: umka.fas diff --git a/shell.c b/shell.c index 9ba38e2..ad19a4a 100644 --- a/shell.c +++ b/shell.c @@ -783,6 +783,7 @@ shell_get_window_colors(int argc, char **argv) { } (void)argv; system_colors_t colors; + memset(&colors, 0xaa, sizeof(colors)); COVERAGE_ON(); umka_sys_get_window_colors(&colors); COVERAGE_OFF(); diff --git a/test/016_#f01_#draw_all.ref.log b/test/016_#f01_#draw_all.ref.log index 08fac13..8ae72f2 100644 --- a/test/016_#f01_#draw_all.ref.log +++ b/test/016_#f01_#draw_all.ref.log @@ -32,8 +32,8 @@ font smoothing: 0 - off /> get_window_colors 0x00586786 frame 0x00fefefe grab -0x00aea6a6 work_3d_dark -0x00fbfbfb work_3d_light +0x00c5bdb9 work_3d_dark +0x00ece9e5 work_3d_light 0x00333333 grab_text 0x00ddd7cf work 0x007887a6 work_button diff --git a/test/016_#f01_#draw_all.ref.png b/test/016_#f01_#draw_all.ref.png index 573c89df7c606ee6d7aaec7b426169310d5d0bc6..66511b2ff2aa716afedebb248b95367e7fcc19fb 100644 GIT binary patch delta 2063 zcmW+#XH-*(5+)(S1;N}KO7Q8!n`;!6ML?8Zl8`(@Rdf|WDPly_6%auXkeh-_NKh_K zK&lj#D#B7^7Zn!|5tMyWMJWpe0i{V%K-_G0=g)jIbLN}#edo+`(rpq(#rY)da9~xH zEo3B56=ctwn3zmXP7VzXr6o?tWU}Fb)x6BP!NI|?v9Vjiv5}FHfq{XXw0U0CV1Ivq zOR>Lyaf?(c&A{fn-z+9QB^!;sZeL7InCEy$!JJs|QOHdp;aDl2I0uy6wXUY1pd8}Br2iO!o9+>ZYrG&o`}`^hL^k0em zaK-;V(@m4*rrD^IW@7-$Y77ppN@depXPd33a2BUM^m5$KX}+#L`f#`93s*GP{H`*m zquM_^vrE)gzR*~pnw6Q=rFf*a+@!vDWo^SA_cdG^|3;y7z+rugLtcj@}W?4Sm9nQS$!N;T`E=`y#Q^;@Or z(6vn!r6%F@U+$D@afR<@YJdJ@+WYR3Z2yDjrOS=FSQz9pk^Pj?u@Z^MDjOghG^Kqz z*-WV~*fXru3CWWdOfpiR#!04v>aB8|Dx*reR66*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q{AA%)QY6gx7Pj8@iJR!fv62ADTyuJys5CztRc3(e%w~0pwNu% zbD*u6rx19Y&(+<@jp_bAWnC`O;nejs_?TpUt-eet)IV9ds1r5)#jh>Ci+0wJE_@Uz z`QYBGKyP?>-{UCcs;GZh!EG>S^Ww)Y6S*GxhV?@Fe67x!^Kj+1#v=R zl<7*!fOXN|Jtbjr!-1-PCMD-q{@7~=KOi5X>+nsDZLo|7*3!BJX>`0dp*HHL!7|&r zuH~N}eaqrKYDk%ZH^%-b5s5sY(vD6m8)(E(0C<%1>~I?$IN`BTa+rKC8KQFP`h0CPe{A;!$0|`qkn2hkRZUq%j7IPW^21a zNV1$B*Ik7c-^lrwZEg|hoza~b*9k}32N5UIh|U(*;FPz9{wn%&y$bw&L@wOq91||a zH67&}W1|*$0=>1?loYOF4)mD`!-y~}#!y_76F|WBBJ!xXR2yNSpCBgSp8^^~TI6#~ zFBne%o`9Cn7vw#9JL9P=X`er#Dt}`%EZf>)?2K^W3Pl3~LNOe2;ya1D%w zLXb5QBi%~|@4}adP9h!*RHaE4;9v&uMRGU}r{}K(ZYRc}49p9_JMs-72=QQ|P}5dA zz`%mwX^keOsxQb8Gw&?_Fef*|3*@Ot9@yD*XYIiJjbnmdeOG-p8xmTLr1;7GMeyx5 zl&{^le?K)Urd~XNI=qE^ z%Xx@QCf!vdRyAO75CxEkOb`LRkcY71XLlol>=J~v9<~V;xtlO+j0k8HBI&?RHrVWb zlFTWKCz8Y;D1bFpgE(dEL*{V9iKHGL1@NY-69Wyr$ed~)B5BB<0<>~WA|p6PSEg^t zdB0F22JZDBbGFtZtH2eWr)c#mEc5@yod=2B1yEk&;=-1;UlYF>x_@o_(LX{tLB8d1 Gj`csp{n1ze diff --git a/umka.asm b/umka.asm index dcb5443..ed946d7 100644 --- a/umka.asm +++ b/umka.asm @@ -171,6 +171,15 @@ macro add r, v { end if } +macro stdcall target, [args] { +common + if target eq is_region_userspace + test esp, esp ; clear zf + else + stdcall target, args + end if +} + include 'system.inc' include 'fdo.inc' @@ -671,13 +680,6 @@ map_memEx: sys_msg_board equ __pex0 delay_ms equ __pex1 -macro stdcall target, [args] { - if target eq is_region_userspace - test esp, esp ; clear zf - else - stdcall target, args - end if -} include fix pew macro pew x {} @@ -741,7 +743,7 @@ BTN_ADDR dd ? MEM_AMOUNT rd 0x1d SYS_SHUTDOWN db ? sys_proc rd 0x800 -rb 0xb242 ; align SLOT_BASE on 0x10000 +rb 0xb202 ; align SLOT_BASE on 0x10000 SLOT_BASE: rd 0x8000 VGABasePtr rb 640*480 ;rb 0x582 ; align HEAP_BASE on page boundary