This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; MikeOS Cat Splashscreen | |
; Uses VGA 320x200, 256 color, mode 13h | |
; Picture data is compressed into one bit per pixel | |
; | |
; Blake Burgess // 5 APR 2014 | |
; | |
width equ 56 ; picture width | |
height equ 61 ; picture height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\PROJECTS\Megaton Dev Kit\Server>java -jar Server.jar | |
Started server @ port 4000 | |
Authenticates: false | |
Enabling MMO-Commands plugin | |
- 1 plugin(s) loaded | |
Authentication is now on | |
C:\Users\Blake Burgess\AppData\Roaming/Daexsys/Megaton/images/grass.png | |
C:\Users\Blake Burgess\AppData\Roaming/Daexsys/Megaton/images/sand.png | |
C:\Users\Blake Burgess\AppData\Roaming/Daexsys/Megaton/images/dirt.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set worldName="world3" | |
:start | |
echo %0 n [/c] [/w] [/l] [/p] | |
echo. n - string to append to end of output filename | |
echo. /c - backup root files | |
echo. /w - backup world directory | |
echo. /l - backup log directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; structure test | |
org 0x100 | |
struc Point x,y { | |
.x dw x | |
.y db y | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String args[]) { | |
System.out.println("Hello world"); | |
return; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void putChar(char c, short x, short y, char color) { | |
char* glyphOfs = getGlyph(c); | |
char byte = 0; | |
char i; | |
unsigned char pattern = 128u; // 0b10000000 | |
short xOfs = 0; | |
short yOfs = 0; | |
for (i = 0; i < 5*5; i++) { | |
// Plot pixel only if bit is set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declaring a new string | |
char string1[] = "This is a string"; | |
// Declaring an uninitialized array with specified size | |
char string2[8]; | |
// Declaring an uninitialized array with undefined size | |
// (SmallerC does not implement this!!) | |
char string3[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void drawLine(short x1, short y1, short x2, short y2, char color) { | |
short dx = x2 - x1; | |
short dy = y2 - y1; | |
short newX = x1; | |
short newY = y1; | |
// Iterate along the X axis if slope is not steep (m <= 1) | |
if (dx >= dy) { | |
for (; newX <= x2; newX++) { | |
setPixel( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asm("mov ax, [bp - 4] \n" // ax = (dy) | |
"cwde \n"); // sign extend ax to fill eax | |
asm("mov bx, [bp - 6] \n" // bx = (newX) | |
"xchg eax, ebx \n" // ax = (newX) <--> bx = (dy) | |
"cwde \n"); // sign extend ax to fill eax | |
asm("imul ebx \n"); // eax = (signed)(dy * newX) | |
asm("mov edx, eax \n" // edx = eax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asm("mov ax, [bp - 4] \n" // ax = (dy) | |
"mov bx, [bp - 6] \n"); // bx = (newX) | |
asm("imul bx \n"); // dx:ax = (dy * newX) | |
asm("idiv word [bp - 2] \n"); // ax = dx:ax / (dx) | |
asm("mov [bp - 8] , ax \n"); // (newY) = ax |
OlderNewer