hex|opcode
---+------
00 | NOP
01 | STP
02 | PSE
03 | RST
04 | LOG imm
05 | LOG mem
06 | INT
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
/Users/mfosdick/slow.cpp | |
source.cpp | |
source.cpp.embedded.macro | |
requested grammar outside of this repository | |
requested grammar outside of this repository | |
total time: 96775.84208899736ms | |
match failure | |
pattern name average time total time peak time | |
source.cpp:5809 4188.354939 96332.164 32609.107 |
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
match failure | |
pattern name average time total time | |
source.c:3632 0.008575 12.176 | |
source.c:3732 0.007287 7.578 | |
source.c:3655 0.005987 0.006 | |
source.c:3654 0.005895 61.735 | |
source.c:154 0.004502 0.027 | |
source.c:3782 0.003931 0.016 | |
source.c:3773 0.003578 2.011 | |
source.c:2306 0.003501 1926.857 |
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
{ | |
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | |
"name": "Debug", | |
"patterns": [ | |
{ | |
"include": "#next" | |
}, | |
{ | |
"begin": "check for\\s*", | |
"end": "(?!\\G)", |
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
MOV imm, imm |
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
[COMPILERS] | |
COUNT=2 | |
PREFIX1=i586-elf | |
PREFIX2=x86_64-elf | |
ARCH1=86 | |
ARCH2=64 | |
LINK1=linkx86 | |
LINK2=linkx64 | |
[VENDOR86] |
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
static int sock; | |
addrinfo *info; | |
int Init(const char *addr,int port) { | |
addrinfo hints, *res; | |
memset(&hints,0,sizeof(addrinfo)); | |
hints.ai_family = AF_UNSPEC; | |
hints.ai_socktype = SOCK_STREAM; | |
hints.ai_flags = AI_PASSIVE; | |
hints.ai_protocol = 0; | |
hints.ai_canonname = NULL; |
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
char *strlcpy(char *dest, const char *src, size_t num) { | |
bool zero=false; | |
char *d=dest; | |
while(num) { | |
if(!zero) { | |
int len=get_char_len(src); | |
if(len>=num||!*src) { | |
zero=true; | |
} else { | |
char_copy(dest,src); |
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
int get_char_len(const char *str) { | |
unsigned char c=*str; | |
//if not a start of char return -1 | |
if(c&0xC0==0x80) { | |
return -1; | |
} | |
//number of high one's is total byte count | |
uint8_t count=1; | |
while(c&0x80==0x80) { | |
count++; |
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
int get_char_len(const char *str); | |
char * next_char(const char *str); | |
char * get_next_char(const char *str, size_t count); | |
bool is_char_equal(const char *c1, const char *c2); |