Latest Uploads
Extraterre ... .0.1 (zip)

dantheman363

Monty Teas ... Screenie 1

steve_ancell

Santa Clau ... ed his bag

waroffice

manic_platdude.png

spinal

Tetris Clone

steve_ancell

Super blues bros.

spinal

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, 09: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, 16: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)

Latest Posts
Coder's Block
Jayenkai Thu 09:01
Consumer Lockout
9572AD Thu 06:09
Professor Oak, Honest!!
spinal Wed 23:24
Position in Mind
steve_ancell Wed 20:11
Sonic Adventure v0.x
Jayenkai Wed 07:08
FIRST!!!
steve_ancell Wed 03:55
Noel's Graduation
waroffice Wed 02:55
Monkey vs iOS tweaks
spinal Tue 22:51
Fucking Pound Sign Unicode Bullshit Bollocks
Dabz Tue 13:00
Progress / Location Bars
dna Tue 08:55
More

Latest Items
News : Newsletter #176
Jayenkai Sat 04:49
News : Newsletter #175
Dabz Tue 09:38
Blog : Snow: More Material Junk
Cower Sat 23:17
Dev-Diary : Mutant Monty: Amstrad CPC to Windows conversion
rockford Fri 13:14
Techy : AppleTV
Jayenkai Thu 09:40
Blog : Graphviz
steve_ancell Sat 14:17
Pets : Top-Down Shadow Hack
Jayenkai Tue 05:52
Snippet : JNKrunch v1.0
Jayenkai Sat 07:20
News : Newsletter #173
waroffice Fri 04:47
Blog : Material Loading
Cower Fri 02:08
Pets : I Done Won A Thing
shroom_monk Sun 11:31
Pets : Repurposing A Lexer
Cower Mon 22:06
Bah : Feeling a Little Angry
spinal Mon 11:26
News : Newsletter #170
Dabz Sat 00:34
Showcase : sbfgen
Cower Sat 16:57
More

Who's Online
HoboBen
Fri, at 15:51
dna
Fri, at 15:04
Jayenkai
Fri, at 15:01
spinal
Fri, at 14:30
Dabz
Fri, at 13:41
Cower
Fri, at 13:39
steve_ancell
Fri, at 12:55
CodersRule
Fri, at 12:23
rockford
Fri, at 12:06
shroom_monk
Fri, at 09:47
Link to this page
Site : Jayenkai 2006-Infinity |
MudChat's origins, BBCode's former life, Image Scaler.