Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Wired Hello World!
- //Connect CPU membus input to console screen
- //Connect CPUs CLK input to button (toggle)
- //Notice how you can store your
- //subroutines/calls in DATA area
- jmp _code;
- message:
- db 'Now for scrolling...',0;
- PrintStr: //ESI - String pointer, EDX - Param
- mov eax,65536+960; //65535 is end of RAM
- AWriteLoop:
- cmp #esi,0; //Terminate on char 0
- je AEnd;
- mov #eax,#esi; //Output char
- inc eax;
- mov #eax,edx; //Output char param
- inc eax;
- inc esi;
- jmp AWriteLoop;
- AEnd:
- ret
- UpScroll:
- mov eax,67574;
- mov #eax,1;
- mov #eax,0;
- ret
- ScrReset:
- mov eax,67577;
- mov #eax,1;
- mov #eax,0;
- ret
- _code:
- call ScrReset;
- mov esi,message;
- mov edx,000999; //White foreground on black background
- call PrintStr;
- call UpScroll;
Add Comment
Please, Sign In to add comment