/programs/develop/fasm/trunk/fasm.asm |
---|
32,7 → 32,6 |
dd params,0x0 ; parameters,icon |
include 'lang.inc' |
include '..\..\..\macros.inc' |
include 'fasm.inc' |
center fix true |
91,7 → 90,7 |
still: |
push 10 ; Wait here for event |
pop eax |
mcall |
int 40h |
dec eax |
je red ; Redraw request |
dec eax |
99,18 → 98,18 |
key: ; Key |
mov al,2 ; Read it and ignore |
mcall |
int 0x40 |
jmp still |
button: ; Button in Window |
mov al,17 |
mcall |
int 0x40 |
cmp ah,1 |
jne noclose |
or eax,-1 |
mcall |
int 0x40 |
noclose: |
cmp ah,2 ; Start compiling |
151,13 → 150,13 |
mov ecx,50*65536+250 |
mov edx,[sc.work] |
or edx,0x33000000 |
mov edi,title ; Draw Window Label Text |
mcall |
mov edi,header ; Draw Window Label Text |
int 0x40 |
mcall 9,PROCESSINFO,-1 |
mpack ecx,1,1 |
mov ebx,[pinfo.box.left] |
mov ebx,[pinfo.x_size] |
sub ebx,10 |
push ecx |
190,7 → 189,7 |
madd ecx, 14,0 |
mcall ,,,0x4000000D ; Button: Enter Path |
mpack ebx,[pinfo.box.left],MAGIC1 |
mpack ebx,[pinfo.x_size],MAGIC1 |
msub ebx,MAGIC1+10+1,0 |
mpack ecx,0, 14*3/2-1 |
madd ecx,1,0 |
205,13 → 204,13 |
mov esi,text.line_size |
mov eax,4 |
newline: |
mcall |
int 0x40 |
add ebx, 14 |
add edx,text.line_size |
cmp byte[edx],'x' |
jne newline |
mov ebx,[pinfo.box.left] |
mov ebx,[pinfo.x_size] |
sub ebx,MAGIC1+10+1-9 |
shl ebx,16 |
add ebx,1+( 14*3/2-1)/2-3 |
221,7 → 220,7 |
mpack ebx,MAGIC1+6,0 |
add ebx,1+ 14/2-3+ 14*0 |
mov esi,[pinfo.box.left] |
mov esi,[pinfo.x_size] |
sub esi,MAGIC1*2+5*2+6+3 |
mov eax,esi |
mov cl,6 |
247,9 → 246,9 |
draw_messages: |
mov eax,13 ; clear work area |
mpack ebx,7-2,[pinfo.box.left] |
mpack ebx,7-2,[pinfo.x_size] |
sub ebx,5*2+7*2-1-2*2 |
mpack ecx,0,[pinfo.box.top] |
mpack ecx,0,[pinfo.y_size] |
madd ecx, 14*3+1+7+1,-( 14*3+1+7*2+25) |
mov word[bottom_right+2],bx |
mov word[bottom_right],cx |
256,7 → 255,7 |
msub [bottom_right],7,11 |
add [bottom_right],7 shl 16 + 53 |
mov edx,[sc.work] |
mcall |
int 0x40 |
_cy = 0 |
_sy = 2 |
_cx = 4 |
361,7 → 360,7 |
print_text: |
mpack ebx,MAGIC1+6,[pinfo.box.left] |
mpack ebx,MAGIC1+6,[pinfo.x_size] |
sub ebx,MAGIC1*2+19 |
movzx esi,bx |
mov ecx,[ya-2] |
488,7 → 487,7 |
mov eax,70 |
mov ebx,file_info_start |
xor ecx,ecx |
mcall |
int 0x40 |
@@: |
jmp exit_program |
504,7 → 503,7 |
include 'x86_64.inc' |
include 'tables.inc' |
title db appname,VERSION_STRING,0 |
header db appname,VERSION_STRING,0 |
_logo db 'flat assembler version ',VERSION_STRING,13,10,0 |
/programs/develop/fasm/trunk/system.inc |
---|
63,7 → 63,7 |
cmp [_mode],NORMAL_MODE |
je still |
or eax,-1 |
mcall |
int 0x40 |
make_timestamp: |
push ebx |
144,7 → 144,7 |
mov dword [ebx+16], fileinfo |
mov eax, 70 |
push ebx |
mcall |
int 0x40 |
pop ebx |
test eax, eax |
jnz .fail |
172,7 → 172,7 |
mov [ebx+16], edx |
push ebx |
mov eax, 70 |
mcall |
int 0x40 |
xchg eax, [esp] |
add [eax+4], ebx |
adc [eax+8], dword 0 |
201,7 → 201,7 |
; mov [filesize],edx |
; mov eax,58 |
; mov ebx,file_info_write |
; mcall |
; int 0x40 |
; popa |
; ret |
209,7 → 209,7 |
mov [ebx+16], edx |
push ebx |
mov eax, 70 |
mcall |
int 0x40 |
xchg eax, [esp] |
add [eax+4], ebx |
adc [eax+8], dword 0 |
344,7 → 344,7 |
mov eax,63 |
mov ebx,1 |
mov cl,dl |
mcall |
int 0x40 |
popa |
ret |
/programs/develop/fasm/trunk/fasm.inc |
---|
18,6 → 18,64 |
call __draw_caption |
} |
macro mpack dest, hsrc, lsrc |
{ |
if (hsrc eqtype 0) & (lsrc eqtype 0) |
mov dest, (hsrc) shl 16 + lsrc |
else |
if (hsrc eqtype 0) & (~lsrc eqtype 0) |
mov dest, (hsrc) shl 16 |
add dest, lsrc |
else |
mov dest, hsrc |
shl dest, 16 |
add dest, lsrc |
end if |
end if |
} |
macro __mov reg,a,b { |
if (~a eq)&(~b eq) |
mpack reg,a,b |
else if (~a eq)&(b eq) |
mov reg,a |
end if |
} |
macro mcall a,b,c,d,e,f { |
__mov eax,a |
__mov ebx,b |
__mov ecx,c |
__mov edx,d |
__mov esi,e |
__mov edi,f |
int 0x40 |
} |
macro sz name,[data] { |
if used name |
common |
label name |
forward |
db data |
common |
.size = $-name |
end if |
} |
macro lsz name,[lng,data] { |
if used name |
common |
label name |
forward |
if lang eq lng |
db data |
end if |
common |
.size = $-name |
end if |
} |
macro mmov reg,a1,a2 { |
mov reg,(a1) shl 16 + (a2) |
} |
51,3 → 109,39 |
@^ fix macro comment { |
^@ fix } |
; structure definition helper |
;include '%fasminc%struct.inc' |
include 'struct.inc' |
; structures used in MeOS |
struct process_information |
cpu_usage dd ? ; +0 |
window_stack_position dw ? ; +4 |
window_stack_value dw ? ; +6 |
not_used1 dw ? ; +8 |
process_name db 12 dup(?) ; +10 |
memory_start dd ? ; +22 |
used_memory dd ? ; +26 |
PID dd ? ; +30 |
x_start dd ? ; +34 |
y_start dd ? ; +38 |
x_size dd ? ; +42 |
y_size dd ? ; +46 |
slot_state dw ? ; +50 |
not_used2 db 1024-52 dup(?) |
ends |
struct system_colors |
frame dd ? |
grab dd ? |
grab_button dd ? |
grab_button_text dd ? |
grab_text dd ? |
work dd ? |
work_button dd ? |
work_button_text dd ? |
work_text dd ? |
work_graph dd ? |
ends |