Start of TRIGOL Compiler for a Program P3.tri at Mon Jan 05 16:55:50 2004


Program

# F:=(7*(3+(2*5)))#

Parsing tree

root
:=
F*
7+
3*
25

Table of constants
c1=7c2=3c3=2c4=5

Table of identifiers
i1=F

Modified tree:

root
:=
F*
7+
3*
25


Compiler to Assembler started

; gen_header: source text
; #F:=7*(3+(2*5))#
;
; Program P3.asm
	.MODEL	small
	.STACK	100h
; gen_header: Rd=0 Wr=0
; gen_header: # of identifiers=1
.DATA F DW 0 dTv0 DW 0 ; gen_header: code segment'll start
.CODE ProgramStart: mov ax,@data mov ds,ax
StackF

StackF7

StackF73

StackF732

StackF7325
;compiling the operator (2*5)
*
25
mov ax,2 mov dx,5 mul dx mov dTv0,ax ;compiling the operator (3+(2*5))
+
3*
25
mov ax,3 add ax,dTv0 mov dTv0,ax ;compiling the operator (7*(3+(2*5)))
*
7+
3*
25
mov ax,7 mov dx,dTv0 mul dx mov dTv0,ax ;compiling the operator F:=(7*(3+(2*5)))
:=
F*
7+
3*
25
mov ax,dTv0 mov F,ax
Stack
mov ah,4ch int 21h END ProgramStart programm P3.asm is compiled

I'll start compiler from assembler, and linker

tasm P3 >>P3c.htm
Turbo Assembler Version 3.1 Copyright (c) 1988, 1992 Borland International Assembling file: P3.ASM Error messages: None Warning messages: None Passes: 1 Remaining memory: 458k
tlink P3+teek >>P3c.htm
Turbo Link Version 2.0 Copyright (c) 1987, 1988 Borland International

Compiler ended at Mon Jan 05 16:55:51 2004