504 lines
8.7 KiB
ArmAsm
504 lines
8.7 KiB
ArmAsm
.file "ex1.cob"
|
|
.version "01.01"
|
|
tinycobol_compiled.:
|
|
.text
|
|
Ltext_ex1:
|
|
.stabs "ex1.cob",100,0,0,ex1
|
|
.stabs "ex1:F1",36,0,0,ex1
|
|
.stabs "display:t2=r2;0;255;",128,0,0,0
|
|
.stabs "comp:t3=r3;-2147483648;2147483647;",128,0,0,0
|
|
.stabs "comp3:t4=r3;0;255;",128,0,0,0
|
|
.stabs "compw:t5=r5;-32768;32767;",128,0,0,0
|
|
.stabs "compb:t6=r6;-128;127;",128,0,0,0
|
|
.stabs "compll:t7=r(0,1);0;01777777777777777777777",128,0,0,0
|
|
.align 16
|
|
.globl ex1
|
|
.type ex1,@function
|
|
ex1:
|
|
.stabs ":t1",128,0,0,0
|
|
pushl %ebp
|
|
movl %esp, %ebp
|
|
subl $40, %esp
|
|
movl %ebx, -24(%ebp)
|
|
.Linit_ex1:
|
|
movl $s_base0+0, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
pushl $3
|
|
movl $c_base0+162, %eax
|
|
pushl %eax
|
|
call tcob_enter_runelement
|
|
addl $16, %esp
|
|
movl $s_base0+0, %eax
|
|
cmpl $0, 0(%eax)
|
|
jne .Linite_ex1
|
|
movl $1, 0(%eax)
|
|
movl $w_base0+0, %eax
|
|
pushl %eax
|
|
movl $c_base0+85, %eax
|
|
pushl %eax
|
|
movl $c_base0+51, %eax
|
|
pushl %eax
|
|
movl $c_base0+53, %eax
|
|
pushl %eax
|
|
call tcob_move
|
|
addl $16, %esp
|
|
movl $w_base0+4, %eax
|
|
pushl %eax
|
|
movl $c_base0+102, %eax
|
|
pushl %eax
|
|
movl $c_base0+0, %eax
|
|
pushl %eax
|
|
movl $c_base0+2, %eax
|
|
pushl %eax
|
|
call tcob_move
|
|
addl $16, %esp
|
|
movl $w_base0+132, %eax
|
|
pushl %eax
|
|
movl $c_base0+117, %eax
|
|
pushl %eax
|
|
movl $c_base0+0, %eax
|
|
pushl %eax
|
|
movl $c_base0+2, %eax
|
|
pushl %eax
|
|
call tcob_move
|
|
addl $16, %esp
|
|
movl $w_base0+213, %eax
|
|
pushl %eax
|
|
movl $c_base0+147, %eax
|
|
pushl %eax
|
|
movl $c_base0+0, %eax
|
|
pushl %eax
|
|
movl $c_base0+2, %eax
|
|
pushl %eax
|
|
call tcob_move
|
|
addl $16, %esp
|
|
movl $w_base0+212, %eax
|
|
pushl %eax
|
|
movl $c_base0+132, %eax
|
|
pushl %eax
|
|
movl $c_base0+17, %eax
|
|
pushl %eax
|
|
movl $c_base0+19, %eax
|
|
pushl %eax
|
|
call tcob_move
|
|
addl $16, %esp
|
|
.Linite_ex1:
|
|
.stabn 192,0,0,.LS0-Ltext_ex1
|
|
.stabn 224,0,0,.LSend_ex1-Ltext_ex1
|
|
leal ex1, %eax
|
|
pushl %eax
|
|
leal .Lend_pgm_ex1, %eax
|
|
pushl %eax
|
|
.stabs "ex1.cob",132,0,0,.LS0
|
|
.stabn 68,0,14,.LS0-Ltext_ex1
|
|
.LS0:
|
|
pushl $0
|
|
movl $c_base0+181, %eax
|
|
pushl %eax
|
|
movl $c_base0+189, %eax
|
|
pushl %eax
|
|
call tcob_resolve_subr
|
|
addl $12, %esp
|
|
addl $0, %esp
|
|
and %eax,%eax
|
|
jz .L1
|
|
subl $0, %esp
|
|
call *%eax
|
|
movl $s_base0+0, %eax
|
|
pushl %eax
|
|
pushl $1
|
|
pushl $3
|
|
movl $c_base0+162, %eax
|
|
pushl %eax
|
|
call tcob_enter_runelement
|
|
addl $16, %esp
|
|
jmp .L2
|
|
.L1: # exceplabel
|
|
call tcob_resolve_subr_error
|
|
jmp .L3
|
|
.L2: # notexceplabel
|
|
.L3: # endlabel
|
|
# STRING into TSCR
|
|
pushl $0
|
|
pushl $0
|
|
movl $w_base0+212, %eax
|
|
pushl %eax
|
|
movl $c_base0+132, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $c_base0+204, %eax
|
|
pushl %eax
|
|
movl $c_base0+219, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $w_base0+4, %eax
|
|
pushl %eax
|
|
movl $c_base0+102, %eax
|
|
pushl %eax
|
|
call tcob_stringcmd
|
|
addl $40, %esp
|
|
movl $w_base0+132, %eax
|
|
pushl %eax
|
|
movl $w_base0+4, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $c_base0+234, %eax
|
|
pushl %eax
|
|
movl $c_base0+243, %eax
|
|
pushl %eax
|
|
call tcob_resolve_subr
|
|
addl $12, %esp
|
|
addl $8, %esp
|
|
and %eax,%eax
|
|
jz .L4
|
|
subl $8, %esp
|
|
call *%eax
|
|
addl $8, %esp
|
|
movl $s_base0+0, %eax
|
|
pushl %eax
|
|
pushl $1
|
|
pushl $3
|
|
movl $c_base0+162, %eax
|
|
pushl %eax
|
|
call tcob_enter_runelement
|
|
addl $16, %esp
|
|
jmp .L5
|
|
.L4: # exceplabel
|
|
call tcob_resolve_subr_error
|
|
jmp .L6
|
|
.L5: # notexceplabel
|
|
.L6: # endlabel
|
|
.stabn 68,0,19,.LS1-Ltext_ex1
|
|
.LS1:
|
|
# STRING into TSCR
|
|
pushl $0
|
|
pushl $0
|
|
movl $w_base0+212, %eax
|
|
pushl %eax
|
|
movl $c_base0+132, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $c_base0+258, %eax
|
|
pushl %eax
|
|
movl $c_base0+280, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $w_base0+4, %eax
|
|
pushl %eax
|
|
movl $c_base0+102, %eax
|
|
pushl %eax
|
|
call tcob_stringcmd
|
|
addl $40, %esp
|
|
movl $w_base0+132, %eax
|
|
pushl %eax
|
|
movl $w_base0+4, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $c_base0+295, %eax
|
|
pushl %eax
|
|
movl $c_base0+304, %eax
|
|
pushl %eax
|
|
call tcob_resolve_subr
|
|
addl $12, %esp
|
|
addl $8, %esp
|
|
and %eax,%eax
|
|
jz .L7
|
|
subl $8, %esp
|
|
call *%eax
|
|
addl $8, %esp
|
|
movl $s_base0+0, %eax
|
|
pushl %eax
|
|
pushl $1
|
|
pushl $3
|
|
movl $c_base0+162, %eax
|
|
pushl %eax
|
|
call tcob_enter_runelement
|
|
addl $16, %esp
|
|
jmp .L8
|
|
.L7: # exceplabel
|
|
call tcob_resolve_subr_error
|
|
jmp .L9
|
|
.L8: # notexceplabel
|
|
.L9: # endlabel
|
|
.stabn 68,0,22,.LS2-Ltext_ex1
|
|
.LS2:
|
|
# STRING into TSCR
|
|
pushl $0
|
|
pushl $0
|
|
movl $w_base0+212, %eax
|
|
pushl %eax
|
|
movl $c_base0+132, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $c_base0+319, %eax
|
|
pushl %eax
|
|
movl $c_base0+362, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $w_base0+4, %eax
|
|
pushl %eax
|
|
movl $c_base0+102, %eax
|
|
pushl %eax
|
|
call tcob_stringcmd
|
|
addl $40, %esp
|
|
movl $w_base0+132, %eax
|
|
pushl %eax
|
|
movl $w_base0+4, %eax
|
|
pushl %eax
|
|
pushl $0
|
|
movl $c_base0+377, %eax
|
|
pushl %eax
|
|
movl $c_base0+386, %eax
|
|
pushl %eax
|
|
call tcob_resolve_subr
|
|
addl $12, %esp
|
|
addl $8, %esp
|
|
and %eax,%eax
|
|
jz .L10
|
|
subl $8, %esp
|
|
call *%eax
|
|
addl $8, %esp
|
|
movl $s_base0+0, %eax
|
|
pushl %eax
|
|
pushl $1
|
|
pushl $3
|
|
movl $c_base0+162, %eax
|
|
pushl %eax
|
|
call tcob_enter_runelement
|
|
addl $16, %esp
|
|
jmp .L11
|
|
.L10: # exceplabel
|
|
call tcob_resolve_subr_error
|
|
jmp .L12
|
|
.L11: # notexceplabel
|
|
.L12: # endlabel
|
|
.stabn 68,0,25,.LS3-Ltext_ex1
|
|
.LS3:
|
|
pushl $1
|
|
movl $c_base0+401, %eax
|
|
pushl %eax
|
|
movl $c_base0+415, %eax
|
|
pushl %eax
|
|
call tcob_display
|
|
addl $12, %esp
|
|
pushl $1
|
|
movl $w_base0+132, %eax
|
|
pushl %eax
|
|
movl $c_base0+117, %eax
|
|
pushl %eax
|
|
call tcob_display
|
|
addl $12, %esp
|
|
pushl $1
|
|
movl $c_base0+430, %eax
|
|
pushl %eax
|
|
movl $c_base0+432, %eax
|
|
pushl %eax
|
|
call tcob_display
|
|
addl $12, %esp
|
|
pushl $1
|
|
call tcob_newline
|
|
addl $4, %esp
|
|
.stabn 68,0,26,.LS4-Ltext_ex1
|
|
.LS4:
|
|
pushl $1
|
|
movl $c_base0+447, %eax
|
|
pushl %eax
|
|
movl $c_base0+476, %eax
|
|
pushl %eax
|
|
call tcob_display
|
|
addl $12, %esp
|
|
.stabn 68,0,27,.LS5-Ltext_ex1
|
|
.LS5:
|
|
pushl $0
|
|
movl $c_base0+147, %eax
|
|
pushl %eax
|
|
movl $w_base0+213, %eax
|
|
pushl %eax
|
|
call tcob_accept_std
|
|
addl $12, %esp
|
|
.stabn 68,0,28,.LS6-Ltext_ex1
|
|
.LS6:
|
|
leal .Lend_pgm_ex1, %eax
|
|
pushl %eax
|
|
jmp .Lend_pgm_ex1
|
|
# resolving paragraphs/sections labels
|
|
# finish resolving paragraphs/sections labels
|
|
.Lend_pgm_ex1:
|
|
call tcob_stop_run
|
|
leal w_base0+0, %edx
|
|
movl (%edx), %eax
|
|
jmp .LSend_ex1
|
|
.align 16
|
|
.LSend_ex1:
|
|
pushl %eax
|
|
call exit
|
|
addl $4,%esp
|
|
movl -24(%ebp), %ebx
|
|
mov %ebp,%esp
|
|
popl %ebp
|
|
ret
|
|
.Lfe1_ex1:
|
|
.size ex1,.Lfe1_ex1-ex1
|
|
.data
|
|
.align 4
|
|
w_base0:
|
|
.stabs "RETURN-CODE:V3",38,0,0,w_base0+0
|
|
.space 4
|
|
.stabs "TSCR:V(1,128)=ar3;1;128;2",38,0,0,w_base0+4
|
|
.space 128
|
|
.stabs "TRES:V(1,80)=ar3;1;80;2",38,0,0,w_base0+132
|
|
.space 80
|
|
.stabs "EOSTR:V(1,1)=ar3;1;1;2",38,0,0,w_base0+212
|
|
.space 1
|
|
.stabs "WKEY:V(1,1)=ar3;1;1;2",38,0,0,w_base0+213
|
|
.space 1
|
|
v_base0:
|
|
c_base0:
|
|
.byte 32,0
|
|
.long 1
|
|
.byte 'X',0,0,1
|
|
.long c_base0+14
|
|
.byte 'X',1,0
|
|
.byte 0,0
|
|
.long 1
|
|
.byte 'X',0,0,1
|
|
.long c_base0+31
|
|
.byte 'X',1,0
|
|
.byte -1,0
|
|
.long 1
|
|
.byte 'X',0,0,1
|
|
.long c_base0+48
|
|
.byte 'X',1,0
|
|
.byte 48,0
|
|
.long 1
|
|
.byte '9',0,0,1
|
|
.long c_base0+65
|
|
.byte '9',1,0
|
|
.byte 34,0
|
|
.long 1
|
|
.byte 'X',0,0,1
|
|
.long c_base0+82
|
|
.byte 'X',1,0
|
|
.long 4
|
|
.byte 'B',0,0,0
|
|
.long c_base0+97
|
|
.byte 'S',1
|
|
.byte '9',6
|
|
.byte 0
|
|
.long 128
|
|
.byte 'X',0,0,0
|
|
.long c_base0+114
|
|
.byte 'X',128
|
|
.byte 0
|
|
.long 80
|
|
.byte 'X',0,0,0
|
|
.long c_base0+129
|
|
.byte 'X',80
|
|
.byte 0
|
|
.long 1
|
|
.byte 'X',0,0,0
|
|
.long c_base0+144
|
|
.byte 'X',1
|
|
.byte 0
|
|
.long 1
|
|
.byte 'X',0,0,0
|
|
.long c_base0+159
|
|
.byte 'X',1
|
|
.byte 0
|
|
.byte 101,120,49,0
|
|
.long 3
|
|
.byte '9',0,0,0
|
|
.long c_base0+178
|
|
.byte '9',3,0
|
|
.byte 105,110,105,116,84,99,108,0
|
|
.long 7
|
|
.byte 'X',0,0,0
|
|
.long c_base0+201
|
|
.byte 'X',7,0
|
|
.byte 115,111,117,114,99,101,32,101
|
|
.byte 120,49,46,116,99,108,0
|
|
.long 14
|
|
.byte 'X',0,0,0
|
|
.long c_base0+231
|
|
.byte 'X',14,0
|
|
.byte 115,116,99,108,101,118,97,108,0
|
|
.long 8
|
|
.byte 'X',0,0,0
|
|
.long c_base0+255
|
|
.byte 'X',8,0
|
|
.byte 116,107,119,97,105,116,32,118
|
|
.byte 97,114,105,97,98,108,101,32
|
|
.byte 114,101,97,100,121,0
|
|
.long 21
|
|
.byte 'X',0,0,0
|
|
.long c_base0+292
|
|
.byte 'X',21,0
|
|
.byte 115,116,99,108,101,118,97,108,0
|
|
.long 8
|
|
.byte 'X',0,0,0
|
|
.long c_base0+316
|
|
.byte 'X',8,0
|
|
.byte 119,109,32,119,105,116,104,100
|
|
.byte 114,97,119,32,46,32,59,32
|
|
.byte 115,101,116,32,101,110,116,114
|
|
.byte 121,95,100,97,116,97,32,59
|
|
.byte 32,115,101,116,32,116,101,115
|
|
.byte 116,101,0
|
|
.long 42
|
|
.byte 'X',0,0,0
|
|
.long c_base0+374
|
|
.byte 'X',42,0
|
|
.byte 115,116,99,108,101,118,97,108,0
|
|
.long 8
|
|
.byte 'X',0,0,0
|
|
.long c_base0+398
|
|
.byte 'X',8,0
|
|
.byte 116,99,108,32,114,101,115,117
|
|
.byte 108,116,58,32,39,0
|
|
.long 13
|
|
.byte 'X',0,0,0
|
|
.long c_base0+427
|
|
.byte 'X',13,0
|
|
.byte 39,0
|
|
.long 1
|
|
.byte 'X',0,0,0
|
|
.long c_base0+444
|
|
.byte 'X',1,0
|
|
.byte 98,97,116,97,32,117,109,97
|
|
.byte 32,116,101,99,108,97,32,40
|
|
.byte 110,111,32,120,116,101,114,109
|
|
.byte 41,46,46,46,0
|
|
.long 28
|
|
.byte 'X',0,0,0
|
|
.long c_base0+488
|
|
.byte 'X',28,0
|
|
s_base0: .long 0
|
|
.align 4
|
|
.globl main
|
|
.type main,@function
|
|
main:
|
|
.stabs ":t1",128,0,0,0
|
|
pushl %ebp
|
|
movl %esp, %ebp
|
|
subl $4,%esp
|
|
movl $0,-4(%ebp)
|
|
movl 12(%ebp),%eax
|
|
pushl %eax
|
|
movl 8(%ebp),%eax
|
|
pushl %eax
|
|
call tcob_init
|
|
addl $8,%esp
|
|
call ex1
|
|
movl %eax,%eax
|
|
movl %eax,-4(%ebp)
|
|
call tcob_stop_run
|
|
movl -4(%ebp),%edx
|
|
movl %edx,%eax
|
|
leave
|
|
ret
|
|
.Lfe1:
|
|
.size main,.Lfe1-main
|
|
|
|
.ident "TinyCOBOL: pre alpha 0.62.11 (linux-gnu 2005/08/08)"
|