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 635|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
SNES Classic
spinal Mon 11:02
AGameAWeek : 2017 - Part One
Jayenkai Mon 09:28
For Greed
steve_ancell Mon 08:05
Puff Dog
spinal Mon 02:42
Crystal Maze
rychan Sun 11:59
CSS-Me-Do - SoCoder2
Jayenkai Sun 08:08
Buy Zelda
Jayenkai Sat 08:34
Welcome Caton
steve_ancell Sat 04:53
Update All Objects in Array?
Jayenkai Sat 03:34
2D Array?
Jayenkai Sat 03:29
More

Latest Items
Blog : Rewatching ''1 Litre of Tears''
Jayenkai Mon 02:52
Snippet : Twitter BBCode
Jayenkai Sun 02:44
Link : Learn C++
Pakz Sat 20:33
Dev-Diary : My Journey into NES Development
Jayenkai Thu 03:58
Showcase : A Civilization Clone v0.5
rychan Thu 03:27
News : Newsletter #320
Jayenkai Tue 18:47
Blog : sadas
hardcoal22 Tue 02:50
Showcase : Flappadiddle
Jayenkai Mon 08:20
Article : Cookie Information
rychan Sun 12:28
Dev-Diary : Wii to N64 adapter
spinal Sat 11:50
Link : MonkeyX code examples
Jayenkai Sat 06:42
Link : Available Languages
Jayenkai Thu 13:22
Blog : Mr Testo Tests
Socoder Tue 07:21
Showcase : Hives
zzoom Fri 16:10
More

Who's Online
Jayenkai
Mon, at 11:19
Pakz
Mon, at 11:14
spinal
Mon, at 11:12
rychan
Mon, at 10:42
GfK
Mon, at 10:12
rskgames
Mon, at 09:36
steve_ancell
Mon, at 09:25
Dan
Mon, at 08:22
shroom_monk
Mon, at 05:58
rockford
Mon, at 05:38
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.