AD Teaching Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

FrontPage

AD Teaching Wiki:
  • attachment:JasminFaculty.j of JavaVsCplusplusWS1011

Attachment 'JasminFaculty.j'

Download

   1 .class public Faculty 
   2 .super java/lang/Object 
   3 
   4 .method public static main([Ljava/lang/String;)V 
   5     .limit stack 2 
   6     .limit locals 3 
   7     ldc 10   ; calculate the faculty of this number (n)..
   8     istore 1 ; store n into variable 1, 0 used for string array...
   9     iconst_1 ; initialize result with 1
  10     istore 2 ; store result into local variable 2
  11  Label1:
  12     iload 1  ; load n and result, multiply them
  13     iload 2 
  14     imul   
  15     istore 2 ; store new result in resultvariable
  16     iload 1  ; subtract 1 from n..
  17     iconst_1 ; 
  18     isub     
  19     istore 1 ; store n again...
  20     iload 1  ;
  21     ifgt Label1 ; if n greater 0, continue loop...
  22 
  23 
  24     iload 2                                             ; output result
  25     getstatic java/lang/System/out Ljava/io/PrintStream; 
  26     swap 
  27     invokevirtual java/io/PrintStream/println(I)V   ; print x
  28     return        ; return from main
  29 
  30 .end method

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-01-12 15:57:58, 180.0 KB) [[attachment:Array in C++.pptx]]
  • [get | view] (2011-01-12 15:58:38, 1271.9 KB) [[attachment:Array in c++.pdf]]
  • [get | view] (2010-12-19 13:56:41, 127.1 KB) [[attachment:GCJ]]
  • [get | view] (2011-02-04 18:05:01, 0.9 KB) [[attachment:JasminFaculty.j]]
  • [get | view] (2010-11-24 16:29:25, 323.8 KB) [[attachment:JavaJITC.pdf]]
  • [get | view] (2011-03-01 11:22:49, 300.4 KB) [[attachment:Niklas Meinzer - Threads.pdf]]
  • [get | view] (2011-02-09 14:56:18, 751.6 KB) [[attachment:Strings in Java]]
  • [get | view] (2011-02-09 15:01:04, 763.3 KB) [[attachment:Strings in Java - Annotated]]
  • [get | view] (2011-03-01 11:38:24, 13.7 KB) [[attachment:ThreadTestSources.zip]]
  • [get | view] (2011-02-09 14:31:26, 203.9 KB) [[attachment:c++ slides as pdf]]
  • [get | view] (2010-11-09 13:39:25, 1012.2 KB) [[attachment:cpp_compiler_opt.pdf]]
  • [get | view] (2011-02-09 14:04:26, 61.0 KB) [[attachment:evaluation-java-vs-cplusplus-ws1011.pdf]]
  • [get | view] (2011-01-26 16:36:29, 271.5 KB) [[attachment:javaArray.ppt]]
  • [get | view] (2011-01-26 16:39:02, 271.5 KB) [[attachment:javaArray.pptx]]
  • [get | view] (2010-11-03 00:11:18, 750.2 KB) [[attachment:jvm.odp]]
  • [get | view] (2010-11-03 00:11:23, 145.1 KB) [[attachment:jvm.pdf]]
  • [get | view] (2010-12-02 23:03:58, 523.8 KB) [[attachment:memory_management_c++.pdf]]
  • [get | view] (2010-10-20 16:22:24, 311888.1 KB) [[attachment:session-1.avi]]
  • [get | view] (2010-10-20 16:25:15, 45.9 KB) [[attachment:session-1.pdf]]
  • [get | view] (2011-01-31 17:00:20, 245625.3 KB) [[attachment:session-11.wmv]]
  • [get | view] (2010-10-27 16:02:12, 262318.9 KB) [[attachment:session-2.avi]]
  • [get | view] (2010-10-27 15:59:58, 86.3 KB) [[attachment:session-2.pdf]]
  • [get | view] (2010-11-21 22:36:01, 0.0 KB) [[attachment:session-3.avi]]
  • [get | view] (2010-11-05 17:49:37, 238220.7 KB) [[attachment:session-3.wmv]]
  • [get | view] (2010-11-17 13:41:41, 161559.3 KB) [[attachment:session-4.wmv]]
  • [get | view] (2010-12-01 16:02:40, 138274.7 KB) [[attachment:session-5.wmv]]
  • [get | view] (2010-12-15 15:59:51, 180481.0 KB) [[attachment:session-6.wmv]]
  • [get | view] (2010-12-22 12:09:40, 114403.2 KB) [[attachment:session-7.wmv]]
  • [get | view] (2010-12-28 15:27:28, 156028.0 KB) [[attachment:session-8.wmv]]
  • [get | view] (2010-12-28 18:05:29, 163797.9 KB) [[attachment:session-9.wmv]]
  • [get | view] (2011-01-19 12:05:07, 223.8 KB) [[attachment:session9-RTL-pres.pdf]]
  • [get | view] (2011-02-21 14:46:15, 2.0 KB) [[attachment:session9-rtl-Examples.zip]]
  • [get | view] (2011-02-17 11:31:23, 677.2 KB) [[attachment:slides-Java-vs-c++.pdf]]
  • [get | view] (2011-02-17 11:38:36, 146.2 KB) [[attachment:sources-gui.zip]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01