[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | VAX MACRO assembler issues |
|
Moderator: | TLE::TROWEL |
|
Created: | Mon Mar 30 1987 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 257 |
Total number of notes: | 916 |
250.0. "Pb with macro conversion [homing]" by COPS02::LECORRE () Fri Feb 07 1997 16:12
Hi,
I have a pb porting that macro code to Alpha, it seems related to the == movl (ap)[r6],r7 == in the find_last subroutine returning
the wrong address in r7 (pb with homing or I 've done something wrong ???)
Thanks for any help
Christian
=================================================================================================================================
0000240E 349 .subtitle Program Code
0000240E 350
0000240E 351 .psect code,page
00000000 352
00000000 353 ; .entry lh$lock_holder,^m<>
00000000 354
?01T 00000002 403 lh$lock_holder: .call_entry preserve=<r2,r3,r4,r5,r7>, home_args=true,max_args=1
00000002 404
00000002 405 ;----------------------------------------
00000002 406 ; GET NODE NAME
00000002 407 pushal nodename
00000008 408 calls #1,g^utl$get_nodename
0000000F 409 blbs r0,100$
00000012 410 pushl r0
00000014 411 calls #1,g^sys$exit
0000001B 412
0000001B 413 100$: pushal iis_str
00000021 414 pushal nodename
00000027 415 pushal node_res_name
======= 0000002D 416 calls #3,g^utl$bld_string
00000034 417
00000034 418
00000034 419 ; -------------------------------------------
00000034 420 ; SEE IF WE CAN GRAB THE COUNTS RECOVERY LOCK
00000034 421 pushal lck_ef ; Get QIO event flag
0000003A 422 calls #1,g^lib$get_ef
===============================================================================================================================
00000008 33 .subtitle Program Code
00000008 34
00000008 35 .psect code
00000000 36
00000000 37 ; .entry utl$bld_string,^m<r2,r3,r4,r5,r6,r7,r8,r9>
00000000 38
?01T 00000002 87 utl$bld_string:: .call_entry home_args=true,max_args=1
00000002 88
00000002 89 movl #2,r6 ; Set r6 for second argument in list.
00000005 90 clrw size_so_far ; Initialize the size_so_far variable.
0000000B 91
0000000B 92 movl out_str(ap),r7 ; Get the output argument address.
0000000F 93 movzwl (r7),out_size ; Get the output string size.
00000016 94 movl 4(r7),out_str_addr ; Get the output string address.
0000001E 95 movc5 #0,#0,#^a/ /,out_size,@out_str_addr ; Initialize the output
0000002D 96 ; string.
0000002D 97
0000002D 98 ; Loop
0000002D 99
0000002D 100 10$: jsb find_last ; Find last non-blank/non-tab character
00000033 101 ; for input argument(r6).
00000033 102 movc3 r7,(r8),@out_str_addr ; Move the truncated string(r6) to
0000003B 103 ; the output string.
0000003B 104 cmpw size_so_far,out_size ; Is the output string full?
00000046 105 beql 20$ ; If so, branch the label 20$.
00000048 106 movl r3,out_str_addr ; Otherwise, set new output string
0000004F 107 ; address.
0000004F 108 acbl (ap),#1,r6,10$ ; Loop back for next input string.
00000055 109
00000055 110 ; Replace any high values (FF) with Spaces.
00000055 111
00000055 112 20$: movl out_str(ap),r7 ; Get the output argument address.
00000059 113 movl 4(r7),r7 ; Get the output string address.
0000005D 114
0000005D 115 30$: locc #^xFF,out_size,(r7) ; Try to locate high values.
00000066 116 beql 40$ ; If not found, branch to label 40$
00000068 117 movb #^a/ /,(r1) ; Replace high values with a spaces
0000006B 118 brb 30$ ; And go look for high values again.
0000006D 119
0000006D 120
0000006D 121 40$: movl #1,r0 ; Set return to success.
00000070 122 ret ; And return to caller.
00000071 123
00000071 124 ;----------------------------------------
00000071 125
00000071 135 find_last: .jsb32_entry
00000071 136
============ 00000071 137 movl (ap)[r6],r7 ; Get argument address.
1.......
%AMAC-I-ARGLISHOME, (1) arglist must be homed in routine FIND_LAST
00000075 138 movl 4(r7),r8 ; Get argument's string address.
00000079 139 movzwl (r7),r7 ; Get argument's string size.
0000007C 140 bneq 10$ ; If string size is not zero then find
0000007E 141 ; the last non-blank/non-tab character.
0000007E 142 rsb ; Otherwise, just return to main loop.
0000007F 143
0000007F 144 ; Loop
0000007F 145
0000007F 146 10$: cmpb -1(r7)[r8],#^a/ / ; Is this character a space?
1
%AMAC-I-MEMREFNOT, (1) memory reference not naturally aligned in routine FIND_LAST
00000084 147 beql 20$ ; Yes, Branch to label 20$.
00000086 148 cmpb -1(r7)[r8],#^a/ / ; Is this character a tab?
1.......
%AMAC-I-MEMREFNOT, (1) memory reference not naturally aligned in routine FIND_LAST
0000008B 149 bneq 30$ ; If not, we have the end of the string
T.R | Title | User | Personal Name | Date | Lines |
---|
250.1 | Looks Similar To 247.* | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Fri Feb 07 1997 17:38 | 9 |
|
See note 247.* for what looks like a very a similar problem...
And if you haven't already done so, you'll also want to take a look
at the Macro porting documentation...
Digital documentation -- the Macro porting documentation -- also
recommends implementing all new code in a language other than the
Macro compiler...
|
250.2 | More Clues are welcome. | COPS02::LECORRE | | Mon Feb 10 1997 11:42 | 10 |
| Thanks
I've looked in 247.* and I've also looked in the doc before posting my
note and I'm unable to have a clue...
Any clues is welcome
Thanks
Christian
|
250.3 | | CPEEDY::FLEURY | | Mon Feb 10 1997 12:10 | 7 |
| As indicated in #247, the informational message will remain even though
the calling program has homed the arguments. It would appear that the
code is OK as posted (only took a quick glance.) If the concern is
that there is still an informational message, other than disabling
informational messages, there is nothing that can be done.
Dan
|
250.4 | Options | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Mon Feb 10 1997 13:57 | 6 |
| : Any clues is welcome
Ignore the compiler message.
Recode the macro to avoid this construct.
Recode the application in C or some other language.
|
250.5 | set max_args=3 (or more?) | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Mon Feb 10 1997 14:32 | 10 |
| You pass 3 arguments, and you set up to read argument #2, but when
you tell the MACRO compiler to home the arguments, you tell it that
it never needs to home more than one argument.
Change this line to tell the truth, and things should go better
(but you'll still get the compile-time warning):
87 utl$bld_string:: .call_entry home_args=true,max_args=1
__^__
|
250.6 | I just got it | COPS02::LECORRE | | Mon Feb 10 1997 14:44 | 7 |
| That's the answer....
I just got in with the debugger
Thanks
Christian
|