This repository has been archived on 2021-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
CAHomework/Homework 9/ex1.jas
2018-11-29 20:44:57 +01:00

24 lines
260 B
Text

.constant
OBJREF 0x40
.end-constant
.main
LDC_W OBJREF
BIPUSH 0xF9
INVOKEVIRTUAL even
HALT
.end-main
.method even(x)
.var
.end-var
ILOAD x
BIPUSH 0x01
IAND
IFEQ even
BIPUSH 0x00
IRETURN // odd
even:
BIPUSH 0x01
IRETURN // even
.end-method