asciivju: v0.3 R3, makefiles update (building from source)

git-svn-id: svn://kolibrios.org@2087 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2011-08-21 07:27:03 +00:00
parent 8baf5f1141
commit c98be95345
8 changed files with 412 additions and 3 deletions

View File

@ -45,6 +45,7 @@ FASM_PROGRAMS:=\
@panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \
@rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \
@ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\ @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\
asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \
calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \
calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \
commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \
@ -241,7 +242,7 @@ CMM_PROGRAMS:=\
# Some of them are auto-built with special rules, some just exist before build. # Some of them are auto-built with special rules, some just exist before build.
# Each item is of the form <local name>:<name inside image>. # Each item is of the form <local name>:<name inside image>.
# Spaces should be represented as |. # Spaces should be represented as |.
OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ OTHER_FILES:=autorun.dat:AUTORUN.DAT \
background.gif:background.gif default.skn:DEFAULT.SKN \ background.gif:background.gif default.skn:DEFAULT.SKN \
e80:E80 graph:GRAPH hdread:HDREAD \ e80:E80 graph:GRAPH hdread:HDREAD \
icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \ icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \

Binary file not shown.

View File

@ -45,6 +45,7 @@ FASM_PROGRAMS:=\
@panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \
@rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \
@ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\ @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm\
asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \
calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \
calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \
commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \
@ -247,7 +248,7 @@ CMM_PROGRAMS:=\
# Some of them are auto-built with special rules, some just exist before build. # Some of them are auto-built with special rules, some just exist before build.
# Each item is of the form <local name>:<name inside image>. # Each item is of the form <local name>:<name inside image>.
# Spaces should be represented as |. # Spaces should be represented as |.
OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ OTHER_FILES:=autorun.dat:AUTORUN.DAT \
background.gif:background.gif default.skn:DEFAULT.SKN \ background.gif:background.gif default.skn:DEFAULT.SKN \
e80:E80 graph:GRAPH hdread:HDREAD \ e80:E80 graph:GRAPH hdread:HDREAD \
icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \ icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \

Binary file not shown.

View File

@ -45,6 +45,7 @@ FASM_PROGRAMS:=\
@panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \ @panel:@PANEL:$(PROGS)/system/panel/trunk/@PANEL.ASM \
@rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \ @rb:@RB:$(PROGS)/system/rb/trunk/@RB.ASM \
@ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm \ @ss:@SS:$(PROGS)/system/ss/trunk/@ss.asm \
asciivju:ASCIIVJU:$(PROGS)/develop/asciivju/trunk/asciivju.asm \
calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \ calc:CALC:$(PROGS)/other/calc/trunk/calc.asm \
calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \ calendar:CALENDAR:$(PROGS)/system/calendar/trunk/calendar.asm \
commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \ commouse:COMMOUSE:$(PROGS)/system/commouse/trunk/commouse.asm \
@ -240,7 +241,7 @@ CMM_PROGRAMS:=\
# Spaces should be represented as |. # Spaces should be represented as |.
# #
# yogev_ezra: Removed '3dsheart' to free some space on RAMDISK. This demo has 90% in common with VIEW3DS # yogev_ezra: Removed '3dsheart' to free some space on RAMDISK. This demo has 90% in common with VIEW3DS
OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ OTHER_FILES:=autorun.dat:AUTORUN.DAT \
background.gif:background.gif default.skn:DEFAULT.SKN \ background.gif:background.gif default.skn:DEFAULT.SKN \
e80:E80 graph:GRAPH hdread:HDREAD \ e80:E80 graph:GRAPH hdread:HDREAD \
icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \ icons.dat:ICONS.DAT iconstrp.gif:ICONSTRP.GIF index_htm:INDEX.HTM \

Binary file not shown.

View File

