Add DASM
https://web.archive.org/web/20120704091855/http://dcpu.com/ Fixes: #57
This commit is contained in:
36
d/dcpu.dasm
Normal file
36
d/dcpu.dasm
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
set i, 0xf615
|
||||||
|
set j, 0x7349
|
||||||
|
hwn z
|
||||||
|
sub z, 1
|
||||||
|
|
||||||
|
:device_detect_loop
|
||||||
|
hwq z
|
||||||
|
|
||||||
|
ife a, i
|
||||||
|
ife b, j
|
||||||
|
set pc, device_detect_ret
|
||||||
|
|
||||||
|
sub z, 1
|
||||||
|
ifa z, 0xffff
|
||||||
|
set pc, device_detect_loop
|
||||||
|
|
||||||
|
:device_detect_ret
|
||||||
|
set a, 0
|
||||||
|
set b, [vidmem]
|
||||||
|
hwi z
|
||||||
|
|
||||||
|
set i, [vidmem]
|
||||||
|
set j, string
|
||||||
|
set c, 0xc
|
||||||
|
|
||||||
|
:memcpy_loop
|
||||||
|
bor [j], 0xf000 ; OR with font style.
|
||||||
|
sti [i], [j]
|
||||||
|
sub c, 1
|
||||||
|
ife c, 0
|
||||||
|
sub pc, 1
|
||||||
|
set pc, memcpy_loop
|
||||||
|
|
||||||
|
:display dat 0
|
||||||
|
:vidmem dat 0x8000
|
||||||
|
:string dat "Hello World!"
|
||||||
@@ -8,7 +8,7 @@ Thanks to everyone who continues to contribute; new languages are created every
|
|||||||
Make sure to see [contributing.md](/contributing.md) for instructions on contributing to the project!
|
Make sure to see [contributing.md](/contributing.md) for instructions on contributing to the project!
|
||||||
|
|
||||||
<!--Languages start-->
|
<!--Languages start-->
|
||||||
## Languages (723 total)
|
## Languages (724 total)
|
||||||
|
|
||||||
* [05Ab1E](%23/05AB1E)
|
* [05Ab1E](%23/05AB1E)
|
||||||
* [0815](%23/0815.0815)
|
* [0815](%23/0815.0815)
|
||||||
@@ -236,6 +236,7 @@ Make sure to see [contributing.md](/contributing.md) for instructions on contrib
|
|||||||
* [Dbase](d/dBase.dbf)
|
* [Dbase](d/dBase.dbf)
|
||||||
* [Dc](d/dc.dc)
|
* [Dc](d/dc.dc)
|
||||||
* [Dcl](d/DCL)
|
* [Dcl](d/DCL)
|
||||||
|
* [Dcpu](d/dcpu.dasm)
|
||||||
* [Dd Dd](d/dd_dd.dd)
|
* [Dd Dd](d/dd_dd.dd)
|
||||||
* [Decimal](d/Decimal.dec)
|
* [Decimal](d/Decimal.dec)
|
||||||
* [Delphi](d/delphi.delphi)
|
* [Delphi](d/delphi.delphi)
|
||||||
|
|||||||
Reference in New Issue
Block a user