GORF COMMAND SUMMARY title: text - enter the title of your program desc: text - enter the description of your program rem text - use rem or a semi-colon to enter comments set color # # - set gorf interface colors set screen # - set gorf interface screen mode set cls - clear the interface screen link on/off - enable or disable library functions source - set main address to srcseg:0000h code - set main address to 8000:0100h library - set main address to library code area help - display a list of commands and their discription reset or r - clear screen and set color mode q - exit using int 21h function 4ch ren old new - rename any command or register dump offset - display memory contents at main address saddr seg off - change the main address sorg - set org to the current pointer setvar # - set *v variable to any number or address srcseg seg - change source code segment cmds - display a list of commands run - assemble any source code located at srcseg:0h end - required termination of source code include fname - include any file at main address build fname - compile source code file and exit read fname - read a source code file into srcseg:0h write bytes fname - write amount of bytes to file stay - stay resident using ms-dos int 27h start - jump to any executable code at main address label # - assign a label to the current pointer point off - set code insertion pointer to offset pointv int# - set main address to int vector rep hex times - repeat a char any amount of times dim times size - declare a dimensional array pdim element size - adds (element * size) to si findz - al=char cx=count ds:si=start returns ds:si zhex - read string hex in ds:si to es:di force string - force a string into ds:si forcez string - force a string into ds:si and add a nul inject hex hex ... - inject hex into ds:si ddump - cx=count dump ds:si as hex adump - cx=count dump ds:si as ascii (filtered) timer - place current cmos clock tick into al incrow/decrow/inccol/deccol - inc or dec row or col getip - place address in ip register into bp leaip - lea si, [bp+di] mov reg val - move data into a register mov reg reg - move register into another register push reg - push a register to the stack pop reg - pop a register from the stack push all - push all registers to stack pop all - pop all registers from stack cmp reg val - compare a register with a value cmp reg reg - compare a register with a register call reg - call address within a register loadw reg:reg - load a segment and offset into ax loadb reg:reg - load a segment and offset into al setw reg:reg - set at addr seg:off to ax setb reg:reg - set at addr seg:off to al hook int# # # - hook any interrupt setv - set vector al to address in ds:dx getv - get vector al into registers ds:dx spush addr - push value in addr to stack spop addr - pop value in stack into addr int1or - or word [bp + 6], 0100h int1and - and word [bp + 6], 0feffh sp2bp - mov the sp register into bp init - clear 64k starting at main address credit info - insert credits info into .com file setsegs - set ds and es to cs poker seg off hex - poke hex byte into any seg:off peek hex hex - mov al, byte [ds:addr] poke hex hex - mov byte [ds:addr], al indexb hex - mov al, byte [ds:si + hex] indexw hex - mov ax, word [ds:si + hex] sindexb hex - mov byte [ds:si + hex], al sindexw hex - mov word [ds:si + hex], ax toggle hex hex - toggle addr between 0 and 1 returns al togstat - display text 'ON', 'OFF', or '??' based on al bstep - if al=0 then inc bl if al=1 then dec bl btrick - if bl=ah then mov bl, al ax2segs - set ds and es to ax zregs - set ax, bx, cx, dx, si, di, and bp to nul jxx # - jump to offset based on comparison add reg - add register bx,cx or dx to ax into ax sub reg - sub register bx,cx or dx from ax into ax mul reg - mul register ax with bx or cx into ax div reg - div register ax with bx or cx into ax inc/dec reg - increment or decrement a register adds si/di hex - add hex to si or di subs si/di hex - sub hex from si or di adda hex hex - add any hex value to ax suba hex hex - subtract any hex value from ax faddp/fsupp/fmulp/fdivp - floating point instructions vfjmp seg off - very far jump to segment:offset jump hex hex - long jump to offset jumpe - after cmp long jump to offset if equal (ax) jumpne - after cmp long jump to offset if not equal (ax) xjump hex hex - long jump to offset (bp) xjumpe - after cmp long jump to offset if equal (bp) xjumpne - after cmp long jump to offset if not equal (bp) xloop hex hex - loop if cx>0 else dec cx and far loop swing # # - cycle using label as the main loop int # - call any interrupt screen mode - set the screen mode uses int 10h function 0 db 'bsave - ds:si=filename es:di=address cx=size',13,10 db 'bload - ds:si=filename es:di=address cx=size',13,10 locate row col - set the cursor location cursor - ah=start al=end set cursor size modex - al=0 or al=1 turn vga off/on modey - bx=109,10a,10b,10c set super vga mode vga50 - set 50 rows per screen palreg - ds:dx = 16 byte palette register set wide - ds:si=data sets video to wide mode clrscr - ah=char al=color clears the screen zap - repeativly call bp with b800:si in ax cls - clears the screen bar - dh=len al=color draws bar at cursor blink - al=0 or al=1 enable/disable blinking arrow - arrow keys update dh and dl font - bh=bytes per chr cx=# of chrs dx=chr# bp=addr gfont - graphics mode fonts bp=addr bye - int 21h func 4ch quit program if al=q quit - al=retcode add code to quit via int 21h, 4ch win - bx=windows data area cx=win# draws win rand - dh=start dl=end returns ax screw - cx=turns returns random seed in ax gseed - cx=turns ds:si=2word seed returns new seed in ax rgen - ax=seed dh=start dl=end returns al kick - al=1-4 inc or dec dh/dl chase - al=1-2 this will make pos dx chase pos cx word hex hex - define a 2 byte word byte hex - define a single byte delay - sleep for dl amount of moments hex # # # ... - insert hexidecimal codes bin 00000000 - enter 7 bit binary digit txt text - insert text at code insertion ponter goto hex - short jump to memory location gosub # - execute a 'call' to a label # gosube # - execute a 'call' to a label # if cmp is equal repsub # times - call sub # more than once loop hex - loop to a memory location cx times ret,iret,retf - return, return from int, and far return return - this is the the same as using ret break - insert an int3 break-point int3 - insert an int3 break-point (same as 'break') lodsb, stosb - load or store byte from ds:si or to es:di lodsw, stosw - load or store word from ds:si or to es:di swap - swap registers ah and al xchgs - swap registers ds:si with es:di print text [crlf] - print text with optional crlf prn text [crlf] - print text (same as 'print') pax - print register ax as hex peax - print register eax as hex pah - print register ah as hex pal - print register al as hex paxch - print contents ax as ascii text ueax2ax - upper word of eax to ax pcrlf - print a carrage return line feed gpeek - dh=row dl=col returns ah=char al=color gpoke - ah=char al=color dh=row dl=col gfold - cl=screen width dh=row dl=col returns dx getpos - get cursor pos dh=row dl=col setpos - dh=row dl=col set cursor pos gposc - get char at cursor ah=attrib al=char xcolor - set entire text screen to color to al color hex hex - set fore/back and border colors pset - set pixel al=color cx=row dx=col psetm - ds:si=map bx=cols cx=row dx=col ah=term char pget - get pixel cx=row dx=col returns al=color grows - get amount of screen rows into ax gcols - get amount of screen cols into ax scnhex - ds:si as hex str to ax ascii hax - ax as hex text to ax as hex binary conhex - ascii char in al into hex string into ax hexcv - al as hex '0' to 'f' returns al as 0 to f xbin - ds:si as bin str to al ascii gseg - es=segment ax=bytes to add to segment returns es pause - wait for a user to hit a key test # - defines a debug breakpoint for any use skeybd - ch=scan code cl=char stuff keyboard buffer display - print ds:si in color al show - bl=color print string in ds:si lshow - prints multiple lines on same column xline - cx=count al=char bl=color prints a line line count char color - prints a line sound - ax=note play a sound nosound - stop a playing sound strlen - length of string in ds:si into cx wipe - clear cx bytes of ds:si cpymem - ds:si to ds:di 0 terminated xcopy - copy cx bytes of ds:si to es:di ucase - convert ds:si to upper case lcase - convert ds:si to lower case wipe - clear cx bytes of ds:si inp - (tiny) read keyboard into ds:si input - (w/backspace) read keyboard into ds:si inkey - read a key into ax and pass through inkeyp - in al, 60h quest - print (Y/N)? prompt al retruns y or n or q parse - ds:si as str parse commas to zeros filter - ds:si as str parse char al to zeros pointp - ds:si as str point si to str # in al pointpd - ds:di as str point di to str # in al compare - compare si with di al=1 if match sxor - xor with al cx bytes of ds:si sgetc - show str si set cx to 0 if ax=cx else inc cx getdec - al as 0h to 63h returns ax as '00' to '99' gscp - cx=count get str at cur pos to ds:di ins - cl=end col ds:si=buff ins will ins spc at cur del - cl=end col ds:si=buff del key will del spc at cur clean - al=char filters char 7,8,9,a, and d returns al putc - print char in al color bl getc - read key into al gal - print '00' and read from keybd into ax gax - print '0000' and read from keybd into ax and bx putch hex - print a char at cursor face - colorize ds:si=string of six color digits replace - dh=old char dl=new char al=color ltrim - increment ds:si to first non-space char rtrim - change trailing spaces in ds:si to zeros cli/sti/cld/std/clc/stc - clear or set flag nop, nope - insert hex 90h (nop) crlf - insert a carrage return and line feed nul - insert a ascii 0 (nul) jmpr reg - jump to an address stored in a register eoi - trigger End-Of-Interrupt (EOI) on 8259 chip disk - bp=2/3 ax=sector# cx=amount es:bx=buffer jope - insert a jope header, must be at 100h floats - install this at int 22h for floats finit - initialize the floating points fpush - pushes float string in ds:si to st0 fprint - displays st0 as float string self - write gorf itself to main address stat - toggle internal cmd address display on/off pauto - point main address to internal auto hex pintro - point main address to internal intro phelp - point main address to internal help pcmd # - point main address to cmd# 0 to 8 runcmd - execute a `ret' terminated cmd# 0 to 8 cmd0-cmd8 - embed your own hex into gorf sinit - saddr 8000 100 & init & point 100 lib_start - start including library commands lib_end - finish including library commands note: label and pointer paramiter formats are !# @# *p