Skip to content

Instantly share code, notes, and snippets.

View johnhmj's full-sized avatar
😃
online

John "DumbSheep" Hsieh johnhmj

😃
online
View GitHub Profile
@johnhmj
johnhmj / sic.txt
Last active November 25, 2022 19:42
sic1 (c++ string method, Nov 20, 2022) of sic/xe
COPY START 1000
FIRST STL RETADR
CLOOP JSUB RDREC
LDA LENGTH
COMP ZERO
JEQ ENDFIL
JSUB WRREC
J CLOOP
ENDFIL LDA EOF
STA BUFFER
@johnhmj
johnhmj / sic.txt
Last active November 20, 2022 15:50
sic1 (char string method, Nov 20, 2022) of sic/xe
COPY START 1000
FIRST STL RETADR
CLOOP JSUB RDREC
LDA LENGTH
COMP ZERO
JEQ ENDFIL
JSUB WRREC
J CLOOP
ENDFIL LDA EOF
STA BUFFER
@johnhmj
johnhmj / sic.txt
Last active November 15, 2022 08:47
sic code for visual studio, sic1 codes for sic1 project, sic2 codes for sic2 project.
COPY START 1000
FIRST STL RETADR
CLOOP JSUB RDREC
LDA LENGTH
COMP ZERO
JEQ ENDFIL
JSUB WRREC
J CLOOP
ENDFIL LDA EOF
STA BUFFER
@johnhmj
johnhmj / TimeDepositCalculator.html
Last active April 2, 2022 16:23
A calculator for Taiwan time deposit (CC BY-SA 4.0) 定期存款計算機
<!--This is a HTML5 web page-->
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<!-- Global -->
<title>定期存款計算機 試算結果僅供參考 2022年4月2日 (CC BY-SA 4.0)</title>
<base href="https://gist.github.com/johnhmj/9ffe5e925d33de69c99f537dff84d549">
<meta charset="UTF-8">
<meta name="description" content="This is a calculator for Time deposit (CC BY-SA 4.0)">
<meta name="author" content="DumbSheep">
@johnhmj
johnhmj / StockCalculator.html
Last active May 25, 2022 07:19
A calculator for Taiwan stock market (CC BY-SA 4.0) 股票計算機
<!--This is a HTML5 web page-->
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<!-- Global -->
<title>股票計算機 試算結果僅供參考 2022年5月25日 (CC BY-SA 4.0)</title>
<base href="https://gist.github.com/johnhmj/753d096acb2bfea8524d7d28a76376c1">
<meta charset="UTF-8">
<meta name="description" content="This is a calculator for stock (CC BY-SA 4.0)">
<meta name="author" content="DumbSheep">
Log: Log file open, 06/27/20 17:04:34
Log: FEngineLoop::PreInit GHiPriThreadPoolNumThreads=8
Init: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
Log: ... running in INSTALLED mode
DevConfig: GConfig::Find has loaded file: ..\..\Engine\Config\ConsoleVariables.ini
Init: Version: 9656
Init: Epic Internal: 0
Init: Compiled (32-bit): Dec 16 2019 08:54:00
Init: Changelist: 1202061
Init: Command line:
(translated to traditional chinese by johnmhsieh)
YEAHHHHH YEAH "耶…耶…"
i'll set "我會"
you on fire "點火焚燒你"
with gas "用瓦斯"
and a lighterrrr "還有打火機…"
you'll scream "你會大聲尖叫"
when i "當我"
#include <Windows.h>
//
// 1st way to avoid max conflict: undefine max from Windows.h
#ifdef max
#undef max
#endif
//
int wmain(int argc, wchar_t* argv[])
{
//
@johnhmj
johnhmj / header.cpp
Created December 1, 2017 03:33
AutoCAD Text height calculator
#include "header.h"
//
CACADTextHeight::CACADTextHeight()
{
this->m_dDIMTXT = 0.0f;
this->m_dDIMSCALE = 0.0f;
this->m_dViewportScale = 0.0f;
this->m_dTextHeightModel = 0.0f;
this->m_dTextHeightLayout = 0.0f;
}
@johnhmj
johnhmj / SICXEPass1.pseudo
Created May 2, 2017 12:17
Pseudocode of SICXE
BEGIN
read first input line
IF OPCODE = 'START' THEN
BEGIN
save #[OPERAND] as starting address
initialize LOCCTR to starting address
write line to intermediate file
read next input line
END {if START}
ELSE