-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
50 lines (45 loc) · 804 Bytes
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
win_bison -d $1'.y'
win_flex $1'.l'
gcc lex.yy.c $1'.tab.c'
echo ".model small
.stack 200h
.data
.code
mov ax , @data
mov ds , ax
mov ax , 0
" > "C:\Tasm 1.4\Tasm\code.asm";
a < "test.rexx";
echo "mov ah,4ch
int 21h
print proc
mov cx,0
mov dx,0
label1:
cmp ax,0
je print1
mov bx,10
div bx
push dx
inc cx
xor dx,dx
jmp label1
print1:
cmp cx,0
je exit
pop dx
add dx,48
mov ah,02h
int 21h
dec cx
jmp print1
exit:
mov dx,13
mov ah,2
int 21h
mov dx,10
mov ah,2
int 21h
ret
print endp
end" >> "C:\Tasm 1.4\Tasm\code.asm";