Skip to content

Instantly share code, notes, and snippets.

View Karl-Han's full-sized avatar

Kunlin Han Karl-Han

View GitHub Profile
@Karl-Han
Karl-Han / vimrc
Created January 25, 2019 06:35
A sloppy vimrc
syntax enable
set shiftwidth=4 "autoindent's length
set softtabstop=4 "change the length of the tab by this
set tabstop=4 "set the length of tab
set autoindent "autoindent
set textwidth=79 "the characters showed in one line
set fileformat=unix
set showmatch "highlight matching parentheses
set incsearch "show the result of search inmediately
set hlsearch "highlight the result
@Karl-Han
Karl-Han / zshrc
Last active June 10, 2020 10:53
A zshrc
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="host-amuse"
# Set list of themes to pick from when loading at random
data segment
string1 db 'Hello - Wor ld !',0
data ends
stack1 segment para stack
dw 10h dup(0)
stack1 ends
codeseg segment
start:
data segment
ascii db 30h,31h,32h,33h,34h,35h,36h,37h,38h,39h,
41h,42h,43h,44h,45h,46h
hex db 04h,0bh
data ends
stack1 segment para stack
dw 20h dup(?)
stack1 ends
data segment
BCD db 04h
data ends
stack1 segment para stack
dw 10h dup(0)
stack1 ends
codeseg segment
start:
; string lower case to higer case
data segment
capacity equ 100
buffer db capacity
db 0 ; return length
db capacity dup(0)
data ends
stack1 segment para stack
dw 10h dup(0)
; Use opcode offset to jump to destination
data segment
num db 78h
addrs dw offset func0, offset func1, offset func2, offset func3
dw offset func4, offset func5, offset func6, offset func7
data ends
stack1 segment para stack
dw 10h dup(0)
data segment
char db 'i'
data ends
stack1 segment para stack
dw 10h dup(0)
stack1 ends
codeseg segment
start:
data segment
array db 1,-2,8,-23,-24,76,-98,123,25,82
sizeArr db 10
bmax db ?
bmin db ?
data ends
stack1 segment para stack
dw 20h dup(0)
stack1 ends
data segment
err db 'ERROR','$'
data ends
stack1 segment para stack
dw 10h dup(0)
stack1 ends
codeseg segment
start: