Guest User

Untitled

a guest
Sep 3rd, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Wired Hello World!
  2. //Connect CPU membus input to console screen
  3. //Connect CPUs CLK input to button (toggle)
  4. //Notice how you can store your
  5. //subroutines/calls in DATA area
  6. jmp _code;
  7. message:
  8.   db 'Now for scrolling...',0;
  9. PrintStr: //ESI - String pointer, EDX - Param
  10.   mov eax,65536+960; //65535 is end of RAM
  11.   AWriteLoop:
  12.     cmp #esi,0; //Terminate on char 0
  13.     je AEnd;
  14.     mov #eax,#esi; //Output char
  15.     inc eax;
  16.     mov #eax,edx; //Output char param
  17.     inc eax;
  18.     inc esi;
  19.   jmp AWriteLoop;
  20.   AEnd:
  21. ret
  22. UpScroll:
  23.   mov eax,67574;
  24.   mov #eax,1;
  25.   mov #eax,0;
  26. ret
  27. ScrReset:
  28.   mov eax,67577;
  29.   mov #eax,1;
  30.   mov #eax,0;
  31. ret
  32. _code:
  33.  
  34.   call ScrReset;
  35.  
  36.   mov esi,message;
  37.   mov edx,000999; //White foreground on black background
  38.   call PrintStr;
  39.   call UpScroll;
Add Comment
Please, Sign In to add comment