; Compiled from C source code using dcpu16-lcc version 0.1(http://dcpu16-lcc.bugs3.com/):
;
;void print(const char*);
;
;void main() {
; print("omar");
; return;
;}
;
;static unsigned* dsp_ptr = (unsigned*)0x8000;
;void print(const char* str) {
; while( *str ) {
; *dsp_ptr = ((unsigned)*str) | 0x7000u;
; dsp_ptr++;
; str++;
;
; if ( ((unsigned)dsp_ptr) > 0x817f )
; dsp_ptr = (unsigned*)0x8000;
;
; }
;}
;
;
;
;
;DCPU-16 ASM Generated by LCC 4.2 (dcpu16-lcc v0.1)
;
JSR _main
:__crash
SET PC, __crash
:_main ;maxoffset: 0 maxargoffset: 1
SET PUSH, J ;save previous frame pointer
SET J, SP ;set new frame pointer
SET A, _L2
JSR _print
:_L1
SET J, POP ;restore previous frame pointer
SET PC, POP
:_dsp_ptr
DAT 32768
:_print ;maxoffset: 0 maxargoffset: 0
SET PUSH, J ;save previous frame pointer
SET J, SP ;set new frame pointer
SET PC, _L5
:_L4
SET I, [_dsp_ptr]
SET [I], [A]
BOR [I], 28672
SET I, _dsp_ptr
SET Z, 1
ADD [I], Z
ADD A, Z
SET I, [I]
IFG 0x817f, I
SET PC, _L7
IFE I, 0x817f
SET PC, _L7
SET [_dsp_ptr], 0x8000
:_L7
:_L5
SET I, [A]
IFN I, 0
SET PC, _L4
:_L3
SET J, POP ;restore previous frame pointer
SET PC, POP
:_L2
DAT 0x0048 ;H
DAT 0x0065 ;e
DAT 0x006c ;l
DAT 0x006c ;l
DAT 0x006f ;o
DAT 0x0020 ;
DAT 0x0057 ;W
DAT 0x006f ;o
DAT 0x0072 ;r
DAT 0x006c ;l
DAT 0x0064 ;d
DAT 0x0000 ;
:__scratch0
DAT 0
:__scratch1
DAT 0
:__scratch2
DAT 0
:__scratch3
DAT 0
Comments
Sign in to comment and vote
No comments yet