annotate run/bug_20041103_D.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents ec5e144583ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
140
a33ad7189d21 1) news:// -> news:
thomask
parents: 98
diff changeset
1 // $HeadURL$
a33ad7189d21 1) news:// -> news:
thomask
parents: 98
diff changeset
2 // $Date$
a33ad7189d21 1) news:// -> news:
thomask
parents: 98
diff changeset
3 // $Author$
a33ad7189d21 1) news:// -> news:
thomask
parents: 98
diff changeset
4
98
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
5 // @author@ kinghajj <kinghajj_member@pathlink.com>
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
6 // @date@ 2004-10-03
140
a33ad7189d21 1) news:// -> news:
thomask
parents: 98
diff changeset
7 // @uri@ news:cm98hu$e30$1@digitaldaemon.com
1383
52c9e86b6486 @url@ -> @uri@
thomask
parents: 140
diff changeset
8 // @uri@ nntp://digitalmars.com/digitalmars.D/12248
98
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
9
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
10 module dstress.run.bug_20041103_D;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
11
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1383
diff changeset
12 int rot13_c(int ret){
98
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
13 if(ret > 'A'-1 && ret < 'N'){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
14 ret += 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
15 }else if(ret > 'M' && ret < 'Z'+1){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
16 ret -= 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
17 }else if(ret > 'a'-1 && ret < 'n'){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
18 ret += 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
19 }else if(ret > 'm' && ret < 'z'+1){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
20 ret -= 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
21 }
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
22 return ret;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
23 }
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
24
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
25 int main(){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
26 int c = rot13_c('A');
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1383
diff changeset
27 if('A'+13 != c){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1383
diff changeset
28 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1383
diff changeset
29 }
98
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
30 return 0;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
31 }