Logo Image  Distributed DNS
DDNS is a P2P software that aims to build a decentralized, distributed DNS.
Bulltet Homepage
Bulltet Download
Bulltet Project Page
Bulltet People
Bulltet Documents
 
-Project Overview
-Project Description
-MVM Specifications
-MVM Example
-Network Protocol Specifications
-Screen shots
-Announcement
Bulltet Forum
Bulltet FAQ
Bulltet Links
Sorry for my bad English, it is not my native language.


SourceForge.net Logo
 

MVM Example

Jan Kayatz (a mathematician form ETH Zurich) provided an example for the MVM. The example calculates the n-th prim number. n can be set as a variable in "number: 1800". Right now it calculates the 1800th prim number. This code is also used at the moment to ask the "dummy question". The source code is shown below:

pos: 3
count: 1
prtc: 0
divb: 0
addr: 0
intsize: 4
membegin: 400
ccount: 0
number: 1800
nnumber: 0

.code
ipush number
idec 1
ipop nnumber
ipushc 2
ipush count
ipush intsize
imul
ipush membegin
iadd
ipop addr
ipop* addr
label:check
ipushc 0
ipop divb
ipushc 0
ipop ccount
label:next
ipush ccount
ipush ccount
iinc 1
ipop ccount
ipush count
icmpe label:final
ipush ccount
ipush intsize
imul
ipush membegin
iadd
ipop addr
ipush* addr
ipop prtc
ipush prtc
ipush prtc
imul
ipush pos
icmpl label:final
ipush prtc
ipush pos
idiv
ipush prtc
imul
ipush pos
icmpe label:diva
jump label:next
label:final
ipush divb
ipushc 0
icmpe label:addt
label:fin_cont
ipush pos
iinc 2
ipop pos
jump label:check
label:addt
ipush count
iinc 1
ipop count
ipush pos
ipush count
ipush intsize
imul
ipush membegin
iadd
ipop addr
ipop* addr
ipush number
idec 1
ipop number
ipush number
ipushc 1
icmpl label:fin_cont
ipush nnumber
ipush intsize
imul
ipush membegin
iadd
ipop addr
ipush* addr
ret 01
label:diva
ipush divb
iinc 1
ipop divb
jump label:next
Copyright notice: Unless otherwise specified, documents and software on this page are freely distributable under the terms of the GNU Lesser General Public License