@ -0,0 +1,403 @@
use32
org 0x0
db 'MENUET01'
dd 0x01,start,i_end,e_end,e_end,0,0
BUTTON_SIDE equ 16 ; button are squares
BUTTON_SPACE equ 19 ; space between cols and rows
start:
call get_skin_height
still:
mov eax, 10
int 0x40
dec eax
jnz @f
call redraw
@@: dec eax
jnz @f
call key
@@: dec eax
jnz @f
call button
@@: jmp still
get_skin_height:
mov eax, 48
mov ebx, 4
int 0x40
mov [skin_height], eax
ret
redraw:
mov eax, 12
mov ebx, 1
int 0x40
mov eax, 0
mov ebx, 300*0x10000+317
mov ecx, 300*0x10000+184
add ecx, [skin_height]
mov edx, 0x33F0F0F0 ; skinned, resizeable
mov esi, 0x80808080 ; title color
mov edi, window_title
int 0x40
call draw_table
call draw_codes
call draw_page_switcher
mov eax, 12
mov ebx, 2
int 0x40
ret
key:
mov eax, 2
int 0x40
ret
button:
mov eax, 17
int 0x40
cmp eax, 1
jnz @f
ret
@@: shr eax, 8
cmp eax, 1
jz quit
cmp ax, 0xFFAA
jnz .change_focus
xor bx, bx
mov bl, [symbol_start]
add bx, 2
mov cx, bx
add cx, 128
@@: mov eax, 8
mov edx, 0x80000000
add dx, bx
int 0x40
cmp bx, cx
jz @f
inc bx
jmp @b
@@: add [symbol_start], 128 ; change page
add [symbol_focused], 128
call draw_table
call draw_codes
mov [redraw_flag], 1 ; for page_switcher this means visual blink (color changing)
call draw_page_switcher
mov eax, 5
mov ebx, 10
int 0x40
mov [redraw_flag], 0
call draw_page_switcher
ret
.change_focus:
mov bl, [symbol_focused]
mov [symbol_unfocused], bl
shl eax, 8
sub ah, 2
mov [symbol_focused], ah
mov [redraw_flag], 1 ; for table this means redraw only focused and unfocused buttons
call draw_table
call draw_codes
mov [redraw_flag], 0
ret
draw_table:
mov al, [symbol_start]
mov [symbol_current], al
.next_button:
push [button_x]
pop [button_cur_x]
push [button_y]
pop [button_cur_y]
mov al, [symbol_current]
mov [button_cur_id], al
mov [is_active], 0
mov al, [symbol_focused]
cmp [symbol_current], al
jnz @f
mov byte[is_active], 1
@@: cmp [redraw_flag], 1
jnz .draw ; if redraw_flag is zero, we should redraw the whole table
mov al, [symbol_focused]
cmp [symbol_current], al
jz .draw
mov al, [symbol_unfocused]
cmp [symbol_current], al
jz .draw
jmp .skip ; skip button if it isn't (un)focused
.draw:
call draw_button
.skip:
mov al, [symbol_start]
add al, 127 ; end of current page
cmp [symbol_current], al ; the last on page?
jb @f
mov [button_x], 2
mov [button_y], 2
ret
@@: inc [symbol_current]
add [button_x], BUTTON_SPACE
cmp [button_x], 306 ; the last in row?
jae @f
jmp .next_button
@@: add [button_y], BUTTON_SPACE ; next row
mov [button_x], 2
jmp .next_button
ret
draw_button:
mov eax, 8
mov ebx, [button_cur_x]
shl ebx, 16
add ebx, BUTTON_SIDE
mov ecx, [button_cur_y]
shl ecx, 16
add ecx, BUTTON_SIDE
mov edx, 0x80000000
add dl, [button_cur_id]
add edx, 2
mov eax, 8
int 0x40
or edx, 0x20000000
add edx, 0x80000000
mov esi, 0x00F0F0F0 ; button color
int 0x40
cmp byte[is_active], 1
jz @f
.symbol:
mov eax, 4
mov ebx, [button_cur_x]
add ebx, 6
shl ebx, 16
add ebx, [button_cur_y]
add ebx, 5
xor ecx, ecx
mov edx, symbol_current
mov esi, 1
int 0x40
ret
@@: ; draw a blue square (selection), 8 lines
mov eax, 38
mov ebx, [button_cur_x]
shl ebx, 16
add ebx, [button_cur_x]
add ebx, BUTTON_SIDE-1
mov ecx, [button_cur_y]
shl ecx, 16
add ecx, [button_cur_y]
mov edx, 0x000080FF ; square color
int 0x40
mov ebx, [button_cur_x]
shl ebx, 16
add ebx, [button_cur_x]
mov ecx, [button_cur_y]
shl ecx, 16
add ecx, [button_cur_y]
add ecx, BUTTON_SIDE-1
int 0x40
mov ebx, [button_cur_x]
inc ebx
shl ebx, 16
add ebx, [button_cur_x]
inc ebx
add ebx, BUTTON_SIDE-1
mov ecx, [button_cur_y]
inc ecx
shl ecx, 16
add ecx, [button_cur_y]
inc ecx
int 0x40
mov ebx, [button_cur_x]
inc ebx
shl ebx, 16
add ebx, [button_cur_x]
inc ebx
mov ecx, [button_cur_y]
inc ecx
shl ecx, 16
add ecx, [button_cur_y]
inc ecx
add ecx, BUTTON_SIDE-2
int 0x40
mov ebx, [button_cur_x]
add ebx, BUTTON_SIDE-1
shl ebx, 16
add ebx, [button_cur_x]
add ebx, BUTTON_SIDE-1
mov ecx, [button_cur_y]
inc ecx
shl ecx, 16
add ecx, [button_cur_y]
add ecx, BUTTON_SIDE-1
int 0x40
mov ebx, [button_cur_x]
inc ebx
shl ebx, 16
add ebx, [button_cur_x]
add ebx, BUTTON_SIDE-2
mov ecx, [button_cur_y]
add ecx, BUTTON_SIDE-1
shl ecx, 16
add ecx, [button_cur_y]
add ecx, BUTTON_SIDE-1
int 0x40
mov ebx, [button_cur_x]
add ebx, BUTTON_SIDE
shl ebx, 16
add ebx, [button_cur_x]
add ebx, BUTTON_SIDE
mov ecx, [button_cur_y]
shl ecx, 16
add ecx, [button_cur_y]
add ecx, BUTTON_SIDE-1
int 0x40
mov ebx, [button_cur_x]
shl ebx, 16
add ebx, [button_cur_x]
add ebx, BUTTON_SIDE
mov ecx, [button_cur_y]
add ecx, BUTTON_SIDE
shl ecx, 16
add ecx, [button_cur_y]
add ecx, BUTTON_SIDE
int 0x40
jmp .symbol
draw_page_switcher:
mov eax, 8
mov edx, 0x8000FFAA
int 0x40
mov esi, 0x00F0F0F0
cmp [redraw_flag], 1
jnz @f
mov esi, 0x00808080
@@: mov eax, 8
mov ebx, 2*0x10000+60
mov ecx, 157*0x10000+19
mov edx, 0x2000FFAA
int 0x40
cmp [symbol_start], 0
jnz @f
mov eax, 4
mov ebx, 11*0x10000+164
mov ecx, 0x80000000
mov edx, string_000_127
int 0x40
ret
@@: mov eax, 4
mov ebx, 11*0x10000+164
mov ecx, 0x80000000
mov edx, string_128_255
int 0x40
ret
draw_codes:
mov eax, 13
mov ebx, 80*0x10000+220
mov ecx, 164*0x10000+9
mov edx, 0x00F0F0F0
int 0x40
mov eax, 4
mov ebx, 80*0x10000+164
mov ecx, 0x80000000
mov edx, string_ASCII_CODE
int 0x40
mov ebx, 180*0x10000+164
mov ecx, 0x80000000
mov edx, string_ASCII_HEX_CODE
int 0x40
mov eax, 47
mov ebx, 0x00030000 ; 3 digits, dec
xor ecx, ecx
add cl, [symbol_focused]
mov edx, 152*0x10000+164
xor esi, esi
int 0x40
mov ebx, 0x00020100 ; 2 digits, hex
mov edx, 276*0x10000+164
int 0x40
ret
quit:
mov eax, -1
int 0x40
window_title db 'ASCIIVju v0.3 R3',0
string_000_127 db '000-127',0
string_128_255 db '128-255',0
string_ASCII_CODE db 'ASCII Code: ',0
string_ASCII_HEX_CODE db 'ASCII Hex-Code: ',0
skin_height dd 0
button_x dd 2
button_y dd 2
symbol_current db 0
symbol_start db 0
button_cur_x dd 0
button_cur_y dd 0
button_cur_id db 0
db 0,0,0 ; unused
is_active dd 0 ; is current symbol selected?
symbol_unfocused db 0
symbol_focused db 0
redraw_flag dd 0
db 0,0,0,0 ; unused
i_end:
rb 0x500 ;stack
e_end:

View File

@ -0,0 +1,3 @@
asciivju : asciivju.asm
fasm asciivju.asm asciivju