This file contains hidden or 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
| assemble :: Line -> AsmAct Word8 Word16 () | |
| assemble (Line labels Nothing) = sequence_ $ do | |
| l <- labels | |
| return $ (getPtr >>= setLabel l) | |
| assemble (Line labels (Just (Instruction inst rawargs))) = do | |
| assemble (Line labels Nothing) | |
| args <- runListT $ do | |
| arg <- ListT $ return rawargs |
This file contains hidden or 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
| import ctypes | |
| import ctypes.util | |
| import asyncore | |
| import sys | |
| import atexit | |
| import code | |
| import readline as pyreadline | |
| import rlcompleter | |
| readline = ctypes.CDLL(ctypes.util.find_library("readline")) |
This file contains hidden or 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
| ;;; useful addresses | |
| INT_VBLANK: equ 0x0040 | |
| INT_LCDC: equ 0x0048 | |
| INT_TIMER: equ 0x0050 | |
| INT_SERIAL: equ 0x0058 | |
| INT_P1THRU4: equ 0x0060 | |
| ROM_HEADER: equ 0x0100 | |
| ;;; 15 ascii bytes | |
| ROM_TITLE: equ ROM_HEADER + 0x034 | |
| ;;; 2 bytes |
This file contains hidden or 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
| strlen: | |
| ;; string address is in hl, output is in bc | |
| ld bc, 0 | |
| .loop: | |
| ld a, (hli) | |
| cp 0 | |
| ret z | |
| inc bc | |
| jr .loop |
This file contains hidden or 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
| #include <stdio.h> | |
| int x = 0; | |
| int main() { | |
| printf("%d ", (x = 3) + (x = 4)); | |
| printf("%d\n", x); | |
| return 0; | |
| } |
This file contains hidden or 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
| /* carl -- C Asynchronous Readline | |
| * Copyright (C) 2010 Dawid Ciężarkiewicz | |
| * | |
| * Originally part of xmppconsole <http://github.com/dpc/xmppconsole> | |
| * as io.c and io.h, but repackaged for general-purpose use, and with | |
| * a different namespace, by Aaron Griffith. | |
| * | |
| * For documentation, see carl.h. | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
This file contains hidden or 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
| static void carl_async_print(print_func func, void* data) | |
| { | |
| char* saved_line; | |
| int saved_point; | |
| struct readline_state rlstate; | |
| //saved_point = rl_point; | |
| //saved_line = rl_copy_text(0, rl_end); | |
| //rl_save_prompt(); |
This file contains hidden or 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
| ./tier2/carl | |
| ./tier2/Myst.inform | |
| ./tier2/libvaht | |
| ./tier2/tamra | |
| ./tier2/copper | |
| ./tier2/botnames | |
| ./tier2/carnivorg | |
| ./tier2/geegaw | |
| ./tier2/mpd-python | |
| ./tier2/4julia |
This file contains hidden or 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
| from collections import namedtuple | |
| import yaml | |
| from annotations import Annotation, AnnotatedValue | |
| from parser import Parser | |
| class YAMLParser(Parser): | |
| def parse(self): | |
| tree = yaml.compose(self.fileobj) | |
| self._constructor = yaml.constructor.SafeConstructor() |
This file contains hidden or 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
| import parseyaml | |
| import validators | |
| import annotations | |
| class WidgetValidator(validators.ObjectValidator): | |
| foo = validators.StringValidator() | |
| bar = validators.StringValidator() | |
| def validate_object(self): | |
| if self.bar != "racuda": |