Latest Uploads
Invasion V ... prototype

rychan

Invasion V ... Prototype

rychan

Shields 64x64

Pakz

Ffs_Spam

Jayenkai

Hives Screen shot

rychan

Rpg Potion Sprites

Pakz

Showcase > Apps and Utilities ( Created 29 June 2010 | Last Edited 30 June 2010)

Virtual Machine + Assembler - Created by HoboBen (No Votes)

An open source Virtual Machine and Assembler for the Cobra programming language.
Created using Cobra > WindowsView Worklog (0 entries)
1.6mb zip
VM Updates
The imaginatively named "vm" Virtual Machine is a typeless, procedural VM, with native support for functions and strings. Use the "vmAsm" assembler to assemble programs into a vmx (VM eXecutable) binary file that vm can run.

This program is open source - see license-vm.txt and license-vmAsm.txt for licensing details.

Contains an example front-end with an example script ready-to-run!
Highslide JS

Latest Comments

Posted : Friday, 02 July 2010, 10:11
HoboBen


Bugs & fixes:

Fixed a bug where global arrays were accessed in the wrong direction (local ones were working). Here's the fix - replace the Vm_ResolveOpStackIndex function in vm.cps (line 300) with the following:

-->

Additionally, HAPI funcs were buggy. Fix Vm_GetHapiFunc in vm.cps (line 456):
-->

At approx line 1200, these instructions also need fixing:
-->

Unfixed: Assembly scripts will not work properly if a function has both local variables (var) AND parameters (param). Either on its own will work. Workaround: use global variables for some function vars or params.

Posted : Monday, 05 July 2010, 17:32
HoboBen


Working pacman example:

Highslide JS

Download (ready-to-run!) ~1.5 MB

The example is over 1000 lines of assembly and took four days. You'd be mad to actually use the VM this way, but as a "proof of concept" it's pretty good.

Host API functions:

; HapiDrawCell (x, y, cellState)
; HapiCreateSprite(), returns index
; HapiPositionSprite(index, x, y)
; HapiSetSpriteFrame(index, frame)
; HapiFreeSprite(index)
; HapiGetDelta(), returns delta as real
; HapiRnd(), returns random number between 0 and 1
; HapiGetTicks(), returns ticks as integer
; HapiKeyDown(key), returns 0 (false) or 1 (true)
; HapiDisplayStats(score, eaten)

-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 581|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Manchester Arena Explosion
Jayenkai Wed 04:17
Family
Jayenkai Wed 04:06
RIP - Sir Roger Moore
rockford Tue 15:56
CSS-Me-Do - SoCoder2
Jayenkai Tue 09:41
Any Feature Requests?
spinal Mon 12:02
Switch - Mini Dock
Jayenkai Mon 06:26
AGameAWeek : 2017 - Part One
rychan Mon 05:17
ArdWiiNo?
spinal Sun 12:42
Great Big Youtube thread
Jayenkai Sun 11:13
Time for a new Android Test Doohickey
Jayenkai Sun 07:00
More

Latest Items
Dev-Diary : My Journey into NES Development
rychan Tue 01:53
Showcase : Flappadiddle
Jayenkai Sun 14:39
Snippet : QFind
Jayenkai Sun 13:02
Showcase : Tiny Blocks
Jayenkai Sun 04:08
Showcase : Read Error A
rychan Fri 05:13
Blog : All my makes!
Jayenkai Tue 05:48
Showcase : Infinitron
rychan Mon 18:03
Showcase : Hives
rockford Wed 12:53
Showcase : Quadoban
rskgames Fri 10:11
Blog : My Arduino experience.
steve_ancell Wed 17:02
Showcase : Roguelike Explorer
Pakz Fri 06:59
News : Newsletter #311
Jayenkai Thu 17:27
Link : Super Shapes Exploration Kit
Andy_A Thu 11:09
Dev-Diary : Sensitive - Arduboy!
rychan Thu 17:27
Snippet : Skylines
steve_ancell Tue 14:25
More

Who's Online
Jayenkai
Wed, at 05:34
Socoder
Wed, at 05:30
HoboBen
Wed, at 04:23
rskgames
Wed, at 03:31
therevillsgames
Wed, at 03:26
steve_ancell
Wed, at 03:22
Pakz
Wed, at 03:21
rockford
Wed, at 02:15
spinal
Wed, at 01:19
Dabz
Tue, at 22:58
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.