about summary refs log blame commit diff stats
path: root/arc/highlights
blob: bb81fb569ca4e508a801907552deba6bb4350292 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


                                                                                                     







                                                                









                                                        
" vim: ft=vim
" Data-flow highlighting: http://www.reddit.com/r/programming/comments/1w76um/coding_in_color/cezpios

highlight highlight_97a5a5e3 ctermfg=205
call matchadd('highlight_97a5a5e3', '\<ncols\>')
highlight highlight_1f88e41c ctermfg=139
call matchadd('highlight_1f88e41c', '\<nrows\>')
highlight highlight_6da20a96 ctermfg=141
call matchadd('highlight_6da20a96', '\<rowidx\>')
highlight highlight_ae83eebb ctermfg=149
call matchadd('highlight_ae83eebb', 'curr-line-address-address')
highlight highlight_bb695e14 ctermfg=36
call matchadd('highlight_bb695e14', '\<default-scope\>')
highlight highlight_1e44ab4f ctermfg=208
call matchadd('highlight_1e44ab4f', '\<first-arg\>')
highlight highlight_3323f077 ctermfg=208
call matchadd('highlight_3323f077', '\<first-arg-box\>')
highlight highlight_74fc42b2 ctermfg=220
call matchadd('highlight_74fc42b2', 'second-arg')
highlight highlight_ff6f0571 ctermfg=220
call matchadd('highlight_ff6f0571', 'second-arg-box')
program on the disk image: # cat baremetal/boot.hex baremetal/ex3.hex |./bootstrap run apps/hex > a.bin # dd if=a.bin of=disk.img conv=notrunc # To run: # qemu-system-i386 disk.img # Or: # bochs -f baremetal/boot.bochsrc # boot.bochsrc loads disk.img # main: (address 0x8800) # eax <- LFB 8b # copy *rm32 to r32 05 # 00/mod/indirect 000/r32/eax 101/rm32/use-disp32 28 7f 00 00 # disp32 [label] # var read index/ecx: byte = 0 31 c9 # ecx <- xor ecx; 11/direct 001/r32/ecx 001/rm32/ecx # $loop: # CL = *read index 8a # copy m8 at r32 to r8 0d # 00/mod/indirect 001/r8/cl 101/rm32/use-disp32 cf 7d 00 00 # disp32 [label] # CL = *(keyboard buffer + ecx) 8a # copy m8 at r32 to r8 89 # 10/mod/*+disp32 001/r8/cl 001/rm32/ecx d0 7d 00 00 # disp32 [label] # if (CL == 0) loop (spin loop) 80 f9 # 11/mod/direct 111/subop/compare 001/rm8/CL 00 # imm8 74 ef # loop -17 [label] # offset 0x19: # otherwise increment read index fe # increment byte 05 # 00/mod/indirect 000/subop/increment 101/rm32/use-disp32 cf 7d 00 00 # disp32 [label] # clear top nibble of index (keyboard buffer is circular) 80 # and byte 25 # 00/mod/indirect 100/subop/and 101/rm32/use-disp32 cf 7d 00 00 # disp32 [label] 0f # imm8 # print a pixel in fluorescent green c6 # copy imm8 to m8 at rm32 00 # 00/mod/indirect 000/subop 000/rm32/eax 31 # imm32 40 # increment eax eb dc # loop -36 [label] # $break: e9 fb ff ff ff # hang indefinitely # vim:ft=subx