1
0
mirror of https://github.com/pfusik/xasm.git synced 2024-06-07 11:29:32 +00:00

X-Assembler 2.0 beta.

This commit is contained in:
Piotr Fusik 1998-09-30 19:23:10 +02:00
parent bfa7ed2568
commit 6ad566e409

View File

@ -611,7 +611,7 @@ fopen: cmp di, offset t_icl+l_icl-2
ret ret
fread: mov ah, 3fh fread: mov ah, 3fh
freacl: mov bx, [iclen] fread1: mov bx, [iclen]
mov bx, [(icl bx).prev] mov bx, [(icl bx).prev]
mov bx, [(icl bx).handle] mov bx, [(icl bx).handle]
mov bp, offset e_read mov bp, offset e_read
@ -620,7 +620,7 @@ freacl: mov bx, [iclen]
ret ret
fclose: mov ah, 3eh fclose: mov ah, 3eh
call freacl call fread1
mov bx, [iclen] mov bx, [iclen]
cmp bx, [srcen] cmp bx, [srcen]
jne fclos1 jne fclos1
@ -1048,12 +1048,14 @@ vlabel: push bx
jnc vlabfn jnc vlabfn
jpass1 vlukp1 jpass1 vlukp1
error e_undec error e_undec
vlabfn: test [(lab bx).flags], m_ukp1 vlabfn: jpass1 vlchuk
jz vlabkn
jpass1 vlukp1
cmp bx, [pslab] cmp bx, [pslab]
jb vlukp1 jb vlchuk
test [(lab bx).flags], m_ukp1
jz vlukp1
error e_fref error e_fref
vlchuk: test [(lab bx).flags], m_ukp1
jz vlabkn
vlukp1: mov [ukp1], 0ffh vlukp1: mov [ukp1], 0ffh
vlabkn: bt [word (lab bx).flags], b_sign vlabkn: bt [word (lab bx).flags], b_sign
sbb eax, eax sbb eax, eax
@ -1174,9 +1176,19 @@ brange: cmp eax, 100h
spauns: call spaces spauns: call spaces
getuns: call getval getuns: call getval
jc v_ret pushf
jnc getun1
jpass1 getun2
getun1: test eax, eax
js orange
getun2: popf
unsret: ret
getpos: call getval
jc unknow
test eax, eax test eax, eax
jns v_ret jg unsret
orange: error e_range orange: error e_range
mbrack: error e_brack mbrack: error e_brack
@ -1805,10 +1817,7 @@ dtan2: lodsd
mov [sinadd], ax mov [sinadd], ax
call valuco call valuco
mov [sinamp], ax mov [sinamp], ax
call getuns call getpos
jc unknow
test ax, ax
jz badsin
mov [sinsiz], ax mov [sinsiz], ax
mov [sinmin], 0 mov [sinmin], 0
dec ax dec ax
@ -2048,10 +2057,38 @@ p_icl: call rfname
jmp opfile jmp opfile
p_ins: call rfname p_ins: call rfname
call fopen xor eax, eax
mov [insofs], eax
mov [inslen], ax
lodsb
cmp al, ','
jne p_ii2
push di
call getval
jc unknow
mov [insofs], eax
lodsb
cmp al, ','
jne p_ii1
call getpos
mov [inslen], ax
inc si
p_ii1: pop di
p_ii2: dec si
push si push si
p_in1: mov cx, 256 call fopen
mov dx, offset tlabel mov dx, [word insofs]
mov cx, [word high insofs]
mov ax, 4200h
jcxz p_ip1
mov al, 2
p_ip1: call fread1
p_in1: mov cx, [inslen]
jcxz p_in2
test ch, ch
jz p_in3
p_in2: mov cx, 256
p_in3: mov dx, offset tlabel
call fread call fread
jz p_inx jz p_inx
cwde cwde
@ -2059,16 +2096,23 @@ p_in1: mov cx, 256
mov bx, [(icl bx).prev] mov bx, [(icl bx).prev]
add [(icl bx).line], eax add [(icl bx).line], eax
mov si, offset tlabel mov si, offset tlabel
push ax
sta cx sta cx
p_in2: lodsb p_inp: lodsb
push cx push cx
call savbyt call savbyt
pop cx pop cx
loop p_in2 loop p_inp
jmp p_in1 pop ax
cmp [inslen], 0
jz p_in1
sub [inslen], ax
jnz p_in1
p_inx: call fclose p_inx: call fclose
pop si pop si
ret cmp [inslen], 0
jz rlret
error e_fshor
p_end: pop ax p_end: pop ax
call linend call linend
@ -2229,7 +2273,7 @@ noper1 = $-opert1
swilet db 'TSOLIC' swilet db 'TSOLIC'
hello db 'X-Assembler 2.0à by Fox/Taquart',eot hello db 'X-Assembler 2.0á by Fox/Taquart',eot
hellen = $-hello-1 hellen = $-hello-1
usgtxt db "Syntax: XASM source [options]",eol usgtxt db "Syntax: XASM source [options]",eol
db "/c List false conditionals",eol db "/c List false conditionals",eol
@ -2291,6 +2335,7 @@ e_eifex db 'EIF expected',eol
e_mift db 'Missing IFT',eol e_mift db 'Missing IFT',eol
e_meif db 'Missing EIF',eol e_meif db 'Missing EIF',eol
e_norg db 'No ORG specified',eol e_norg db 'No ORG specified',eol
e_fshor db 'File is too short',eol
exitcod dw 4c00h exitcod dw 4c00h
ohand dw nhand ohand dw nhand
@ -2329,6 +2374,8 @@ op1 dd ?
dw ? dw ?
op2 dd ? op2 dd ?
dw ? dw ?
insofs dd ?
inslen dw ?
IFNDEF compak IFNDEF compak
undata undata