User guide
172 CHAPTER 10. THE DESIGN OF SIAL
This can be converted into something slightly more readable using the command:
sial-sasm hello.sial to * giving: This can be translated into Sial using th e
bcpl2sial command as follows.
0.010> sial-sasm hello.sial to *
Converting hello.sial to *
MODSTART
//Entry to: start
ENTRY K5 C115 C116 C97 C114 C116
LAB L1
LSTR M9001
KPG P3 G94
L K0
RTN
STRING M9001 K6 C72 C101 C108 C108 C111 C10
GLOBAL K1
G1 L1
G94
MODEND
Conversion complete
0.000>
Alternatively, the Sial can be translated, state me nt by statement, into the assembly
language of a machine such as the Pentium as follows.
0.000> sial-386 hello.sial to hello.s
Converting hello.sial to hello.s
Conversion complete
0.010> type hello.s
# Code generated by sial-386
.text
.align 16
# MODSTART
# Entry to: start
# ENTRY K5 C115 C116 C97 C114 C116
# LAB L1
LA1:
movl %ebp,0(%edx)
movl %edx,%ebp
popl %edx
movl %edx,4(%ebp)
movl %eax,8(%ebp)
movl %ebx,12(%ebp)
# LSTR M9001
leal MA9001,%ebx
shrl $2,%ebx
# KPG P3 G94
movl 376(%esi),%eax
leal 12(%ebp),%edx