hexsha
stringlengths
40
40
size
int64
6
1.05M
ext
stringclasses
3 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
232
max_stars_repo_name
stringlengths
7
106
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
7
max_stars_count
int64
1
33.5k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
232
max_issues_repo_name
stringlengths
7
106
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
7
max_issues_count
int64
1
37.5k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
232
max_forks_repo_name
stringlengths
7
106
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
7
max_forks_count
int64
1
12.6k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
6
1.05M
avg_line_length
float64
1.16
19.7k
max_line_length
int64
2
938k
alphanum_fraction
float64
0
1
7007c8fe2b51d5b20bc80040af1d638d7f14b1ab
9,046
asm
Assembly
src/lzd.asm
wernsey/zoo
6264a99f9aea7afb4deb3089bd6d4d036e94f9ab
[ "Unlicense" ]
5
2020-12-20T21:07:41.000Z
2022-01-25T16:43:42.000Z
src/lzd.asm
wernsey/zoo
6264a99f9aea7afb4deb3089bd6d4d036e94f9ab
[ "Unlicense" ]
1
2020-12-20T20:27:19.000Z
2020-12-21T12:34:12.000Z
src/lzd.asm
wernsey/zoo
6264a99f9aea7afb4deb3089bd6d4d036e94f9ab
[ "Unlicense" ]
2
2020-09-24T15:25:26.000Z
2020-12-20T21:08:01.000Z
; Derived from Tom Pfau's public domain assembly code. ; ; The contents of this file are hereby released to the public domain. ; -- Rahul Dhesi 1988/08/24 title Lempel-Ziv Decompressor UNBUF_IO equ 1 ;use unbuffered I/O public _lzd,memflag,docrc include asmconst.ai include macros.ai ;Hash table entry hash_rec struc next dw ? ; prefix code char db ? ; suffix char hash_rec ends extrn _addbfcrc:near ;External C function for CRC ifdef UNBUF_IO extrn _read:near extrn _blockwrite:near else extrn _zooread:near extrn _zoowrite:near endif ;Declare segments _text segment byte public 'code' _text ends dgroup group _data assume ds:dgroup,es:dgroup _data segment word public 'data' extrn _out_buf_adr:word ;address of C output buffer extrn _in_buf_adr:word ;address of C input buffer memflag db 0 ;Memory allocated? flag save_bp dw ? save_sp dw ? input_handle dw ? output_handle dw ? hash_seg dw ? cur_code dw ? old_code dw ? in_code dw ? free_code dw first_free ;Note: for re-entrancy, following 3 must be re-initialized each time stack_count dw 0 nbits dw 9 max_code dw 512 fin_char db ? k db ? masks dw 1ffh,3ffh,7ffh,0fffh,1fffh ;Note: for re-entrancy, following 2 must be re-initialized each time bit_offset dw 0 output_offset dw 0 _data ends memory segment para public 'memory' hash label hash_rec memory ends call_index macro mov bp,bx ;bx = bx * 3 (3 byte entries) shl bx,1 ;bp = bx add bx,bp ;bx = bx * 2 + bp endm call_write_char macro local wc$1 mov di,output_offset ;Get offset in buffer cmp di,outbufsiz ;Full? jb wc$1 ;no call write_char_partial sub di,di ;so we add zero in next statement wc$1: add di,[_out_buf_adr] ;di <- buffer address + di stosb ;Store char inc output_offset ;Increment number of chars in buffer endm add_code macro mov bx,free_code ;Get new code ;call index ;convert to address call_index push es ;point to hash table mov es,hash_seg mov al,k ;get suffix char mov es:[bx].char,al ;save it mov ax,old_code ;get prefix code mov es:[bx].next,ax ;save it pop es inc free_code ;set next code endm ;Start coding _text segment assume cs:_text,ds:dgroup,es:dgroup,ss:nothing write_char_partial proc near push cx mov cx,di ;byte count call write_block pop cx mov output_offset,0 ;Restore buffer pointer ret write_char_partial endp _lzd proc near push bp ;Standard C entry code mov bp,sp push di push si push ds ;Save ds to be sure mov [save_bp],bp ;And bp too! mov bx,ds mov es,bx ;Get two parameters, both integers, that are input file handle and ;output file handle mov ax,[bp+4] mov [input_handle],ax mov ax,[bp+6] mov [output_handle],ax call decompress ;Compress file & get status in AX mov bp,[save_bp] ;Restore bp pop ds pop si ;Standard C return code pop di mov sp,bp pop bp ret _lzd endp ;Note: Procedure decompress returns AX=0 for successful decompression and ; AX=1 for I/O error and AX=2 for malloc failure. decompress proc near mov [save_sp],sp ;Save SP in case of error return ;Initialize variables -- required for serial re-entrancy mov [nbits],9 mov [max_code],512 mov [free_code],first_free mov [stack_count],0 mov [bit_offset],0 mov [output_offset],0 test memflag,0ffH ;Memory allocated? jnz gotmem ;If allocated, continue malloc <((maxmax * 3) / 16 + 20)> ;allocate it jnc here1 jmp MALLOC_err here1: mov hash_seg,ax ;Save segment address of mem block mov memflag,0ffh ;Set flag to remind us later gotmem: mov ax,inbufsiz push ax ;byte count push _in_buf_adr ;buffer address push input_handle ;zoofile ifdef UNBUF_IO call _read else call _zooread endif add sp,6 cmp ax,-1 jz IO_err ;I/O error here2: l1: call read_code ;Get a code cmp ax,eof ;End of file? jne l2 ;no cmp output_offset,0 ;Data in output buffer? je OK_ret ;no mov cx,[output_offset] ;byte count call write_block ;write block of cx bytes OK_ret: xor ax,ax ;Normal return -- decompressed ret ;done IO_err: mov ax,2 ;I/O error return mov sp,[save_sp] ;Restore stack pointer ret MALLOC_err: mov ax,1 ;Malloc error return mov sp,[save_sp] ;Restore stack pointer ret l2: cmp ax,clear ;Clear code? jne l7 ;no call init_tab ;Initialize table call read_code ;Read next code mov cur_code,ax ;Initialize variables mov old_code,ax mov k,al mov fin_char,al mov al,k ;call write_char ;Write character call_write_char jmp l1 ;Get next code l7: mov cur_code,ax ;Save new code mov in_code,ax mov es,hash_seg ;Point to hash table cmp ax,free_code ;Code in table? (k<w>k<w>k) jb l11 ;yes mov ax,old_code ;get previous code mov cur_code,ax ;make current mov al,fin_char ;get old last char push ax ;push it inc stack_count ;old code -- two memory references ;l11: ; cmp cur_code,255 ;Code or character? ; jbe l15 ;Char ; mov bx,cur_code ;Convert code to address ;new code -- 0 or 1 memory references mov ax,cur_code l11: ;All paths in must have ax containing cur_code cmp ax,255 jbe l15 mov bx,ax ;end code ;call index call_index mov al,es:2[bx] ;Get suffix char push ax ;push it inc stack_count mov ax,es:[bx] ;Get prefix code mov cur_code,ax ;Save it jmp l11 ;Translate again l15: ;old code ; push ds ;Restore seg reg ; pop es ;new code mov ax,ds ;faster than push/pop mov es,ax ;end code mov ax,cur_code ;Get code mov fin_char,al ;Save as final, k mov k,al push ax ;Push it ;old code ; inc stack_count ; mov cx,stack_count ;Pop stack ;new code -- slightly faster because INC of memory is slow mov cx,stack_count inc cx mov stack_count,cx ;end code jcxz l18 ;If anything there l17: pop ax ;call write_char call_write_char loop l17 ;old code ;l18: ; mov stack_count,cx ;Clear count on stack ;new code -- because stack_count is already zero on earlier "jcxz l18" mov stack_count,cx l18: ;end code ;call add_code ;Add new code to table add_code mov ax,in_code ;Save input code mov old_code,ax mov bx,free_code ;Hit table limit? cmp bx,max_code jb l23 ;Less means no cmp nbits,maxbits ;Still within maxbits? je l23 ;no (next code should be clear) inc nbits ;Increase code size shl max_code,1 ;Double max code l23: jmp l1 ;Get next code decompress endp read_code proc near ;old code ; mov ax,bit_offset ;Get bit offset ; add ax,nbits ;Adjust by code size ; xchg bit_offset,ax ;Swap ; mov dx,ax ;dx <- ax ;new code mov ax,bit_offset mov dx,ax ;dx <- bit_offset add ax,nbits mov bit_offset,ax mov ax,dx ;end code shr ax,1 shr ax,1 shr ax,1 ;ax <- ax div 8 and dx,07 ;dx <- ax mod 8 cmp ax,inbufsiz-3 ;Approaching end of buffer? jb rd0 ;no push dx ;Save offset in byte add dx,nbits ;Calculate new bit offset mov bit_offset,dx mov cx,inbufsiz mov bp,ax ;save byte offset sub cx,ax ;Calculate bytes left add ax,_in_buf_adr mov si,ax mov di,_in_buf_adr rep movsb ;Move last chars down push bp ;byte count push di ;buffer address push input_handle ;zoofile ifdef UNBUF_IO call _read else call _zooread endif add sp,6 cmp ax,-1 jnz here4 jmp IO_err ;I/O error here4: xor ax,ax ;Clear ax pop dx ;Restore offset in byte rd0: add ax,_in_buf_adr mov si,ax lodsw ;Get word mov bx,ax ;Save in AX lodsb ;Next byte mov cx,dx ;Offset in byte jcxz rd2 ;If zero, skip shifts rd1: shr al,1 ;Put code in low (code size) bits of BX rcr bx,1 loop rd1 rd2: mov ax,bx ;put code in ax mov bx,nbits ;mask off unwanted bits sub bx,9 shl bx,1 and ax,masks[bx] ret read_code endp init_tab proc near mov nbits,9 ;Initialize variables mov max_code,512 mov free_code,first_free ret init_tab endp comment # index proc near mov bp,bx ;bx = bx * 3 (3 byte entries) shl bx,1 ;bp = bx add bx,bp ;bx = bx * 2 + bp ret index endp #end comment docrc proc near ;On entry, ax=char count, dx=buffer address. ;Do crc on character count, in buffer. ;****** Update CRC value -- call external C program ;External program is: addbfcrc(buffer, count) ; char *buffer; ; int count; push ax ;SAVE AX push bx ;SAVE BX push cx push dx push ax ;param 2: char count push dx ;param 1: buffer address call _addbfcrc add sp,4 ;Restore 2 params from stack pop dx pop cx pop bx ;RESTORE BX pop ax ;RESTORE AX ret docrc endp write_block proc near ;Input: CX=byte count to write push ax push bx push cx push dx push si ;may not be necessary to save si & di push di push cx ;save count push cx ;count push _out_buf_adr ;buffer push output_handle ;zoofile ifdef UNBUF_IO call _blockwrite else call _zoowrite endif add sp,6 pop cx ;restore count ;ax = actual number of bytes written cmp ax,cx ;all bytes written? je written ;if yes, OK jmp IO_err written: mov dx,_out_buf_adr call docrc ;do crc on ax bytes in buffer dx mov output_offset,0 ;restore buffer ptr to zero pop di pop si pop dx pop cx pop bx pop ax ret write_block endp _text ends end
20.102222
74
0.714017
4a8a6272ac8c1f6f3c1a425db2932a518a823f28
752
asm
Assembly
programs/oeis/053/A053191.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/053/A053191.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/053/A053191.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A053191: a(n) = n^2 * phi(n). ; 1,4,18,32,100,72,294,256,486,400,1210,576,2028,1176,1800,2048,4624,1944,6498,3200,5292,4840,11638,4608,12500,8112,13122,9408,23548,7200,28830,16384,21780,18496,29400,15552,49284,25992,36504,25600,67240,21168,77658,38720,48600,46552,101614,36864,100842,50000,83232,64896,146068,52488,121000,75264,116964,94192,201898,57600,223260,115320,142884,131072,202800,87120,296274,147968,209484,117600,352870,124416,383688,197136,225000,207936,355740,146016,486798,204800,354294,268960,564898,169344,462400,310632,423864,309760,697048,194400,596232,372416,518940,406456,649800,294912,903264,403368,588060,400000 mov $1,$0 add $0,1 pow $0,2 seq $1,10 ; Euler totient function phi(n): count numbers <= n and prime to n. mul $0,$1
83.555556
602
0.784574
b34608772cc87df2eb756b45e947269d840dd97d
51
asm
Assembly
Sem-4/COA LAB Programs/Lab4Obj1.asm
rituraj-iter/ASSIGNMENTS
f317a2990bac43202314320d6d97356498c44603
[ "MIT" ]
10
2021-04-24T11:46:48.000Z
2022-01-17T05:14:37.000Z
Sem-4/COA LAB Programs/Lab4Obj1.asm
rituraj-iter/ASSIGNMENTS
f317a2990bac43202314320d6d97356498c44603
[ "MIT" ]
2
2021-06-28T11:51:50.000Z
2021-11-01T08:21:53.000Z
Sem-4/COA LAB Programs/Lab4Obj1.asm
rituraj-iter/ASSIGNMENTS
f317a2990bac43202314320d6d97356498c44603
[ "MIT" ]
16
2021-04-24T11:46:58.000Z
2022-03-02T05:08:19.000Z
org 100h mov ax, 20h mov cl, 03h sal ax, cl hlt
10.2
12
0.647059
ef35c86ab655c6702c05f2b091088a5b1743a6ab
14,544
asm
Assembly
smsq/sbas/parse.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
smsq/sbas/parse.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
smsq/sbas/parse.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
; SBAS_PARSE - SuperBASIC Parser  1992 Tony Tebby section sbas xdef sb_palin ; parse a line xdef sb_paini ; init xdef sb_parse ; parse xdef sb_strip ; strip spare spaces xdef sb_paerr ; error! xdef sb_parcl xref sb_graph ; syntax graphs xref sb_pastr ; parse string item xref sb_pakey ; parse keywords xref sb_panky ; parse non-keywords xref sb_lnam2 ; locate name xref sb_gnam2 ; global name xref sb_anam2 ; add name xref sbp_nchr xref sbp_intb xref sb_rescl ; reserve command line xref sb_rbk20 ; reserve backtrack stack xref sb_rgr04 ; reserve graph stack xref sb_rar32 ; resrve RI stack xref cr_deciw xref cr_decfp xref cr_hexil xref cr_binil xref qa_lfloat include 'dev8_keys_sbasic' include 'dev8_keys_err' include 'dev8_keys_err4' include 'dev8_smsq_sbas_parser_keys' include 'dev8_keys_k' include 'dev8_mac_assert' ;+++ ; Control routine for parsing ;--- sb_palin bsr.s sb_paini ; initialise lea sb_graph,a2 bsr.l sb_parsln ; parse beq.s sb_strip ; strip spaces rts ;+++ ; Initialise parser data area ;--- sb_paini ;sbtrns is only required if sb vars are above data areas ;sbtrns tas sb_grphb(a6) ; Turbo - this unturbos the graph stack move.l sb_backb(a6),sb_backp(a6) ; clear backtrack stack move.l sb_grphb(a6),sb_grphp(a6) ; clear temporary graph stack move.l sb_cmdlb(a6),sb_cmdlp(a6) ; clear command line rts ;+++ ; Strip spare spaces ; ; a0/a2 scratch ; status arbitrary ; ;--- sb_strip move.l sb_cmdlb(a6),a0 move.l sb_cmdlp(a6),a2 cmp.l a2,a0 ; any tokens at all? bge.s sbst_exit ; ... no cmp.b #tkb.spce,(a6,a0.l) ; starts with spaces? bne.s sbst_cke ; ... no subq.l #2,a2 ; ... yes, strip them sbst_clp move.w 2(a6,a0.l),(a6,a0.l) addq.l #2,a0 cmp.l a2,a0 blt.s sbst_clp sbst_cke ; no check at end, 'cos parser has already stripped them sbst_sp move.l a2,sb_cmdlp(a6) ; reset end pointer sbst_exit moveq #0,d0 rts ;+++ ; Parser error processing: creates MISTake line ; d1/d2/d3/d4/d5/a0/a1/a2/a3 (at least) smashed ; returns 0 (MISTake line successfully created) ; err.isyn (too garbled) ;--- sb_paerr moveq #8,d1 ; enough room for odd tokens add.l sb_buffp(a6),d1 sub.l sb_buffb(a6),d1 ; and the line bsr.l sbp_rscl move.l sb_cmdlb(a6),a1 ; command line cmp.w #tkw.lno,(a6,a1.l) ; line number? bne.s sbpe_err ; ... yes addq.l #4,a1 move.l sb_buffb(a6),a0 ; use cr_deciw to set / skip line no jsr cr_deciw move.l #tkw.mist<<16+tkw.text,2(a6,a1.l) ; add MISTAKE, TEXT addq.l #8,a1 ; skip to where text will be cmp.b #' ',(a6,a0.l) ; starts with space? bne.s sbpe_sln addq.l #1,a0 ; ... yes, skip it sbpe_sln move.l sb_buffp(a6),d0 sub.l a0,d0 ; length of text (including newline) subq.w #1,d0 move.w d0,-2(a6,a1.l) ; set length bra.s sbpe_cte sbpe_ctxt move.b (a6,a0.l),(a6,a1.l) ; copy text addq.l #1,a0 addq.l #1,a1 sbpe_cte dbra d0,sbpe_ctxt move.l a1,d0 and.w #1,d0 add.w d0,a1 ; round up move.w #tkw.eol,(a6,a1.l) addq.l #2,a1 move.l a1,sb_cmdlp(a6) ; set token list end moveq #0,d0 rts sbpe_err moveq #err.isyn,d0 rts page ;+++ ; Parser ; ; d0 r error code ; d1-d3 scratch ; a0 r pointer to furthest along buffer ; a1 scratch ; a2 c s pointer to parser graphs ; a3 scratch ; a4 scratch ; ; status return 0 OK ; err.isyn syntax error ; -ve specific errors ; ;--- sb_parse clr.w sb_line(a6) ; do not add line number sb_parsln clr.l sb_pcern(a6) ; no error yet clr.l sb_pcerp(a6) jsr sb_rar32 ; ensure room for FP conversion move.l sb_buffb(a6),a0 ; pointer to line to parse move.l sb_cmdlb(a6),a4 ; pointer to where to put it all clr.l (a6,a4.l) ; blat it sf sb_cmdst(a6) ; no command line statement nr now jsr sb_rgr04 ; reserve null graph entry move.l sb_grphb(a6),a1 sub.w #sgr.len,a1 clr.l sgr_btrk(a6,a1.l) move.l a1,sb_grphp(a6) moveq #4,d1 ; reserve enough for line number bsr.l sbp_rscl clr.l d7 subq.l #1,a0 moveq #' ',d0 sbp_stsp addq.l #1,a0 cmp.b (a6,a0.l),d0 ; skip space beq.s sbp_stsp move.l a0,a1 moveq #k.nl,d0 sbp_lnl addq.l #1,a1 cmp.b -1(a6,a1.l),d0 ; look for NL at end bne.s sbp_lnl move.l #' ',d0 sbp_espc subq.l #1,a1 cmp.b -1(a6,a1.l),d0 ; skip end spaces beq.s sbp_espc addq.l #1,a1 move.b #k.nl,-1(a6,a1.l) ; genuine end move.l a1,sb_buffp(a6) ; truly stripped sbp_lnum move.l a0,d2 ; buffer pointer lea 4(a4),a1 ; where to put line number jsr cr_deciw ; convert beq.s sbp_line ; ... there is a line number cmp.l a0,d2 ; error in number or no number? bne.l sbp_elno ; ... error move.w sb_line(a6),d1 ; add line number? beq.s sbp_stloop ; ... no move.w d1,2(a6,a4.l) sbp_line move.w d1,sb_line(a6) ; 1-32767 ble.l sbp_elno ; ... no, oops move.w #tkw.lno,(a6,a4.l) ; put token in addq.l #4,a4 cmp.b #' ',(a6,a0.l) ; space after line number bne.s sbp_stloop addq.l #1,a0 sbp_stloop moveq #0,d2 ; no item decoded yet sbp_loop tst.l d2 ; item already decoded? bne.l sbp_ckit ; ... yes, just check it sbp_stlp moveq #8,d1 ; reserve enough fixed length tokens bsr.l sbp_rscl ; first check if it is spaces sbp_cksp moveq #0,d1 move.b (a6,a0.l),d1 ; start of next item cmp.b #' ',d1 ; is it spaces? bne.s sbp_look moveq #$7d,d0 sbp_cntsp addq.l #1,a0 cmp.b #' ',(a6,a0.l) ; another space? dbne d0,sbp_cntsp ; ... yes not.w d0 ; 1 space = ff82, $7f spaces = 0 add.w #tkb.spce<<8+$7f,d0 ; space token move.w d0,(a6,a4.l) ; set spaces token addq.w #2,a4 addq.b #1,d0 bmi.s sbp_cksp ; could be more spaces to come move.b (a6,a0.l),d1 ; start of next item sbp_look ; check if this is a special bit of code sbp_scod assert sbg.call,sbg.code,0 tst.w (a2) ; special code bgt.s sbp_cknm ; ... standard code blt.l sbp_exgr ; ... an exit moveq #0,d0 bsr sbp_sbtr lea sbg_call(a2),a1 add.w (a1),a1 jsr (a1) ; ... call it beq.l sbp_ckit ; set item blt.l sbp_error ; error found addq.l #sbg.gent,a2 ; next bra.s sbp_scod ; try code again ; now we will see whether this is a keyword or name sbp_cknm lea sbp_nchr,a3 ; table of name characters tst.b (a3,d1.w) ; character type ble.s sbp_cknk ; not a letter, try non-keyword item move.l a0,a1 ; save start of keyword / name sbp_cknl addq.l #1,a0 move.b (a6,a0.l),d1 tst.b (a3,d1.w) ; another keyword / name character bne.s sbp_cknl assert k.dollar,k.percnt-1 sub.b #k.dollar,d1 blo.s sbp_stnl ; not a dollar subq.b #k.percnt-k.dollar,d1 bhi.s sbp_stnl addq.l #1,a0 ; include dollar or percent sbp_stnl move.l a0,d2 sub.l a1,d2 ; a1 points to chars / d2 is length jsr sb_pakey ; check keys (changes A3) beq.l sbp_ckit ; ok, done, check item permitted sbp_lname jsr sb_lnam2 ; find name given a1,d2 beq.s sbp_name jsr sb_gnam2 ; try global name given a1,d2 beq.s sbp_name jsr sb_anam2 ; add name given a1,d2 sbp_name move.w #tkw.name,(a6,a4.l) move.l a3,d0 sub.l sb_nmtbb(a6),d0 ; index name table lsr.l #3,d0 move.w d0,2(a6,a4.l) addq.l #4,a4 moveq #tki.name,d2 ; name item type bra.l sbp_ckit ; next check non-keyword items sbp_cknk jsr sb_panky beq.l sbp_ckit ; we are running out of possibilities - try string moveq #tki.quot,d2 cmp.b #tks.quot,d1 ; this type of string? beq.s sbp_str ; ... yes cmp.b #tks.apst,d1 ; or this? bne.s sbp_ckval ; ... no moveq #tki.apst,d2 sbp_str add.w #tkb.strg<<8,d1 jsr sb_pastr ; get string beq.s sbp_ckit bra.l sbp_error ; Floating point is all that there is left sbp_ckval move.l sb_arthp(a6),a1 cmp.b #'$',d1 ; hex? beq.s sbp_hex cmp.b #'%',d1 ; or binary? beq.s sbp_bin jsr cr_decfp ; check fp bne.l sbp_urec move.w #$f000,d2 bra.s sbp_setval sbp_hex addq.l #1,a0 ; skip $ move.l a0,d3 jsr cr_hexil ; convert from hex move.w #$e000,d2 bra.s sbp_float sbp_bin addq.l #1,a0 ; skip % move.l a0,d3 jsr cr_binil ; convert from binary move.w #$d000,d2 sbp_float cmp.l d3,a0 ; anything converted? beq.l sbp_urec ; ... no add.l a6,a1 jsr qa_lfloat ; float long int sub.l a6,a1 sbp_setval or.w (a6,a1.l),d2 move.w d2,(a6,a4.l) ; copy it with FP flag move.l 2(a6,a1.l),2(a6,a4.l) addq.l #6,a4 moveq #tki.val,d2 bra.s sbp_ckit sbp_goto addq.l #sbg_next,a2 ; next item add.w (a2),a2 bra.s sbp_rtry sbp_nopt addq.l #sbg.gent,a2 sbp_ckit sbp_rtry nop move.b (a2),d1 ; call, option or exit? blt.s sbp_exgr ; ... exit beq.l sbp_sgrp ; ... sub graph move.w sbg_mini(a2),d0 ; range beq.s sbp_goto ; ... none, goto cmp.b d0,d2 ; in max range bhi.s sbp_nopt ; ... no lsr.w #8,d0 cmp.b d0,d2 ; in min range? blo.s sbp_nopt ; ... no swap d2 clr.w d2 ; no substitute move.b sbg_subi(a2),d0 : (BYTE in WORD) add.b d0,d0 ; substitute? beq.s sbp_ckbt ; ... no move.w -2(a6,a4.l),d2 ; keep old tokens lea sbp_intb,a1 move.w (a1,d0.w),-2(a6,a4.l) ; substitute new token sbp_ckbt subq.b #sbg.nret,d1 ; was it nret? bne.s sbp_stbt move.l sb_grphp(a6),a1 move.l sgr_btrk(a6,a1.l),a1 add.l sb_backb(a6),a1 ; clear backtrack stack for this level move.l a1,sb_backp(a6) ; reset backtrack bra.s sbp_next ; save item position in buffer, graph and token list in back track stack sbp_stbt move.l d2,d0 sbp_stb0 bsr sbp_sbtr sbp_next moveq #0,d2 ; next item not decoded sbp_nxti addq.l #sbg_next,a2 ; next item add.w (a2),a2 tst.b (a2) bpl.l sbp_loop ; ... not exit sbp_exgr cmp.b #sbg.err,(a2) ; is it error? beq.s sbp_sete ; ... yes, set it move.l sb_grphp(a6),a1 addq.l #sgr.len,a1 move.l a1,sb_grphp(a6) cmp.l sb_grphb(a6),a1 ; end of outermost graph? bhs.l sbp_done ; ... yes move.l -sgr.len+sgr_btrk(a6,a1.l),a1 ; backtrack stack pointer add.l sb_backb(a6),a1 move.l sbk_grph(a6,a1.l),a2 ; just get graph add.w #sbk.len,a1 move.l a1,sb_backp(a6) ; reset backtrack bra.s sbp_nxti ; goto next sbp_sgrp ; sub graphs and code ends up here moveq #0,d0 move.b sbg_flag(a2),d0 beq.s sbp_stb0 ; was code, done it move.b d2,d0 swap d0 bsr.l sbp_sbtr ; save status for backtrack bsr.l sbp_rstg ; reserve room on t graph (sets a1) move.l sb_backp(a6),d0 ; stack backtrack stack pointer sub.l sb_backb(a6),d0 move.l d0,(a6,a1.l) addq.l #sbg_call,a2 ; call graph add.w (a2),a2 bra sbp_rtry sbp_sete move.b sbg_err(a2),d0 ; set error code ext.w d0 ext.l d0 bra.s sbp_error sbp_urec moveq #0,d0 ; do not understand this error sbp_error cmp.l sb_pcerp(a6),a0 ; this far along line blo.s sbp_back ; ... we've already been further bhi.s sbp_serr tst.l sb_pcern(a6) ; error already identified? bne.s sbp_back ; ... yes, keep current code sbp_serr move.l d0,sb_pcern(a6) ; this far move.l a0,sb_pcerp(a6) sbp_back move.l sb_backp(a6),a1 cmp.l sb_backb(a6),a1 bge.s sbp_gvup ; cannot backtrack further, give up movem.l (a6,a1.l),d2/a0/a2/a3/a4 ; backtrack add.l sb_buffb(a6),a0 add.l sb_grphb(a6),a3 add.l sb_cmdlb(a6),a4 move.l a3,sb_grphp(a6) ; including temporary graph add.w #sbk.len,a1 move.l a1,sb_backp(a6) tst.w d2 ; any saved token? beq.s sbp_bkit ; ... no move.w d2,(a6,a4.l) ; restore token sbp_bkit swap d2 bne sbp_nopt ; retry for another option addq.l #sbg.gent,a2 ; was code, move on and ... bra sbp_look ; ... look at item again sbp_gvup move.l sb_pcern(a6),d0 ; error number bne.s sbp_emes moveq #err.isyn,d0 bra.s sbp_exit sbp_elno move.l a0,sb_pcerp(a6) ; set error position moveq #sbe.lno,d0 sbp_emes add.w #err4.null,d0 ; standard error message sbp_exit tst.l d0 sbp_rts rts ; because of a nasty in SuperBASIC, we need to strip out spaces after keywords! sbp_done move.l sb_cmdlb(a6),a4 ; starting here add.l a6,a4 ; IMMOVEABLE move.l a4,a2 sqp_ntok moveq #$4f,d1 and.b (a2),d1 ; masked byte token move.w (a2)+,d0 move.w d0,(a4)+ ; copy token add.b d1,d1 ; byte doubled bvs.s sqp_float ; floating point move.w sqp_tab(pc,d1.w),d1 jmp sqp_tab(pc,d1.w) sqp_tab dc.w sqp_ntok-sqp_tab ; spaces dc.w sqp_key-sqp_tab ; keys dc.w sqp_ntok-sqp_tab dc.w sqp_ntok-sqp_tab dc.w sqp_sym-sqp_tab ; symbols dc.w sqp_ntok-sqp_tab ; ops dc.w sqp_ntok-sqp_tab ; monops dc.w sqp_ntok-sqp_tab dc.w sqp_name-sqp_tab ; name dc.w sqp_ntok-sqp_tab dc.w sqp_ntok-sqp_tab dc.w sqp_strg-sqp_tab ; string dc.w sqp_text-sqp_tab ; text dc.w sqp_lno-sqp_tab ; line number dc.w sqp_ntok-sqp_tab ; separator dc.w sqp_ntok-sqp_tab sqp_float move.l (a2)+,(a4)+ ; copy the rest bra sqp_ntok sqp_key cmp.b #tkb.spce,(a2) ; spaces? bne.s sqp_ntok ; no, very unusual, but ok move.w (a2)+,d0 ; space token subq.b #1,d0 ; one fewer spaces beq.s sqp_ntok ; ... none left move.w d0,(a4)+ bra.s sqp_ntok sqp_name move.w (a2)+,(a4)+ ; name number bra sqp_ntok sqp_strg sqp_text sqp_ctxt move.w (a2)+,d1 ; length move.w d1,(a4)+ beq sqp_ntok sqp_txlp move.w (a2)+,(a4)+ subq.w #2,d1 bgt.s sqp_txlp bra sqp_ntok sqp_lno move.w (a2)+,(a4)+ bra sqp_ntok sqp_sym cmp.w #tkw.eol,d0 ; end of line? bne.s sqp_ntok ; ... no sub.l a6,a4 move.l a4,sb_cmdlp(a6) ; set end pointer moveq #0,d0 rts sbp_sbtr move.l sb_backp(a6),a1 ; save backtrack info sub.w #sbk.len,a1 cmp.l sb_backl(a6),a1 ; enough room? blt.s sbp_rstr movem.l a0/a4,-(sp) move.l sb_grphp(a6),a3 sub.l sb_buffb(a6),a0 sub.l sb_grphb(a6),a3 sub.l sb_cmdlb(a6),a4 movem.l d0/a0/a2/a3/a4,(a6,a1.l) move.l a1,sb_backp(a6) movem.l (sp)+,a0/a4 rts sbp_rstr movem.l d0/d2,-(sp) jsr sb_rbk20 ; reserve backtrack movem.l (sp)+,d0/d2 bra.s sbp_sbtr ; and try again sbp_rstg move.l sb_grphp(a6),a1 cmp.l sb_grphl(a6),a1 bgt.s sbp_stg move.l d2,-(sp) jsr sb_rgr04 ; reserve graph stack move.l (sp)+,d2 move.l sb_grphp(a6),a1 sbp_stg subq.l #sgr.len,a1 ; set new graph stack pointer move.l a1,sb_grphp(a6) rts ;+++ ; reserve (parsed) command line for parser ; adjusts a0 (text) and a4 (tokens) if moved ;--- sb_parcl sbp_rscl move.l sb_cmdlt(a6),d0 ; top of area sub.l a4,d0 ; amount spare cmp.l d0,d1 ; enough? ble.s sbp_rrts ; ... yes move.l a4,sb_cmdlp(a6) ; set command line running pointer sub.l sb_buffb(a6),a0 move.l d2,-(sp) jsr sb_rescl ; before reserving space move.l (sp)+,d2 add.l sb_buffb(a6),a0 ; line may move move.l sb_cmdlp(a6),a4 ; reset command line running pointer sbp_rrts rts end
21.707463
79
0.66646
d5f3834ad4431b149c6eaa84bc2c409302beb777
1,103
asm
Assembly
programs/oeis/274/A274406.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/274/A274406.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/274/A274406.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A274406: Numbers m such that 9 divides m*(m + 1). ; 0,8,9,17,18,26,27,35,36,44,45,53,54,62,63,71,72,80,81,89,90,98,99,107,108,116,117,125,126,134,135,143,144,152,153,161,162,170,171,179,180,188,189,197,198,206,207,215,216,224,225,233,234,242,243,251,252,260,261,269,270,278,279,287,288,296,297,305,306,314,315,323,324,332,333,341,342,350,351,359,360,368,369,377,378,386,387,395,396,404,405,413,414,422,423,431,432,440,441,449,450,458,459,467,468,476,477,485,486,494,495,503,504,512,513,521,522,530,531,539,540,548,549,557,558,566,567,575,576,584,585,593,594,602,603,611,612,620,621,629,630,638,639,647,648,656,657,665,666,674,675,683,684,692,693,701,702,710,711,719,720,728,729,737,738,746,747,755,756,764,765,773,774,782,783,791,792,800,801,809,810,818,819,827,828,836,837,845,846,854,855,863,864,872,873,881,882,890,891,899,900,908,909,917,918,926,927,935,936,944,945,953,954,962,963,971,972,980,981,989,990,998,999,1007,1008,1016,1017,1025,1026,1034,1035,1043,1044,1052,1053,1061,1062,1070,1071,1079,1080,1088,1089,1097,1098,1106,1107,1115,1116,1124 mov $1,$0 add $1,1 div $1,2 mul $1,7 add $1,$0
122.555556
1,002
0.734361
ac3622069895fd5bd1b0c5b3d09c136eb82561e7
837
asm
Assembly
programs/oeis/055/A055364.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/055/A055364.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/055/A055364.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A055364: Number of asymmetric mobiles (circular rooted trees) with n nodes and 3 leaves. ; 1,4,10,22,42,73,119,184,272,389,540,731,969,1261,1614,2037,2538,3126,3811,4603,5512,6550,7728,9058,10553,12226,14090,16160,18450,20975,23751,26794,30120,33747,37692,41973,46609,51619,57022,62839,69090,75796,82979 mov $15,$0 mov $17,$0 add $17,1 lpb $17 clr $0,15 mov $0,$15 sub $17,1 sub $0,$17 mov $12,$0 mov $14,$0 add $14,1 lpb $14 clr $0,12 mov $0,$12 sub $14,1 sub $0,$14 mov $9,$0 mov $11,$0 add $11,1 lpb $11 mov $0,$9 sub $11,1 sub $0,$11 mov $2,$0 gcd $2,3 add $2,$0 mov $3,$2 div $3,2 mov $1,$3 mul $1,3 sub $1,3 div $1,3 add $1,1 add $10,$1 lpe add $13,$10 lpe add $16,$13 lpe mov $1,$16
19.022727
214
0.548387
93cb5c2d8ae5ebe0d37619917d4c4d5fc8fb32a3
1,020
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_9_497.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_9_497.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_9_497.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r8 push %rbp push %rcx push %rdx // Load mov $0x2df93e000000087b, %r10 clflush (%r10) nop add $21755, %rdx mov (%r10), %rcx nop nop nop nop nop dec %r10 // Faulty Load lea addresses_normal+0x1d882, %rcx clflush (%rcx) nop nop nop nop nop cmp $61291, %rdx movaps (%rcx), %xmm5 vpextrq $0, %xmm5, %r8 lea oracles, %rbp and $0xff, %r8 shlq $12, %r8 mov (%rbp,%r8,1), %r8 pop %rdx pop %rcx pop %rbp pop %r8 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_NC', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': True, 'AVXalign': True, 'size': 16, 'type': 'addresses_normal', 'congruent': 0}} <gen_prepare_buffer> {'00': 9} 00 00 00 00 00 00 00 00 00 */
16.721311
126
0.647059
00b9bf61b427444f22f6c0554c0277eedbf9f2ab
605
asm
Assembly
oeis/328/A328621.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/328/A328621.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/328/A328621.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A328621: Multiplicative with a(p^e) = p^(2e mod p). ; Submitted by Jon Maiga ; 1,1,9,1,25,9,49,1,3,25,121,9,169,49,225,1,289,3,361,25,441,121,529,9,625,169,1,49,841,225,961,1,1089,289,1225,3,1369,361,1521,25,1681,441,1849,121,75,529,2209,9,2401,625,2601,169,2809,1,3025,49,3249,841,3481,225,3721,961,147,1,4225,1089,4489,289,4761,1225,5041,3,5329,1369,5625,361,5929,1521,6241,25,9,1681,6889,441,7225,1849,7569,121,7921,75,8281,529,8649,2209,9025,9,9409,2401,363,625 add $0,1 pow $0,2 sub $0,1 mul $0,4 add $0,3 mov $1,$0 seq $1,327939 ; Multiplicative with a(p^e) = p^(e-(e mod p)). div $0,$1 add $0,1
43.214286
388
0.692562
63c4375ef63313b1328d98cc8362d4eb674af636
1,672
asm
Assembly
programs/oeis/129/A129143.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/129/A129143.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/129/A129143.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A129143: Start with the empty sequence and append in step k the consecutive numbers 2^(k-1) to 2^(k-1)+k-1. ; 1,2,3,4,5,6,8,9,10,11,16,17,18,19,20,32,33,34,35,36,37,64,65,66,67,68,69,70,128,129,130,131,132,133,134,135,256,257,258,259,260,261,262,263,264,512,513,514,515,516,517,518,519,520,521,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,16384,16385,16386,16387,16388,16389,16390,16391,16392,16393,16394,16395,16396,16397,16398,32768,32769,32770,32771,32772,32773,32774,32775,32776,32777,32778,32779,32780,32781,32782,32783,65536,65537,65538,65539,65540,65541,65542,65543,65544,65545,65546,65547,65548,65549,65550,65551,65552,131072,131073,131074,131075,131076,131077,131078,131079,131080,131081,131082,131083,131084,131085,131086,131087,131088,131089,262144,262145,262146,262147,262148,262149,262150,262151,262152,262153,262154,262155,262156,262157,262158,262159,262160,262161,262162,524288,524289,524290,524291,524292,524293,524294,524295,524296,524297,524298,524299,524300,524301,524302,524303,524304,524305,524306,524307,1048576,1048577,1048578,1048579,1048580,1048581,1048582,1048583,1048584,1048585,1048586,1048587,1048588,1048589,1048590,1048591,1048592,1048593,1048594,1048595,1048596,2097152,2097153,2097154,2097155,2097156,2097157,2097158,2097159,2097160,2097161,2097162,2097163,2097164,2097165,2097166,2097167,2097168,2097169,2097170 mov $1,3 mov $2,1 lpb $0,1 sub $0,1 mov $1,$0 add $1,3 mul $2,2 add $3,1 trn $0,$3 lpe add $1,$2 sub $1,3
104.5
1,442
0.794258
2b13dcfbd132c028b4f4bc1c4eaf2c6179a1eb59
869
asm
Assembly
cwiczenia3/kwadrat.asm
adamczykpiotr/AGH_WIMiIP_Architektury_Komputerow
0b1d41c6903632dd9ab2b7d624288eb2f5f80240
[ "MIT" ]
1
2019-02-28T15:40:21.000Z
2019-02-28T15:40:21.000Z
cwiczenia3/kwadrat.asm
adamczykpiotr/AGH_WIMiIP_Architektury_Komputerow
0b1d41c6903632dd9ab2b7d624288eb2f5f80240
[ "MIT" ]
null
null
null
cwiczenia3/kwadrat.asm
adamczykpiotr/AGH_WIMiIP_Architektury_Komputerow
0b1d41c6903632dd9ab2b7d624288eb2f5f80240
[ "MIT" ]
1
2019-03-03T17:52:08.000Z
2019-03-03T17:52:08.000Z
extern printf extern scanf section .data wiersz dd 0 kolumna dd 0 format db "%d",0 napis db "Podaj rozmiar kwadratu: ",0 znak db "* ",0 endl db 10,0 section .text global main main: xor rax, rax mov rdi, napis call printf xor rax, rax mov rdi, format mov rsi, wiersz call scanf mov ebx, [wiersz] mov [kolumna], ebx _petla_pozioma: xor rax, rax mov rdi, znak call printf dec dword [wiersz] cmp dword [wiersz], 0 ja _petla_pozioma xor rax, rax mov rdi, endl call printf ;petla pionowa mov [wiersz], ebx dec dword [kolumna] cmp dword [kolumna] ,0 ja _petla_pozioma _koniec: xor rax, rax mov rdi, endl call printf mov rax, 1 mov rbx, 0 int 80h
15.517857
44
0.544304
5d2bd2a3b9d673da8024f81947f89de55da56894
10,323
a51
Assembly
Timers.a51
Chapmip/8051-assembly-c-i2c-timers-serial
5799fac37069e7bdeab2ba18dcafa9c4c68b9d61
[ "MIT" ]
null
null
null
Timers.a51
Chapmip/8051-assembly-c-i2c-timers-serial
5799fac37069e7bdeab2ba18dcafa9c4c68b9d61
[ "MIT" ]
null
null
null
Timers.a51
Chapmip/8051-assembly-c-i2c-timers-serial
5799fac37069e7bdeab2ba18dcafa9c4c68b9d61
[ "MIT" ]
null
null
null
NAME TIMERS $INCLUDE (PORTS.INC) ; ; Timer 2 Based Routines for 87C52, AT89S53 and AT89S8253 ; ======================================================= ; ; Copyright (c) 2002-2020, Ian Chapman (Chapmip Consultancy) ; ; This software is licensed under the MIT license (see LICENSE.TXT) ; ; Harnesses Timer 2 to provide: ; ; 1. (Optional) Enabling and regular feeding of built-in watchdog ; on 89S53 and 89S8253 variants ; 2. Main 16-bit timeout timer clocked at Timer 2 reload rate ; 3. Auxiliary 16-bit timeout timer clocked at Timer 2 reload rate ; 4. I2C bus inactivity timeout timer (for I2C_51.A51 module) ; 5. Control of status LED L1 (on, off or flashing at specified rate) ; ; See README.md for information on typical usage ; ; Stack usage: ; ; 5 bytes in background (low priority interrupt) ; 2 bytes in foreground (any function call) ; ; -- CONSTANTS -- ; Segment definitions ?DT?TIMERS SEGMENT DATA ?BI?TIMERS SEGMENT BIT ?PR?TIMERS SEGMENT CODE ; Switches for device-specific watchdog code generation WD_89S53 EQU 0 ; Set non-zero for 89S53 watchdog code WD_89S8253 EQU 0 ; Set non-zero for 89S8253 watchdog code ; 8052 register definitions ; ** REMOVE THESE IF ALREADY DEFINED BY ASSEMBLER ** T2CON EQU 0C8H ; Timer 2 control register RCAP2L EQU 0CAH ; Timer 2 reload low byte RCAP2H EQU 0CBH ; Timer 2 reload high byte TL2 EQU 0CCH ; Timer 2 low byte TH2 EQU 0CDH ; Timer 2 high byte TF2 EQU T2CON.7 ; Timer 2 overflow flag EXF2 EQU T2CON.6 ; Timer 2 external flag RCLK EQU T2CON.5 ; Timer 2 receive clock flag TCLK EQU T2CON.4 ; Timer 2 transmit clock flag EXEN2 EQU T2CON.3 ; Timer 2 external enable flag TR2 EQU T2CON.2 ; Timer 2 run flag CT2 EQU T2CON.1 ; Timer 2 timer/counter select CPRL2 EQU T2CON.0 ; Timer 2 capture/reload flag ET2 EQU IE.5 ; Timer 2 interrupt enable PT2 EQU IP.5 ; Timer 2 interrupt priority ; 8052 register constants T2_MODE EQU 00000000B ; 16-bit auto-reload IF WD_89S53 ; AT89S53 specific SFR and constants WCON EQU 096H ; Watchdog control register WDOG_MODE EQU 11100011B ; 2.048 second timeout WDOG_RESET_MSK EQU 00000010B ; Watchdog reset bit mask ENDIF IF WD_89S8253 ; AT89S8253 specific SFR and constants WDTCON EQU 0A7H ; Watchdog timer control register WDOG_MODE EQU 11101011B ; 2.048 second timeout WDOG_RESET_MSK EQU 00000010B ; Watchdog reset bit mask ENDIF ; -- VARIABLES -- RSEG ?DT?TIMERS MAIN_TOUT_HI: DS 1 ; Main event timer MAIN_TOUT_LO: DS 1 ; <- AUX_TOUT_HI: DS 1 ; Auxiliary event timer AUX_TOUT_LO: DS 1 ; <- I2C_TIMER: DS 1 ; I2C watchdog timer FLASH_CTR: DS 1 ; LED L1 flash tick counter FLASH_REL: DS 1 ; LED L1 flash tick reload value RSEG ?BI?TIMERS MAIN_TIMEOUT: DBIT 1 ; Main event timeout flag AUX_TIMEOUT: DBIT 1 ; Auxiliary event timeout flag I2C_TOUT: DBIT 1 ; I2C timeout flag FLASH_ENABLE: DBIT 1 ; Enables LED L1 flashing when set NOT_L1_STATE: DBIT 1 ; Current LED L1 state (active-low) ; Externally visible variables PUBLIC MAIN_TIMEOUT ; For C code main routines PUBLIC AUX_TIMEOUT ; <- PUBLIC I2C_TOUT ; For I2C assembly routines ; ; Timer 2 Interrupt Routine ; ------------------------- ; ; Purpose: Performs various periodic tasks ; ; Mechanism: 1. Resets AT89S53 watchdog timer ; 2. Updates event timers (if running) ; 3. Counts down I2C watchdog timer (if running) ; 4. Flashes LED at specified rate if flashing is enabled ; ; Run Time: 52 cycles MAX, 33 cycles TYP (21.5 us @ 18.432 MHz) ; Latency: Equal to run time (low priority interrupt) ; ; Destroys: None (!) ; CSEG AT 002BH ; (2) Interrupt "LCALL" LJMP T2_INT ; (2) Jump to main routine RSEG ?PR?TIMERS USING 0 T2_INT: PUSH PSW ; (2) Save vitals PUSH ACC ; (2) <- PUSH AR0 ; (2) <- ; CLR TF2 ; (1) Clear interrupt flag ; CLR N_TMR_ISR ; (1) Assert diagnostic output ; IF WD_89S53 ORL WCON,#WDOG_RESET_MSK ; (2) Reset watchdog timer ENDIF IF WD_89S8253 ORL WDTCON,#WDOG_RESET_MSK ; (2) Reset watchdog timer ENDIF ; T2_MTIM: JB MAIN_TIMEOUT,T2_ATIM ; (2) Skip if timer expired DJNZ MAIN_TOUT_LO,T2_ATIM ; (2) Decrement timer .. DJNZ MAIN_TOUT_HI,T2_ATIM ; (2) .. as 16 bit value ; SETB MAIN_TIMEOUT ; (1) Indicate timeout ; T2_ATIM: JB AUX_TIMEOUT,T2_I2C ; (2) Skip if timer expired DJNZ AUX_TOUT_LO,T2_I2C ; (2) Decrement timer .. DJNZ AUX_TOUT_HI,T2_I2C ; (2) .. as 16 bit value ; SETB AUX_TIMEOUT ; (1) Indicate timeout ; T2_I2C: JB I2C_TOUT,T2_LED ; (2) Skip if timer expired DJNZ I2C_TIMER,T2_LED ; (2) Decrement timer ; SETB I2C_TOUT ; (1) Indicate timeout ; T2_LED: JNB FLASH_ENABLE,T2_DONE ; (2) Skip if not flashing DJNZ FLASH_CTR,T2_DONE ; (2) Count down to zero ; MOV FLASH_CTR,FLASH_REL ; (2) Re-load flash counter ; CPL NOT_L1_STATE ; (1) Flip stored LED L1 state MOV C,NOT_L1_STATE ; (1) Copy stored state .. MOV N_LED_L1,C ; (2) .. to LED L1 output ; T2_DONE: SETB N_TMR_ISR ; (1) Release diagnostic output ; POP AR0 ; (2) Restore vitals POP ACC ; (2) <- POP PSW ; (2) <- ; RETI ; (2) All done ; ; Initialise Timers ; ----------------- ; ; Prototype: void init_timers(word period); ; ; Purpose: Initialise Timer 2 and variables ; Also enables AT89S53 watchdog timer ; ; Mechanism: Brute-force initialisation ; ; Run Time: 31 cycles always ; Latency: 26 cycles always ; PUBLIC _INIT_TIMERS RSEG ?PR?TIMERS _INIT_TIMERS: ; (2) LCALL _INIT_TIMERS ; CLR ET2 ; (1) Stop timer + interrupt CLR TR2 ; (1) <- ; MOV T2CON,#T2_MODE ; (2) Set auto-reload mode CLR PT2 ; (1) Low priority interrupt ; CLR A ; (1) Set up timer + reload CLR C ; (1) <- SUBB A,R7 ; (1) <- MOV TL2,A ; (1) <- MOV RCAP2L,A ; (1) <- CLR A ; (1) <- SUBB A,R6 ; (1) <- MOV TH2,A ; (1) <- MOV RCAP2H,A ; (1) <- ; SETB TR2 ; (1) Start Timer 2 running ; SETB MAIN_TIMEOUT ; (1) Assume timeout initially SETB AUX_TIMEOUT ; (1) <- SETB I2C_TOUT ; (1) <- ; CLR FLASH_ENABLE ; (1) Disable flashing of LED L1 SETB NOT_L1_STATE ; (1) LED L1 is switched off SETB N_LED_L1 ; (1) Reflect on LED L1 output ; CLR A ; (1) Zero flash values MOV FLASH_CTR,A ; (1) <- MOV FLASH_REL,A ; (1) <- ; IF WD_89S53 MOV WCON,#WDOG_MODE ; (2) Enable watchdog timer ENDIF IF WD_89S8253 MOV WDTCON,#WDOG_MODE ; (2) Enable watchdog timer ENDIF ; SETB ET2 ; (1) Enable Timer 2 ints ; RET ; (2) All done ; ; Set main timeout timer ; --------------------- ; ; Prototype: void set_main_timeout(word ticks); ; ; Purpose: Set the main timeout timer to number of Timer 2 periods ; ("ticks" - 16 bit value) and start it running ; ; Mechanism: 1. Stop timeout timer ; 2. Adjust count bytes to base 1 (0 == 256) ; 3. Load timeout timer with count ; 4. Start timeout timer ; ; Run Time: 12 cycles always ; Latency: None ; ; Assumptions: Timer 2 interrupts are enabled ; PUBLIC _SET_MAIN_TIMEOUT RSEG ?PR?TIMERS _SET_MAIN_TIMEOUT: ; (2) LCALL _SET_MAIN_TIMEOUT ; SETB MAIN_TIMEOUT ; (1) Stop timeout timer ; INC R6 ; (1) Adjust count bytes INC R7 ; (1) <- ; MOV MAIN_TOUT_HI,R6 ; (2) Load timeout timer MOV MAIN_TOUT_LO,R7 ; (2) <- ; CLR MAIN_TIMEOUT ; (1) Start timeout timer ; RET ; (2) All done ; ; Set auxiliary timeout timer ; --------------------------- ; ; Prototype: void set_aux_timeout(word ticks); ; ; Purpose: Set the auxiliary timeout timer to number of Timer 2 periods ; ("ticks" - 16 bit value) and start it running ; ; Mechanism: 1. Stop timeout timer ; 2. Adjust count bytes to base 1 (0 == 256) ; 3. Load timeout timer with count ; 4. Start timeout timer ; ; Run Time: 12 cycles always ; Latency: None ; ; Assumptions: Timer 2 interrupts are enabled ; PUBLIC _SET_AUX_TIMEOUT RSEG ?PR?TIMERS _SET_AUX_TIMEOUT: ; (2) LCALL _SET_AUX_TIMEOUT ; SETB AUX_TIMEOUT ; (1) Stop timeout timer ; INC R6 ; (1) Adjust count bytes INC R7 ; (1) <- ; MOV AUX_TOUT_HI,R6 ; (2) Load timeout timer MOV AUX_TOUT_LO,R7 ; (2) <- ; CLR AUX_TIMEOUT ; (1) Start timeout timer ; RET ; (2) All done ; ; Set I2C bus watchdog timer ; -------------------------- ; ; Prototype: void set_i2c_watchdog(void); ; ; Purpose: Set the I2C watchdog timer to 256 * Timer 2 periods ; and start it running ; ; Mechanism: 1. Stop watchdog timer ; 2. Load watchdog timer with count ; 3. Start watchdog timer ; ; Run Time: 8 cycles always ; Latency: None ; ; Assumptions: Timer 2 interrupts are enabled ; PUBLIC SET_I2C_WATCHDOG RSEG ?PR?TIMERS SET_I2C_WATCHDOG: ; (2) LCALL SET_I2C_WATCHDOG ; SETB I2C_TOUT ; (1) Stop watchdog timer MOV I2C_TIMER,#0 ; (2) Load timer with 256 CLR I2C_TOUT ; (1) Start watchdog timer RET ; (2) All done ; ; Set LED L1 state ; ---------------- ; ; Prototypes: void set_L1_on(void); ; void set_L1_off(void); ; void set_L1_flash(byte period); ; ; Purpose: Sets LED L1 output to be continuously on or off, ; or to flash with the specified period ; ; Mechanism: Brute-force initialisation ; ; Run Time: 7 cycles always (except set_L1_flash() - 10 cycles) ; Latency: None ; PUBLIC SET_L1_ON PUBLIC SET_L1_OFF PUBLIC _SET_L1_FLASH RSEG ?PR?TIMERS SET_L1_ON: ; (2) LCALL SET_L1_ON CLR FLASH_ENABLE ; (1) Disable flashing CLR NOT_L1_STATE ; (1) LED L1 is switched on CLR N_LED_L1 ; (1) Reflect on LED L1 output RET ; (2) Done SET_L1_OFF: ; (2) LCALL SET_L1_OFF CLR FLASH_ENABLE ; (1) Disable flashing SETB NOT_L1_STATE ; (1) LED L1 is switched off SETB N_LED_L1 ; (1) Reflect on LED L1 output RET ; (2) Done _SET_L1_FLASH: ; (2) LCALL _SET_L1_FLASH CLR FLASH_ENABLE ; (1) Suspend flashing MOV FLASH_REL,R7 ; (2) Store flashing period MOV FLASH_CTR,#1 ; (2) Force change next int SETB FLASH_ENABLE ; (1) Enable flashing RET ; (2) Done END
24.696172
72
0.642352
a2f3fe028797db9eae6d6a570244f87a09136082
395
asm
Assembly
programs/oeis/229/A229232.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/229/A229232.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/229/A229232.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A229232: Number of undirected circular permutations pi(1), ..., pi(n) of 1, ..., n with the n numbers pi(1)*pi(2)-1, pi(2)*pi(3)-1, ..., pi(n-1)*pi(n)-1, pi(n)*pi(1)-1 all prime. ; 0,0,0,1,0,2,1,2,2,8 lpb $0 mov $2,$0 add $0,11 cmp $3,0 add $1,$3 div $2,$1 mov $1,$0 div $0,10 mul $0,2 dif $2,2 sub $2,$0 lpe lpb $2 mod $2,1 add $2,2 lpe mov $0,$2 add $0,10 mod $0,10
17.173913
180
0.531646
753b3f49aac8cf76ceee4ccd3cafa3383673dfd1
30,873
asm
Assembly
Library/Kernel/Graphics/graphicsRegionRaster.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Kernel/Graphics/graphicsRegionRaster.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Kernel/Graphics/graphicsRegionRaster.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: KLib/Graphics/RegionPath FILE: graphicsRegionRaster.asm AUTHOR: Gene Anderson, Apr 2, 1990 ROUTINES: Name Description ---- ----------- INT RasterLine Scan convert a line into the region. INT RasterBezier Scan convert a Bezier curve into the region. INT SetPointInRegion Set a single on/off point in the region. INT FindRegionLine Find given line within region. INT FindSetRegionPoint Find given point on line, set on/off. INT RegionAddSpace Add space to region at given point. EC ECCheckOffset Check that offset is within region. REVISION HISTORY: Name Date Description ---- ---- ----------- Gene 4/ 2/90 Initial revision DESCRIPTION: Contains rasterization routines for regions/paths. $Id: graphicsRegionRaster.asm,v 1.1 97/04/05 01:12:44 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GraphicsRegionPaths segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RasterLine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Scan convert a line into the region. CALLED BY: NimbusLine PASS: (ax,bx) - endpoint 0 (Point) (cx,dx) - endpoint 1 (Point) es - seg addr of RegionPath RETURN: es - (new) seg addr of RegionPath DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: Because of the way the region code works, the line is always traversed in the y direction. This means that horizontal lines can/must be ignored. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/12/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RasterLine proc near uses di, si, bp, ds .enter ; if the line can be trivially rejected, do it. We can do this if ; both are above, or both below the window. cmp bx, es:[RP_y_min] ; if below, check both jl checkdxbelow cmp bx, es:[RP_y_max] ; if above, check other jle getDirection ; bx is above the window... cmp dx, es:[RP_y_max] ; check this one too. jle getDirection jmp done checkdxbelow: cmp dx, es:[RP_y_min] jge getDirection jmp done ; ; First find the direction of the line, for winding rule ; getDirection: mov di, RPD_DOWN ;assume line goes down cmp bx, dx ;y0<y1? jl flipDone ;yes, OK je done ;ignore horizontals mov di, RPD_UP ;it actually gos up xchg ax, cx xchg bx, dx ;swap ends flipDone: ; ; Determine the horizontal difference for each pixel change in Y ; mov si, dx ;si <- end y push bx ;save y0 push ax ;save x0 sub ax, cx ;cx <- d(x) sub bx, dx ;dx <- d(y) mov dx, ax clr ax ;bx.ax <- d(x) mov cx, ax ;dx.cx <- d(y) tst dx ;check divident for zero jz postDivide call GrSDivWWFixed ;dx.cx <- d(x)/d(y) postDivide: mov bp, dx mov ax, cx ;bp.ax <- d(x)/d(y) pop cx pop dx ;dx <- start y segmov ds, es ; ; Loop vertically until we're done with this line segment ; mov bx, di ;bx <- RegionPointDirection clr di xchg ax, di ;bp.di <- d(x)/d(y) ;cx.ax <- x position lineLoop: push ax, bx, cx, dx rndwwf cxax ;cx <- ROUND(cx.ax) call SetPointInRegion ;set on/off point (cx,dx) pop ax, bx, cx, dx addwwf cxax, bpdi ;next x position inc dx ;next y position cmp dx, si ;end of the line? jl lineLoop ;no, keep going done: .leave ret RasterLine endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RasterBezier %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Convert a bezier curve to a polyline. Output that polyline to either a scan-conversion routine (RasterLine), or a polyline routine (CurveToPolylineCB) CALLED BY: CurveToPolyline, GrRegionPathAddBezierAtCP PASS: ds:si - ptr to points p0-p3 (IntRegionBezier) and stack (grows downward to segment start) es - segment in which to store points. For region code, es:0 is a RegionPath structure. For curve code, es:0 is a CurvePolyline structure bp - offset to callback routine to call. Routine must be in the same segment as RasterBezier CALLBACK ROUTINE: PASS: (ax,bx) , (cx, dx) - endpoints of one line segment in the curve RETURN: nothing CAN DESTROY: ax, bx, cx, dx RETURN: es - (new) seg addr of RegionPath (or CurvePolyline) DESTROYED: ax, bx, cx, dx, di PSEUDO CODE/STRATEGY: This is the same algorithm the Nimbus stuff uses. It refers to SIGGRAPH 1986, Course Notes #4, pp 164-165. My addition is checking to see if the points are collinear and just drawing a line if they are. This is becomes effective as the curve flattens out, which happens more rapidly at larger pointsizes. See "An Introduction to Splines For Use In Computer Graphics & Geometric Modeling" (Bartels, Beatty, Barsky) for more about Bezier curves and about my optimization. (Jim has a copy) New End Condition (CB -- 3/16/92) Using ArcTangent (a single divide and a binary search on a 90-item table), determine if (P0-P3) and (P0-P1) are in the same direction, opposite of (P3-P2). If so, output P0-P3. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/12/90 Initial version CDB 2/4/92 changed to allow use by GrDrawSpline %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ diff macro dest, source local done sub dest, source jge done neg dest done: endm IRB_x0 equ <IRB_p0.IRP_x> IRB_y0 equ <IRB_p0.IRP_y> IRB_x1 equ <IRB_p1.IRP_x> IRB_y1 equ <IRB_p1.IRP_y> IRB_x2 equ <IRB_p2.IRP_x> IRB_y2 equ <IRB_p2.IRP_y> IRB_x3 equ <IRB_p3.IRP_x> IRB_y3 equ <IRB_p3.IRP_y> RBA_left equ <ds:[si]> RBA_right equ <ds:[si][(size IntRegionBezier)]> RBA_args equ <ds:[di]> RasterBezierFar proc far call RasterBezier ret RasterBezierFar endp RasterBezier proc near mov di, si ;di <- ptr to passed args ; check end conditions. ; If P1 is close to P0, or P2 is close to P3, then output this ; line. mov ax, RBA_args.IRB_x1.WBF_int diff ax, RBA_args.IRB_x0.WBF_int cmp ax, BEZIER_POINT_TOLERANCE jg notClose mov ax, RBA_args.IRB_y1.WBF_int diff ax, RBA_args.IRB_y0.WBF_int cmp ax, BEZIER_POINT_TOLERANCE jg notClose mov ax, RBA_args.IRB_x3.WBF_int diff ax, RBA_args.IRB_x2.WBF_int cmp ax, BEZIER_POINT_TOLERANCE jg notClose mov ax, RBA_args.IRB_y3.WBF_int diff ax, RBA_args.IRB_y2.WBF_int cmp ax, BEZIER_POINT_TOLERANCE jle drawSegment notClose: ; They're not close enough. ; See if P1 and P2 both lie on the line segment (P0-P3). push si lea si, RBA_args.IRB_p1 call PointOnLine? pop si jnc anotherLevel push si lea si, RBA_args.IRB_p2 call PointOnLine? pop si jnc anotherLevel ; ; Output P0-P3 ; ; ds:di = ptr to IntRegionBezier.IRB_p0 ; drawSegment: movwbf axcl, RBA_args.IRB_x0 rndwbf axcl movwbf bxcl, RBA_args.IRB_y0 rndwbf bxcl push ax movwbf cxal, RBA_args.IRB_x3 rndwbf cxal movwbf dxal, RBA_args.IRB_y3 rndwbf dxal pop ax call bp mov si, di ; nuke the scratch space ret anotherLevel: mov si, di ; nuke the scratch space ; ; We've got 4K or so of "stack" space. ; Make sure we don't overflow it. ; cmp si, (size IntRegionBezier)*2 jb drawSegment ;no, stop recursion ; ; Divide the curve at the midpoint and recurse. ; sub si, (size IntRegionBezier)*2 ;allocate args for next calls push si, di call DivideCurve ;divide x points jc checkValidity add si, offset IRP_y add di, offset IRP_y call DivideCurve ;divide y points checkValidity: pop si, di jc overflowCondition call RasterBezier ;recurse to the left add si, size IntRegionBezier call RasterBezier ;recurse to the right add si, size IntRegionBezier ret ; oops. overflowed out math. Just draw the thing. overflowCondition: add si, (size IntRegionBezier)*2 jmp drawSegment RasterBezier endp if 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetNextLine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the next 2 pairs of coordinates from the IntRegionBezier structure. Compare the pairs for equality CALLED BY: PASS: ds:di - pointer to two PointWBFixed structs RETURN: ax, bx - first point cx, dx - second point ZERO flag set if pairs are equal ds:di - pointer to next PointWBFixed DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 3/17/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetNextLine proc near .enter movwbf axcl, ds:[di].PWBF_x rndwbf axcl movwbf bxcl, ds:[di].PWBF_y rndwbf bxcl add di, size PointWBFixed push ax movwbf cxal, ds:[di].PWBF_x rndwbf cxal movwbf dxal, ds:[di].PWBF_y rndwbf dxal pop ax cmp ax, cx jne done cmp bx, dx done: .leave ret GetNextLine endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DivideCurve %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Do parametric subdivision for x or y. CALLED BY: RasterBezier PASS: ds:di - ptr to args (IntRegionBezier) + offset for x or y ds:si - ptr to two sets of points (IntRegionBezier) + offset RETURN: carry - set if error (coordinate calculation error) DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/15/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DivideCurve proc near uses bp .enter mov bl, RBA_args.IRB_x0.WBF_frac mov ax, RBA_args.IRB_x0.WBF_int ;ax.bl <- x0 mov RBA_left.IRB_x0.WBF_frac, bl mov RBA_left.IRB_x0.WBF_int, ax ;pass x0 mov dl, RBA_args.IRB_x1.WBF_frac mov bp, RBA_args.IRB_x1.WBF_int ;bp.dl <- x1 add bl, dl adc ax, bp ;ax.bl <- (x0+x1) jo overflow Div2 ax, bl ;ax.bl <- sx1=(x0+x1)/2 mov RBA_left.IRB_x1.WBF_frac, bl mov RBA_left.IRB_x1.WBF_int, ax ;pass sx1 mov bh, RBA_args.IRB_x2.WBF_frac mov cx, RBA_args.IRB_x2.WBF_int ;cx.bh <- x2 add dl, bh adc bp, cx ;bp.dl <- (x1+x2) jo overflow Div2 bp, dl ;bp.dl <- t=(x1+x2)/2 add bl, dl adc ax, bp ;ax.bl <- (sx1+t) jo overflow Div2 ax, bl ;ax.bl <- sx2=(sx1+t)/2 mov RBA_left.IRB_x2.WBF_frac, bl mov RBA_left.IRB_x2.WBF_int, ax ;pass sx2 mov bh, RBA_args.IRB_x3.WBF_frac mov cx, RBA_args.IRB_x3.WBF_int ;cx.bh <- x3 mov RBA_right.IRB_x3.WBF_frac, bh mov RBA_right.IRB_x3.WBF_int, cx ;pass x3 add bh, RBA_args.IRB_x2.WBF_frac adc cx, RBA_args.IRB_x2.WBF_int ;cx.bh <- (x3+x2) jo overflow Div2 cx, bh ;cx.bh <- tx2=(x2+x3)/2 mov RBA_right.IRB_x2.WBF_frac, bh mov RBA_right.IRB_x2.WBF_int, cx ;pass tx2 add bh, dl adc cx, bp ;cx.bh <- (t+tx2) jo overflow Div2 cx, bh ;cx.bh <- tx1=(t+tx2)/2 mov RBA_right.IRB_x1.WBF_frac, bh mov RBA_right.IRB_x1.WBF_int, cx ;pass tx1 add bl, bh adc ax, cx ;ax.bl <- (sx2+tx1) jo overflow Div2 ax, bl ;ax.bl <- sx3=(sx2+tx1)/2 mov RBA_left.IRB_x3.WBF_frac, bl mov RBA_left.IRB_x3.WBF_int, ax ;pass sx3 mov RBA_right.IRB_x0.WBF_frac, bl mov RBA_right.IRB_x0.WBF_int, ax ;pass sx3 clc done: .leave ret overflow: stc jmp done DivideCurve endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetPointInRegion %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set a single point in the region CALLED BY: LibRegionAddPoint, LibRegionAddLine PASS: (cx,dx) - (x,y) point bx - RegionPointDirection es - seg addr of region RETURN: es - (new) seg addr of region DESTROYED: ax, bx, cx, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: The RP_flags field in the RegionPath structure now contains a flag that indicates a lower level memory allocation failed., Users of this routine should check that flag and take approp. action. REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/ 2/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetPointInRegion proc near uses si, di, bp, ds .enter if (0) ; if the point we're setting is the same as the last point we set, ; then ignore it. This fixes the case where connected line segments ; are added as individual elements, so the last point of one line ; is the same as the first point of the next line. This yields bad ; results if both are removed. cmp cx, es:[RP_lastSet].P_x jne tryToSetIt cmp dx, es:[RP_lastSet].P_y je done tryToSetIt: mov es:[RP_lastSet].P_x, cx mov es:[RP_lastSet].P_y, dx endif segmov ds, es, ax ; ; Get the y coordinate of the passed point and ; convert it into an offset into the region. Also ; do checks to see if it changes the bounding box. ; mov ax, dx ;ax <- y point cmp ax, ds:RP_y_min ;see if above top jl done ;branch if clipped cmp ax, ds:RP_y_max ;see if below bottom jge done ;branch if clipped cmp ax, ds:RP_bounds.R_top ;check against top edge jl newTop afterTop: cmp ax, ds:RP_bounds.R_bottom ;check against bottom edge jge newBottom afterBottom: call FindRegionLine ;find correct line in region ; ; Get the x coordinate of the passed point, and ; convert it into an offset into the region. Also ; do checks to see if it changes the bounding box. ; mov ax, cx ;ax <- x point cmp ax, ds:RP_bounds.R_left ;check against left edge jl newLeft afterLeft: cmp ax, ds:RP_bounds.R_right ;check against right edge jg newRight afterRight: call FindSetRegionPoint ;find & set point on line done: .leave ret ; ; These are done as stubs because the most common case for ; bounds checking is no or only one new bound. This way ; the more common case is a fall through at 4 cycles per, and ; the less common case is the slower branch at 12 cycles per. ; newTop: mov ds:RP_bounds.R_top, ax jmp afterTop ; ; Must increment bottom because of imaging convention ; newBottom: mov ds:RP_bounds.R_bottom, ax inc ds:RP_bounds.R_bottom jmp afterBottom newLeft: mov ds:RP_bounds.R_left, ax jmp afterLeft newRight: mov ds:RP_bounds.R_right, ax jmp afterRight SetPointInRegion endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindRegionLine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find ptr to specified line in current region. CALLED BY: SetPointInRegion PASS: ds, es - seg addr of RegionPath ax - line # in region to find RETURN: es:di - ptr to start of line DESTROYED: ax, dx PSEUDO CODE/STRATEGY: if (line < lastLineFound) { scan backwards; } else if (line > lastLineFound) { scan forwards; } return(line ptr); KNOWN BUGS/SIDE EFFECTS/IDEAS: ASSUMES: line of the region exists ASSUMES: lines are MIN_REGION_LINE_SIZE bytes long. REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/28/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FindRegionLine proc near uses cx .enter xchg dx, ax ;dx <- line to find, trash AX mov cx, -1 ;check everything mov ax, EOREGREC ;ax <- word to search for mov di, ds:RP_curPtr ;di <- ptr to last known line cmp dx, ds:RP_curLine ;see if after known line jl backLineScan ;branch if before known line je done ;branch if same lineLoop: EC < cmp es:[di], EOREGREC ;see if end of region > EC < ERROR_E GRAPHICS_REGION_LINE_NOT_FOUND ;we don't handle this > cmp ds:[di], dx ;see if correct line je found add di, MIN_REGION_LINE_SIZE - 2 ;line at least this long repne scasw ;find end of line jmp lineLoop firstLine: mov di, size RegionPath ;di <- ptr to first line foundBack: cld ;evil to leave this set... found: mov ds:RP_curLine, dx mov ds:RP_curPtr, di ;update last line found done: .leave ret backLineScan: cmp dx, ds:RP_y_min ;see if looking for first line je firstLine ;branch if first line std ;scan backwards backLineLoop: EC < cmp di, size RegionPath ;have we gone too far? > EC < ERROR_B GRAPHICS_REGION_LINE_NOT_FOUND ; > cmp ds:[di], dx ;see if correct line je foundBack sub di, MIN_REGION_LINE_SIZE ;line at least this long repne scasw ;find end of 2 lines back add di, REGION_LINE_SIZE ;skip EOREGREC to line # 1 back EC < call ECCheckOffset ; > jmp backLineLoop FindRegionLine endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindSetRegionPoint %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find and set the specified point on a line. CALLED BY: SetPointInRegion PASS: es:di - ptr to line in region ds, es - seg addr of region ax - x coordinate of point to find bx - up/down value RETURN: carry - set if couldn't allocate memory else es - (new) seg addr of region DESTROYED: ax, bx, cx, dx, di, si, bp PSEUDO CODE/STRATEGY: while (!found) { if (unused space) { found = TRUE; } else if (end of line) { AddSpace(); /* add space at end of line */ found = TRUE; } else if (value < passed coord) { AddSpace(); /* add space in middle */ found = TRUE; } else { point++; /* advance to next point */ } } SetPoint(point); KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/28/90 Initial version don 7/22/91 Added support for WINDING rule %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CheckHack <RFR_ODD_EVEN eq 0> FindSetRegionPoint proc near .enter ; Some set-up work ; xchg bx, ax ;bx <- x coordinate to set xchg bp, ax ;bp <- up/down value, trash AX mov dx, 2 ;bytes/point for ODD_EVEN rule tst es:[RP_fillRule] ;ODD_EVEN or WINDING ?? jz pointLoop ;ODD_EVEN, so go for it mov dx, 4 ;bytes/point for WINDING rule sub di, 2 ;fudge factor to start properly ; Loop thorugh the line to find where to insert point ; pointLoop: add di, dx ;advance to next point mov ax, ds:[di] ;ax <- x point cmp ax, UNUSED_POINT ;see if vacant je placeFound ;use the vacant spot cmp ax, EOREGREC ;see if end of line je addSpace ;end of line, bummer cmp ax, bx ;check against coord jg foundRect ;found the right area jne pointLoop ;else go try again ; The point on the line has been set already. We must unset it ; or die for the ODD_EVEN rule, or maintain the up/down count ; for the WINDING rule. We must also ensure that the on/off ; points are contiguous, else the loop above will not work! ; tst es:[RP_fillRule] ;ODD_EVEN or WINDING jnz unsetWinding ;WINDING, so go to it mov si, di ;destination => ES:DI add si, 2 ;source => DS:SI movePoints: lodsw ;point or marker => AX EC < call ECCheckOffset ;check within block> stosw ;store in previous position shr ax, 1 cmp ax, (EOREGREC shr 1) ;EOREGREC or UNUSED_POINT ?? jne movePoints ;neither, so continue mov es:[di][-2], UNUSED_POINT ;mark point as unused jmp doneOK unsetWinding: add ds:[di+2], bp ;add in up/down value jmp doneOK ; Add space at the current location, so that we can insert ; the point. We will need to move any data after this point down ; by the number of bytes we insert ; addSpace: xchg ax, dx ;ax <- # of bytes to add call RegionAddSpace jc done ; couldn't allocate. bummer. placeFound: EC < call ECCheckOffset ;check within block> mov ds:[di], bx ;set the on/off point tst es:[RP_fillRule] ;ODD_EVEN or WINDING jz doneOK ;ODD_EVEN, so we're done mov ds:[di+2], bp ;store the up/down value doneOK: clc done: .leave ret ; We've found the correct portion of the line. We need ; to shift the rest of the line down to make space, or ; if we can't do that, shift the whole region to make space. ; foundRect: mov si, di ;si <- ptr to location spaceLoop: add si, dx ;skip one point mov ax, ds:[si] cmp ax, EOREGREC ;end of line? je addSpace ;yes, we've to to resize cmp ax, UNUSED_POINT ;vacant space? jne spaceLoop ;no, try again ; We've found a vacant spot on the line. We need to shift ; everything after our insertion point up one word. ; push di mov cx, si sub cx, di ;cx <- # of bytes to move shr cx, 1 ;cx <- # of words to move add si, dx sub si, 2 ;hack due to size differential mov di, si ;es:di <- dest EC < call ECCheckOffset ;check within block> sub si, dx ;ds:si <- source std ;work backwards rep movsw ;shift me jesus cld ;must reset direction flag pop di jmp placeFound FindSetRegionPoint endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RegionAddSpace %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add space to our region definition. CALLED BY: FindSetRegionPoint PASS: es:di - ptr to insertion point ds, es - seg addr of region ax - # of bytes to add RETURN: carry - set if some problem allocating memory else ds, es - (new) seg addr of region DESTROYED: ax, cx, si PSEUDO CODE/STRATEGY: if (!space at end of block) { Realloc(block); } for (s = KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/28/90 Initial version don 4/16/91 Now works with additional bytes other than 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RegionAddSpace proc near uses bx, bp, di .enter ; if we're already in trouble, don't add to it. test ds:[RP_flags], mask RPF_CANT_ALLOC jnz allocProblem ; See if we need to re-allocate the block ; mov cx, ds:RP_endPtr ;cx <- amount we're using add cx, ax ;cx <- new size xchg bp, ax ;bp <- amount to add mov ax, ds:RP_size ;ax <- current block size mov bx, ds:RP_handle ;bx <- handle of block mov ds:RP_endPtr, cx ;save new size cmp cx, ax ;see if enough left over jbe insertSpace ;branch if enough room ; Re-allocate by a standard large amount, to avoid repeated calls ; add cx, REGION_BLOCK_REALLOC_INC_SIZE ;up size so we don't thrash NEC < jc allocProblem > EC < ERROR_C GRAPHICS_REGION_TOO_BIG ; > mov ds:RP_size, cx ;save new size xchg ax, cx ;ax <- size to realloc clr ch ; want to handle errors call MemReAlloc ;reallocate as necessary jc allocProblem ; if can't allocate, bail mov es, ax ;es <- seg addr of block mov ds, ax ; Copy things below allocated space (from bottom of memory towards top) ; Assume: BP = # of bytes to insert ; DI = insertion point ; insertSpace: mov cx, ds:RP_endPtr ;cx <- new size mov si, cx sub cx, di ;cx <- # of bytes to shift shr cx, 1 ;cx <- # of words to shift EC < ERROR_C GRAPHICS_REGION_ODD_SIZE ;should always be even> dec si dec si mov di, si ;destination = newSize - 2 EC < call ECCheckOffset ;check within block > sub si, bp ;source = destination - inserted EC < xchg di, si > EC < call ECCheckOffset ;check within block > EC < xchg di, si > std rep movsw ;shift me jesus cld clc ; signal no alloc problems done: .leave ret ; There is some problem allocating the necessary memory. Instead of ; dying, as we did before, let's set a flag to say that things are ; hosed and back it all out. At a point higher up we'll re-alloc ; the block to be just a rectangle. allocProblem: or ds:RP_flags, mask RPF_CANT_ALLOC ; set the flag stc ; signal alloc problems jmp done RegionAddSpace endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECCheckOffset %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check that an offset is within the region block. CALLED BY: INTERNAL PASS: di - offset to check es - segment address of RegionPath RETURN: none DESTROYED: none, not even flags PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/ 6/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK ECCheckOffset proc near uses ax, bx .enter pushf call SysGetECLevel ;ax <- ErrorCheckingFlags test ax, mask ECF_GRAPHICS ;checking regions? jz skipCheck ;no, don't bother cmp di, ds:RP_size ;see if bigger than we thought ERROR_AE GRAPHICS_REGION_OVERDOSE cmp di, ds:RP_endPtr ;see if bigger than we though ERROR_AE GRAPHICS_REGION_OVERDOSE mov bx, ds:RP_handle ;bx <- handle of region block mov ax, MGIT_SIZE call MemGetInfo cmp di, ax ;see if bigger than block ERROR_AE GRAPHICS_REGION_OVERDOSE skipCheck: popf .leave ret ECCheckOffset endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CurveToPolylineCB %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: callback routine in the "CurveToPolyline" process CALLED BY: RasterBezier via CurveToPolyline PASS: endpoints of next line segment: ax,bx - P0 cx,dx - P1 es - segment of CurvePolylinePoints RETURN: es - new segment of CurvePolylinePoints DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: Points will not be added to block if there's not enough memory. REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 2/ 3/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CURVE_POLYLINE_BLOCK_MAX_SIZE equ 40960 ; This is a pretty huge value, but since we're allowing MemReAlloc to ; return errors, such a big block will only be created if the memory ; is available. CurveToPolylineCB proc near uses di .enter ; Make sure there's enough room for at least 2 more points mov di, es:[CP_curPtr] add di, 2 * size Point cmp di, es:[CP_size] jbe afterAlloc ; ; reallocate by a large amount, unless the block is already ; bigger than it should be. ; push ax, bx, cx mov ax, es:[CP_size] cmp ax, CURVE_POLYLINE_BLOCK_MAX_SIZE jae errorPop add ax, CURVE_POLYLINE_SIZE_INCREMENT mov bx, es:[CP_handle] clr cx call MemReAlloc jc errorPop ; ; Now that we've successfully reallocated, store the new size. ; mov es, ax add es:[CP_size], CURVE_POLYLINE_SIZE_INCREMENT pop ax, bx, cx afterAlloc: ; Get the pointer to the next set of points. If no points ; have been stored yet, then store the first point, otherwise, ; only store the second point mov di, es:[CP_curPtr] cmp di, size CurvePolyline ja afterFirst ; store the first point (ax, bx) inc es:[CP_numPoints] stosw mov_tr ax, bx stosw afterFirst: mov_tr ax, cx stosw mov_tr ax, dx stosw inc es:[CP_numPoints] mov es:[CP_curPtr], di done: .leave ret errorPop: ; ; We don't have the memory to add any more points to this ; block. What can we do??? Nothing -- the polyline just won't ; get drawn correctly! ; pop ax, bx, cx jmp done CurveToPolylineCB endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PointOnLine? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if the point is on the line CALLED BY: RasterBezier PASS: ds:di - RasterBezierArgs ds:[si] - point T RETURN: carry SET if on line, clear otherwise DESTROYED: ax,bx,cx,dx PSEUDO CODE/STRATEGY: Ripped off from Graphics Gems, Fast 2D point-on-line test (p 49-50) KNOWN BUGS/SIDE EFFECTS/IDEAS: This procedure was written as an April Fool's joke. REVISION HISTORY: Name Date Description ---- ---- ----------- CDB 4/1/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PX = RBA_args.IRB_x0.WBF_int QX = RBA_args.IRB_y0.WBF_int PY = RBA_args.IRB_x3.WBF_int QY = RBA_args.IRB_y3.WBF_int TX = ds:[si].IRP_x.WBF_int TY = ds:[si].IRP_x.WBF_int max macro dest, source local done cmp dest, source jge done mov source, dest done: endm PointOnLine? proc near .enter mov ax, QY sub ax, PY mov bx, TX sub bx, PX imul bx ; dx:ax - result pushdw dxax mov ax, TY sub ax, PY mov bx, QX sub bx, PX imul bx popdw bxcx subdw dxax, bxcx tst dx jns posDXAX negdw dxax posDXAX: mov bx, QX diff bx, PX mov cx, QY diff cx, PY max bx, cx clr cx jgdw dxax, cxbx, notOnLine ;----------------------------------------------------------------------------- ; RE-DEFINE the CONSTANTS ;----------------------------------------------------------------------------- mov ax, PX mov bx, PY mov cx, QX mov dx, QY PX = ax PY = bx QX = cx QY = dx ; If Qx < Px and Px < Tx, not on line cmp QX, PX jge test2 cmp PX, TX jl notOnLine test2: ; If Qy < PY and PY < TY, not on line cmp QY, PY jge test3 cmp PY, TY jl notOnLine test3: ; If TX < PX and PX < QX, not on line cmp TX, PX jge test4 cmp PX, QX jl notOnLine test4: ; If TY < PY and PY < QY, not on line cmp TY, PY jge test5 cmp PY, QY jl notOnLine test5: ; If PX < QX and QX < TX, not on line cmp PX, QX jge test6 cmp QX, TX jl notOnLine test6: ; If PY < QY and QY < TY, not on line cmp PY, QY jge test7 cmp QY, TY jl notOnLine test7: ; If TX < QX and QX < PX, not on line cmp TX, QX jge test8 cmp QX, PX jl notOnLine test8: ; If TY < QY and QY < PY, not on line cmp TY, QY jge onLine cmp QY, PY jge onLine notOnLine: clc done: .leave ret onLine: stc jmp done PointOnLine? endp GraphicsRegionPaths ends
24.619617
79
0.610372
25b1fbcdd2e71ab9854d7d044a748998aeb20148
4,688
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_991.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_991.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_991.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x114f6, %rsi lea addresses_A_ht+0x15a76, %rdi clflush (%rdi) nop nop nop nop nop inc %rbx mov $19, %rcx rep movsb nop nop nop add %rcx, %rcx lea addresses_WT_ht+0x1a486, %rbx nop nop nop nop lfence mov $0x6162636465666768, %rax movq %rax, %xmm5 vmovups %ymm5, (%rbx) inc %rbx lea addresses_WC_ht+0x15926, %rdi nop nop nop nop nop cmp $63086, %r14 mov $0x6162636465666768, %rcx movq %rcx, %xmm0 movups %xmm0, (%rdi) nop cmp $28431, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %rax push %rbp push %rdx push %rsi // Faulty Load lea addresses_WT+0x14126, %rsi clflush (%rsi) nop nop nop nop nop sub %rbp, %rbp mov (%rsi), %r10 lea oracles, %rdx and $0xff, %r10 shlq $12, %r10 mov (%rdx,%r10,1), %r10 pop %rsi pop %rdx pop %rbp pop %rax pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 10}} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
47.836735
2,999
0.664462
ed07548f030c0c7f72897ab606d422b039d5eb83
124,525
asm
Assembly
docs/gvb+_editor.asm
arucil/wqxtools
f0498d5eb4f956d0f0571b19500e396f82978f69
[ "MIT" ]
3
2021-12-07T03:38:14.000Z
2022-03-17T01:37:57.000Z
docs/gvb+_editor.asm
arucil/wqxtools
f0498d5eb4f956d0f0571b19500e396f82978f69
[ "MIT" ]
null
null
null
docs/gvb+_editor.asm
arucil/wqxtools
f0498d5eb4f956d0f0571b19500e396f82978f69
[ "MIT" ]
null
null
null
; nc3000 GVBASIC+.bin disassembled ; entry = $4060 4010: 00 17 05 INT $0517 4013: A2 39 LDX #$39 4015: BD 37 40 LDA $4037,X 4018: 9D 8C 08 STA $088C,X 401B: CA DEX 401C: D0 F7 BNE $4015 401E: A9 00 LDA #$00 4020: 8D CC 08 STA $08CC 4023: A9 25 LDA #$25 4025: 85 E0 STA $E0 4027: A9 06 LDA #$06 4029: 85 E1 STA $E1 402B: 00 25 05 INT $0525 402E: 20 50 40 JSR $4050 4031: 4C 00 44 JMP $4400 4038: .db "/应用程序" 4041: .db "/GVBASIC+.bin" 404F: 00 FF 4050: A9 00 LDA #$00 4052: A2 10 LDX #$10 4054: 9D 8C 08 STA $088C,X 4057: CA DEX 4058: D0 FA BNE $4054 405A: 60 RTS 4060: A2 0D LDX #$0D 4062: BD 8C 08 LDA $088C,X 4065: 9D 41 40 STA $4041,X 4068: CA DEX 4069: D0 F7 BNE $4062 406B: 4C 10 40 JMP $4010 4400: 4C 03 44 JMP $4403 4403: BA TSX 4404: 86 5F STX $5F 4406: A5 0A LDA $0A 4408: 8D 28 B8 STA $B828 440B: 20 81 4C JSR $4C81 440E: 90 0D BCC $441D ; 切换 /BASIC文件 工作目录失败,报错退出 4410: AD CC 08 LDA $08CC 4413: C9 0E CMP #$0E 4415: D0 03 BNE $441A 4417: 20 8F 4D JSR $4D8F 441A: 4C B7 47 JMP $47B7 441D: 00 2A C7 INT $C72A 4420: A9 FF LDA #$FF 4422: 8D AF 03 STA $03AF 4425: A9 FF LDA #$FF 4427: 8D B0 03 STA $03B0 442A: 00 19 C7 INT $C719 442D: A9 00 LDA #$00 442F: 85 64 STA $64 4431: 85 62 STA $62 4433: 85 63 STA $63 4435: 20 A1 4C JSR $4CA1 4438: A5 60 LDA $60 443A: 05 61 ORA $61 443C: F0 0E BEQ $444C 443E: A5 62 LDA $62 4440: 85 80 STA $80 4442: A5 63 LDA $63 4444: 85 81 STA $81 4446: 20 E9 47 JSR $47E9 4449: 20 54 49 JSR $4954 444C: A5 60 LDA $60 444E: 05 61 ORA $61 4450: D0 22 BNE $4474 4452: 8A TXA 4453: 48 PHA 4454: A9 00 LDA #$00 4456: A2 09 LDX #$09 4458: 9D 88 03 STA $0388,X 445B: CA DEX 445C: D0 FA BNE $4458 445E: 68 PLA 445F: AA TAX 4460: 00 2A C7 INT $C72A 4463: A9 FF LDA #$FF 4465: 8D AF 03 STA $03AF 4468: A9 FF LDA #$FF 446A: 8D B0 03 STA $03B0 446D: 00 19 C7 INT $C719 4470: A9 1C LDA #$1C 4472: D0 2B BNE $449F 4474: A4 64 LDY $64 4476: A2 00 LDX #$00 4478: 00 1D C7 INT $C71D 447B: 20 BA 49 JSR $49BA 447E: A9 00 LDA #$00 4480: 8D B1 03 STA $03B1 4483: A9 00 LDA #$00 4485: 8D B2 03 STA $03B2 4488: A9 80 LDA #$80 448A: 8D B3 03 STA $03B3 448D: A9 FF LDA #$FF 448F: 8D AF 03 STA $03AF 4492: A9 FF LDA #$FF 4494: 8D B0 03 STA $03B0 4497: 00 19 C7 INT $C719 449A: 00 06 C0 INT $C006 449D: F0 FB BEQ $449A ; 显示完basic文件列表,读取按键 449F: AA TAX 44A0: A0 0D LDY #$0D 44A2: A9 B0 LDA #$B0 44A4: 85 80 STA $80 44A6: A9 44 LDA #$44 44A8: 85 81 STA $81 44AA: 20 3C E0 JSR $E03C 44AD: 4C 4C 44 JMP $444C 44B0: .db 21, 22, 14, 20, 23, 19, 13, 28, 29, 30, 31, 25, 27 44BD: .dw $44D7 ; 下 44BF: .dw $44D7 ; 右 44C1: .dw $4501 ; 下翻页 44C3: .dw $455A ; 上 44C5: .dw $455A ; 左 44C7: .dw $458A ; 上翻页 44C9: .dw $45E3 ; 输入 44CB: .dw $465E ; f1 新建 44CD: .dw $4661 ; f2 删除 44CF: .dw $46CF ; f3 帮助 44D1: .dw $46D3 ; f4 修改 44D3: .dw $46CF ; 帮助 44D5: .dw $47B7 ; 跳出 ; 下移 44D7: E6 62 INC $62 44D9: D0 02 BNE $44DD 44DB: E6 63 INC $63 44DD: A5 63 LDA $63 44DF: C5 61 CMP $61 44E1: D0 04 BNE $44E7 44E3: A5 62 LDA $62 44E5: C5 60 CMP $60 44E7: 90 0B BCC $44F4 44E9: A5 62 LDA $62 44EB: D0 02 BNE $44EF 44ED: C6 63 DEC $63 44EF: C6 62 DEC $62 44F1: 4C 12 E0 JMP $E012 44F4: A6 64 LDX $64 44F6: E8 INX 44F7: E0 05 CPX #$05 44F9: 90 03 BCC $44FE 44FB: 4C CB 47 JMP $47CB 44FE: 86 64 STX $64 4500: 60 RTS ; 下翻页 4501: A5 62 LDA $62 4503: 85 80 STA $80 4505: A5 63 LDA $63 4507: 85 81 STA $81 4509: 18 CLC 450A: A5 80 LDA $80 450C: 69 05 ADC #$05 450E: 85 80 STA $80 4510: 90 02 BCC $4514 4512: E6 81 INC $81 4514: A5 81 LDA $81 4516: C5 61 CMP $61 4518: D0 04 BNE $451E 451A: A5 80 LDA $80 451C: C5 60 CMP $60 451E: 90 2F BCC $454F 4520: 38 SEC 4521: A5 80 LDA $80 4523: E5 60 SBC $60 4525: 85 80 STA $80 4527: A5 81 LDA $81 4529: E5 61 SBC $61 452B: 85 81 STA $81 452D: A5 64 LDA $64 452F: E5 80 SBC $80 4531: B0 03 BCS $4536 4533: 4C 12 E0 JMP $E012 4536: D0 03 BNE $453B 4538: 4C 12 E0 JMP $E012 453B: 85 64 STA $64 453D: C6 64 DEC $64 453F: A5 60 LDA $60 4541: 85 80 STA $80 4543: A5 61 LDA $61 4545: 85 81 STA $81 4547: A5 80 LDA $80 4549: D0 02 BNE $454D 454B: C6 81 DEC $81 454D: C6 80 DEC $80 454F: A5 80 LDA $80 4551: 85 62 STA $62 4553: A5 81 LDA $81 4555: 85 63 STA $63 4557: 4C CB 47 JMP $47CB ; 上移 455A: A5 62 LDA $62 455C: 85 80 STA $80 455E: A5 63 LDA $63 4560: 85 81 STA $81 4562: A5 80 LDA $80 4564: D0 02 BNE $4568 4566: C6 81 DEC $81 4568: C6 80 DEC $80 456A: A5 80 LDA $80 456C: 25 81 AND $81 456E: C9 FF CMP #$FF 4570: D0 03 BNE $4575 4572: 4C 12 E0 JMP $E012 4575: A5 80 LDA $80 4577: 85 62 STA $62 4579: A5 81 LDA $81 457B: 85 63 STA $63 457D: A6 64 LDX $64 457F: E0 00 CPX #$00 4581: D0 03 BNE $4586 4583: 4C CB 47 JMP $47CB 4586: CA DEX 4587: 86 64 STX $64 4589: 60 RTS ; 上翻页 458A: A5 62 LDA $62 458C: 85 80 STA $80 458E: A5 63 LDA $63 4590: 85 81 STA $81 4592: 38 SEC 4593: A5 80 LDA $80 4595: E5 64 SBC $64 4597: 85 80 STA $80 4599: A5 81 LDA $81 459B: E9 00 SBC #$00 459D: 85 81 STA $81 459F: B0 03 BCS $45A4 45A1: 4C 12 E0 JMP $E012 45A4: A5 80 LDA $80 45A6: 05 81 ORA $81 45A8: D0 03 BNE $45AD 45AA: 4C 12 E0 JMP $E012 45AD: 38 SEC 45AE: A5 80 LDA $80 45B0: E9 05 SBC #$05 45B2: 85 80 STA $80 45B4: A5 81 LDA $81 45B6: E9 00 SBC #$00 45B8: 85 81 STA $81 45BA: A5 80 LDA $80 45BC: 05 81 ORA $81 45BE: F0 02 BEQ $45C2 45C0: B0 13 BCS $45D5 45C2: A5 64 LDA $64 45C4: 85 80 STA $80 45C6: A9 00 LDA #$00 45C8: 85 81 STA $81 45CA: A5 80 LDA $80 45CC: 85 62 STA $62 45CE: A5 81 LDA $81 45D0: 85 63 STA $63 45D2: 4C CB 47 JMP $47CB 45D5: 18 CLC 45D6: A5 80 LDA $80 45D8: 65 64 ADC $64 45DA: 85 80 STA $80 45DC: 90 02 BCC $45E0 45DE: E6 81 INC $81 45E0: 4C CA 45 JMP $45CA ; 输入 45E3: 20 3B 4C JSR $4C3B 45E6: F0 14 BEQ $45FC ; 显示 非BAS文件 45E8: A9 00 LDA #$00 45EA: 8D 32 0A STA $0A32 45ED: A2 1B LDX #$1B 45EF: A0 4E LDY #$4E 45F1: A9 00 LDA #$00 45F3: 00 12 CA INT $CA12 45F6: 20 2A E0 JSR $E02A 45F9: 4C CB 47 JMP $47CB 45FC: 20 38 49 JSR $4938 45FF: A5 5F LDA $5F 4601: 48 PHA 4602: AD 73 BA LDA $BA73 4605: 48 PHA 4606: AD 74 BA LDA $BA74 4609: 48 PHA 460A: A5 62 LDA $62 460C: 48 PHA 460D: A5 63 LDA $63 460F: 48 PHA 4610: A5 64 LDA $64 4612: 48 PHA 4613: 20 D7 51 JSR $51D7 ; 运行bas文件 4616: 68 PLA 4617: 85 64 STA $64 4619: 68 PLA 461A: 85 63 STA $63 461C: 68 PLA 461D: 85 62 STA $62 461F: 68 PLA 4620: 8D 74 BA STA $BA74 4623: 68 PLA 4624: 8D 73 BA STA $BA73 4627: 68 PLA 4628: 85 5F STA $5F 462A: A5 62 LDA $62 462C: 85 80 STA $80 462E: A5 63 LDA $63 4630: 85 81 STA $81 4632: 38 SEC 4633: A5 80 LDA $80 4635: E5 64 SBC $64 4637: 85 80 STA $80 4639: A5 81 LDA $81 463B: E9 00 SBC #$00 463D: 85 81 STA $81 463F: 20 E9 47 JSR $47E9 4642: 20 A1 4C JSR $4CA1 4645: 20 54 49 JSR $4954 4648: 20 5A 46 JSR $465A 464B: 8A TXA 464C: 48 PHA 464D: A9 00 LDA #$00 464F: A2 09 LDX #$09 4651: 9D 88 03 STA $0388,X 4654: CA DEX 4655: D0 FA BNE $4651 4657: 68 PLA 4658: AA TAX 4659: 60 RTS 465A: 00 27 04 INT $0427 465D: 60 RTS 465E: 4C F2 49 JMP $49F2 4661: A9 00 LDA #$00 4663: 8D 32 0A STA $0A32 4666: A2 07 LDX #$07 4668: A0 4E LDY #$4E 466A: A9 02 LDA #$02 466C: 00 12 CA INT $CA12 466F: C9 79 CMP #$79 4671: F0 03 BEQ $4676 4673: 4C CB 47 JMP $47CB 4676: 20 38 49 JSR $4938 4679: 00 0E 05 INT $050E 467C: 90 03 BCC $4681 467E: 4C B8 4D JMP $4DB8 4681: A5 60 LDA $60 4683: 85 80 STA $80 4685: A5 61 LDA $61 4687: 85 81 STA $81 4689: A5 80 LDA $80 468B: D0 02 BNE $468F 468D: C6 81 DEC $81 468F: C6 80 DEC $80 4691: A5 63 LDA $63 4693: C5 81 CMP $81 4695: D0 04 BNE $469B 4697: A5 62 LDA $62 4699: C5 80 CMP $80 469B: D0 10 BNE $46AD 469D: C6 64 DEC $64 469F: 10 04 BPL $46A5 46A1: A9 00 LDA #$00 46A3: 85 64 STA $64 46A5: A5 62 LDA $62 46A7: D0 02 BNE $46AB 46A9: C6 63 DEC $63 46AB: C6 62 DEC $62 46AD: A5 60 LDA $60 46AF: D0 02 BNE $46B3 46B1: C6 61 DEC $61 46B3: C6 60 DEC $60 46B5: A5 60 LDA $60 46B7: 05 61 ORA $61 46B9: D0 10 BNE $46CB 46BB: 00 2A C7 INT $C72A 46BE: A9 FF LDA #$FF 46C0: 8D AF 03 STA $03AF 46C3: A9 FF LDA #$FF 46C5: 8D B0 03 STA $03B0 46C8: 00 19 C7 INT $C719 46CB: 20 CB 47 JSR $47CB 46CE: 60 RTS 46CF: 20 12 E0 JSR $E012 46D2: 60 RTS 46D3: 20 3B 4C JSR $4C3B 46D6: F0 14 BEQ $46EC ; 显示 非BAS文件 46D8: A9 00 LDA #$00 46DA: 8D 32 0A STA $0A32 46DD: A2 1B LDX #$1B 46DF: A0 4E LDY #$4E 46E1: A9 00 LDA #$00 46E3: 00 12 CA INT $CA12 46E6: 20 2A E0 JSR $E02A 46E9: 4C CB 47 JMP $47CB 46EC: 20 38 49 JSR $4938 46EF: A9 C0 LDA #$C0 46F1: 8D C9 08 STA $08C9 46F4: 00 15 05 INT $0515 46F7: 90 03 BCC $46FC 46F9: 4C B8 4D JMP $4DB8 46FC: AD C8 08 LDA $08C8 46FF: 8D 75 BA STA $BA75 4702: 00 14 05 INT $0514 4705: AD FD 08 LDA $08FD 4708: F0 03 BEQ $470D 470A: 4C B8 4D JMP $4DB8 470D: AD FB 08 LDA $08FB 4710: 8D 77 BA STA $BA77 4713: AD FC 08 LDA $08FC 4716: 8D 78 BA STA $BA78 4719: A9 A0 LDA #$A0 471B: 85 52 STA $52 471D: AD 78 BA LDA $BA78 4720: C9 40 CMP #$40 4722: D0 05 BNE $4729 4724: AD 77 BA LDA $BA77 4727: C9 00 CMP #$00 4729: 90 2A BCC $4755 472B: F0 28 BEQ $4755 472D: A9 20 LDA #$20 472F: 85 52 STA $52 4731: A9 00 LDA #$00 4733: 8D 32 0A STA $0A32 ; 文件超长,不可编辑 4736: A2 11 LDX #$11 4738: A0 4E LDY #$4E 473A: A9 00 LDA #$00 473C: 00 12 CA INT $CA12 473F: 20 2A E0 JSR $E02A 4742: 20 A5 53 JSR $53A5 4745: AD 75 BA LDA $BA75 4748: 8D C8 08 STA $08C8 474B: 00 17 05 INT $0517 474E: 20 5A 46 JSR $465A 4751: 20 CB 47 JSR $47CB 4754: 60 RTS 4755: 20 57 53 JSR $5357 4758: 4C 2E 4A JMP $4A2E 475B: 60 RTS 475C: FF ?? 475D: FF ?? 475E: FF ?? 475F: FF ?? 4760: 47 ?? 4761: 56 42 LSR $42,X 4763: 61 73 ADC ($73,X) 4765: 69 63 ADC #$63 4767: 2B ?? 4768: 20 6D 61 JSR $616D 476B: 64 ?? 476C: 65 20 ADC $20 476E: 62 ?? 476F: 79 20 44 ADC $4420,Y 4772: 65 6E ADC $6E 4774: 7A ?? 4775: 68 PLA 4776: FF ?? 4777: FF ?? 4778: FF ?? 4779: FF ?? 477A: FF ?? 477B: FF ?? 477C: FF ?? 477D: FF ?? 477E: FF ?? 477F: FF ?? 4780: FF ?? 4781: FF ?? 4782: FF ?? 4783: FF ?? 4784: FF ?? 4785: FF ?? 4786: FF ?? 4787: FF ?? 4788: FF ?? 4789: FF ?? 478A: FF ?? 478B: FF ?? 478C: FF ?? 478D: FF ?? 478E: FF ?? 478F: FF ?? 4790: FF ?? 4791: FF ?? 4792: FF ?? 4793: FF ?? 4794: FF ?? 4795: FF ?? 4796: FF ?? 4797: FF ?? 4798: 60 RTS 4799: A2 64 LDX #$64 479B: BD 2E 4E LDA $4E2E,X 479E: 9D BF 02 STA $02BF,X 47A1: CA DEX 47A2: D0 F7 BNE $479B 47A4: A9 FF LDA #$FF 47A6: 8D AF 03 STA $03AF 47A9: A9 FF LDA #$FF 47AB: 8D B0 03 STA $03B0 47AE: 00 19 C7 INT $C719 47B1: 00 06 C0 INT $C006 47B4: 4C B1 47 JMP $47B1 47B7: 00 12 03 INT $0312 47BA: 00 A2 09 INT $09A2 47BD: 9D 88 03 STA $0388,X 47C0: CA DEX 47C1: D0 FA BNE $47BD 47C3: 68 PLA 47C4: AA TAX 47C5: A6 5F LDX $5F 47C7: 9A TXS 47C8: 4C 6C 52 JMP $526C 47CB: A5 62 LDA $62 47CD: 85 80 STA $80 47CF: A5 63 LDA $63 47D1: 85 81 STA $81 47D3: 38 SEC 47D4: A5 80 LDA $80 47D6: E5 64 SBC $64 47D8: 85 80 STA $80 47DA: A5 81 LDA $81 47DC: E9 00 SBC #$00 47DE: 85 81 STA $81 47E0: 20 E9 47 JSR $47E9 47E3: 20 54 49 JSR $4954 47E6: 60 RTS 47E7: 60 RTS 47E8: EA NOP 47E9: A5 0A LDA $0A 47EB: 48 PHA 47EC: A5 0A LDA $0A 47EE: 29 F0 AND #$F0 47F0: 09 01 ORA #$01 47F2: 85 0A STA $0A 47F4: A5 80 LDA $80 47F6: 8D 05 09 STA $0905 47F9: A5 81 LDA $81 47FB: 8D 06 09 STA $0906 47FE: A9 00 LDA #$00 4800: 85 65 STA $65 4802: AD D2 08 LDA $08D2 4805: 8D F6 08 STA $08F6 4808: AD D3 08 LDA $08D3 480B: 8D F7 08 STA $08F7 480E: A9 C0 LDA #$C0 4810: 8D 00 09 STA $0900 4813: 00 1A 05 INT $051A 4816: 90 03 BCC $481B 4818: 4C 33 49 JMP $4933 481B: 00 1B 05 INT $051B 481E: 90 03 BCC $4823 4820: 4C 33 49 JMP $4933 4823: A2 12 LDX #$12 4825: BD D4 08 LDA $08D4,X 4828: 8D F8 08 STA $08F8 482B: BD D5 08 LDA $08D5,X 482E: 8D F9 08 STA $08F9 4831: A9 00 LDA #$00 4833: 8D 18 09 STA $0918 4836: A9 00 LDA #$00 4838: 8D 19 09 STA $0919 483B: AD 05 09 LDA $0905 483E: 8D 09 CC STA $CC09 4841: AD 06 09 LDA $0906 4844: 8D 0A CC STA $CC0A 4847: A9 00 LDA #$00 4849: 8D 0B CC STA $CC0B 484C: A9 00 LDA #$00 484E: 8D 0C CC STA $CC0C 4851: A9 56 LDA #$56 4853: 85 EA STA $EA 4855: A9 C8 LDA #$C8 4857: 85 EB STA $EB 4859: A9 56 LDA #$56 485B: 85 E2 STA $E2 485D: A9 C8 LDA #$C8 485F: 85 E3 STA $E3 4861: 00 06 05 INT $0506 4864: 90 03 BCC $4869 4866: 4C 33 49 JMP $4933 4869: AD 19 09 LDA $0919 486C: C9 00 CMP #$00 486E: D0 05 BNE $4875 4870: AD 18 09 LDA $0918 4873: C9 00 CMP #$00 4875: D0 03 BNE $487A 4877: 4C E6 48 JMP $48E6 487A: A9 00 LDA #$00 487C: 8D F6 03 STA $03F6 487F: A0 00 LDY #$00 4881: B1 E2 LDA ($E2),Y 4883: 8D F6 08 STA $08F6 4886: C8 INY 4887: B1 E2 LDA ($E2),Y 4889: 8D F7 08 STA $08F7 488C: AD F7 08 LDA $08F7 488F: C9 FF CMP #$FF 4891: D0 05 BNE $4898 4893: AD F6 08 LDA $08F6 4896: C9 FF CMP #$FF 4898: D0 03 BNE $489D 489A: 4C 2E 49 JMP $492E 489D: 00 20 05 INT $0520 48A0: B0 44 BCS $48E6 48A2: AD 0C CC LDA $CC0C 48A5: CD 0A CC CMP $CC0A 48A8: D0 06 BNE $48B0 48AA: AD 0B CC LDA $CC0B 48AD: CD 09 CC CMP $CC09 48B0: F0 0B BEQ $48BD 48B2: EE 0B CC INC $CC0B 48B5: D0 03 BNE $48BA 48B7: EE 0C CC INC $CC0C 48BA: 4C E6 48 JMP $48E6 48BD: A5 65 LDA $65 48BF: 0A ASL 48C0: AA TAX 48CB: 38 SEC 48CC: A5 82 LDA $82 48CE: E9 02 SBC #$02 48D0: 85 82 STA $82 48D2: B0 02 BCS $48D6 48D4: C6 83 DEC $83 48D6: A0 02 LDY #$02 48D8: B1 E2 LDA ($E2),Y 48DA: 91 82 STA ($82),Y 48DC: F0 44 BEQ $4922 48DE: C8 INY 48DF: C0 10 CPY #$10 48E1: 90 F5 BCC $48D8 48E3: 4C 22 49 JMP $4922 48E6: 18 CLC 48E7: A5 E2 LDA $E2 48E9: 69 10 ADC #$10 48EB: 85 E2 STA $E2 48ED: 90 02 BCC $48F1 48EF: E6 E3 INC $E3 48F1: A5 E3 LDA $E3 48F3: C9 CA CMP #$CA 48F5: D0 04 BNE $48FB 48F7: A5 E2 LDA $E2 48F9: C9 56 CMP #$56 48FB: B0 03 BCS $4900 48FD: 4C 7A 48 JMP $487A 4900: 18 CLC 4901: AD 18 09 LDA $0918 4904: 69 00 ADC #$00 4906: 8D 18 09 STA $0918 4909: AD 19 09 LDA $0919 490C: 69 02 ADC #$02 490E: 8D 19 09 STA $0919 4911: AD 19 09 LDA $0919 4914: C9 40 CMP #$40 4916: D0 05 BNE $491D 4918: AD 18 09 LDA $0918 491B: C9 00 CMP #$00 491D: B0 14 BCS $4933 491F: 4C 51 48 JMP $4851 4922: E6 65 INC $65 4924: A5 65 LDA $65 4926: C9 05 CMP #$05 4928: 90 BC BCC $48E6 492A: 18 CLC 492B: 4C 34 49 JMP $4934 492E: A9 02 LDA #$02 4930: 8D CC 08 STA $08CC 4933: 38 SEC 4934: 68 PLA 4935: 85 0A STA $0A 4937: 60 RTS 4938: A5 64 LDA $64 493A: 0A ASL 493B: AA TAX 493C: BD DA 4D LDA $4DDA,X 493F: 85 80 STA $80 4941: BD DB 4D LDA $4DDB,X 4944: 85 81 STA $81 4946: A0 0D LDY #$0D 4948: B1 80 LDA ($80),Y 494A: 99 8D 08 STA $088D,Y 494D: 99 61 BA STA $BA61,Y 4950: 88 DEY 4951: 10 F5 BPL $4948 4953: 60 RTS 4954: A9 00 LDA #$00 4956: 85 57 STA $57 4958: A5 65 LDA $65 495A: D0 03 BNE $495F 495C: 4C 95 49 JMP $4995 495F: A5 57 LDA $57 4961: 0A ASL 4962: AA TAX 4963: BD DA 4D LDA $4DDA,X 4966: 85 80 STA $80 4968: BD DB 4D LDA $4DDB,X 496B: 85 81 STA $81 496D: BD E4 4D LDA $4DE4,X 4970: 85 82 STA $82 4972: BD E5 4D LDA $4DE5,X 4975: 85 83 STA $83 4977: A0 00 LDY #$00 4979: B1 80 LDA ($80),Y 497B: F0 07 BEQ $4984 497D: 91 82 STA ($82),Y 497F: C8 INY 4980: C0 0E CPY #$0E 4982: 90 F5 BCC $4979 4984: A9 00 LDA #$00 4986: 91 82 STA ($82),Y 4988: C8 INY 4989: C0 14 CPY #$14 498B: 90 F7 BCC $4984 498D: E6 57 INC $57 498F: A5 57 LDA $57 4991: C5 65 CMP $65 4993: D0 CC BNE $4961 4995: C9 05 CMP #$05 4997: D0 01 BNE $499A 4999: 60 RTS 499A: 0A ASL 499B: AA TAX 499C: BD E4 4D LDA $4DE4,X 499F: 85 80 STA $80 49A1: BD E5 4D LDA $4DE5,X 49A4: 85 81 STA $81 49A6: 20 B0 49 JSR $49B0 49A9: E6 57 INC $57 49AB: A5 57 LDA $57 49AD: 4C 95 49 JMP $4995 49B0: A9 00 LDA #$00 49B2: A0 13 LDY #$13 49B4: 91 80 STA ($80),Y 49B6: 88 DEY 49B7: 10 FB BPL $49B4 49B9: 60 RTS 49BA: A5 62 LDA $62 49BC: 85 82 STA $82 49BE: A5 63 LDA $63 49C0: 85 83 STA $83 49C2: A5 60 LDA $60 49C4: 85 80 STA $80 49C6: A5 61 LDA $61 49C8: 85 81 STA $81 49CA: A5 80 LDA $80 49CC: D0 02 BNE $49D0 49CE: C6 81 DEC $81 49D0: C6 80 DEC $80 49D2: 00 2C C7 INT $C72C 49D5: A5 62 LDA $62 49D7: 85 80 STA $80 49D9: A5 63 LDA $63 49DB: 85 81 STA $81 49DD: E6 80 INC $80 49DF: D0 02 BNE $49E3 49E1: E6 81 INC $81 49E3: 00 2D C7 INT $C72D 49E6: 60 RTS 49E7: A9 00 LDA #$00 49E9: A0 63 LDY #$63 49EB: 99 2A B8 STA $B82A,Y 49EE: 88 DEY 49EF: 10 FA BPL $49EB 49F1: 60 RTS 49F2: 8A TXA 49F3: 48 PHA 49F4: A9 00 LDA #$00 49F6: A2 09 LDX #$09 49F8: 9D 88 03 STA $0388,X ; clear icons 49FB: CA DEX 49FC: D0 FA BNE $49F8 49FE: 68 PLA 49FF: AA TAX 4A00: A9 00 LDA #$00 4A02: 8D 32 0A STA $0A32 4A05: A2 F3 LDX #$F3 4A07: A0 4D LDY #$4D 4A09: A9 02 LDA #$02 4A0B: 00 12 CA INT $CA12 ; 询问是否 创建文件 4A0E: C9 79 CMP #$79 ; 选择 yes ? 4A10: F0 0F BEQ $4A21 4A12: A5 60 LDA $60 4A14: 05 61 ORA $61 4A16: D0 03 BNE $4A1B 4A18: 4C B8 4D JMP $4DB8 4A1B: 20 5A 46 JSR $465A 4A1E: 4C CB 47 JMP $47CB 4A21: A2 12 LDX #$12 4A23: A9 00 LDA #$00 4A25: 9D 60 BA STA $BA60,X 4A28: CA DEX 4A29: D0 F8 BNE $4A23 4A2B: 20 11 53 JSR $5311 4A2E: AD B4 03 LDA $03B4 4A31: 48 PHA 4A32: AD B5 03 LDA $03B5 4A35: 48 PHA 4A36: AD 91 03 LDA $0391 4A39: 48 PHA 4A3A: AD B3 03 LDA $03B3 4A3D: 48 PHA 4A3E: 20 87 4A JSR $4A87 ; ESC 菜单 4A41: 68 PLA 4A42: 8D B3 03 STA $03B3 4A45: 68 PLA 4A46: 8D 91 03 STA $0391 4A49: 68 PLA 4A4A: 8D B5 03 STA $03B5 4A4D: 68 PLA 4A4E: 8D B4 03 STA $03B4 4A51: A6 57 LDX $57 4A53: F0 1B BEQ $4A70 4A55: E0 01 CPX #$01 4A57: D0 06 BNE $4A5F 4A59: 20 2E 55 JSR $552E 4A5C: 4C 2E 4A JMP $4A2E 4A5F: 8A TXA 4A60: 48 PHA 4A61: A9 00 LDA #$00 4A63: A2 09 LDX #$09 4A65: 9D 88 03 STA $0388,X 4A68: CA DEX 4A69: D0 FA BNE $4A65 4A6B: 68 PLA 4A6C: AA TAX 4A6D: 4C 12 4A JMP $4A12 4A70: 90 BC BCC $4A2E 4A72: 20 CB 47 JSR $47CB 4A75: 20 5A 46 JSR $465A 4A78: 8A TXA 4A79: 48 PHA 4A7A: A9 00 LDA #$00 4A7C: A2 09 LDX #$09 4A7E: 9D 88 03 STA $0388,X 4A81: CA DEX 4A82: D0 FA BNE $4A7E 4A84: 68 PLA 4A85: AA TAX 4A86: 60 RTS 4A87: BA TSX 4A88: 86 57 STX $57 4A8A: A2 2B LDX #$2B 4A8C: A0 4F LDY #$4F 4A8E: 00 02 CB INT $CB02 4A91: 60 RTS 4A92: 00 2A C7 INT $C72A 4A95: A2 0D LDX #$0D 4A97: BD BD 4E LDA $4EBD,X 4A9A: 9D BF 02 STA $02BF,X 4A9D: CA DEX 4A9E: D0 F7 BNE $4A97 4AA0: A9 0C LDA #$0C 4AA2: 8D 4A 04 STA $044A 4AA5: AD 91 03 LDA $0391 4AA8: 09 01 ORA #$01 4AAA: 8D 91 03 STA $0391 4AAD: A9 00 LDA #$00 4AAF: 8D 47 04 STA $0447 4AB2: A9 00 LDA #$00 4AB4: 8D B3 03 STA $03B3 4AB7: A9 FF LDA #$FF 4AB9: 8D AF 03 STA $03AF 4ABC: A9 FF LDA #$FF 4ABE: 8D B0 03 STA $03B0 4AC1: 00 19 C7 INT $C719 4AC4: 60 RTS 4AC5: 20 92 4A JSR $4A92 4AC8: AC 61 BA LDY $BA61 4ACB: F0 13 BEQ $4AE0 4ACD: A0 00 LDY #$00 4ACF: B9 61 BA LDA $BA61,Y 4AD2: F0 0C BEQ $4AE0 4AD4: C9 2E CMP #$2E 4AD6: F0 08 BEQ $4AE0 4AD8: 99 D4 02 STA $02D4,Y 4ADB: C8 INY 4ADC: C0 0E CPY #$0E 4ADE: 90 EF BCC $4ACF 4AE0: 98 TYA 4AE1: A2 EE LDX #$EE 4AE3: A0 4D LDY #$4D 4AE5: 20 19 4C JSR $4C19 4AE8: 00 07 CB INT $CB07 4AEB: 4C F8 4A JMP $4AF8 4AEE: 20 92 4A JSR $4A92 4AF1: A2 EE LDX #$EE 4AF3: A0 4D LDY #$4D 4AF5: 00 06 CB INT $CB06 ; 输入法 4AF8: C9 1B CMP #$1B 4AFA: F0 11 BEQ $4B0D 4AFC: C9 0D CMP #$0D 4AFE: F0 1E BEQ $4B1E ; 确定 4B00: C9 19 CMP #$19 4B02: D0 03 BNE $4B07 4B04: 4C EE 4A JMP $4AEE 4B07: 00 07 CB INT $CB07 4B0A: 4C F8 4A JMP $4AF8 4B0D: 18 CLC 4B0E: A9 00 LDA #$00 4B10: F0 06 BEQ $4B18 4B12: A9 01 LDA #$01 4B14: D0 02 BNE $4B18 4B16: A9 02 LDA #$02 4B18: A6 57 LDX $57 4B1A: 85 57 STA $57 4B1C: 9A TXS 4B1D: 60 RTS 4B1E: AD D4 02 LDA $02D4 4B21: F0 CE BEQ $4AF1 ; 文件名为空 4B23: A0 00 LDY #$00 4B25: B9 D4 02 LDA $02D4,Y 4B28: F0 11 BEQ $4B3B 4B2A: C9 2E CMP #$2E 4B2C: F0 C3 BEQ $4AF1 4B2E: C9 2F CMP #$2F 4B30: F0 BF BEQ $4AF1 4B32: C9 20 CMP #$20 4B34: F0 BB BEQ $4AF1 4B36: C8 INY 4B37: C0 0A CPY #$0A 4B39: 90 EA BCC $4B25 4B3B: A2 00 LDX #$00 4B3D: BD FB 4B LDA $4BFB,X 4B40: 99 D4 02 STA $02D4,Y 4B43: C8 INY 4B44: E8 INX 4B45: E0 04 CPX #$04 4B47: 90 F4 BCC $4B3D 4B49: A9 00 LDA #$00 4B4B: 99 D4 02 STA $02D4,Y 4B4E: A2 0E LDX #$0E 4B50: BD D3 02 LDA $02D3,X 4B53: 9D 60 BA STA $BA60,X 4B56: CA DEX 4B57: D0 F7 BNE $4B50 4B59: A2 0E LDX #$0E 4B5B: BD 60 BA LDA $BA60,X 4B5E: 9D 8C 08 STA $088C,X 4B61: CA DEX 4B62: D0 F7 BNE $4B5B 4B64: 20 FF 4B JSR $4BFF ; open or create a file then close it. 4B67: 90 16 BCC $4B7F 4B69: A9 60 LDA #$60 4B6B: 8D C9 08 STA $08C9 4B6E: A9 CF LDA #$CF 4B70: 8D CA 08 STA $08CA 4B73: A9 FF LDA #$FF 4B75: 8D CB 08 STA $08CB 4B78: A9 00 LDA #$00 4B7A: 85 59 STA $59 4B7C: 4C 9D 4B JMP $4B9D ; 有同名文件存在,询问是否覆盖 4B7F: A9 00 LDA #$00 4B81: 8D 32 0A STA $0A32 4B84: A2 FD LDX #$FD 4B86: A0 4D LDY #$4D 4B88: A9 02 LDA #$02 4B8A: 00 12 CA INT $CA12 ; 弹窗 4B8D: C9 79 CMP #$79 4B8F: F0 03 BEQ $4B94 ; yes 4B91: 4C C5 4A JMP $4AC5 4B94: A9 50 LDA #$50 4B96: 8D C9 08 STA $08C9 4B99: A9 01 LDA #$01 4B9B: 85 59 STA $59 4B9D: 00 15 05 INT $0515 4BA0: 90 14 BCC $4BB6 4BA2: AD CC 08 LDA $08CC 4BA5: C9 0E CMP #$0E 4BA7: F0 07 BEQ $4BB0 4BA9: C9 19 CMP #$19 4BAB: F0 03 BEQ $4BB0 4BAD: 4C B8 4D JMP $4DB8 4BB0: 20 8F 4D JSR $4D8F 4BB3: 4C 0D 4B JMP $4B0D 4BB6: A9 00 LDA #$00 4BB8: 85 E0 STA $E0 4BBA: A9 70 LDA #$70 4BBC: 85 E1 STA $E1 4BBE: 38 SEC 4BBF: AD 58 BA LDA $BA58 4BC2: E9 00 SBC #$00 4BC4: 8D C6 08 STA $08C6 4BC7: AD 59 BA LDA $BA59 4BCA: E9 70 SBC #$70 4BCC: 8D C7 08 STA $08C7 4BCF: 00 18 05 INT $0518 4BD2: B0 19 BCS $4BED 4BD4: 00 17 05 INT $0517 4BD7: A5 59 LDA $59 4BD9: D0 0E BNE $4BE9 4BDB: A5 60 LDA $60 4BDD: 85 62 STA $62 4BDF: A5 61 LDA $61 4BE1: 85 63 STA $63 4BE3: E6 60 INC $60 4BE5: D0 02 BNE $4BE9 4BE7: E6 61 INC $61 4BE9: 38 SEC 4BEA: 4C 0E 4B JMP $4B0E 4BED: 48 PHA 4BEE: 00 17 05 INT $0517 4BF1: 00 0E 05 INT $050E 4BF4: 68 PLA 4BF5: 8D CC 08 STA $08CC ; file error code 4BF8: 4C A2 4B JMP $4BA2 4BFB: .db "." 4BFC: .db "BAS" ; open or create a file and close it. 4BFF: A9 80 LDA #$80 4C01: 8D C9 08 STA $08C9 4C04: 00 15 05 INT $0515 4C07: 90 0B BCC $4C14 4C09: AD CC 08 LDA $08CC 4C0C: C9 02 CMP #$02 4C0E: F0 03 BEQ $4C13 4C10: 4C B8 4D JMP $4DB8 4C13: 60 RTS 4C14: 00 17 05 INT $0517 4C17: 18 CLC 4C18: 60 RTS 4C19: 86 A8 STX $A8 4C1B: 84 A9 STY $A9 4C1D: 8D 13 06 STA $0613 4C20: AD 91 03 LDA $0391 4C23: 09 01 ORA #$01 4C25: 8D 91 03 STA $0391 4C28: A0 00 LDY #$00 4C2A: B1 A8 LDA ($A8),Y 4C2C: 8D 14 06 STA $0614 4C2F: C8 INY 4C30: B1 A8 LDA ($A8),Y 4C32: 85 8A STA $8A 4C34: C8 INY 4C35: B1 A8 LDA ($A8),Y 4C37: 8D 15 06 STA $0615 4C3A: 60 RTS ; 判断文件名后缀是否是 BAS,若是则 A=0,否则 A!=0 4C3B: A5 64 LDA $64 4C3D: 0A ASL 4C3E: AA TAX 4C3F: BD DA 4D LDA $4DDA,X 4C42: 85 80 STA $80 4C44: BD DB 4D LDA $4DDB,X 4C47: 85 81 STA $81 4C49: A0 00 LDY #$00 4C4B: B1 80 LDA ($80),Y 4C4D: F0 09 BEQ $4C58 4C4F: C9 2E CMP #$2E 4C51: F0 08 BEQ $4C5B 4C53: C8 INY 4C54: C0 0E CPY #$0E 4C56: 90 F3 BCC $4C4B 4C58: A9 FF LDA #$FF 4C5A: 60 RTS 4C5B: A2 00 LDX #$00 4C5D: C8 INY 4C5E: C0 0E CPY #$0E 4C60: B0 F6 BCS $4C58 4C62: B1 80 LDA ($80),Y 4C64: C9 61 CMP #$61 4C66: 90 06 BCC $4C6E 4C68: C9 7B CMP #$7B 4C6A: B0 02 BCS $4C6E 4C6C: 29 DF AND #$DF 4C6E: DD FC 4B CMP $4BFC,X 4C71: F0 01 BEQ $4C74 4C73: 60 RTS 4C74: E8 INX 4C75: E0 03 CPX #$03 4C77: D0 E4 BNE $4C5D 4C79: C8 INY 4C7A: C0 0E CPY #$0E 4C7C: F0 02 BEQ $4C80 4C7E: B1 80 LDA ($80),Y 4C80: 60 RTS ; 切换 /BASIC文件 工作目录 4C81: A2 0B LDX #$0B 4C83: BD CE 4D LDA $4DCE,X 4C86: 9D 8C 08 STA $088C,X 4C89: CA DEX 4C8A: D0 F7 BNE $4C83 4C8C: 00 0D 05 INT $050D 4C8F: B0 01 BCS $4C92 4C91: 60 RTS ; 创建 /BASIC文件 目录 4C92: AD CC 08 LDA $08CC 4C95: C9 02 CMP #$02 4C97: F0 02 BEQ $4C9B 4C99: 38 SEC 4C9A: 60 RTS 4C9B: 00 0B 05 INT $050B 4C9E: 90 E1 BCC $4C81 4CA0: 60 RTS ; 读取nand 4CA1: A5 0A LDA $0A 4CA3: 48 PHA 4CA4: A5 0A LDA $0A 4CA6: 29 F0 AND #$F0 4CA8: 09 01 ORA #$01 4CAA: 85 0A STA $0A 4CAC: A9 00 LDA #$00 4CAE: 85 60 STA $60 4CB0: A9 00 LDA #$00 4CB2: 85 61 STA $61 4CB4: AD D2 08 LDA $08D2 4CB7: 8D F6 08 STA $08F6 4CBA: AD D3 08 LDA $08D3 4CBD: 8D F7 08 STA $08F7 4CC0: A9 C0 LDA #$C0 4CC2: 8D 00 09 STA $0900 4CC5: 00 1A 05 INT $051A 4CC8: 00 1B 05 INT $051B 4CCB: A2 12 LDX #$12 4CCD: BD D4 08 LDA $08D4,X 4CD0: 8D F8 08 STA $08F8 4CD3: BD D5 08 LDA $08D5,X 4CD6: 8D F9 08 STA $08F9 4CD9: A9 00 LDA #$00 4CDB: 8D 18 09 STA $0918 4CDE: A9 00 LDA #$00 4CE0: 8D 19 09 STA $0919 4CE3: 20 0B 4D JSR $4D0B 4CE6: B0 1F BCS $4D07 4CE8: 18 CLC 4CE9: AD 18 09 LDA $0918 4CEC: 69 00 ADC #$00 4CEE: 8D 18 09 STA $0918 4CF1: AD 19 09 LDA $0919 4CF4: 69 02 ADC #$02 4CF6: 8D 19 09 STA $0919 4CF9: AD 19 09 LDA $0919 4CFC: C9 40 CMP #$40 4CFE: D0 05 BNE $4D05 4D00: AD 18 09 LDA $0918 4D03: C9 00 CMP #$00 4D05: 90 DC BCC $4CE3 4D07: 68 PLA 4D08: 85 0A STA $0A 4D0A: 60 RTS 4D0B: A9 56 LDA #$56 4D0D: 85 EA STA $EA 4D0F: A9 C8 LDA #$C8 4D11: 85 EB STA $EB 4D13: A9 56 LDA #$56 4D15: 85 E2 STA $E2 4D17: A9 C8 LDA #$C8 4D19: 85 E3 STA $E3 4D1B: 00 06 05 INT $0506 4D1E: AD 19 09 LDA $0919 4D21: C9 00 CMP #$00 4D23: D0 05 BNE $4D2A 4D25: AD 18 09 LDA $0918 4D28: C9 00 CMP #$00 4D2A: D0 03 BNE $4D2F 4D2C: 4C 43 4D JMP $4D43 4D2F: A9 00 LDA #$00 4D31: 8D F6 03 STA $03F6 4D34: 20 60 4D JSR $4D60 4D37: B0 0A BCS $4D43 4D39: C9 FF CMP #$FF 4D3B: F0 21 BEQ $4D5E 4D3D: E6 60 INC $60 4D3F: D0 02 BNE $4D43 4D41: E6 61 INC $61 4D43: 18 CLC 4D44: A5 E2 LDA $E2 4D46: 69 10 ADC #$10 4D48: 85 E2 STA $E2 4D4A: 90 02 BCC $4D4E 4D4C: E6 E3 INC $E3 4D4E: A5 E3 LDA $E3 4D50: C9 CA CMP #$CA 4D52: D0 04 BNE $4D58 4D54: A5 E2 LDA $E2 4D56: C9 56 CMP #$56 4D58: 90 D5 BCC $4D2F 4D5A: 18 CLC 4D5B: 4C 5F 4D JMP $4D5F 4D5E: 38 SEC 4D5F: 60 RTS 4D60: A0 00 LDY #$00 4D62: B1 E2 LDA ($E2),Y 4D64: 8D F6 08 STA $08F6 4D67: C8 INY 4D68: B1 E2 LDA ($E2),Y 4D6A: 8D F7 08 STA $08F7 4D6D: AD F7 08 LDA $08F7 4D70: C9 FF CMP #$FF 4D72: D0 05 BNE $4D79 4D74: AD F6 08 LDA $08F6 4D77: C9 FF CMP #$FF 4D79: D0 03 BNE $4D7E 4D7B: 4C 8B 4D JMP $4D8B 4D7E: 00 20 05 INT $0520 4D81: B0 04 BCS $4D87 4D83: A9 00 LDA #$00 4D85: 18 CLC 4D86: 60 RTS 4D87: A9 00 LDA #$00 4D89: 38 SEC 4D8A: 60 RTS 4D8B: A9 FF LDA #$FF 4D8D: 18 CLC 4D8E: 60 RTS ; 显示 空间已满 对话框 4D8F: A9 00 LDA #$00 4D91: 8D 32 0A STA $0A32 4D94: A2 A4 LDX #$A4 4D96: A0 4D LDY #$4D 4D98: A9 00 LDA #$00 4D9A: 00 12 CA INT $CA12 4D9D: 20 2A E0 JSR $E02A 4DA0: 20 2A E0 JSR $E02A 4DA3: 60 RTS 4DA4: 80 ?? 4DA5: AE 4D 20 LDX $204D 4DA8: 19 08 02 ORA $0208,Y 4DAB: AD 4D 02 LDA $024D 4DAE: BF ?? 4DAF: D5 BC CMP $BC,X 4DB1: E4 D2 CPX $D2 4DB3: D1 C2 CMP ($C2),Y 4DB5: FA ?? 4DB6: 00 00 4DB8: 00 03 12 INT $0312 4DBB: 00 4DBC: A2 09 LDX #$09 4DBE: 9D 88 03 STA $0388,X 4DC1: CA DEX 4DC2: D0 FA BNE $4DBE 4DC4: 68 PLA 4DC5: AA TAX 4DC6: 00 23 05 INT $0523 4DC9: A6 5F LDX $5F 4DCB: 9A TXS 4DCC: 4C 6C 52 JMP $526C 4DCF: 2F ?? 4DD0: 42 ?? 4DD1: 41 53 EOR ($53,X) 4DD3: 49 43 EOR #$43 4DD5: CE C4 BC DEC $BCC4 4DD8: FE 00 2A INC $2A00,X 4DDB: B8 CLV 4DDC: 3E B8 52 ROL $52B8,X 4DDF: B8 CLV 4DE0: 66 B8 ROR $B8 4DE2: 7A ?? 4DE3: B8 CLV 4DE4: C0 02 CPY #$02 4DE6: D4 ?? 4DE7: 02 ?? 4DE8: E8 INX 4DE9: 02 ?? 4DEA: FC ?? 4DEB: 02 ?? 4DEC: 10 03 BPL $4DF1 4DEE: 14 ?? 4DEF: 0A ASL 4DF0: 20 93 4E JSR $4E93 ; 调用信息框的参数 ; "创建新文件?" 4DF3: 80 ?? 4DF4: CB ?? 4DF5: 4E 18 10 LSR $1018 4DF8: 0C ?? 4DF9: 02 ?? 4DFA: FC ?? 4DFB: 4D 02 ; 调用信息框的参数 ; "有同名文件存在,覆盖?" 4DFD: 80 4DFE: D9 4E 1A CMP $1A4E,Y 4E01: 08 PHP 4E02: 0C ?? 4E03: 04 ?? 4E04: 06 4E ASL $4E 4E06: 02 ?? ; 调用信息框的参数 ; "确实删除?" 4E07: 80 ?? 4E08: F4 ?? 4E09: 4E 1A 12 LSR $121A 4E0C: 0C ?? 4E0D: 02 ?? 4E0E: 10 4E BPL $4E5E 4E10: 02 ?? ; 调用信息框的参数 ; "文件超长 不可编辑" 4E11: 80 ?? 4E12: 01 4F ORA ($4F,X) 4E14: 28 PLP 4E15: 12 ?? 4E16: 08 PHP 4E17: 04 ?? 4E18: 1A ?? 4E19: 4E 02 ; 调用信息框的参数 ; "非BAS文件" 4E1B: .db $80 ; 固定 4E1C: .dw $4f14 ; 文字地址, 文字以 00 结尾或换行 4E1E: .db $22, $1e ; x, y 坐标 4E20: .db $0A ; 文字长度 4E21: .db $02 ; 行数, 02 是1行, 04 是2行, ... 最大4行 4E22: .dw $4e24 ; 文字模式 所在的地址 4E24: .db $02 ; 文字模式 02 = 8x16正常文字, 04 = 8x8正常文字 82 = 8x16反显文字, 84 = 8x8反显文字 ; 调用信息框的参数 ; "空间不足" 4E25: .db $80 4E26: .dw $4f20 4e28: .db $26, $1e 4E2A: .db $09 4E2B: .db $02 4E2C: .db $4e2E 4E2E: .db $02 4E2F: 2D 2D 2D AND $2D2D 4E32: 2D 2D 2D AND $2D2D 4E35: 2D 2D 2D AND $2D2D 4E38: 2D 2D 2D AND $2D2D 4E3B: 2D 2D 2D AND $2D2D 4E3E: 2D 2D 2D AND $2D2D 4E41: 2D 2D 20 AND $202D 4E44: 20 20 20 JSR $2020 4E47: CE C4 BC DEC $BCC4 4E4A: FE BC D3 INC $D3BC,X 4E4D: D4 ?? 4E4E: D8 CLD 4E4F: B4 ED LDY $ED,X 4E51: CE F3 20 DEC $20F3 4E54: 20 20 20 JSR $2020 4E57: 20 20 C7 JSR $C720 4E5A: EB ?? 4E5B: D6 D8 DEC $D8,X 4E5D: D0 C2 BNE $4E21 4E5F: C9 FD CMP #$FD 4E61: BC B6 B4 LDY $B4B6,X 4E64: CB ?? 4E65: CE C4 BC DEC $BCC4 4E68: FE 20 20 INC $2020,X 4E6B: 20 20 20 JSR $2020 4E6E: 20 20 20 JSR $2020 4E71: 20 20 20 JSR $2020 4E74: 20 20 20 JSR $2020 4E77: 20 20 20 JSR $2020 4E7A: 20 20 20 JSR $2020 4E7D: 20 20 2D JSR $2D20 4E80: 2D 2D 2D AND $2D2D 4E83: 2D 2D 2D AND $2D2D 4E86: 2D 2D 2D AND $2D2D 4E89: 2D 2D 2D AND $2D2D 4E8C: 2D 2D 2D AND $2D2D 4E8F: 2D 2D 2D AND $2D2D 4E92: 2D 3D 3D AND $3D3D 4E95: 3D 3D 3D AND $3D3D,X 4E98: 20 47 56 JSR $5647 4E9B: 20 42 41 JSR $4142 4E9E: 53 ?? 4E9F: 49 43 EOR #$43 4EA1: 20 3D 3D JSR $3D3D 4EA4: 3D 3D 3D AND $3D3D,X 4EA7: 00 CA E4 INT $E4CA 4EAA: C8 INY 4EAB: EB ?? 4EAC: C4 FA CPY $FA 4EAE: CB ?? 4EAF: F9 C8 A1 SBC $A1C8,Y 4EB2: B5 C4 LDA $C4,X 4EB4: CE C4 BC DEC $BCC4 4EB7: FE C3 FB INC $FBC3,X 4EBA: A1 A3 LDA ($A3,X) 4EBC: 00 00 C7 INT $C700 4EBF: EB ?? 4EC0: CA DEX 4EC1: E4 C8 CPX $C8 4EC3: EB ?? 4EC4: CE C4 BC DEC $BCC4 4EC7: FE C3 FB INC $FBC3,X 4ECA: 3A ?? 4F2A: 00 4F2B: 09 INT $0900 4F2C: 03 ?? 4F2D: .dw $4ac5 ; 保存文件 4F2F: .dw $4f5A ; 返回编辑 4F31: .dw $4b12 ; 放弃保存 4F33: .dw $4f85 ; 4F35: 16 4B ASL $4B,X 4F37: B2 ?? 4F38: 4F ?? 4F39: .db "1.保存文件" 4F43: .db $FF 4F44: .db "2.返回编辑" 4F4E: .db $FF 4F4F: .db "3.放弃保存" 4F59: .db $FF 4F5A: .db "===== GV BASIC =====" 4F6E: .db $00 4F71: .db "输入文件名保存文件。" 4F83: .db $00, $00 4F85: .db "===== GV BASIC =====" 4F99: .db $00 4F9A: .db "返回编辑界面继续编辑。" 4FB0: .db $00, $00 4FB2: .db "===== GV BASIC =====" 4FC6: .db $00 4FC9: .db "放弃保存文件返回菜单。" 4FDD: .db $00,$00 4FDF: .db "+-*/^>=< " 4FE8: .db $00 4FE9: .db ":;,\"()" 4FEF: .db $C9, $CA, $CB, $CC, $CD, $D0, $D1, $D2 ; table of commands ; each ended with a bit mask $80 4FF7: .DB $45, $4E, $C4 ; end 4FFA: .DB $46, $4f, $d2 ; for 4FFD: .DB $4E, $45, $58, $d4 ; next 5001: .DB $44, $41, $54, $c1 ; data 5005: .DB $49, $4e, $50, $55, $d4 ; input 500A: .DB $44, $45, $cc ; del 500D: .DB $44, $49, $cd ; dim 5010: .DB $52, $45, $41, $c4 ; read 5014: .DB $53, $57, $41, $d0 ; swap 5018: .DB $54, $52, $41, $43, $c5 ; trace 501d: .DB $4E, $4f, $54, $52, $41, $43, $c5 ; notrace 5024: .DB $50, $4f, $d0 ; pop 5027: .DB $4C, $45, $d4 ; let 502A: .DB $47, $4f, $54, $cf ; goto 502E: .DB $52, $55, $ce ; run 5031: .DB $49, $C6 ; if 5033: .DB $52, $45, $53, $54, $4f, $52, $cf ; restore 5039: .DB $47, $4f, $53, $55, $c2 ; gosub 503F: .DB $52, $45, $54, $55, $52, $ce ; return 5045: .DB $52, $45, $cd ; rem 5048: .DB $53, $54, $4f, $d0 ; stop 504C: .DB $4F, $ce ; on 504E: .DB $44, $45, $c6 ; def 5051: .DB $50, $4f, $4b, $c5 ; poke 5055: .DB $50, $52, $49, $4e, $d4 ; print 505A: .DB $43, $4f, $4e, $d4 ; cont 505e: .DB $4C, $49, $53, $d4 ; list 5062: .DB $43, $4c, $45, $41, $d2 ; clear 5067: .DB $4E, $45, $D7 ; new 506A: .db $54, $45, $58, $d4 ; text 506E: .db $47, $52, $41, $50, $c8 ; graph 5073: .db $53, $59, $53, $54, $45, $cd ; system 5079: .db $4E, $4F, $52, $4d, $41, $cc ; normal 507F: .db $49, $4E, $56, $45, $52, $53, $c5 ; inverse 5086: .db $46, $4c, $41, $53, $c8 ; flash 508B: .db $50, $4C, $41, $d9 ; play 508F: .db $42, $45, $45, $d0 ; beep 5093: .db $49, $4e, $4b, $45, $59, $a4 ; inkey$ 5099: .db $4C, $4f, $41, $c4 ; load 509D: .db $53, $41, $56, $c5 ; save 50A1: .db $4B, $49, $4c, $cc ; kill 50A5: .db $46, $49, $4c, $45, $d3 ; files 50AA: .db $4F, $50, $45, $ce ; open 50AE: .db $43, $4C, $4f, $53, $c5 ; close 50B2: .db $57, $52, $49, $54, $c5 ; write 50B8: .db $46, $49, $45, $4c, $c4 ; field 50Bd: .db $47, $45, $d4 ; get 50C0: .db $50, $55, $d4 ; put 50C3: .db $4C, $53, $45, $d4 ; lset 50C7: .db $52, $53, $45, $d4 ; rset 50CB: .db $41, $55, $54, $cf ; auto 50CF: .db $4C, $4F, $43, $41, $54, $c5 ; locate 50D5: .db $44, $52, $41, $d7 ; draw 50D9: .db $4C, $49, $4E, $c5 ; line 50DD: .db $42, $4f, $d8 ; box 50E0: .db $43, $49, $52, $43, $4c, $c5 ; circle 50E6: .db $45, $4c, $4c, $49, $50, $53, $c5 ; ellipse 50ED: .db $43, $4c, $d3 ; cls 50f0: .db $45, $44, $49, $d4 ; edit 50F4: .db $57, $48, $49, $4c, $c5 ; while 50F9: .db $57, $45, $4e, $c4 ; wend 50FD: .db $43, $41, $4c, $cc ; call 5101: .db $52, $45, $4e, $41, $4d, $c5 ; rename 5107: .db $43, $4f, $50, $d9 ; copy 510B: .db $54, $41, $c2 ; tab 510E: .db $54, $cf ; to 5110: .db $46, $CE ; fn 5112: .db $53, $50, $c3 ; spc 5116: .db $48, $45, $ce ; then 5119: .db $45, $4C, $53, $c5 ; else 511d: .db $41, $d4 ; at 511F: .db $4E, $4F, $D4 ; not 5122: .db $53, $54, $45, $d0 ; step 5126: .db $AB ; + 5127: .db $AD ; - 5128: .db $AA ; * 5129: .db $AF ; / 512A: .db $DE ; ^ 512b: .db $41, $4E, $c4 ; and 512E: .db $4F, $D2 ; or 5130: .db $BE ; > 5131: .db $BD ; = 5132: .db $BC ; < 5133: .db $53, $47, $ce ; sgn 5136: .db $49, $4E, $d4 ; int 5139: .db $41, $42, $d3 ; abs 513C: .db $50, $4F, $d3 ; pos 513F: .db $53, $51, $d2 ; sqr 5142: .db $52, $4e, $c4 ; rnd 5145: .db $4C, $4f, $c7 ; log 5148: .db $45, $58, $d0 ; exp 514V: .db $43, $4f, $d3 ; cos 514E: .db $53, $49, $ce ; sin 5151: .db $54, $41, $ce ; tan 5154: .db $41, $54, $ce ; atn 5157: .db $50, $45, $45, $cb ; peek 515B: .db $4C, $45, $CE ; len 515E: .db $53, $54, $52, $a4 ; str$ 5162: .db $56, $41, $cc ; val 5165: .db $41, $53, $c3 ; asc 5168: .db $4D, $4B, $53, $a4 ; mks$ 516C: .db $4D, $4b, $49, $a4 ; mki$ 5170: .db $43, $56, $53, $a4 ; cvs$ 5174: .db $43, $56, $49, $a4 ; cvi$ 5178: .db $4C, $4f, $c6 ; lof 517B: .db $45, $4f, $c6 ; eof 517e: .db $43, $48, $52, $a4 ; chr$ 5182: .db $4C, $45, $46, $54, $a4 ; left$ 5187: .db $52, $49, $47, $48, $54, $a4 ; right$ 518d: .db $4D, $49, $44, $a4 ; mid$ 5191: .db $00 5192: A2 00 LDX #$00 5194: A0 64 LDY #$64 5196: D0 07 BNE $519F 5198: 20 AC 51 JSR $51AC 519B: A2 50 LDX #$50 519D: A0 14 LDY #$14 519F: A9 00 LDA #$00 51A1: 9D C0 02 STA $02C0,X 51A4: E8 INX 51A5: 88 DEY 51A6: D0 F9 BNE $51A1 51A8: 00 1A C7 INT $C71A 51AB: 60 RTS 51AC: A9 C0 LDA #$C0 51AE: 85 80 STA $80 51B0: A9 23 LDA #$23 51B2: 85 81 STA $81 51B4: A2 00 LDX #$00 51B6: F0 0A BEQ $51C2 51B8: A5 80 LDA $80 51BA: 69 28 ADC #$28 51BC: 85 80 STA $80 51BE: 90 02 BCC $51C2 51C0: E6 81 INC $81 51C2: A9 00 LDA #$00 51C4: A0 27 LDY #$27 51C6: 91 80 STA ($80),Y 51C8: 88 DEY 51C9: D0 FB BNE $51C6 51CB: A9 C0 LDA #$C0 51CD: 31 80 AND ($80),Y 51CF: 91 80 STA ($80),Y 51D1: E8 INX 51D2: E0 10 CPX #$10 51D4: 90 E2 BCC $51B8 51D6: 60 RTS 51D7: A0 00 LDY #$00 51D9: B9 E5 51 LDA $51E5,Y 51DC: 99 00 BF STA $BF00,Y 51DF: C8 INY 51E0: D0 F7 BNE $51D9 51E2: 4C 00 BF JMP $BF00 ; 把 bin 文件偏移 $3000 (原地址 $7000) 之后的代码读取到 $6000,然后 JSR $6000 51E5: A9 00 LDA #$00 51E7: 8D D1 08 STA $08D1 51EA: A9 00 LDA #$00 51EC: 8D CD 08 STA $08CD 51EF: 8D D0 08 STA $08D0 51F2: A9 30 LDA #$30 51F4: 8D CE 08 STA $08CE 51F7: A9 00 LDA #$00 51F9: 8D CF 08 STA $08CF 51FC: 00 27 05 INT $0527 51FF: B0 4C BCS $524D 5201: A9 00 LDA #$00 5203: 85 E0 STA $E0 5205: A9 60 LDA #$60 5207: 85 E1 STA $E1 5209: A9 00 LDA #$00 520B: 8D C6 08 STA $08C6 520E: A9 52 LDA #$52 5210: 8D C7 08 STA $08C7 5213: 00 26 05 INT $0526 5216: B0 36 BCS $524E 5218: 20 00 60 JSR $6000 521B: 00 23 05 INT $0523 521E: A9 00 LDA #$00 5220: 8D D1 08 STA $08D1 5223: A9 00 LDA #$00 5225: 8D CD 08 STA $08CD 5228: 8D CF 08 STA $08CF 522B: 8D D0 08 STA $08D0 522E: A9 04 LDA #$04 5230: 8D CE 08 STA $08CE 5233: 00 27 05 INT $0527 5236: A9 00 LDA #$00 5238: 85 E0 STA $E0 523A: A9 44 LDA #$44 523C: 85 E1 STA $E1 523E: A9 00 LDA #$00 5240: 8D C6 08 STA $08C6 5243: A9 6C LDA #$6C 5245: 8D C7 08 STA $08C7 5248: 00 26 05 INT $0526 524B: B0 01 BCS $524E 524D: 60 RTS ; 显示 文件加载错误,请重新升级此文件 524E: A2 64 LDX #$64 5250: BD AC 52 LDA $52AC,X 5253: 9D BF 02 STA $02BF,X 5256: CA DEX 5257: D0 F7 BNE $5250 5259: A9 FF LDA #$FF 525B: 8D AF 03 STA $03AF 525E: A9 FF LDA #$FF 5260: 8D B0 03 STA $03B0 5263: 00 19 C7 INT $C719 5266: 00 06 C0 INT $C006 5269: 4C 66 52 JMP $5266 526C: A0 00 LDY #$00 526E: B9 7A 52 LDA $527A,Y 5271: 99 00 BF STA $BF00,Y 5274: C8 INY 5275: D0 F7 BNE $526E 5277: 4C 00 BF JMP $BF00 527A: AD 28 B8 LDA $B828 527D: 85 0A STA $0A 527F: A9 00 LDA #$00 5281: 8D D1 08 STA $08D1 5284: A9 00 LDA #$00 5286: 8D CD 08 STA $08CD 5289: 8D CE 08 STA $08CE 528C: 8D CF 08 STA $08CF 528F: 8D D0 08 STA $08D0 5292: 00 27 05 INT $0527 5295: A9 00 LDA #$00 5297: 85 E0 STA $E0 5299: A9 40 LDA #$40 529B: 85 E1 STA $E1 529D: A9 00 LDA #$00 529F: 8D C6 08 STA $08C6 52A2: A9 7E LDA #$7E 52A4: 8D C7 08 STA $08C7 52A7: 00 26 05 INT $0526 52AA: B0 A2 BCS $524E 52AC: 60 RTS ; 文件加载错误,请重新升级此文件 52AD: .db "--------------------" 52C1: .db " 文件加载错误 " 52D7: .db "请重新升级此文件 " 52AD: .db "--------------------" 5311: 20 49 JSR $6D49 ; clear $7000-$AFFF 5313: A9 00 LDA #$00 5316: 85 53 STA $53 5318: A9 70 LDA #$70 531A: 85 54 STA $54 531C: A9 03 LDA #$03 531E: 8D 58 BA STA $BA58 5321: A9 70 LDA #$70 5323: 8D 59 BA STA $BA59 5326: A9 80 LDA #$80 5328: 85 52 STA $52 532A: A9 0A LDA #$0A 532C: 8D 5A BA STA $BA5A 532F: A9 00 LDA #$00 5331: 8D 5B BA STA $BA5B 5334: A9 00 LDA #$00 5336: 8D 79 BA STA $BA79 5339: A9 00 LDA #$00 533B: 8D 7A BA STA $BA7A 533E: AD 91 03 LDA $0391 5341: 09 01 ORA #$01 5343: 8D 91 03 STA $0391 5346: A9 00 LDA #$00 5348: 8D 47 04 STA $0447 ; input mode 534B: A9 20 LDA #$20 534D: 0D 48 04 ORA $0448 5350: 8D 48 04 STA $0448 ; chinese mode 5353: 20 DD 54 JSR $54DD 5356: 60 RTS 5357: 20 49 6D JSR $6D49 ; clear $7000-$AFFF 535A: A9 0A LDA #$0A 535C: 8D 5A BA STA $BA5A 535F: A9 00 LDA #$00 5361: 8D 5B BA STA $BA5B 5364: A9 00 LDA #$00 5366: 8D 79 BA STA $BA79 5369: A9 00 LDA #$00 536B: 8D 7A BA STA $BA7A 536E: AD 77 BA LDA $BA77 5371: 85 80 STA $80 5373: AD 78 BA LDA $BA78 5376: 85 81 STA $81 5378: 20 DC 67 JSR $67DC ; read BAS file 537B: 00 17 05 INT $0517 537E: 20 FA 68 JSR $68FA ; adjust address 5381: 20 4D 62 JSR $624D ; store file end address in $BA58, $BA59 5384: A9 00 LDA #$00 5386: 85 53 STA $53 5388: A9 70 LDA #$70 538A: 85 54 STA $54 538C: AD 91 03 LDA $0391 538F: 09 01 ORA #$01 5391: 8D 91 03 STA $0391 5394: A9 00 LDA #$00 5396: 8D 47 04 STA $0447 5399: A9 20 LDA #$20 539B: 0D 48 04 ORA $0448 539E: 8D 48 04 STA $0448 53A1: 20 DD 54 JSR $54DD 53A4: 60 RTS 53A5: 20 C6 53 JSR $53C6 53A8: A9 00 LDA #$00 53AA: 8D 79 BA STA $BA79 53AD: A9 00 LDA #$00 53AF: 8D 7A BA STA $BA7A 53B2: 8D 5C BA STA $BA5C 53B5: AD 77 BA LDA $BA77 53B8: 85 80 STA $80 53BA: AD 78 BA LDA $BA78 53BD: 85 81 STA $81 53BF: 20 DC 67 JSR $67DC 53C2: 20 DD 54 JSR $54DD 53C5: 60 RTS 53C6: A2 10 LDX #$10 53C8: A9 00 LDA #$00 53CA: 9D 7C BA STA $BA7C,X 53CD: CA DEX 53CE: D0 F8 BNE $53C8 53D0: A9 00 LDA #$00 53D2: 8D 7C BA STA $BA7C 53D5: 8D 7B BA STA $BA7B 53D8: A9 00 LDA #$00 53DA: 8D 79 BA STA $BA79 53DD: A9 00 LDA #$00 53DF: 8D 7A BA STA $BA7A 53E2: A9 00 LDA #$00 53E4: 85 80 STA $80 53E6: A9 02 LDA #$02 53E8: 85 81 STA $81 53EA: 20 DC 67 JSR $67DC 53ED: 20 80 62 JSR $6280 53F0: A5 82 LDA $82 53F2: 85 53 STA $53 53F4: A5 83 LDA $83 53F6: 85 54 STA $54 53F8: AD 7C BA LDA $BA7C 53FB: 0A ASL 53FC: AA TAX 53FD: A5 82 LDA $82 53FF: 9D 7D BA STA $BA7D,X 5402: A5 83 LDA $83 5404: 9D 7E BA STA $BA7E,X 5407: 20 74 54 JSR $5474 540A: 90 67 BCC $5473 540C: A9 00 LDA #$00 540E: 85 80 STA $80 5410: A9 40 LDA #$40 5412: 85 81 STA $81 5414: 20 DC 67 JSR $67DC 5417: E6 82 INC $82 5419: D0 02 BNE $541D 541B: E6 83 INC $83 541D: A5 82 LDA $82 541F: 85 66 STA $66 5421: A5 83 LDA $83 5423: 85 67 STA $67 5425: 20 47 6C JSR $6C47 5428: A5 68 LDA $68 542A: 85 80 STA $80 542C: A5 69 LDA $69 542E: 85 81 STA $81 5430: A0 00 LDY #$00 5432: B1 80 LDA ($80),Y 5434: 85 66 STA $66 5436: C8 INY 5437: B1 80 LDA ($80),Y 5439: 85 67 STA $67 543B: 05 66 ORA $66 543D: F0 34 BEQ $5473 543F: 20 47 6C JSR $6C47 5442: A5 69 LDA $69 5444: C9 AF CMP #$AF 5446: D0 04 BNE $544C 5448: A5 68 LDA $68 544A: C9 00 CMP #$00 544C: 90 DA BCC $5428 544E: A5 66 LDA $66 5450: D0 02 BNE $5454 5452: C6 67 DEC $67 5454: C6 66 DEC $66 5456: A5 66 LDA $66 5458: 85 82 STA $82 545A: A5 67 LDA $67 545C: 85 83 STA $83 545E: 38 SEC 545F: A5 66 LDA $66 5461: E5 53 SBC $53 5463: 8D 79 BA STA $BA79 5466: A5 67 LDA $67 5468: E5 54 SBC $54 546A: 8D 7A BA STA $BA7A 546D: EE 7C BA INC $BA7C 5470: 4C F8 53 JMP $53F8 5473: 60 RTS 5474: 00 14 05 INT $0514 5477: 38 SEC 5478: AD FB 08 LDA $08FB 547B: ED 79 BA SBC $BA79 547E: 8D FB 08 STA $08FB 5481: AD FC 08 LDA $08FC 5484: ED 7A BA SBC $BA7A 5487: 8D FC 08 STA $08FC 548A: AD FC 08 LDA $08FC 548D: C9 40 CMP #$40 548F: D0 05 BNE $5496 5491: AD FB 08 LDA $08FB 5494: C9 00 CMP #$00 5496: F0 01 BEQ $5499 5498: 60 RTS 5499: 18 CLC 549A: 60 RTS 549B: 18 CLC 549C: A5 48 LDA $48 549E: 69 14 ADC #$14 54A0: 85 48 STA $48 54A2: 90 02 BCC $54A6 54A4: E6 49 INC $49 54A6: E6 6D INC $6D 54A8: E6 6F INC $6F 54AA: A6 6F LDX $6F 54AC: 8A TXA 54AD: A6 6D LDX $6D 54AF: 9D 48 BA STA $BA48,X 54B2: A6 6E LDX $6E 54B4: 20 BF 68 JSR $68BF 54B7: A2 0A LDX #$0A 54B9: A9 00 LDA #$00 54BB: 20 2F 6C JSR $6C2F 54BE: A0 FF LDY #$FF 54C0: C8 INY 54C1: B5 82 LDA $82,X 54C3: 91 4E STA ($4E),Y 54C5: E8 INX 54C6: E0 05 CPX #$05 54C8: D0 F6 BNE $54C0 54CA: C8 INY 54CB: A9 20 LDA #$20 54CD: 91 4E STA ($4E),Y 54CF: C8 INY 54D0: 8C B4 03 STY $03B4 54D3: 84 50 STY $50 54D5: 84 70 STY $70 54D7: A9 FF LDA #$FF 54D9: 8D 5C BA STA $BA5C 54DC: 60 RTS 54DD: 8A TXA 54DE: 48 PHA 54DF: A9 00 LDA #$00 54E1: A2 09 LDX #$09 54E3: 9D 88 03 STA $0388,X ; clear icons 54E6: CA DEX 54E7: D0 FA BNE $54E3 54E9: 68 PLA 54EA: AA TAX 54EB: 00 2A C7 INT $C72A ; clear text buffer 54EE: 20 2B 69 JSR $692B ; clear $B88E-$B9CF 54F1: A9 00 LDA #$00 54F3: 8D B3 03 STA $03B3 ; cursor mode 54F6: 20 76 68 JSR $6876 54F9: A5 53 LDA $53 54FB: 85 66 STA $66 54FD: A5 54 LDA $54 54FF: 85 67 STA $67 5501: E6 66 INC $66 5503: D0 02 BNE $5507 5505: E6 67 INC $67 5507: 20 47 6C JSR $6C47 550A: A5 68 LDA $68 550C: 85 40 STA $40 550E: A5 69 LDA $69 5510: 85 41 STA $41 5512: 20 31 68 JSR $6831 5515: A5 47 LDA $47 5517: C5 69 CMP $69 5519: D0 04 BNE $551F 551B: A5 46 LDA $46 551D: C5 68 CMP $68 551F: D0 06 BNE $5527 5521: 20 9B 54 JSR $549B 5524: 4C 2E 55 JMP $552E 5527: 20 BF 68 JSR $68BF 552A: A9 00 LDA #$00 552C: 85 50 STA $50 552E: 20 5F 67 JSR $675F 5531: 20 62 6D JSR $6D62 5534: A9 FF LDA #$FF 5536: 8D AF 03 STA $03AF 5539: A9 FF LDA #$FF 553B: 8D B0 03 STA $03B0 553E: 00 19 C7 INT $C719 ; 把文字缓冲刷新到屏幕 5541: 24 52 BIT $52 5543: 10 10 BPL $5555 5545: AD B4 03 LDA $03B4 ; caret x 5548: 85 72 STA $72 554A: AD B5 03 LDA $03B5 ; caret y 554D: 85 73 STA $73 554F: 00 01 07 INT $0701 5552: 4C 58 55 JMP $5558 5555: 00 06 C0 INT $C006 5558: AA TAX 5559: F0 D3 BEQ $552E 555B: 85 55 STA $55 555D: 24 52 BIT $52 555F: 10 1D BPL $557E 5561: A5 55 LDA $55 5563: 30 13 BMI $5578 5565: C9 1B CMP #$1B ; ESC 5567: F0 15 BEQ $557E 5569: A0 FF LDY #$FF 556B: C8 INY 556C: C0 0F CPY #$0F 556E: F0 08 BEQ $5578 5570: D9 8F 55 CMP $558F,Y 5573: D0 F6 BNE $556B 5575: 4C 7E 55 JMP $557E 5578: 20 FB 63 JSR $63FB 557B: 4C 2E 55 JMP $552E 557E: AA TAX 557F: A0 0F LDY #$0F 5581: A9 8F LDA #$8F 5583: 85 80 STA $80 5585: A9 55 LDA #$55 5587: 85 81 STA $81 5589: 20 39 E0 JSR $E039 558C: 4C 2E 55 JMP $552E 558F: .db 23, 22, 20, 21, 19, 14, 13, 48, 26, 28, 29, 30, 31, 25, 15 559E: .dw $5682 ; 左 55A0: .dw $56E5 ; 右 55A2: .dw $5723 ; 上 55A4: .dw $578D ; 下 55A6: .dw $57e3 ; 上翻页 55A8: .dw $57E7 ; 下翻页 55AA: .dw $57EB ; 输入 55AC: .dw $5cA0 ; '0' 55AE: .dw $5cC3 ; shift 55B0: .dw $55BC ; F1 55B2: .dw $55D2 ; F2 55B4: .dw $567A ; F3 55B6: .dw $567E ; F4 55B8: .dw $5d06 ; 帮助 55BA: .dw $5d44 ; caps 55BC: 24 52 BIT $52 55BE: 30 03 BMI $55C3 55C0: 4C 12 E0 JMP $E012 55C3: A5 52 LDA $52 55C5: 49 40 EOR #$40 55C7: 85 52 STA $52 55C9: AD B3 03 LDA $03B3 55CC: 49 08 EOR #$08 55CE: 8D B3 03 STA $03B3 55D1: 60 RTS 55D2: 24 52 BIT $52 55D4: 30 03 BMI $55D9 55D6: 4C 12 E0 JMP $E012 55D9: A9 FF LDA #$FF 55DB: 8D 5C BA STA $BA5C 55DE: 8D 57 BA STA $BA57 55E1: A5 70 LDA $70 55E3: D0 2A BNE $560F 55E5: A6 6E LDX $6E 55E7: 20 EC 61 JSR $61EC 55EA: 08 PHP 55EB: A5 80 LDA $80 55ED: 85 5D STA $5D 55EF: A5 81 LDA $81 55F1: 85 5E STA $5E 55F3: 28 PLP 55F4: F0 13 BEQ $5609 55F6: 20 B3 62 JSR $62B3 55F9: 84 57 STY $57 55FB: 20 0B 5E JSR $5E0B 55FE: 20 FA 68 JSR $68FA 5601: 20 86 5C JSR $5C86 5604: F0 03 BEQ $5609 5606: 4C A2 58 JMP $58A2 5609: 20 46 56 JSR $5646 560C: 4C 8E 56 JMP $568E 560F: C5 50 CMP $50 5611: D0 06 BNE $5619 5613: 20 98 5F JSR $5F98 5616: 4C 2E 56 JMP $562E 5619: A4 50 LDY $50 561B: 88 DEY 561C: B1 4E LDA ($4E),Y 561E: C9 1E CMP #$1E 5620: D0 0C BNE $562E 5622: C8 INY 5623: C8 INY 5624: C8 INY 5625: B1 4E LDA ($4E),Y 5627: 30 05 BMI $562E 5629: C6 50 DEC $50 562B: 20 BF 67 JSR $67BF 562E: A2 FF LDX #$FF 5630: A4 50 LDY $50 5632: B1 4E LDA ($4E),Y 5634: 30 08 BMI $563E 5636: C9 1E CMP #$1E 5638: D0 06 BNE $5640 563A: A2 FD LDX #$FD 563C: D0 02 BNE $5640 563E: A2 FE LDX #$FE 5640: 86 57 STX $57 5642: 20 B1 64 JSR $64B1 5645: 60 RTS 5646: A5 5E LDA $5E 5648: C9 70 CMP #$70 564A: D0 04 BNE $5650 564C: A5 5D LDA $5D 564E: C9 01 CMP #$01 5650: D0 01 BNE $5653 5652: 60 RTS 5653: C6 6D DEC $6D 5655: C6 6F DEC $6F 5657: A6 6D LDX $6D 5659: 20 EC 61 JSR $61EC 565C: A5 80 LDA $80 565E: 85 46 STA $46 5660: A5 81 LDA $81 5662: 85 47 STA $47 5664: 38 SEC 5665: A5 48 LDA $48 5667: E9 14 SBC #$14 5669: 85 48 STA $48 566B: A5 49 LDA $49 566D: E9 00 SBC #$00 566F: 85 49 STA $49 5671: 20 AE 63 JSR $63AE 5674: A9 00 LDA #$00 5676: 8D 5C BA STA $BA5C 5679: 60 RTS 567A: 20 12 E0 JSR $E012 567D: 60 RTS 567E: 20 12 E0 JSR $E012 5681: 60 RTS 5682: A5 50 LDA $50 5684: D0 29 BNE $56AF 5686: AD 5C BA LDA $BA5C 5689: F0 03 BEQ $568E 568B: 4C EB 57 JMP $57EB 568E: 20 CF 5F JSR $5FCF 5691: B0 01 BCS $5694 5693: 60 RTS 5694: 38 SEC 5695: A6 6E LDX $6E 5697: BD 49 BA LDA $BA49,X 569A: FD 48 BA SBC $BA48,X 569D: AA TAX 569E: 38 SEC 569F: BD C2 6E LDA $6EC2,X 56A2: E5 70 SBC $70 56A4: E9 14 SBC #$14 56A6: 38 SEC 56A7: 49 FF EOR #$FF 56A9: 69 00 ADC #$00 56AB: 8D B4 03 STA $03B4 56AE: 60 RTS 56AF: AD B4 03 LDA $03B4 56B2: D0 21 BNE $56D5 56B4: AE B5 03 LDX $03B5 56B7: CA DEX 56B8: 10 05 BPL $56BF 56BA: 20 86 60 JSR $6086 56BD: A2 00 LDX #$00 56BF: 8E B5 03 STX $03B5 56C2: A9 14 LDA #$14 56C4: 8D B4 03 STA $03B4 56C7: A4 50 LDY $50 56C9: 88 DEY 56CA: B1 4E LDA ($4E),Y 56CC: C9 1E CMP #$1E 56CE: D0 05 BNE $56D5 56D0: C6 50 DEC $50 56D2: CE B4 03 DEC $03B4 56D5: 20 B7 5F JSR $5FB7 56D8: D0 05 BNE $56DF 56DA: C6 50 DEC $50 56DC: 20 BF 67 JSR $67BF 56DF: C6 50 DEC $50 56E1: 20 BF 67 JSR $67BF 56E4: 60 RTS 56E5: A4 50 LDY $50 56E7: C4 70 CPY $70 56E9: 90 14 BCC $56FF 56EB: AD 5C BA LDA $BA5C 56EE: F0 03 BEQ $56F3 56F0: 4C EB 57 JMP $57EB 56F3: 20 D9 63 JSR $63D9 56F6: B0 01 BCS $56F9 56F8: 60 RTS 56F9: A9 00 LDA #$00 56FB: 8D B4 03 STA $03B4 56FE: 60 RTS 56FF: B1 4E LDA ($4E),Y 5701: 10 05 BPL $5708 5703: E6 50 INC $50 5705: 20 97 67 JSR $6797 5708: E6 50 INC $50 570A: 20 97 67 JSR $6797 570D: AD B4 03 LDA $03B4 5710: C9 13 CMP #$13 5712: F0 01 BEQ $5715 5714: 60 RTS 5715: A4 50 LDY $50 5717: B1 4E LDA ($4E),Y 5719: C9 1E CMP #$1E 571B: F0 01 BEQ $571E 571D: 60 RTS 571E: E6 50 INC $50 5720: 4C 97 67 JMP $6797 5723: A5 50 LDA $50 5725: C9 14 CMP #$14 5727: 90 38 BCC $5761 5729: AE B5 03 LDX $03B5 572C: CA DEX 572D: 10 05 BPL $5734 572F: 20 86 60 JSR $6086 5732: A2 00 LDX #$00 5734: 8E B5 03 STX $03B5 5737: 38 SEC 5738: A5 50 LDA $50 573A: E9 14 SBC #$14 573C: 85 50 STA $50 573E: AD B4 03 LDA $03B4 5741: D0 01 BNE $5744 5743: 60 RTS 5744: C9 13 CMP #$13 5746: D0 0D BNE $5755 5748: A4 50 LDY $50 574A: B1 4E LDA ($4E),Y 574C: C9 1E CMP #$1E 574E: D0 05 BNE $5755 5750: C6 50 DEC $50 5752: CE B4 03 DEC $03B4 5755: 20 C9 5F JSR $5FC9 5758: D0 01 BNE $575B 575A: 60 RTS 575B: C6 50 DEC $50 575D: CE B4 03 DEC $03B4 5760: 60 RTS 5761: AD 5C BA LDA $BA5C 5764: F0 03 BEQ $5769 5766: 4C EB 57 JMP $57EB 5769: 20 CF 5F JSR $5FCF 576C: B0 01 BCS $576F 576E: 60 RTS 576F: 18 CLC 5770: A5 70 LDA $70 5772: 69 14 ADC #$14 5774: 38 SEC 5775: E5 71 SBC $71 5777: AA TAX 5778: ED B4 03 SBC $03B4 577B: B0 04 BCS $5781 577D: 8E B4 03 STX $03B4 5780: 60 RTS 5781: 85 57 STA $57 5783: 38 SEC 5784: A5 70 LDA $70 5786: E5 57 SBC $57 5788: 85 50 STA $50 578A: 4C 3E 57 JMP $573E 578D: 38 SEC 578E: A9 14 LDA #$14 5790: ED B4 03 SBC $03B4 5793: 85 57 STA $57 5795: A5 70 LDA $70 5797: E5 50 SBC $50 5799: C5 57 CMP $57 579B: B0 17 BCS $57B4 579D: AD 5C BA LDA $BA5C 57A0: F0 03 BEQ $57A5 57A2: 4C EB 57 JMP $57EB 57A5: 20 D9 63 JSR $63D9 57A8: B0 01 BCS $57AB 57AA: 60 RTS 57AB: AD B4 03 LDA $03B4 57AE: AE B5 03 LDX $03B5 57B1: 4C C7 57 JMP $57C7 57B4: AE B5 03 LDX $03B5 57B7: E8 INX 57B8: E4 51 CPX $51 57BA: 90 06 BCC $57C2 57BC: 20 FE 62 JSR $62FE 57BF: AE B5 03 LDX $03B5 57C2: 18 CLC 57C3: A5 50 LDA $50 57C5: 69 14 ADC #$14 57C7: C5 70 CMP $70 57C9: 90 10 BCC $57DB 57CB: F0 0E BEQ $57DB 57CD: E5 70 SBC $70 57CF: 85 57 STA $57 57D1: AD B4 03 LDA $03B4 57D4: E5 57 SBC $57 57D6: 8D B4 03 STA $03B4 57D9: A5 70 LDA $70 57DB: 85 50 STA $50 57DD: 8E B5 03 STX $03B5 57E0: 4C 3E 57 JMP $573E 57E3: 20 12 E0 JSR $E012 57E6: 60 RTS 57E7: 20 12 E0 JSR $E012 57EA: 60 RTS ; 编辑器中按 输入 57EB: A5 70 LDA $70 57ED: F0 03 BEQ $57F2 57EF: 4C 40 59 JMP $5940 57F2: A6 6E LDX $6E 57F4: 20 EC 61 JSR $61EC 57F7: F0 03 BEQ $57FC 57F9: 4C 87 58 JMP $5887 57FC: A5 80 LDA $80 57FE: 85 5D STA $5D 5800: A5 81 LDA $81 5802: 85 5E STA $5E 5804: A5 55 LDA $55 5806: C9 17 CMP #$17 5808: D0 03 BNE $580D 580A: 4C 09 56 JMP $5609 580D: C9 14 CMP #$14 580F: D0 3F BNE $5850 5811: A5 5E LDA $5E 5813: C9 70 CMP #$70 5815: D0 04 BNE $581B 5817: A5 5D LDA $5D 5819: C9 01 CMP #$01 581B: D0 01 BNE $581E 581D: 60 RTS 581E: A5 5E LDA $5E 5820: C5 45 CMP $45 5822: D0 04 BNE $5828 5824: A5 5D LDA $5D 5826: C5 44 CMP $44 5828: D0 20 BNE $584A 582A: C6 6D DEC $6D 582C: C6 6F DEC $6F 582E: C6 6E DEC $6E 5830: A9 8E LDA #$8E 5832: 85 48 STA $48 5834: A9 B8 LDA #$B8 5836: 85 49 STA $49 5838: 20 DC 60 JSR $60DC 583B: 20 BF 68 JSR $68BF 583E: A5 70 LDA $70 5840: 85 50 STA $50 5842: A9 00 LDA #$00 5844: 8D 5C BA STA $BA5C 5847: 4C 6F 57 JMP $576F 584A: 20 46 56 JSR $5646 584D: 4C 69 57 JMP $5769 5850: A5 81 LDA $81 5852: C9 70 CMP #$70 5854: D0 04 BNE $585A 5856: A5 80 LDA $80 5858: C9 01 CMP #$01 585A: D0 0B BNE $5867 585C: A9 0A LDA #$0A 585E: 85 86 STA $86 5860: A9 00 LDA #$00 5862: 85 87 STA $87 5864: 4C 0C 5C JMP $5C0C 5867: A5 80 LDA $80 5869: 85 82 STA $82 586B: A5 81 LDA $81 586D: 85 83 STA $83 586F: 20 98 61 JSR $6198 5872: 18 CLC 5873: A0 02 LDY #$02 5875: B1 80 LDA ($80),Y 5877: 6D 5A BA ADC $BA5A 587A: 85 86 STA $86 587C: C8 INY 587D: B1 80 LDA ($80),Y 587F: 6D 5B BA ADC $BA5B 5882: 85 87 STA $87 5884: 4C 0C 5C JMP $5C0C 5887: A5 80 LDA $80 5889: 85 5D STA $5D 588B: A5 81 LDA $81 588D: 85 5E STA $5E 588F: 20 B3 62 JSR $62B3 5892: 84 57 STY $57 5894: 20 0B 5E JSR $5E0B 5897: 20 FA 68 JSR $68FA 589A: 20 86 5C JSR $5C86 589D: D0 03 BNE $58A2 589F: 4C 04 58 JMP $5804 58A2: A6 6E LDX $6E 58A4: E8 INX 58A5: BD 48 BA LDA $BA48,X 58A8: 38 SEC 58A9: CA DEX 58AA: FD 48 BA SBC $BA48,X 58AD: A8 TAY 58AE: 85 57 STA $57 58B0: B9 C2 6E LDA $6EC2,Y 58B3: 85 6A STA $6A 58B5: A6 6E LDX $6E 58B7: 20 05 6C JSR $6C05 58BA: 20 89 66 JSR $6689 58BD: 18 CLC 58BE: A5 80 LDA $80 58C0: 65 6A ADC $6A 58C2: 85 80 STA $80 58C4: 90 02 BCC $58C8 58C6: E6 81 INC $81 58C8: 20 7F 66 JSR $667F 58CB: A5 48 LDA $48 58CD: 85 82 STA $82 58CF: A5 49 LDA $49 58D1: 85 83 STA $83 58D3: A5 81 LDA $81 58D5: C5 83 CMP $83 58D7: D0 04 BNE $58DD 58D9: A5 80 LDA $80 58DB: C5 82 CMP $82 58DD: F0 03 BEQ $58E2 58DF: 20 C1 6C JSR $6CC1 58E2: A6 6E LDX $6E 58E4: E8 INX 58E5: 38 SEC 58E6: BD 48 BA LDA $BA48,X 58E9: E5 57 SBC $57 58EB: 9D 47 BA STA $BA47,X 58EE: E4 6D CPX $6D 58F0: 90 F2 BCC $58E4 58F2: A9 00 LDA #$00 58F4: 9D 48 BA STA $BA48,X 58F7: C6 6D DEC $6D 58F9: A6 6D LDX $6D 58FB: BD 48 BA LDA $BA48,X 58FE: 85 6F STA $6F 5900: A6 6D LDX $6D 5902: 20 EC 61 JSR $61EC 5905: A5 80 LDA $80 5907: 85 46 STA $46 5909: A5 81 LDA $81 590B: 85 47 STA $47 590D: 38 SEC 590E: A5 48 LDA $48 5910: E5 6A SBC $6A 5912: 85 48 STA $48 5914: A5 49 LDA $49 5916: E9 00 SBC #$00 5918: 85 49 STA $49 591A: 20 AE 63 JSR $63AE 591D: 20 55 63 JSR $6355 5920: 20 BF 68 JSR $68BF 5923: A9 00 LDA #$00 5925: 8D 5C BA STA $BA5C 5928: A5 55 LDA $55 592A: C9 17 CMP #$17 592C: D0 03 BNE $5931 592E: 4C 8E 56 JMP $568E 5931: C9 14 CMP #$14 5933: D0 03 BNE $5938 5935: 4C 69 57 JMP $5769 5938: C9 15 CMP #$15 593A: D0 03 BNE $593F 593C: 4C AB 57 JMP $57AB 593F: 60 RTS 5940: A5 4E LDA $4E 5942: 85 5B STA $5B 5944: A5 4F LDA $4F 5946: 85 5C STA $5C 5948: A5 5B LDA $5B 594A: D0 02 BNE $594E 594C: C6 5C DEC $5C 594E: C6 5B DEC $5B 5950: 20 48 5D JSR $5D48 ; read a character and test if it is a digit 5953: B0 44 BCS $5999 ; not digit 5955: 20 5D 5D JSR $5D5D ; 读取行号 5958: 90 3F BCC $5999 ; 行号 > 9999 595A: C9 20 CMP #$20 595C: F0 30 BEQ $598E 595E: A4 70 LDY $70 5960: C0 5E CPY #$5E 5962: 90 2A BCC $598E 5964: 88 DEY 5965: C0 5D CPY #$5D 5967: F0 06 BEQ $596F 5969: A9 00 LDA #$00 596B: 91 4E STA ($4E),Y 596D: F0 F5 BEQ $5964 596F: A5 50 LDA $50 5971: 48 PHA 5972: A0 5E LDY #$5E 5974: 84 50 STY $50 5976: 20 B7 5F JSR $5FB7 5979: D0 0A BNE $5985 597B: C4 50 CPY $50 597D: D0 06 BNE $5985 597F: A9 00 LDA #$00 5981: A0 5C LDY #$5C 5983: 91 4E STA ($4E),Y 5985: 68 PLA 5986: 85 50 STA $50 5988: A9 00 LDA #$00 598A: A0 5D LDY #$5D 598C: 91 4E STA ($4E),Y 598E: A5 40 LDA $40 5990: 85 86 STA $86 5992: A5 41 LDA $41 5994: 85 87 STA $87 5996: 4C C3 59 JMP $59C3 ; 无行号或行号有误 5999: AD B5 03 LDA $03B5 599C: 48 PHA 599D: AD B3 03 LDA $03B3 59A0: 48 PHA 59A1: AD 91 03 LDA $0391 59A4: 48 PHA 59A5: A9 00 LDA #$00 59A7: 8D 32 0A STA $0A32 59AA: A2 D9 LDX #$D9 59AC: A0 6E LDY #$6E 59AE: A9 00 LDA #$00 59B0: 00 12 CA INT $CA12 59B3: 20 2A E0 JSR $E02A 59B6: 68 PLA 59B7: 8D 91 03 STA $0391 59BA: 68 PLA 59BB: 8D B3 03 STA $03B3 59BE: 68 PLA 59BF: 8D B5 03 STA $03B5 59C2: 60 RTS 59C3: AD 5C BA LDA $BA5C 59C6: D0 03 BNE $59CB 59C8: 4C 89 5B JMP $5B89 59CB: AD 91 03 LDA $0391 59CE: 09 01 ORA #$01 59D0: 8D 91 03 STA $0391 59D3: AD 47 04 LDA $0447 59D6: C9 02 CMP #$02 59D8: D0 13 BNE $59ED 59DA: A9 05 LDA #$05 59DC: 85 51 STA $51 59DE: A5 40 LDA $40 59E0: 48 PHA 59E1: A5 41 LDA $41 59E3: 48 PHA 59E4: 20 4A 63 JSR $634A 59E7: 68 PLA 59E8: 85 41 STA $41 59EA: 68 PLA 59EB: 85 40 STA $40 59ED: A9 00 LDA #$00 59EF: 8D 47 04 STA $0447 59F2: A9 20 LDA #$20 59F4: 0D 48 04 ORA $0448 59F7: 8D 48 04 STA $0448 59FA: A9 00 LDA #$00 59FC: 8D BA B9 STA $B9BA 59FF: 20 A1 5D JSR $5DA1 5A02: 20 D9 5D JSR $5DD9 5A05: 90 35 BCC $5A3C 5A07: A5 5D LDA $5D 5A09: 85 80 STA $80 5A0B: A5 5E LDA $5E 5A0D: 85 81 STA $81 5A0F: 20 B3 62 JSR $62B3 5A12: 84 57 STY $57 5A14: 98 TYA 5A15: 38 SEC 5A16: E5 59 SBC $59 5A18: B0 1C BCS $5A36 5A1A: 49 FF EOR #$FF 5A1C: 69 01 ADC #$01 5A1E: 6D 58 BA ADC $BA58 5A21: 85 80 STA $80 5A23: AD 59 BA LDA $BA59 5A26: 69 00 ADC #$00 5A28: 85 81 STA $81 5A2A: A5 81 LDA $81 5A2C: C9 B0 CMP #$B0 5A2E: D0 04 BNE $5A34 5A30: A5 80 LDA $80 5A32: C9 00 CMP #$00 5A34: B0 21 BCS $5A57 5A36: 20 0B 5E JSR $5E0B 5A39: 4C 58 5A JMP $5A58 5A3C: 18 CLC 5A3D: AD 58 BA LDA $BA58 5A40: 65 59 ADC $59 5A42: 85 80 STA $80 5A44: AD 59 BA LDA $BA59 5A47: 69 00 ADC #$00 5A49: 85 81 STA $81 5A4B: A5 81 LDA $81 5A4D: C9 B0 CMP #$B0 5A4F: D0 04 BNE $5A55 5A51: A5 80 LDA $80 5A53: C9 00 CMP #$00 5A55: 90 01 BCC $5A58 5A57: 60 RTS 5A58: AD BA B9 LDA $B9BA 5A5B: F0 06 BEQ $5A63 5A5D: 20 3B 5E JSR $5E3B 5A60: 20 CF 62 JSR $62CF 5A63: 20 FA 68 JSR $68FA 5A66: A6 6E LDX $6E 5A68: F0 2F BEQ $5A99 5A6A: A5 5E LDA $5E 5A6C: C9 70 CMP #$70 5A6E: D0 04 BNE $5A74 5A70: A5 5D LDA $5D 5A72: C9 01 CMP #$01 5A74: D0 03 BNE $5A79 5A76: 4C 48 5C JMP $5C48 5A79: CA DEX 5A7A: 20 15 6C JSR $6C15 5A7D: A5 5D LDA $5D 5A7F: 85 82 STA $82 5A81: A5 5E LDA $5E 5A83: 85 83 STA $83 5A85: 20 98 61 JSR $6198 5A88: 20 C6 62 JSR $62C6 5A8B: E4 40 CPX $40 5A8D: F0 03 BEQ $5A92 5A8F: 4C 48 5C JMP $5C48 5A92: C5 41 CMP $41 5A94: F0 03 BEQ $5A99 5A96: 4C 48 5C JMP $5C48 5A99: A6 6E LDX $6E 5A9B: E8 INX 5A9C: E4 6D CPX $6D 5A9E: D0 43 BNE $5AE3 5AA0: E0 01 CPX #$01 5AA2: F0 13 BEQ $5AB7 5AA4: 20 86 5C JSR $5C86 5AA7: D0 03 BNE $5AAC 5AA9: 4C 09 5B JMP $5B09 5AAC: 20 8E 5C JSR $5C8E 5AAF: F0 03 BEQ $5AB4 5AB1: 4C 48 5C JMP $5C48 5AB4: 4C 09 5B JMP $5B09 5AB7: A5 5E LDA $5E 5AB9: C5 45 CMP $45 5ABB: D0 04 BNE $5AC1 5ABD: A5 5D LDA $5D 5ABF: C5 44 CMP $44 5AC1: B0 03 BCS $5AC6 5AC3: 4C 48 5C JMP $5C48 5AC6: D0 10 BNE $5AD8 5AC8: 20 86 5C JSR $5C86 5ACB: D0 03 BNE $5AD0 5ACD: 4C 09 5B JMP $5B09 5AD0: 20 8E 5C JSR $5C8E 5AD3: F0 03 BEQ $5AD8 5AD5: 4C 48 5C JMP $5C48 5AD8: A5 5D LDA $5D 5ADA: 85 44 STA $44 5ADC: A5 5E LDA $5E 5ADE: 85 45 STA $45 5AE0: 4C 09 5B JMP $5B09 5AE3: E0 01 CPX #$01 5AE5: D0 03 BNE $5AEA 5AE7: 4C 48 5C JMP $5C48 5AEA: 20 15 6C JSR $6C15 5AED: A5 5D LDA $5D 5AEF: 85 82 STA $82 5AF1: A5 5E LDA $5E 5AF3: 85 83 STA $83 5AF5: 20 E0 61 JSR $61E0 5AF8: 20 C6 62 JSR $62C6 5AFB: E4 40 CPX $40 5AFD: F0 03 BEQ $5B02 5AFF: 4C 48 5C JMP $5C48 5B02: C5 41 CMP $41 5B04: F0 03 BEQ $5B09 5B06: 4C 48 5C JMP $5C48 5B09: 20 86 5C JSR $5C86 5B0C: D0 3A BNE $5B48 5B0E: A5 55 LDA $55 5B10: C9 17 CMP #$17 5B12: F0 07 BEQ $5B1B 5B14: C9 14 CMP #$14 5B16: F0 03 BEQ $5B1B 5B18: 4C 45 5B JMP $5B45 5B1B: A5 5E LDA $5E 5B1D: C9 70 CMP #$70 5B1F: D0 04 BNE $5B25 5B21: A5 5D LDA $5D 5B23: C9 01 CMP #$01 5B25: F0 1E BEQ $5B45 5B27: A5 5E LDA $5E 5B29: C5 45 CMP $45 5B2B: D0 04 BNE $5B31 5B2D: A5 5D LDA $5D 5B2F: C5 44 CMP $44 5B31: D0 0F BNE $5B42 5B33: A6 6E LDX $6E 5B35: 20 05 6C JSR $6C05 5B38: A9 14 LDA #$14 5B3A: 85 6A STA $6A 5B3C: 20 89 66 JSR $6689 5B3F: 4C 04 58 JMP $5804 5B42: 4C A2 58 JMP $58A2 5B45: 4C 48 5C JMP $5C48 5B48: A6 6D LDX $6D 5B4A: 20 EC 61 JSR $61EC 5B4D: A5 80 LDA $80 5B4F: 85 46 STA $46 5B51: A5 81 LDA $81 5B53: 85 47 STA $47 5B55: AD BA B9 LDA $B9BA 5B58: D0 1F BNE $5B79 5B5A: A5 5E LDA $5E 5B5C: C9 70 CMP #$70 5B5E: D0 04 BNE $5B64 5B60: A5 5D LDA $5D 5B62: C9 01 CMP #$01 5B64: D0 03 BNE $5B69 5B66: 4C 48 5C JMP $5C48 5B69: A5 55 LDA $55 5B6B: C9 17 CMP #$17 5B6D: F0 07 BEQ $5B76 5B6F: C9 14 CMP #$14 5B71: F0 03 BEQ $5B76 5B73: 4C 48 5C JMP $5C48 5B76: 4C A2 58 JMP $58A2 5B79: A5 55 LDA $55 5B7B: C9 17 CMP #$17 5B7D: D0 03 BNE $5B82 5B7F: 4C 8E 56 JMP $568E 5B82: C9 14 CMP #$14 5B84: D0 03 BNE $5B89 5B86: 4C 69 57 JMP $5769 5B89: 24 52 BIT $52 5B8B: 30 06 BMI $5B93 5B8D: 20 B5 63 JSR $63B5 5B90: B0 01 BCS $5B93 5B92: 60 RTS 5B93: E6 6E INC $6E 5B95: AC B5 03 LDY $03B5 5B98: 88 DEY 5B99: C8 INY 5B9A: C4 51 CPY $51 5B9C: 90 06 BCC $5BA4 5B9E: 20 FE 62 JSR $62FE 5BA1: A4 51 LDY $51 5BA3: 88 DEY 5BA4: 8C B5 03 STY $03B5 5BA7: 18 CLC 5BA8: B9 C2 6E LDA $6EC2,Y 5BAB: 65 4A ADC $4A 5BAD: 85 82 STA $82 5BAF: A9 00 LDA #$00 5BB1: 65 4B ADC $4B 5BB3: 85 83 STA $83 5BB5: A6 6E LDX $6E 5BB7: 20 05 6C JSR $6C05 5BBA: AC B5 03 LDY $03B5 5BBD: A5 81 LDA $81 5BBF: C5 83 CMP $83 5BC1: D0 04 BNE $5BC7 5BC3: A5 80 LDA $80 5BC5: C5 82 CMP $82 5BC7: D0 D0 BNE $5B99 5BC9: A6 6E LDX $6E 5BCB: 20 EC 61 JSR $61EC 5BCE: D0 21 BNE $5BF1 5BD0: 24 52 BIT $52 5BD2: 30 03 BMI $5BD7 5BD4: 4C 8E 56 JMP $568E 5BD7: 18 CLC 5BD8: A5 48 LDA $48 5BDA: 69 14 ADC #$14 5BDC: 85 48 STA $48 5BDE: 90 02 BCC $5BE2 5BE0: E6 49 INC $49 5BE2: E6 6D INC $6D 5BE4: E6 6F INC $6F 5BE6: A6 6F LDX $6F 5BE8: 8A TXA 5BE9: A6 6D LDX $6D 5BEB: 9D 48 BA STA $BA48,X 5BEE: 20 AE 63 JSR $63AE 5BF1: A6 6E LDX $6E 5BF3: 20 BF 68 JSR $68BF 5BF6: A6 6E LDX $6E 5BF8: 20 EC 61 JSR $61EC 5BFB: D0 35 BNE $5C32 5BFD: 18 CLC 5BFE: A5 86 LDA $86 5C00: 6D 5A BA ADC $BA5A 5C03: 85 86 STA $86 5C05: A5 87 LDA $87 5C07: 6D 5B BA ADC $BA5B 5C0A: 85 87 STA $87 5C0C: A6 86 LDX $86 5C0E: A5 87 LDA $87 5C10: 20 2F 6C JSR $6C2F 5C13: A0 FF LDY #$FF 5C15: C8 INY 5C16: B5 82 LDA $82,X 5C18: 91 4E STA ($4E),Y 5C1A: E8 INX 5C1B: E0 05 CPX #$05 5C1D: D0 F6 BNE $5C15 5C1F: C8 INY 5C20: A9 20 LDA #$20 5C22: 91 4E STA ($4E),Y 5C24: C8 INY 5C25: 8C B4 03 STY $03B4 5C28: 84 50 STY $50 5C2A: 84 70 STY $70 5C2C: A9 FF LDA #$FF 5C2E: 8D 5C BA STA $BA5C 5C31: 60 RTS 5C32: A9 00 LDA #$00 5C34: 8D 5C BA STA $BA5C 5C37: A5 55 LDA $55 5C39: C9 15 CMP #$15 5C3B: D0 03 BNE $5C40 5C3D: 4C AB 57 JMP $57AB 5C40: A9 00 LDA #$00 5C42: 85 50 STA $50 5C44: 8D B4 03 STA $03B4 5C47: 60 RTS 5C48: 20 2B 69 JSR $692B 5C4B: 20 76 68 JSR $6876 5C4E: A5 5D LDA $5D 5C50: 85 40 STA $40 5C52: A5 5E LDA $5E 5C54: 85 41 STA $41 5C56: A5 86 LDA $86 5C58: 48 PHA 5C59: A5 87 LDA $87 5C5B: 48 PHA 5C5C: 20 31 68 JSR $6831 5C5F: 68 PLA 5C60: 85 87 STA $87 5C62: 68 PLA 5C63: 85 86 STA $86 5C65: AD BA B9 LDA $B9BA 5C68: F0 0A BEQ $5C74 5C6A: A9 00 LDA #$00 5C6C: 85 50 STA $50 5C6E: 20 BF 68 JSR $68BF 5C71: 4C 79 5B JMP $5B79 5C74: 38 SEC 5C75: A5 86 LDA $86 5C77: ED 5A BA SBC $BA5A 5C7A: 85 86 STA $86 5C7C: A5 87 LDA $87 5C7E: ED 5B BA SBC $BA5B 5C81: 85 87 STA $87 5C83: 4C 95 5B JMP $5B95 5C86: A0 00 LDY #$00 5C88: B1 5D LDA ($5D),Y 5C8A: C8 INY 5C8B: 11 5D ORA ($5D),Y 5C8D: 60 RTS 5C8E: A0 00 LDY #$00 5C90: B1 5D LDA ($5D),Y 5C92: 85 80 STA $80 5C94: C8 INY 5C95: B1 5D LDA ($5D),Y 5C97: 85 81 STA $81 5C99: B1 80 LDA ($80),Y 5C9B: 88 DEY 5C9C: 11 80 ORA ($80),Y 5C9E: 60 RTS 5C9F: 60 RTS 5CA0: 24 52 BIT $52 5CA2: 30 03 BMI $5CA7 5CA4: 4C 12 E0 JMP $E012 5CA7: AE 47 04 LDX $0447 5CAA: D0 0F BNE $5CBB 5CAC: AE B5 03 LDX $03B5 5CAF: E0 04 CPX #$04 5CB1: B0 01 BCS $5CB4 5CB3: 60 RTS 5CB4: 20 FE 62 JSR $62FE 5CB7: CE B5 03 DEC $03B5 5CBA: 60 RTS 5CBB: E0 01 CPX #$01 5CBD: D0 03 BNE $5CC2 5CBF: 4C FB 63 JMP $63FB 5CC2: 60 RTS 5CC3: 24 52 BIT $52 5CC5: 30 03 BMI $5CCA 5CC7: 4C 12 E0 JMP $E012 5CCA: AE 47 04 LDX $0447 5CCD: D0 13 BNE $5CE2 5CCF: 20 98 51 JSR $5198 5CD2: A9 01 LDA #$01 5CD4: 0D 91 03 ORA $0391 5CD7: 8D 91 03 STA $0391 5CDA: A9 05 LDA #$05 5CDC: 85 51 STA $51 5CDE: 20 4A 63 JSR $634A 5CE1: 60 RTS 5CE2: E0 02 CPX #$02 5CE4: F0 01 BEQ $5CE7 5CE6: 60 RTS 5CE7: AE B5 03 LDX $03B5 5CEA: E0 04 CPX #$04 5CEC: 90 06 BCC $5CF4 5CEE: 20 FE 62 JSR $62FE 5CF1: CE B5 03 DEC $03B5 5CF4: 38 SEC 5CF5: A5 4C LDA $4C 5CF7: E9 14 SBC #$14 5CF9: 85 4C STA $4C 5CFB: A5 4D LDA $4D 5CFD: E9 00 SBC #$00 5CFF: 85 4D STA $4D 5D01: A9 04 LDA #$04 5D03: 85 51 STA $51 5D05: 60 RTS 5D06: AD 49 04 LDA $0449 5D09: C9 02 CMP #$02 5D0B: D0 0B BNE $5D18 5D0D: A5 72 LDA $72 5D0F: 8D B4 03 STA $03B4 5D12: A5 73 LDA $73 5D14: 8D B5 03 STA $03B5 5D17: 60 RTS 5D18: AD B4 03 LDA $03B4 5D1B: 48 PHA 5D1C: AD B5 03 LDA $03B5 5D1F: 48 PHA 5D20: AD B3 03 LDA $03B3 5D23: 48 PHA 5D24: AD 91 03 LDA $0391 5D27: 48 PHA 5D28: A2 18 LDX #$18 5D2A: A0 6F LDY #$6F 5D2C: 86 A6 STX $A6 5D2E: 84 A7 STY $A7 5D30: 00 09 CB INT $CB09 5D33: 68 PLA 5D34: 8D 91 03 STA $0391 5D37: 68 PLA 5D38: 8D B3 03 STA $03B3 5D3B: 68 PLA 5D3C: 8D B5 03 STA $03B5 5D3F: 68 PLA 5D40: 8D B4 03 STA $03B4 5D43: 60 RTS 5D44: 20 12 E0 JSR $E012 5D47: 60 RTS ;; read a character from $5B, $5C and test if it is a digit 5D48: E6 5B INC $5B 5D4A: D0 02 BNE $5D4E 5D4C: E6 5C INC $5C 5D4E: A0 00 LDY #$00 5D50: B1 5B LDA ($5B),Y 5D52: C9 3A CMP #$3A 5D54: B0 06 BCS $5D5C 5D56: 38 SEC 5D57: E9 30 SBC #$30 5D59: 38 SEC 5D5A: E9 D0 SBC #$D0 5D5C: 60 RTS ; 读取行号到 $40, $41 5D5D: A2 00 LDX #$00 5D5F: 86 40 STX $40 5D61: 86 41 STX $41 5D63: B0 3B BCS $5DA0 5D65: E9 2F SBC #$2F 5D67: 85 57 STA $57 5D69: A5 41 LDA $41 5D6B: 85 42 STA $42 5D6D: A5 41 LDA $41 5D6F: C9 03 CMP #$03 5D71: D0 04 BNE $5D77 5D73: A5 40 LDA $40 5D75: C9 E8 CMP #$E8 5D77: B0 26 BCS $5D9F 5D79: A5 40 LDA $40 5D7B: 0A ASL 5D7C: 26 42 ROL $42 5D7E: 0A ASL 5D7F: 26 42 ROL $42 5D81: 65 40 ADC $40 5D83: 85 40 STA $40 5D85: A5 42 LDA $42 5D87: 65 41 ADC $41 5D89: 85 41 STA $41 5D8B: 06 40 ASL $40 5D8D: 26 41 ROL $41 5D8F: A5 40 LDA $40 5D91: 65 57 ADC $57 5D93: 85 40 STA $40 5D95: 90 02 BCC $5D99 5D97: E6 41 INC $41 5D99: 20 48 5D JSR $5D48 5D9C: 4C 63 5D JMP $5D63 ; 行号 >= 1000 5D9F: 18 CLC 5DA0: 60 RTS 5DA1: A9 00 LDA #$00 5DA3: 85 6C STA $6C 5DA5: 38 SEC 5DA6: A5 5B LDA $5B 5DA8: E5 4E SBC $4E 5DAA: 85 5B STA $5B 5DAC: A5 5C LDA $5C 5DAE: E5 4F SBC $4F 5DB0: 85 5C STA $5C 5DB2: 20 63 5E JSR $5E63 ; 忽略空格,若 C=0 则一行结束 5DB5: 90 0F BCC $5DC6 ; 一行结束 5DB7: 20 79 5E JSR $5E79 ; 找到下一个标点符号/汉字/空格或行尾,保存到 $58 5DBA: 20 20 5F JSR $5F20 ; 判断是否关键字 5DBD: 20 71 5F JSR $5F71 ; 输出 token 5DC0: 20 9A 5E JSR $5E9A 5DC3: 4C B2 5D JMP $5DB2 5DC6: A5 6C LDA $6C 5DC8: 18 CLC 5DC9: 69 05 ADC #$05 5DCB: 85 59 STA $59 5DCD: 20 D0 5E JSR $5ED0 5DD0: A9 00 LDA #$00 5DD2: 9D BA B9 STA $B9BA,X 5DD5: 9D BC B9 STA $B9BC,X 5DD8: 60 RTS 5DD9: A9 01 LDA #$01 5DDB: A2 70 LDX #$70 5DDD: A0 00 LDY #$00 5DDF: 85 5D STA $5D 5DE1: 86 5E STX $5E 5DE3: B1 5D LDA ($5D),Y 5DE5: C8 INY 5DE6: 11 5D ORA ($5D),Y 5DE8: F0 1F BEQ $5E09 5DEA: C8 INY 5DEB: C8 INY 5DEC: A5 41 LDA $41 5DEE: D1 5D CMP ($5D),Y 5DF0: 90 18 BCC $5E0A 5DF2: F0 03 BEQ $5DF7 5DF4: 88 DEY 5DF5: D0 09 BNE $5E00 5DF7: A5 40 LDA $40 5DF9: 88 DEY 5DFA: D1 5D CMP ($5D),Y 5DFC: 90 0C BCC $5E0A 5DFE: F0 0A BEQ $5E0A 5E00: 88 DEY 5E01: B1 5D LDA ($5D),Y 5E03: AA TAX 5E04: 88 DEY 5E05: B1 5D LDA ($5D),Y 5E07: B0 D4 BCS $5DDD 5E09: 18 CLC 5E0A: 60 RTS 5E0B: 18 CLC 5E0C: A5 5D LDA $5D 5E0E: 65 57 ADC $57 5E10: 85 80 STA $80 5E12: A5 5E LDA $5E 5E14: 69 00 ADC #$00 5E16: 85 81 STA $81 5E18: AD 58 BA LDA $BA58 5E1B: 85 82 STA $82 5E1D: AD 59 BA LDA $BA59 5E20: 85 83 STA $83 5E22: A5 57 LDA $57 5E24: 85 6A STA $6A 5E26: 20 C1 6C JSR $6CC1 5E29: 38 SEC 5E2A: AD 58 BA LDA $BA58 5E2D: E5 57 SBC $57 5E2F: 8D 58 BA STA $BA58 5E32: AD 59 BA LDA $BA59 5E35: E9 00 SBC #$00 5E37: 8D 59 BA STA $BA59 5E3A: 60 RTS 5E3B: A5 5D LDA $5D 5E3D: 85 80 STA $80 5E3F: A5 5E LDA $5E 5E41: 85 81 STA $81 5E43: AD 58 BA LDA $BA58 5E46: 85 82 STA $82 5E48: AD 59 BA LDA $BA59 5E4B: 85 83 STA $83 5E4D: A5 59 LDA $59 5E4F: 85 6A STA $6A 5E51: 20 05 6D JSR $6D05 5E54: 18 CLC 5E55: AD 58 BA LDA $BA58 5E58: 65 59 ADC $59 5E5A: 8D 58 BA STA $BA58 5E5D: 90 03 BCC $5E62 5E5F: EE 59 BA INC $BA59 5E62: 60 RTS 5E63: A4 5B LDY $5B 5E65: B1 4E LDA ($4E),Y 5E67: F0 0E BEQ $5E77 5E69: C9 20 CMP #$20 5E6B: F0 04 BEQ $5E71 5E6D: C9 1E CMP #$1E 5E6F: D0 04 BNE $5E75 5E71: E6 5B INC $5B 5E73: D0 EE BNE $5E63 5E75: 38 SEC 5E76: 60 RTS 5E77: 18 CLC 5E78: 60 RTS ; 找到第一个标点符号或汉字或空格或行尾的位置,保存到 $58 5E79: A4 5B LDY $5B 5E7B: 88 DEY 5E7C: C8 INY 5E7D: B1 4E LDA ($4E),Y 5E7F: 20 87 5E JSR $5E87 5E82: B0 F8 BCS $5E7C 5E84: 84 58 STY $58 5E86: 60 RTS ; 判断是否标点符号或汉字,C=0 是,C=1 否 5E87: 30 0D BMI $5E96 5E89: A2 00 LDX #$00 5E8B: DD DF 4F CMP $4FDF,X ; 标点符号 5E8E: F0 08 BEQ $5E98 5E90: E8 INX 5E91: E0 10 CPX #$10 5E93: 90 F6 BCC $5E8B 5E95: 60 RTS 5E96: A2 10 LDX #$10 5E98: 18 CLC 5E99: 60 RTS 5E9A: A4 58 LDY $58 5E9C: B1 4E LDA ($4E),Y 5E9E: 20 87 5E JSR $5E87 5EA1: 8A TXA 5EA2: 0A ASL 5EA3: A8 TAY 5EA4: B9 E3 6E LDA $6EE3,Y 5EA7: 85 80 STA $80 5EA9: B9 E4 6E LDA $6EE4,Y 5EAC: 85 81 STA $81 5EAE: 20 B6 5E JSR $5EB6 5EB1: A5 58 LDA $58 5EB3: 85 5B STA $5B 5EB5: 60 RTS 5EB6: 6C 80 00 JMP ($0080) ; tokenize 输出空格。如果上一个输出的字符是汉字或 token,则不输出空格 5EB9: A6 6C LDX $6C 5EBB: BD B9 B9 LDA $B9B9,X 5EBE: 10 01 BPL $5EC1 5EC0: 60 RTS 5EC1: A9 20 LDA #$20 5EC3: 9D BA B9 STA $B9BA,X 5EC6: E6 6C INC $6C 5EC8: E6 58 INC $58 5ECA: 60 RTS ; tokenize 输出标点符号对应的 token 5ECB: BD EF 4F LDA $4FEF,X 5ECE: D0 04 BNE $5ED4 5ED0: A4 58 LDY $58 5ED2: B1 4E LDA ($4E),Y 5ED4: A6 6C LDX $6C 5ED6: 9D BA B9 STA $B9BA,X 5ED9: E6 6C INC $6C 5EDB: E6 58 INC $58 5EDD: 60 RTS ; tokenize 输出字符串。字符串内的内容汉字加上 $1F,其他原样输出 5EDE: 20 D0 5E JSR $5ED0 ; 输出引号 5EE1: A4 58 LDY $58 5EE3: A6 6C LDX $6C 5EE5: B1 4E LDA ($4E),Y 5EE7: D0 01 BNE $5EEA 5EE9: 60 RTS 5EEA: 30 11 BMI $5EFD ; 是汉字 5EEC: C9 1E CMP #$1E 5EEE: D0 05 BNE $5EF5 5EF0: E6 58 INC $58 5EF2: 4C E1 5E JMP $5EE1 5EF5: C9 22 CMP #$22 ; 引号 5EF7: D0 E5 BNE $5EDE 5EF9: 20 D0 5E JSR $5ED0 ; 输出引号 5EFC: 60 RTS 5EFD: 20 03 5F JSR $5F03 ; 输出汉字 5F00: 4C E1 5E JMP $5EE1 ; tokenize 输出汉字 5F03: A9 1F LDA #$1F 5F05: A6 6C LDX $6C 5F07: 9D BA B9 STA $B9BA,X 5F0A: E8 INX 5F0B: A4 58 LDY $58 5F0D: B1 4E LDA ($4E),Y 5F0F: 9D BA B9 STA $B9BA,X 5F12: E8 INX 5F13: C8 INY 5F14: B1 4E LDA ($4E),Y 5F16: 9D BA B9 STA $B9BA,X 5F19: E8 INX 5F1A: 86 6C STX $6C 5F1C: C8 INY 5F1D: 84 58 STY $58 5F1F: 60 RTS ; 判断 $4E, $4F 的文本是否是关键字,C=0 是, $59 是关键字的序号,C=1 不是关键字 5F20: A4 5B LDY $5B 5F22: C4 58 CPY $58 5F24: F0 49 BEQ $5F6F 5F26: A9 00 LDA #$00 5F28: 85 59 STA $59 5F2A: A9 F6 LDA #$F6 5F2C: 85 80 STA $80 5F2E: A9 4F LDA #$4F 5F30: 85 81 STA $81 5F32: A4 5B LDY $5B 5F34: 84 5A STY $5A 5F36: A4 5A LDY $5A 5F38: C4 58 CPY $58 5F3A: B0 1D BCS $5F59 5F3C: E6 80 INC $80 5F3E: D0 02 BNE $5F42 5F40: E6 81 INC $81 5F42: B1 4E LDA ($4E),Y 5F44: E6 5A INC $5A 5F46: 38 SEC 5F47: A0 00 LDY #$00 5F49: F1 80 SBC ($80),Y 5F4B: F0 E9 BEQ $5F36 5F4D: C9 80 CMP #$80 5F4F: D0 08 BNE $5F59 5F51: A6 5A LDX $5A 5F53: E4 58 CPX $58 5F55: D0 02 BNE $5F59 5F57: 18 CLC 5F58: 60 RTS 5F59: A0 00 LDY #$00 5F5B: B1 80 LDA ($80),Y 5F5D: 30 09 BMI $5F68 5F5F: E6 80 INC $80 5F61: D0 02 BNE $5F65 5F63: E6 81 INC $81 5F65: 4C 59 5F JMP $5F59 5F68: E6 59 INC $59 5F6A: C8 INY 5F6B: B1 80 LDA ($80),Y 5F6D: D0 C3 BNE $5F32 5F6F: 38 SEC 5F70: 60 RTS 5F71: B0 0C BCS $5F7F ; 不是关键字 5F73: A6 6C LDX $6C 5F75: A5 59 LDA $59 5F77: 09 80 ORA #$80 5F79: 9D BA B9 STA $B9BA,X 5F7C: E6 6C INC $6C 5F7E: 60 RTS 5F7F: A4 5B LDY $5B 5F81: C4 58 CPY $58 5F83: 90 01 BCC $5F86 5F85: 60 RTS 5F86: A6 6C LDX $6C 5F88: B1 4E LDA ($4E),Y 5F8A: C9 1E CMP #$1E 5F8C: F0 05 BEQ $5F93 5F8E: 9D BA B9 STA $B9BA,X 5F91: E6 6C INC $6C 5F93: E6 5B INC $5B 5F95: D0 E8 BNE $5F7F 5F97: 60 RTS 5F98: 20 B7 5F JSR $5FB7 5F9B: D0 14 BNE $5FB1 5F9D: C6 50 DEC $50 5F9F: 20 BF 67 JSR $67BF 5FA2: C6 50 DEC $50 5FA4: 20 BF 67 JSR $67BF 5FA7: A4 50 LDY $50 5FA9: 88 DEY 5FAA: B1 4E LDA ($4E),Y 5FAC: C9 1E CMP #$1E 5FAE: F0 01 BEQ $5FB1 5FB0: 60 RTS 5FB1: C6 50 DEC $50 5FB3: 20 BF 67 JSR $67BF 5FB6: 60 RTS 5FB7: A0 00 LDY #$00 5FB9: A2 FF LDX #$FF 5FBB: B1 4E LDA ($4E),Y 5FBD: 10 03 BPL $5FC2 5FBF: A2 00 LDX #$00 5FC1: C8 INY 5FC2: C8 INY 5FC3: C4 50 CPY $50 5FC5: 90 F2 BCC $5FB9 5FC7: 8A TXA 5FC8: 60 RTS 5FC9: 20 B7 5F JSR $5FB7 5FCC: C4 50 CPY $50 5FCE: 60 RTS 5FCF: A5 6E LDA $6E 5FD1: F0 03 BEQ $5FD6 5FD3: 4C 6D 60 JMP $606D 5FD6: A5 4B LDA $4B 5FD8: C9 B8 CMP #$B8 5FDA: D0 04 BNE $5FE0 5FDC: A5 4A LDA $4A 5FDE: C9 8E CMP #$8E 5FE0: 90 05 BCC $5FE7 5FE2: F0 03 BEQ $5FE7 5FE4: 4C 6D 60 JMP $606D 5FE7: A5 45 LDA $45 5FE9: C9 70 CMP #$70 5FEB: D0 04 BNE $5FF1 5FED: A5 44 LDA $44 5FEF: C9 01 CMP #$01 5FF1: 90 05 BCC $5FF8 5FF3: F0 03 BEQ $5FF8 5FF5: 4C 6D 60 JMP $606D 5FF8: 24 52 BIT $52 5FFA: 30 07 BMI $6003 5FFC: AD 7B BA LDA $BA7B 5FFF: C9 00 CMP #$00 6001: D0 02 BNE $6005 6003: 18 CLC 6004: 60 RTS 6005: A5 44 LDA $44 6007: 85 68 STA $68 6009: A5 45 LDA $45 600B: 85 69 STA $69 600D: 20 7D 6C JSR $6C7D 6010: A5 66 LDA $66 6012: 85 82 STA $82 6014: A5 67 LDA $67 6016: 85 83 STA $83 6018: A5 46 LDA $46 601A: 85 68 STA $68 601C: A5 47 LDA $47 601E: 85 69 STA $69 6020: 20 7D 6C JSR $6C7D 6023: CE 7B BA DEC $BA7B 6026: AD 7B BA LDA $BA7B 6029: 0A ASL 602A: AA TAX 602B: BD 7D BA LDA $BA7D,X 602E: 85 80 STA $80 6030: BD 7E BA LDA $BA7E,X 6033: 85 81 STA $81 6035: 38 SEC 6036: A5 80 LDA $80 6038: E5 53 SBC $53 603A: 8D 79 BA STA $BA79 603D: A5 81 LDA $81 603F: E5 54 SBC $54 6041: 8D 7A BA STA $BA7A 6044: A9 00 LDA #$00 6046: 85 80 STA $80 6048: A9 40 LDA #$40 604A: 85 81 STA $81 604C: 20 DC 67 JSR $67DC 604F: 20 47 6C JSR $6C47 6052: A5 68 LDA $68 6054: 85 46 STA $46 6056: A5 69 LDA $69 6058: 85 47 STA $47 605A: A5 82 LDA $82 605C: 85 66 STA $66 605E: A5 83 LDA $83 6060: 85 67 STA $67 6062: 20 47 6C JSR $6C47 6065: A5 68 LDA $68 6067: 85 44 STA $44 6069: A5 69 LDA $69 606B: 85 45 STA $45 606D: C6 6E DEC $6E 606F: AE B5 03 LDX $03B5 6072: CA DEX 6073: 10 05 BPL $607A 6075: 20 86 60 JSR $6086 6078: A2 00 LDX #$00 607A: 8E B5 03 STX $03B5 607D: 20 BF 68 JSR $68BF 6080: A5 70 LDA $70 6082: 85 50 STA $50 6084: 38 SEC 6085: 60 RTS 6086: A5 4B LDA $4B 6088: C9 B8 CMP #$B8 608A: D0 04 BNE $6090 608C: A5 4A LDA $4A 608E: C9 F2 CMP #$F2 6090: 90 02 BCC $6094 6092: D0 48 BNE $60DC 6094: A6 6D LDX $6D 6096: CA DEX 6097: 20 05 6C JSR $6C05 609A: A5 81 LDA $81 609C: C5 4D CMP $4D 609E: D0 04 BNE $60A4 60A0: A5 80 LDA $80 60A2: C5 4C CMP $4C 60A4: 90 36 BCC $60DC 60A6: A6 6D LDX $6D 60A8: 38 SEC 60A9: BD 48 BA LDA $BA48,X 60AC: FD 47 BA SBC $BA47,X 60AF: 85 6A STA $6A 60B1: BD 47 BA LDA $BA47,X 60B4: 85 6F STA $6F 60B6: C6 6D DEC $6D 60B8: A6 6D LDX $6D 60BA: 20 EC 61 JSR $61EC 60BD: A5 80 LDA $80 60BF: 85 46 STA $46 60C1: A5 81 LDA $81 60C3: 85 47 STA $47 60C5: A6 6A LDX $6A 60C7: BD C2 6E LDA $6EC2,X 60CA: 85 6A STA $6A 60CC: 38 SEC 60CD: A5 48 LDA $48 60CF: E5 6A SBC $6A 60D1: 85 48 STA $48 60D3: A5 49 LDA $49 60D5: E9 00 SBC #$00 60D7: 85 49 STA $49 60D9: 20 AE 63 JSR $63AE 60DC: 38 SEC 60DD: A5 4A LDA $4A 60DF: E9 14 SBC #$14 60E1: 85 4A STA $4A 60E3: A5 4B LDA $4B 60E5: E9 00 SBC #$00 60E7: 85 4B STA $4B 60E9: 38 SEC 60EA: A5 4C LDA $4C 60EC: E9 14 SBC #$14 60EE: 85 4C STA $4C 60F0: A5 4D LDA $4D 60F2: E9 00 SBC #$00 60F4: 85 4D STA $4D 60F6: A5 4B LDA $4B 60F8: C9 B8 CMP #$B8 60FA: D0 04 BNE $6100 60FC: A5 4A LDA $4A 60FE: C9 8E CMP #$8E 6100: 90 01 BCC $6103 6102: 60 RTS 6103: A5 44 LDA $44 6105: 85 82 STA $82 6107: A5 45 LDA $45 6109: 85 83 STA $83 610B: 20 98 61 JSR $6198 610E: A5 80 LDA $80 6110: 85 40 STA $40 6112: A5 81 LDA $81 6114: 85 41 STA $41 6116: A5 80 LDA $80 6118: 85 44 STA $44 611A: A5 81 LDA $81 611C: 85 45 STA $45 611E: A9 BA LDA #$BA 6120: 85 42 STA $42 6122: A9 B9 LDA #$B9 6124: 85 43 STA $43 6126: 20 2F 6A JSR $6A2F 6129: 20 B2 6B JSR $6BB2 612C: 18 CLC 612D: A4 6D LDY $6D 612F: B9 48 BA LDA $BA48,Y 6132: 65 6A ADC $6A 6134: 99 49 BA STA $BA49,Y 6137: 88 DEY 6138: 10 F5 BPL $612F 613A: A9 00 LDA #$00 613C: 8D 48 BA STA $BA48 613F: E6 6D INC $6D 6141: 18 CLC 6142: A5 6F LDA $6F 6144: 65 6A ADC $6A 6146: 85 6F STA $6F 6148: E6 6E INC $6E 614A: A9 8E LDA #$8E 614C: 85 80 STA $80 614E: A9 B8 LDA #$B8 6150: 85 81 STA $81 6152: A5 48 LDA $48 6154: 85 82 STA $82 6156: A5 49 LDA $49 6158: 85 83 STA $83 615A: A6 6A LDX $6A 615C: BD C2 6E LDA $6EC2,X 615F: 85 6A STA $6A 6161: A5 81 LDA $81 6163: C5 83 CMP $83 6165: D0 04 BNE $616B 6167: A5 80 LDA $80 6169: C5 82 CMP $82 616B: F0 03 BEQ $6170 616D: 20 05 6D JSR $6D05 6170: 20 F1 62 JSR $62F1 6173: 18 CLC 6174: A5 48 LDA $48 6176: 65 6A ADC $6A 6178: 85 48 STA $48 617A: 90 02 BCC $617E 617C: E6 49 INC $49 617E: 18 CLC 617F: A5 4A LDA $4A 6181: 65 6A ADC $6A 6183: 85 4A STA $4A 6185: 90 02 BCC $6189 6187: E6 4B INC $4B 6189: 18 CLC 618A: A5 4C LDA $4C 618C: 65 6A ADC $6A 618E: 85 4C STA $4C 6190: 90 02 BCC $6194 6192: E6 4D INC $4D 6194: 20 AE 63 JSR $63AE 6197: 60 RTS 6198: 24 52 BIT $52 619A: 10 19 BPL $61B5 619C: A2 01 LDX #$01 619E: A9 70 LDA #$70 61A0: 86 80 STX $80 61A2: 85 81 STA $81 61A4: A0 00 LDY #$00 61A6: B1 80 LDA ($80),Y 61A8: AA TAX 61A9: C8 INY 61AA: B1 80 LDA ($80),Y 61AC: C5 83 CMP $83 61AE: D0 F0 BNE $61A0 61B0: E4 82 CPX $82 61B2: D0 EC BNE $61A0 61B4: 60 RTS 61B5: A9 01 LDA #$01 61B7: 85 68 STA $68 61B9: A9 70 LDA #$70 61BB: 85 69 STA $69 61BD: A5 68 LDA $68 61BF: 85 80 STA $80 61C1: A5 69 LDA $69 61C3: 85 81 STA $81 61C5: A0 00 LDY #$00 61C7: B1 80 LDA ($80),Y 61C9: 85 66 STA $66 61CB: C8 INY 61CC: B1 80 LDA ($80),Y 61CE: 85 67 STA $67 61D0: 20 47 6C JSR $6C47 61D3: A5 69 LDA $69 61D5: C5 83 CMP $83 61D7: D0 04 BNE $61DD 61D9: A5 68 LDA $68 61DB: C5 82 CMP $82 61DD: D0 DE BNE $61BD 61DF: 60 RTS 61E0: A0 00 LDY #$00 61E2: B1 82 LDA ($82),Y 61E4: 85 80 STA $80 61E6: C8 INY 61E7: B1 82 LDA ($82),Y 61E9: 85 81 STA $81 61EB: 60 RTS 61EC: A5 44 LDA $44 61EE: 85 80 STA $80 61F0: A5 45 LDA $45 61F2: 85 81 STA $81 61F4: 24 52 BIT $52 61F6: 10 21 BPL $6219 61F8: 8A TXA 61F9: D0 02 BNE $61FD 61FB: F0 48 BEQ $6245 61FD: 86 82 STX $82 61FF: 4C 06 62 JMP $6206 6202: 86 80 STX $80 6204: 85 81 STA $81 6206: A0 00 LDY #$00 6208: B1 80 LDA ($80),Y 620A: AA TAX 620B: C8 INY 620C: B1 80 LDA ($80),Y 620E: C6 82 DEC $82 6210: D0 F0 BNE $6202 6212: 85 81 STA $81 6214: 86 80 STX $80 6216: 4C 45 62 JMP $6245 6219: 8A TXA 621A: D0 02 BNE $621E 621C: F0 27 BEQ $6245 621E: 86 82 STX $82 6220: 4C 2B 62 JMP $622B 6223: A5 68 LDA $68 6225: 85 80 STA $80 6227: A5 69 LDA $69 6229: 85 81 STA $81 622B: A0 00 LDY #$00 622D: B1 80 LDA ($80),Y 622F: 85 66 STA $66 6231: C8 INY 6232: B1 80 LDA ($80),Y 6234: 85 67 STA $67 6236: 20 47 6C JSR $6C47 6239: C6 82 DEC $82 623B: D0 E6 BNE $6223 623D: A5 68 LDA $68 623F: 85 80 STA $80 6241: A5 69 LDA $69 6243: 85 81 STA $81 6245: A0 00 LDY #$00 6247: B1 80 LDA ($80),Y 6249: C8 INY 624A: 11 80 ORA ($80),Y 624C: 60 RTS 624D: A9 01 LDA #$01 624F: 85 80 STA $80 6251: A9 70 LDA #$70 6253: 85 81 STA $81 6255: A0 00 LDY #$00 6257: B1 80 LDA ($80),Y 6259: C8 INY 625A: 11 80 ORA ($80),Y 625C: F0 12 BEQ $6270 625E: D0 06 BNE $6266 6260: B1 80 LDA ($80),Y 6262: 85 81 STA $81 6264: 86 80 STX $80 6266: A0 00 LDY #$00 6268: B1 80 LDA ($80),Y 626A: AA TAX 626B: C8 INY 626C: 11 80 ORA ($80),Y 626E: D0 F0 BNE $6260 6270: 18 CLC 6271: A5 80 LDA $80 6273: 69 02 ADC #$02 6275: 8D 58 BA STA $BA58 6278: A5 81 LDA $81 627A: 69 00 ADC #$00 627C: 8D 59 BA STA $BA59 627F: 60 RTS 6280: A9 01 LDA #$01 6282: 85 80 STA $80 6284: A9 70 LDA #$70 6286: 85 81 STA $81 6288: 20 B3 62 JSR $62B3 628B: A9 00 LDA #$00 628D: 85 82 STA $82 628F: A9 70 LDA #$70 6291: 85 83 STA $83 6293: 98 TYA 6294: D0 01 BNE $6297 6296: 60 RTS 6297: C8 INY 6298: 84 57 STY $57 629A: A0 00 LDY #$00 629C: B1 80 LDA ($80),Y 629E: 85 82 STA $82 62A0: C8 INY 62A1: B1 80 LDA ($80),Y 62A3: 85 83 STA $83 62A5: 38 SEC 62A6: A5 82 LDA $82 62A8: E5 57 SBC $57 62AA: 85 82 STA $82 62AC: A5 83 LDA $83 62AE: E9 00 SBC #$00 62B0: 85 83 STA $83 62B2: 60 RTS 62B3: A0 01 LDY #$01 62B5: B1 80 LDA ($80),Y 62B7: 88 DEY 62B8: 11 80 ORA ($80),Y 62BA: D0 01 BNE $62BD 62BC: 60 RTS 62BD: A0 03 LDY #$03 62BF: C8 INY 62C0: B1 80 LDA ($80),Y 62C2: D0 FB BNE $62BF 62C4: C8 INY 62C5: 60 RTS 62C6: A0 02 LDY #$02 62C8: B1 80 LDA ($80),Y 62CA: AA TAX 62CB: C8 INY 62CC: B1 80 LDA ($80),Y 62CE: 60 RTS 62CF: A0 00 LDY #$00 62D1: A9 01 LDA #$01 62D3: 91 5D STA ($5D),Y 62D5: C8 INY 62D6: 91 5D STA ($5D),Y 62D8: C8 INY 62D9: A5 40 LDA $40 62DB: 91 5D STA ($5D),Y 62DD: C8 INY 62DE: A5 41 LDA $41 62E0: 91 5D STA ($5D),Y 62E2: C8 INY 62E3: A2 00 LDX #$00 62E5: BD BA B9 LDA $B9BA,X 62E8: 91 5D STA ($5D),Y 62EA: D0 01 BNE $62ED 62EC: 60 RTS 62ED: C8 INY 62EE: E8 INX 62EF: D0 F4 BNE $62E5 62F1: A4 6A LDY $6A 62F3: 88 DEY 62F4: B9 BA B9 LDA $B9BA,Y 62F7: 99 8E B8 STA $B88E,Y 62FA: 88 DEY 62FB: 10 F7 BPL $62F4 62FD: 60 RTS 62FE: A5 4D LDA $4D 6300: C9 B9 CMP #$B9 6302: D0 04 BNE $6308 6304: A5 4C LDA $4C 6306: C9 56 CMP #$56 6308: 90 35 BCC $633F 630A: 38 SEC 630B: AD 49 BA LDA $BA49 630E: ED 48 BA SBC $BA48 6311: 8D 49 BA STA $BA49 6314: AA TAX 6315: 85 6A STA $6A 6317: A0 00 LDY #$00 6319: C8 INY 631A: B9 48 BA LDA $BA48,Y 631D: 38 SEC 631E: E5 6A SBC $6A 6320: 99 47 BA STA $BA47,Y 6323: C4 6D CPY $6D 6325: D0 F2 BNE $6319 6327: A9 00 LDA #$00 6329: 99 48 BA STA $BA48,Y 632C: 38 SEC 632D: A5 6F LDA $6F 632F: E5 6A SBC $6A 6331: 85 6F STA $6F 6333: C6 6D DEC $6D 6335: C6 6E DEC $6E 6337: BD C2 6E LDA $6EC2,X 633A: 85 6A STA $6A 633C: 20 4C 69 JSR $694C 633F: 18 CLC 6340: A5 4A LDA $4A 6342: 69 14 ADC #$14 6344: 85 4A STA $4A 6346: 90 02 BCC $634A 6348: E6 4B INC $4B 634A: 18 CLC 634B: A5 4C LDA $4C 634D: 69 14 ADC #$14 634F: 85 4C STA $4C 6351: 90 02 BCC $6355 6353: E6 4D INC $4D 6355: A5 49 LDA $49 6357: C5 4D CMP $4D 6359: D0 04 BNE $635F 635B: A5 48 LDA $48 635D: C5 4C CMP $4C 635F: 90 01 BCC $6362 6361: 60 RTS 6362: A5 46 LDA $46 6364: 85 40 STA $40 6366: A5 47 LDA $47 6368: 85 41 STA $41 636A: A5 48 LDA $48 636C: 85 42 STA $42 636E: A5 49 LDA $49 6370: 85 43 STA $43 6372: A0 00 LDY #$00 6374: B1 40 LDA ($40),Y 6376: C8 INY 6377: 11 40 ORA ($40),Y 6379: D0 0F BNE $638A 637B: 38 SEC 637C: A5 4C LDA $4C 637E: E5 48 SBC $48 6380: A8 TAY 6381: 88 DEY 6382: A9 00 LDA #$00 6384: 91 42 STA ($42),Y 6386: 88 DEY 6387: 10 FB BPL $6384 6389: 60 RTS 638A: 20 2F 6A JSR $6A2F 638D: 20 11 6B JSR $6B11 6390: E6 6D INC $6D 6392: A5 6F LDA $6F 6394: A6 6D LDX $6D 6396: 9D 48 BA STA $BA48,X 6399: A5 40 LDA $40 639B: 85 46 STA $46 639D: A5 41 LDA $41 639F: 85 47 STA $47 63A1: A5 42 LDA $42 63A3: 85 48 STA $48 63A5: A5 43 LDA $43 63A7: 85 49 STA $49 63A9: 20 AE 63 JSR $63AE 63AC: 38 SEC 63AD: 60 RTS 63AE: A9 00 LDA #$00 63B0: A0 00 LDY #$00 63B2: 91 48 STA ($48),Y 63B4: 60 RTS 63B5: A6 6E LDX $6E 63B7: E8 INX 63B8: E4 6D CPX $6D 63BA: D0 1B BNE $63D7 63BC: A5 49 LDA $49 63BE: C5 4D CMP $4D 63C0: D0 04 BNE $63C6 63C2: A5 48 LDA $48 63C4: C5 4C CMP $4C 63C6: 90 0D BCC $63D5 63C8: A0 00 LDY #$00 63CA: B1 4C LDA ($4C),Y 63CC: D0 09 BNE $63D7 63CE: B1 46 LDA ($46),Y 63D0: C8 INY 63D1: 11 46 ORA ($46),Y 63D3: D0 02 BNE $63D7 63D5: 18 CLC 63D6: 60 RTS 63D7: 38 SEC 63D8: 60 RTS 63D9: 20 B5 63 JSR $63B5 63DC: B0 01 BCS $63DF 63DE: 60 RTS 63DF: E6 6E INC $6E 63E1: AE B5 03 LDX $03B5 63E4: E8 INX 63E5: E4 51 CPX $51 63E7: 90 06 BCC $63EF 63E9: 20 FE 62 JSR $62FE 63EC: A6 51 LDX $51 63EE: CA DEX 63EF: 8E B5 03 STX $03B5 63F2: 20 BF 68 JSR $68BF 63F5: A9 00 LDA #$00 63F7: 85 50 STA $50 63F9: 38 SEC 63FA: 60 RTS 63FB: 20 D5 66 JSR $66D5 63FE: 18 CLC 63FF: 65 70 ADC $70 6401: C9 5E CMP #$5E 6403: 90 0D BCC $6412 6405: F0 0B BEQ $6412 6407: A5 55 LDA $55 6409: 10 03 BPL $640E 640B: 00 01 07 INT $0701 640E: 20 12 E0 JSR $E012 6411: 60 RTS 6412: A9 FF LDA #$FF 6414: 8D 5C BA STA $BA5C 6417: 20 B1 64 JSR $64B1 641A: AD 57 BA LDA $BA57 641D: C9 05 CMP #$05 641F: D0 05 BNE $6426 6421: 20 BF 67 JSR $67BF 6424: C6 50 DEC $50 6426: 20 94 66 JSR $6694 6429: 20 5F 67 JSR $675F 642C: A9 00 LDA #$00 642E: 8D B1 03 STA $03B1 6431: AE 47 04 LDX $0447 6434: E0 02 CPX #$02 6436: D0 02 BNE $643A 6438: A9 08 LDA #$08 643A: 8D B2 03 STA $03B2 643D: A9 FF LDA #$FF 643F: 8D AF 03 STA $03AF 6442: A9 FF LDA #$FF 6444: 8D B0 03 STA $03B0 6447: 00 19 C7 INT $C719 644A: AD 47 04 LDA $0447 644D: C9 02 CMP #$02 644F: F0 01 BEQ $6452 6451: 60 RTS 6452: A5 55 LDA $55 6454: 30 01 BMI $6457 6456: 60 RTS 6457: AD 5F 04 LDA $045F 645A: F0 01 BEQ $645D 645C: 60 RTS 645D: A5 55 LDA $55 645F: 85 92 STA $92 6461: A5 56 LDA $56 6463: 85 93 STA $93 6465: 00 07 07 INT $0707 6468: B0 01 BCS $646B 646A: 60 RTS 646B: A5 92 LDA $92 646D: 85 55 STA $55 646F: 20 D5 66 JSR $66D5 6472: 18 CLC 6473: 65 70 ADC $70 6475: C9 5E CMP #$5E 6477: 90 06 BCC $647F 6479: F0 04 BEQ $647F 647B: 20 12 E0 JSR $E012 647E: 60 RTS 647F: 20 B1 64 JSR $64B1 6482: A5 70 LDA $70 6484: 48 PHA 6485: A4 50 LDY $50 6487: AD 57 BA LDA $BA57 648A: C9 04 CMP #$04 648C: D0 0B BNE $6499 648E: A9 1E LDA #$1E 6490: 91 4E STA ($4E),Y 6492: E6 50 INC $50 6494: 20 97 67 JSR $6797 6497: A4 50 LDY $50 6499: A5 92 LDA $92 649B: 91 4E STA ($4E),Y 649D: E6 50 INC $50 649F: 20 97 67 JSR $6797 64A2: A4 50 LDY $50 64A4: A5 93 LDA $93 64A6: 91 4E STA ($4E),Y 64A8: E6 50 INC $50 64AA: 20 97 67 JSR $6797 64AD: 68 PLA 64AE: 85 70 STA $70 64B0: 60 RTS 64B1: A2 00 LDX #$00 64B3: A0 01 LDY #$01 64B5: 84 59 STY $59 64B7: A0 00 LDY #$00 64B9: 84 58 STY $58 64BB: C4 50 CPY $50 64BD: D0 24 BNE $64E3 64BF: A4 57 LDY $57 64C1: F0 20 BEQ $64E3 64C3: 10 15 BPL $64DA 64C5: E6 58 INC $58 64C7: C8 INY 64C8: D0 FB BNE $64C5 64CA: AD 57 BA LDA $BA57 64CD: C9 03 CMP #$03 64CF: D0 12 BNE $64E3 64D1: A9 00 LDA #$00 64D3: A4 58 LDY $58 64D5: 91 4E STA ($4E),Y 64D7: 4C E3 64 JMP $64E3 64DA: A9 00 LDA #$00 64DC: 9D BA B9 STA $B9BA,X 64DF: E8 INX 64E0: 88 DEY 64E1: D0 F7 BNE $64DA 64E3: A4 58 LDY $58 64E5: C4 70 CPY $70 64E7: B0 51 BCS $653A 64E9: B1 4E LDA ($4E),Y 64EB: 10 2D BPL $651A 64ED: A4 59 LDY $59 64EF: 86 5A STX $5A 64F1: B9 C9 6E LDA $6EC9,Y 64F4: C5 5A CMP $5A 64F6: F0 07 BEQ $64FF 64F8: B0 0B BCS $6505 64FA: C8 INY 64FB: 84 59 STY $59 64FD: D0 F2 BNE $64F1 64FF: A9 1E LDA #$1E 6501: 9D BA B9 STA $B9BA,X 6504: E8 INX 6505: A4 58 LDY $58 6507: B1 4E LDA ($4E),Y 6509: 9D BA B9 STA $B9BA,X 650C: E8 INX 650D: C8 INY 650E: B1 4E LDA ($4E),Y 6510: 9D BA B9 STA $B9BA,X 6513: E8 INX 6514: C8 INY 6515: 84 58 STY $58 6517: 4C BB 64 JMP $64BB 651A: C9 1E CMP #$1E 651C: D0 12 BNE $6530 651E: AD 57 BA LDA $BA57 6521: C9 05 CMP #$05 6523: D0 0F BNE $6534 6525: 18 CLC 6526: A5 58 LDA $58 6528: 69 03 ADC #$03 652A: C5 70 CMP $70 652C: D0 06 BNE $6534 652E: A9 1E LDA #$1E 6530: 9D BA B9 STA $B9BA,X 6533: E8 INX 6534: C8 INY 6535: 84 58 STY $58 6537: 4C BB 64 JMP $64BB 653A: 86 70 STX $70 653C: 38 SEC 653D: A0 00 LDY #$00 653F: A5 70 LDA $70 6541: F9 C3 6E SBC $6EC3,Y 6544: C8 INY 6545: B0 F8 BCS $653F 6547: 84 59 STY $59 6549: A8 TAY 654A: A9 00 LDA #$00 654C: 9D BA B9 STA $B9BA,X 654F: E8 INX 6550: C8 INY 6551: D0 F9 BNE $654C 6553: 86 5A STX $5A 6555: A6 6E LDX $6E 6557: E8 INX 6558: BD 48 BA LDA $BA48,X 655B: 0A ASL 655C: AA TAX 655D: BD 98 6E LDA $6E98,X 6560: 85 80 STA $80 6562: BD 99 6E LDA $6E99,X 6565: 85 81 STA $81 6567: A9 14 LDA #$14 6569: 85 6A STA $6A 656B: A5 5A LDA $5A 656D: C5 71 CMP $71 656F: 85 71 STA $71 6571: B0 03 BCS $6576 6573: 4C F0 65 JMP $65F0 6576: D0 03 BNE $657B 6578: 4C 70 66 JMP $6670 657B: A6 6E LDX $6E 657D: 18 CLC 657E: E8 INX 657F: BD 48 BA LDA $BA48,X 6582: 69 01 ADC #$01 6584: 9D 48 BA STA $BA48,X 6587: E4 6D CPX $6D 6589: 90 F3 BCC $657E 658B: A6 6D LDX $6D 658D: BD 48 BA LDA $BA48,X 6590: 85 6F STA $6F 6592: C9 0F CMP #$0F 6594: 90 35 BCC $65CB 6596: C6 6D DEC $6D 6598: A6 6D LDX $6D 659A: BD 48 BA LDA $BA48,X 659D: 85 6F STA $6F 659F: A6 6D LDX $6D 65A1: A5 80 LDA $80 65A3: 48 PHA 65A4: A5 81 LDA $81 65A6: 48 PHA 65A7: 20 EC 61 JSR $61EC 65AA: A5 80 LDA $80 65AC: 85 46 STA $46 65AE: A5 81 LDA $81 65B0: 85 47 STA $47 65B2: 68 PLA 65B3: 85 81 STA $81 65B5: 68 PLA 65B6: 85 80 STA $80 65B8: A6 6D LDX $6D 65BA: BD 48 BA LDA $BA48,X 65BD: 0A ASL 65BE: AA TAX 65BF: CA DEX 65C0: CA DEX 65C1: BD 98 6E LDA $6E98,X 65C4: 85 48 STA $48 65C6: BD 99 6E LDA $6E99,X 65C9: 85 49 STA $49 65CB: A5 48 LDA $48 65CD: 85 82 STA $82 65CF: A5 49 LDA $49 65D1: 85 83 STA $83 65D3: A5 81 LDA $81 65D5: C5 83 CMP $83 65D7: D0 04 BNE $65DD 65D9: A5 80 LDA $80 65DB: C5 82 CMP $82 65DD: F0 03 BEQ $65E2 65DF: 20 05 6D JSR $6D05 65E2: 18 CLC 65E3: A5 48 LDA $48 65E5: 69 14 ADC #$14 65E7: 85 48 STA $48 65E9: 90 02 BCC $65ED 65EB: E6 49 INC $49 65ED: 4C 70 66 JMP $6670 65F0: A6 6D LDX $6D 65F2: 38 SEC 65F3: BD 48 BA LDA $BA48,X 65F6: E9 01 SBC #$01 65F8: 9D 48 BA STA $BA48,X 65FB: CA DEX 65FC: E4 6E CPX $6E 65FE: D0 F3 BNE $65F3 6600: C6 6F DEC $6F 6602: A5 48 LDA $48 6604: 85 82 STA $82 6606: A5 49 LDA $49 6608: 85 83 STA $83 660A: A5 81 LDA $81 660C: C5 83 CMP $83 660E: D0 04 BNE $6614 6610: A5 80 LDA $80 6612: C5 82 CMP $82 6614: F0 03 BEQ $6619 6616: 20 C1 6C JSR $6CC1 6619: 38 SEC 661A: A5 48 LDA $48 661C: E9 14 SBC #$14 661E: 85 48 STA $48 6620: A5 49 LDA $49 6622: E9 00 SBC #$00 6624: 85 49 STA $49 6626: 20 7F 66 JSR $667F 6629: A5 49 LDA $49 662B: C5 4D CMP $4D 662D: D0 04 BNE $6633 662F: A5 48 LDA $48 6631: C5 4C CMP $4C 6633: B0 3B BCS $6670 6635: A5 46 LDA $46 6637: 85 40 STA $40 6639: A5 47 LDA $47 663B: 85 41 STA $41 663D: A5 48 LDA $48 663F: 85 42 STA $42 6641: A5 49 LDA $49 6643: 85 43 STA $43 6645: A0 00 LDY #$00 6647: B1 40 LDA ($40),Y 6649: C8 INY 664A: 11 40 ORA ($40),Y 664C: D0 03 BNE $6651 664E: 4C 70 66 JMP $6670 6651: 20 2F 6A JSR $6A2F 6654: 20 11 6B JSR $6B11 6657: E6 6D INC $6D 6659: A5 6F LDA $6F 665B: A6 6D LDX $6D 665D: 9D 48 BA STA $BA48,X 6660: A5 40 LDA $40 6662: 85 46 STA $46 6664: A5 41 LDA $41 6666: 85 47 STA $47 6668: A5 42 LDA $42 666A: 85 48 STA $48 666C: A5 43 LDA $43 666E: 85 49 STA $49 6670: A4 71 LDY $71 6672: 88 DEY 6673: B9 BA B9 LDA $B9BA,Y 6676: 91 4E STA ($4E),Y 6678: 88 DEY 6679: 10 F8 BPL $6673 667B: 20 AE 63 JSR $63AE 667E: 60 RTS 667F: A9 00 LDA #$00 6681: A0 13 LDY #$13 6683: 91 48 STA ($48),Y 6685: 88 DEY 6686: 10 FB BPL $6683 6688: 60 RTS 6689: A9 00 LDA #$00 668B: A4 6A LDY $6A 668D: 88 DEY 668E: 91 80 STA ($80),Y 6690: 88 DEY 6691: 10 FB BPL $668E 6693: 60 RTS 6694: A5 70 LDA $70 6696: 48 PHA 6697: A4 50 LDY $50 6699: A5 55 LDA $55 669B: 10 2D BPL $66CA 669D: AD 57 BA LDA $BA57 66A0: C9 04 CMP #$04 66A2: F0 0B BEQ $66AF 66A4: C9 02 CMP #$02 66A6: D0 12 BNE $66BA 66A8: AD B4 03 LDA $03B4 66AB: C9 13 CMP #$13 66AD: D0 0B BNE $66BA 66AF: A9 1E LDA #$1E 66B1: 91 4E STA ($4E),Y 66B3: E6 50 INC $50 66B5: 20 97 67 JSR $6797 66B8: A4 50 LDY $50 66BA: A5 55 LDA $55 66BC: 91 4E STA ($4E),Y 66BE: 00 01 07 INT $0701 66C1: 85 56 STA $56 66C3: E6 50 INC $50 66C5: 20 97 67 JSR $6797 66C8: A4 50 LDY $50 66CA: 91 4E STA ($4E),Y 66CC: E6 50 INC $50 66CE: 20 97 67 JSR $6797 66D1: 68 PLA 66D2: 85 70 STA $70 66D4: 60 RTS 66D5: A9 00 LDA #$00 66D7: 8D 57 BA STA $BA57 66DA: 24 52 BIT $52 66DC: 50 25 BVC $6703 66DE: A4 55 LDY $55 66E0: 30 11 BMI $66F3 66E2: A4 50 LDY $50 66E4: 88 DEY 66E5: B1 4E LDA ($4E),Y 66E7: C9 1E CMP #$1E 66E9: D0 6A BNE $6755 66EB: 84 50 STY $50 66ED: 20 BF 67 JSR $67BF 66F0: 4C 51 67 JMP $6751 66F3: A9 02 LDA #$02 66F5: AC B4 03 LDY $03B4 66F8: C0 13 CPY #$13 66FA: D0 4E BNE $674A 66FC: A9 04 LDA #$04 66FE: 8D 57 BA STA $BA57 6701: D0 47 BNE $674A 6703: A4 50 LDY $50 6705: B1 4E LDA ($4E),Y 6707: AA TAX 6708: F0 D4 BEQ $66DE 670A: 29 80 AND #$80 670C: 85 57 STA $57 670E: A5 55 LDA $55 6710: 29 80 AND #$80 6712: C5 57 CMP $57 6714: F0 3B BEQ $6751 6716: 90 1C BCC $6734 6718: A9 01 LDA #$01 671A: AC B4 03 LDY $03B4 671D: C0 13 CPY #$13 671F: D0 29 BNE $674A 6721: E0 1E CPX #$1E 6723: D0 08 BNE $672D 6725: E6 50 INC $50 6727: 20 97 67 JSR $6797 672A: 4C 51 67 JMP $6751 672D: A9 04 LDA #$04 672F: 8D 57 BA STA $BA57 6732: D0 16 BNE $674A 6734: A2 03 LDX #$03 6736: AC B4 03 LDY $03B4 6739: D0 0B BNE $6746 673B: A4 50 LDY $50 673D: 88 DEY 673E: B1 4E LDA ($4E),Y 6740: C9 1E CMP #$1E 6742: D0 02 BNE $6746 6744: A2 05 LDX #$05 6746: 8A TXA 6747: 8D 57 BA STA $BA57 674A: AA TAX 674B: BD 59 67 LDA $6759,X 674E: 85 57 STA $57 6750: 60 RTS 6751: A9 00 LDA #$00 6753: F0 F5 BEQ $674A 6755: A9 01 LDA #$01 6757: D0 F1 BNE $674A 6759: 00 01 02 INT $0201 675C: FF ?? 675D: 03 ?? 675E: FE 675F: 38 SEC 6760: A5 4C LDA $4C 6761: E5 48 SBC $48 6764: 85 82 STA $82 6766: A5 4D LDA $4D 6768: E5 49 SBC $49 676A: 85 83 STA $83 676C: 90 0F BCC $677D 676E: A5 82 LDA $82 6770: 05 83 ORA $83 6772: F0 09 BEQ $677D 6774: A4 82 LDY $82 6776: A9 00 LDA #$00 6778: 91 48 STA ($48),Y 677A: 88 DEY 677B: D0 F9 BNE $6776 677D: A0 63 LDY #$63 677F: AD 47 04 LDA $0447 6782: C9 02 CMP #$02 6784: D0 02 BNE $6788 6786: A0 4F LDY #$4F 6788: B1 4A LDA ($4A),Y 678A: C9 1E CMP #$1E 678C: D0 02 BNE $6790 678E: A9 20 LDA #$20 6790: 99 C0 02 STA $02C0,Y 6793: 88 DEY 6794: 10 F2 BPL $6788 6796: 60 RTS 6797: AE B4 03 LDX $03B4 679A: E8 INX 679B: E0 14 CPX #$14 679D: F0 04 BEQ $67A3 679F: 8E B4 03 STX $03B4 67A2: 60 RTS 67A3: A9 00 LDA #$00 67A5: 8D B4 03 STA $03B4 67A8: AE B5 03 LDX $03B5 67AB: E8 INX 67AC: E4 51 CPX $51 67AE: 90 0B BCC $67BB 67B0: A5 6E LDA $6E 67B2: 20 FE 62 JSR $62FE 67B5: 20 BF 68 JSR $68BF 67B8: A6 51 LDX $51 67BA: CA DEX 67BB: 8E B5 03 STX $03B5 67BE: 60 RTS 67BF: CE B4 03 DEC $03B4 67C2: 30 01 BMI $67C5 67C4: 60 RTS 67C5: A9 13 LDA #$13 67C7: 8D B4 03 STA $03B4 67CA: CE B5 03 DEC $03B5 67CD: 30 01 BMI $67D0 67CF: 60 RTS 67D0: 20 86 60 JSR $6086 67D3: 20 BF 68 JSR $68BF 67D6: A9 00 LDA #$00 67D8: 8D B5 03 STA $03B5 67DB: 60 RTS 67DC: AD 75 BA LDA $BA75 67DF: 8D C8 08 STA $08C8 67E2: A9 00 LDA #$00 67E4: 8D D1 08 STA $08D1 67E7: AD 79 BA LDA $BA79 67EA: 8D CD 08 STA $08CD 67ED: AD 7A BA LDA $BA7A 67F0: 8D CE 08 STA $08CE 67F3: A9 00 LDA #$00 67F5: 8D CF 08 STA $08CF 67F8: 8D D0 08 STA $08D0 67FB: 00 19 05 INT $0519 67FE: B0 2E BCS $682E 6800: A9 00 LDA #$00 6802: 85 E0 STA $E0 6804: A9 70 LDA #$70 6806: 85 E1 STA $E1 6808: A5 80 LDA $80 680A: 8D C6 08 STA $08C6 680D: A5 81 LDA $81 680F: 8D C7 08 STA $08C7 6812: A5 81 LDA $81 6814: C9 40 CMP #$40 6816: D0 04 BNE $681C 6818: A5 80 LDA $80 681A: C9 00 CMP #$00 681C: 90 0A BCC $6828 681E: A9 00 LDA #$00 6820: 8D C6 08 STA $08C6 6823: A9 40 LDA #$40 6825: 8D C7 08 STA $08C7 6828: 00 16 05 INT $0516 682B: B0 01 BCS $682E 682D: 60 RTS 682E: 4C B8 4D JMP $4DB8 6831: A5 40 LDA $40 6833: 85 44 STA $44 6835: A5 41 LDA $41 6837: 85 45 STA $45 6839: A9 8E LDA #$8E 683B: 85 42 STA $42 683D: A9 B8 LDA #$B8 683F: 85 43 STA $43 6841: A0 00 LDY #$00 6843: B1 40 LDA ($40),Y 6845: C8 INY 6846: 11 40 ORA ($40),Y 6848: F0 1B BEQ $6865 684A: 20 2F 6A JSR $6A2F 684D: 20 11 6B JSR $6B11 6850: E6 6D INC $6D 6852: A5 6F LDA $6F 6854: A6 6D LDX $6D 6856: 9D 48 BA STA $BA48,X 6859: A5 43 LDA $43 685B: C5 4D CMP $4D 685D: D0 04 BNE $6863 685F: A5 42 LDA $42 6861: C5 4C CMP $4C 6863: 90 DC BCC $6841 6865: A5 40 LDA $40 6867: 85 46 STA $46 6869: A5 41 LDA $41 686B: 85 47 STA $47 686D: A5 42 LDA $42 686F: 85 48 STA $48 6871: A5 43 LDA $43 6873: 85 49 STA $49 6875: 60 RTS 6876: A9 8E LDA #$8E 6878: 85 4A STA $4A 687A: A9 B8 LDA #$B8 687C: 85 4B STA $4B 687E: A9 F2 LDA #$F2 6880: 85 4C STA $4C 6882: A9 B8 LDA #$B8 6884: 85 4D STA $4D 6886: A9 8E LDA #$8E 6888: 85 4E STA $4E 688A: A9 B8 LDA #$B8 688C: 85 4F STA $4F 688E: 24 52 BIT $52 6890: 10 08 BPL $689A 6892: A9 01 LDA #$01 6894: 0D 91 03 ORA $0391 6897: 8D 91 03 STA $0391 689A: A9 0C LDA #$0C 689C: 8D 4A 04 STA $044A ; 输入法提示类型 689F: A9 00 LDA #$00 68A1: 8D 47 04 STA $0447 ; input mode 68A4: A9 00 LDA #$00 68A6: 8D B4 03 STA $03B4 ; caret x 68A9: 8D B5 03 STA $03B5 ; caret y 68AC: A2 0E LDX #$0E 68AE: 9D 48 BA STA $BA48,X 68B1: CA DEX 68B2: 10 FA BPL $68AE 68B4: 85 6E STA $6E 68B6: 85 6F STA $6F 68B8: 85 6D STA $6D 68BA: A9 05 LDA #$05 68BC: 85 51 STA $51 68BE: 60 RTS 68BF: A6 6E LDX $6E 68C1: BD 48 BA LDA $BA48,X 68C4: 0A ASL 68C5: AA TAX 68C6: BD 98 6E LDA $6E98,X 68C9: 85 4E STA $4E 68CB: BD 99 6E LDA $6E99,X 68CE: 85 4F STA $4F 68D0: A6 6E LDX $6E 68D2: E4 6D CPX $6D 68D4: F0 1B BEQ $68F1 68D6: 38 SEC 68D7: BD 49 BA LDA $BA49,X 68DA: FD 48 BA SBC $BA48,X 68DD: A8 TAY 68DE: B9 C2 6E LDA $6EC2,Y 68E1: 85 71 STA $71 68E3: A0 FF LDY #$FF 68E5: C8 INY 68E6: C4 71 CPY $71 68E8: F0 04 BEQ $68EE 68EA: B1 4E LDA ($4E),Y 68EC: D0 F7 BNE $68E5 68EE: 84 70 STY $70 68F0: 60 RTS 68F1: A9 14 LDA #$14 68F3: 85 71 STA $71 68F5: A9 00 LDA #$00 68F7: 85 70 STA $70 68F9: 60 RTS 68FA: A9 01 LDA #$01 68FC: 85 80 STA $80 68FE: A9 70 LDA #$70 6900: 85 81 STA $81 6902: A0 00 LDY #$00 6904: B1 80 LDA ($80),Y 6906: C8 INY 6907: 11 80 ORA ($80),Y 6909: D0 01 BNE $690C ; 未到文件末尾 690B: 60 RTS ; adjust offset 690C: A0 03 LDY #$03 690E: C8 INY 690F: B1 80 LDA ($80),Y 6911: D0 FB BNE $690E 6913: 18 CLC 6914: C8 INY 6915: 98 TYA 6916: 65 80 ADC $80 6918: AA TAX 6919: A0 00 LDY #$00 691B: 91 80 STA ($80),Y 691D: A5 81 LDA $81 691F: 69 00 ADC #$00 6921: C8 INY 6922: 91 80 STA ($80),Y 6924: 86 80 STX $80 6926: 85 81 STA $81 6928: 4C 02 69 JMP $6902 ; clear $B88E-$B9CF 692B: A9 00 LDA #$00 692D: A0 2B LDY #$2B 692F: 99 8E B9 STA $B98E,Y 6932: 88 DEY 6933: 10 FA BPL $692F 6935: A0 FF LDY #$FF 6937: 99 8E B8 STA $B88E,Y 693A: 88 DEY 693B: D0 FA BNE $6937 693D: 99 8E B8 STA $B88E,Y 6940: 60 RTS 6941: A0 63 LDY #$63 6943: A9 00 LDA #$00 6945: 99 BA B9 STA $B9BA,Y 6948: 88 DEY 6949: 10 FA BPL $6945 694B: 60 RTS 694C: 18 CLC 694D: A9 8E LDA #$8E 694F: 65 6A ADC $6A 6951: 85 80 STA $80 6953: A9 B8 LDA #$B8 6955: 69 00 ADC #$00 6957: 85 81 STA $81 6959: A5 48 LDA $48 695B: 85 82 STA $82 695D: A5 49 LDA $49 695F: 85 83 STA $83 6961: 20 C1 6C JSR $6CC1 6964: 38 SEC 6965: A5 4A LDA $4A 6967: E5 6A SBC $6A 6969: 85 4A STA $4A 696B: A5 4B LDA $4B 696D: E9 00 SBC #$00 696F: 85 4B STA $4B 6971: 38 SEC 6972: A5 4C LDA $4C 6974: E5 6A SBC $6A 6976: 85 4C STA $4C 6978: A5 4D LDA $4D 697A: E9 00 SBC #$00 697C: 85 4D STA $4D 697E: 38 SEC 697F: A5 4E LDA $4E 6981: E5 6A SBC $6A 6983: 85 4E STA $4E 6985: A5 4F LDA $4F 6987: E9 00 SBC #$00 6989: 85 4F STA $4F 698B: 38 SEC 698C: A5 48 LDA $48 698E: E5 6A SBC $6A 6990: 85 48 STA $48 6992: A5 49 LDA $49 6994: E9 00 SBC #$00 6996: 85 49 STA $49 6998: 20 AE 63 JSR $63AE 699B: A5 44 LDA $44 699D: 85 80 STA $80 699F: A5 45 LDA $45 69A1: 85 81 STA $81 69A3: 24 52 BIT $52 69A5: 10 0C BPL $69B3 69A7: A0 00 LDY #$00 69A9: B1 80 LDA ($80),Y 69AB: 85 44 STA $44 69AD: C8 INY 69AE: B1 80 LDA ($80),Y 69B0: 85 45 STA $45 69B2: 60 RTS 69B3: A0 00 LDY #$00 69B5: B1 80 LDA ($80),Y 69B7: 85 66 STA $66 69B9: C8 INY 69BA: B1 80 LDA ($80),Y 69BC: 85 67 STA $67 69BE: AD 7B BA LDA $BA7B 69C1: CD 7C BA CMP $BA7C 69C4: B0 5D BCS $6A23 69C6: 69 01 ADC #$01 69C8: 0A ASL 69C9: AA TAX 69CA: BD 7D BA LDA $BA7D,X 69CD: 85 80 STA $80 69CF: BD 7E BA LDA $BA7E,X 69D2: 85 81 STA $81 69D4: A5 67 LDA $67 69D6: C5 81 CMP $81 69D8: D0 04 BNE $69DE 69DA: A5 66 LDA $66 69DC: C5 80 CMP $80 69DE: 90 43 BCC $6A23 69E0: A5 66 LDA $66 69E2: 85 82 STA $82 69E4: A5 67 LDA $67 69E6: 85 83 STA $83 69E8: A5 46 LDA $46 69EA: 85 68 STA $68 69EC: A5 47 LDA $47 69EE: 85 69 STA $69 69F0: 20 7D 6C JSR $6C7D 69F3: 38 SEC 69F4: A5 80 LDA $80 69F6: E5 53 SBC $53 69F8: 8D 79 BA STA $BA79 69FB: A5 81 LDA $81 69FD: E5 54 SBC $54 69FF: 8D 7A BA STA $BA7A 6A02: A9 00 LDA #$00 6A04: 85 80 STA $80 6A06: A9 40 LDA #$40 6A08: 85 81 STA $81 6A0A: 20 DC 67 JSR $67DC 6A0D: EE 7B BA INC $BA7B 6A10: 20 47 6C JSR $6C47 6A13: A5 68 LDA $68 6A15: 85 46 STA $46 6A17: A5 69 LDA $69 6A19: 85 47 STA $47 6A1B: A5 82 LDA $82 6A1D: 85 66 STA $66 6A1F: A5 83 LDA $83 6A21: 85 67 STA $67 6A23: 20 47 6C JSR $6C47 6A26: A5 68 LDA $68 6A28: 85 44 STA $44 6A2A: A5 69 LDA $69 6A2C: 85 45 STA $45 6A2E: 60 RTS 6A2F: A0 00 LDY #$00 6A31: B1 40 LDA ($40),Y 6A33: C8 INY 6A34: 11 40 ORA ($40),Y 6A36: D0 01 BNE $6A39 6A38: 60 RTS ; 把一行转换为文本保存到 $42, $43 6A39: A9 01 LDA #$01 6A3B: 85 59 STA $59 6A3D: C8 INY 6A3E: B1 40 LDA ($40),Y 6A40: AA TAX 6A41: C8 INY 6A42: B1 40 LDA ($40),Y 6A44: 84 6B STY $6B 6A46: 20 2F 6C JSR $6C2F ; 行号转数字 6A49: A0 FF LDY #$FF 6A4B: C8 INY 6A4C: B5 82 LDA $82,X 6A4E: 91 42 STA ($42),Y 6A50: E8 INX 6A51: E0 05 CPX #$05 6A53: D0 F6 BNE $6A4B 6A55: 84 6C STY $6C 6A57: A9 20 LDA #$20 ; 空格 6A59: A4 6B LDY $6B 6A5B: 84 6B STY $6B 6A5D: A4 6C LDY $6C 6A5F: C8 INY 6A60: 84 6C STY $6C 6A62: 91 42 STA ($42),Y 6A64: A4 6B LDY $6B 6A66: C8 INY 6A67: B1 40 LDA ($40),Y 6A69: D0 01 BNE $6A6C 6A6B: 60 RTS 6A6C: 30 3A BMI $6AA8 6A6E: C9 20 CMP #$20 6A70: B0 E9 BCS $6A5B 6A72: C8 INY 6A73: B1 40 LDA ($40),Y 6A75: 85 92 STA $92 6A77: C8 INY 6A78: B1 40 LDA ($40),Y 6A7A: 85 93 STA $93 6A7C: 84 6B STY $6B 6A7E: E6 6C INC $6C 6A80: A4 59 LDY $59 6A82: B9 C9 6E LDA $6EC9,Y 6A85: C5 6C CMP $6C 6A87: F0 07 BEQ $6A90 6A89: B0 0D BCS $6A98 6A8B: C8 INY 6A8C: 84 59 STY $59 6A8E: D0 F2 BNE $6A82 6A90: A9 1E LDA #$1E 6A92: A4 6C LDY $6C 6A94: 91 42 STA ($42),Y 6A96: E6 6C INC $6C 6A98: A4 6C LDY $6C 6A9A: A5 92 LDA $92 6A9C: 91 42 STA ($42),Y 6A9E: C8 INY 6A9F: A5 93 LDA $93 6AA1: 91 42 STA ($42),Y 6AA3: 84 6C STY $6C 6AA5: 4C 64 6A JMP $6A64 6AA8: 38 SEC 6AA9: E9 7F SBC #$7F 6AAB: AA TAX 6AAC: 48 PHA 6AAD: 84 6B STY $6B 6AAF: A0 00 LDY #$00 6AB1: A9 F6 LDA #$F6 6AB3: 85 80 STA $80 6AB5: A9 4F LDA #$4F 6AB7: 85 81 STA $81 6AB9: CA DEX 6ABA: F0 0C BEQ $6AC8 6ABC: E6 80 INC $80 6ABE: D0 02 BNE $6AC2 6AC0: E6 81 INC $81 6AC2: B1 80 LDA ($80),Y 6AC4: 10 F6 BPL $6ABC 6AC6: 30 F1 BMI $6AB9 6AC8: 68 PLA 6AC9: 48 PHA 6ACA: C9 50 CMP #$50 ; OR 6ACC: F0 04 BEQ $6AD2 6ACE: C9 4A CMP #$4A ; + 6AD0: B0 0D BCS $6ADF 6AD2: A4 6C LDY $6C ; A == 'OR' || A < '+' 6AD4: A9 20 LDA #$20 6AD6: D1 42 CMP ($42),Y 6AD8: F0 05 BEQ $6ADF 6ADA: C8 INY 6ADB: 91 42 STA ($42),Y 6ADD: 84 6C STY $6C 6ADF: A0 00 LDY #$00 6AE1: E6 80 INC $80 6AE3: D0 02 BNE $6AE7 6AE5: E6 81 INC $81 6AE7: B1 80 LDA ($80),Y 6AE9: 30 0A BMI $6AF5 6AEB: A4 6C LDY $6C 6AED: C8 INY 6AEE: 91 42 STA ($42),Y 6AF0: 84 6C STY $6C 6AF2: 4C DF 6A JMP $6ADF 6AF5: 29 7F AND #$7F 6AF7: A4 6C LDY $6C 6AF9: C8 INY 6AFA: 91 42 STA ($42),Y 6AFC: 84 6C STY $6C 6AFE: 68 PLA 6AFF: C9 4F CMP #$4F ; AND 6B01: F0 08 BEQ $6B0B 6B03: C9 50 CMP #$50 ; OR 6B05: F0 04 BEQ $6B0B 6B07: C9 4A CMP #$4A ; + 6B09: B0 03 BCS $6B0E 6B0B: 4C 57 6A JMP $6A57 6B0E: 4C 64 6A JMP $6A64 6B11: C8 INY 6B12: 98 TYA 6B13: 18 CLC 6B14: 65 40 ADC $40 6B16: 85 40 STA $40 6B18: 90 02 BCC $6B1C 6B1A: E6 41 INC $41 6B1C: E6 6C INC $6C 6B1E: A5 6C LDA $6C 6B20: C9 5F CMP #$5F 6B22: 90 05 BCC $6B29 6B24: 20 7C 6B JSR $6B7C 6B27: 85 6C STA $6C 6B29: 18 CLC 6B2A: 65 42 ADC $42 6B2C: 85 42 STA $42 6B2E: 90 02 BCC $6B32 6B30: E6 43 INC $43 6B32: A5 6F LDA $6F 6B34: 0A ASL 6B35: A8 TAY 6B36: B9 98 6E LDA $6E98,Y 6B39: 85 80 STA $80 6B3B: B9 99 6E LDA $6E99,Y 6B3E: 85 81 STA $81 6B40: C8 INY 6B41: C8 INY 6B42: 38 SEC 6B43: A5 80 LDA $80 6B45: E5 42 SBC $42 6B47: 85 80 STA $80 6B49: A5 81 LDA $81 6B4B: E5 43 SBC $43 6B4D: 85 81 STA $81 6B4F: 90 E5 BCC $6B36 6B51: 88 DEY 6B52: 88 DEY 6B53: 98 TYA 6B54: 4A LSR 6B55: 85 6F STA $6F 6B57: A5 80 LDA $80 6B59: 05 81 ORA $81 6B5B: D0 06 BNE $6B63 6B5D: E6 6F INC $6F 6B5F: A2 14 LDX #$14 6B61: D0 03 BNE $6B66 6B63: A5 80 LDA $80 6B65: AA TAX 6B66: A9 00 LDA #$00 6B68: A0 FF LDY #$FF 6B6A: C8 INY 6B6B: 91 42 STA ($42),Y 6B6D: CA DEX 6B6E: D0 FA BNE $6B6A 6B70: C8 INY 6B71: 98 TYA 6B72: 18 CLC 6B73: 65 42 ADC $42 6B75: 85 42 STA $42 6B77: 90 02 BCC $6B7B 6B79: E6 43 INC $43 6B7B: 60 RTS 6B7C: A5 4E LDA $4E 6B7E: 48 PHA 6B7F: A5 4F LDA $4F 6B81: 48 PHA 6B82: A5 50 LDA $50 6B84: 48 PHA 6B85: A5 42 LDA $42 6B87: 85 4E STA $4E 6B89: A5 43 LDA $43 6B8B: 85 4F STA $4F 6B8D: A9 5E LDA #$5E 6B8F: 85 50 STA $50 6B91: 20 B7 5F JSR $5FB7 6B94: D0 10 BNE $6BA6 6B96: C4 50 CPY $50 6B98: F0 0C BEQ $6BA6 6B9A: 68 PLA 6B9B: 85 50 STA $50 6B9D: 68 PLA 6B9E: 85 4F STA $4F 6BA0: 68 PLA 6BA1: 85 4E STA $4E 6BA3: A9 5D LDA #$5D 6BA5: 60 RTS 6BA6: 68 PLA 6BA7: 85 50 STA $50 6BA9: 68 PLA 6BAA: 85 4F STA $4F 6BAC: 68 PLA 6BAD: 85 4E STA $4E 6BAF: A9 5E LDA #$5E 6BB1: 60 RTS 6BB2: E6 6C INC $6C 6BB4: A5 6C LDA $6C 6BB6: C9 5F CMP #$5F 6BB8: 90 05 BCC $6BBF 6BBA: 20 7C 6B JSR $6B7C 6BBD: 85 6C STA $6C 6BBF: 18 CLC 6BC0: 65 42 ADC $42 6BC2: 85 42 STA $42 6BC4: 90 02 BCC $6BC8 6BC6: E6 43 INC $43 6BC8: A0 00 LDY #$00 6BCA: B9 B6 6E LDA $6EB6,Y 6BCD: 85 80 STA $80 6BCF: B9 B7 6E LDA $6EB7,Y 6BD2: 85 81 STA $81 6BD4: C8 INY 6BD5: C8 INY 6BD6: 38 SEC 6BD7: A5 80 LDA $80 6BD9: E5 42 SBC $42 6BDB: 85 80 STA $80 6BDD: A5 81 LDA $81 6BDF: E5 43 SBC $43 6BE1: 85 81 STA $81 6BE3: 90 E5 BCC $6BCA 6BE5: 88 DEY 6BE6: 88 DEY 6BE7: 98 TYA 6BE8: 4A LSR 6BE9: 85 6A STA $6A 6BEB: A5 80 LDA $80 6BED: 05 81 ORA $81 6BEF: D0 06 BNE $6BF7 6BF1: E6 6A INC $6A 6BF3: A2 14 LDX #$14 6BF5: D0 03 BNE $6BFA 6BF7: A5 80 LDA $80 6BF9: AA TAX 6BFA: A9 00 LDA #$00 6BFC: A0 FF LDY #$FF 6BFE: C8 INY 6BFF: 91 42 STA ($42),Y 6C01: CA DEX 6C02: D0 FA BNE $6BFE 6C04: 60 RTS 6C05: BD 48 BA LDA $BA48,X 6C08: 0A ASL 6C09: AA TAX 6C0A: BD 98 6E LDA $6E98,X 6C0D: 85 80 STA $80 6C0F: BD 99 6E LDA $6E99,X 6C12: 85 81 STA $81 6C14: 60 RTS 6C15: 20 05 6C JSR $6C05 6C18: A5 80 LDA $80 6C1A: 85 5B STA $5B 6C1C: A5 81 LDA $81 6C1E: 85 5C STA $5C 6C20: A5 5B LDA $5B 6C22: D0 02 BNE $6C26 6C24: C6 5C DEC $5C 6C26: C6 5B DEC $5B 6C28: 20 48 5D JSR $5D48 6C2B: 20 5D 5D JSR $5D5D 6C2E: 60 RTS ; 把 A,X 的整数转换为 ASCII 码,结果在 $82-$86, X 是第一个不为 '0' 的字符的 index 6C2F: 86 80 STX $80 6C31: 85 81 STA $81 6C33: 00 33 C7 INT $C733 ; 把 $80,$81 的16bit整数转换为 ASCII 码,结果在 $82-$86 6C36: A2 FF LDX #$FF 6C38: E8 INX 6C39: E0 05 CPX #$05 6C3B: D0 03 BNE $6C40 6C3D: A2 04 LDX #$04 6C3F: 60 RTS 6C40: B5 82 LDA $82,X 6C42: C9 30 CMP #$30 6C44: F0 F2 BEQ $6C38 6C46: 60 RTS ; 计算当前行起始地址,保存到 $68,$69? 6C47: A5 66 LDA $66 6C49: 48 PHA 6C4A: A5 67 LDA $67 6C4C: 48 PHA 6C4D: 38 SEC 6C4E: A5 66 LDA $66 6C50: E5 53 SBC $53 6C52: 85 66 STA $66 6C54: A5 67 LDA $67 6C56: E5 54 SBC $54 6C58: 85 67 STA $67 6C5A: 38 SEC 6C5B: A5 66 LDA $66 6C5D: ED 79 BA SBC $BA79 6C60: 85 66 STA $66 6C62: A5 67 LDA $67 6C64: ED 7A BA SBC $BA7A 6C67: 85 67 STA $67 6C69: 18 CLC 6C6A: A5 66 LDA $66 6C6C: 69 00 ADC #$00 6C6E: 85 68 STA $68 6C70: A5 67 LDA $67 6C72: 69 70 ADC #$70 6C74: 85 69 STA $69 6C76: 68 PLA 6C77: 85 67 STA $67 6C79: 68 PLA 6C7A: 85 66 STA $66 6C7C: 60 RTS 6C7D: A5 68 LDA $68 6C7F: 48 PHA 6C80: A5 69 LDA $69 6C82: 48 PHA 6C83: 38 SEC 6C84: A5 68 LDA $68 6C86: E9 00 SBC #$00 6C88: 85 68 STA $68 6C8A: A5 69 LDA $69 6C8C: E9 70 SBC #$70 6C8E: 85 69 STA $69 6C90: 18 CLC 6C91: A5 68 LDA $68 6C93: 6D 79 BA ADC $BA79 6C96: 85 68 STA $68 6C98: A5 69 LDA $69 6C9A: 6D 7A BA ADC $BA7A 6C9D: 85 69 STA $69 6C9F: 18 CLC 6CA0: A5 68 LDA $68 6CA2: 65 53 ADC $53 6CA4: 85 66 STA $66 6CA6: A5 69 LDA $69 6CA8: 65 54 ADC $54 6CAA: 85 67 STA $67 6CAC: 68 PLA 6CAD: 85 69 STA $69 6CAF: 68 PLA 6CB0: 85 68 STA $68 6CB2: 60 RTS 6CB3: 38 SEC 6CB4: A5 66 LDA $66 6CB6: E5 53 SBC $53 6CB8: 85 84 STA $84 6CBA: A5 67 LDA $67 6CBC: E5 54 SBC $54 6CBE: 85 85 STA $85 6CC0: 60 RTS 6CC1: A5 6A LDA $6A 6CC3: D0 01 BNE $6CC6 6CC5: 60 RTS 6CC6: 38 SEC 6CC7: A5 82 LDA $82 6CC9: E5 80 SBC $80 6CCB: A8 TAY 6CCC: 85 84 STA $84 6CCE: A5 83 LDA $83 6CD0: E5 81 SBC $81 6CD2: AA TAX 6CD3: E8 INX 6CD4: 38 SEC 6CD5: A9 00 LDA #$00 6CD7: E5 84 SBC $84 6CD9: A8 TAY 6CDA: 85 84 STA $84 6CDC: 38 SEC 6CDD: A5 80 LDA $80 6CDF: E5 84 SBC $84 6CE1: 85 80 STA $80 6CE3: A5 81 LDA $81 6CE5: E9 00 SBC #$00 6CE7: 85 81 STA $81 6CE9: 38 SEC 6CEA: A5 80 LDA $80 6CEC: E5 6A SBC $6A 6CEE: 85 82 STA $82 6CF0: A5 81 LDA $81 6CF2: E9 00 SBC #$00 6CF4: 85 83 STA $83 6CF6: B1 80 LDA ($80),Y 6CF8: 91 82 STA ($82),Y 6CFA: C8 INY 6CFB: D0 F9 BNE $6CF6 6CFD: E6 81 INC $81 6CFF: E6 83 INC $83 6D01: CA DEX 6D02: D0 F2 BNE $6CF6 6D04: 60 RTS 6D05: A5 6A LDA $6A 6D07: D0 01 BNE $6D0A 6D09: 60 RTS 6D0A: 38 SEC 6D0B: A5 82 LDA $82 6D0D: E5 80 SBC $80 6D0F: A8 TAY 6D10: 85 84 STA $84 6D12: A5 83 LDA $83 6D14: E5 81 SBC $81 6D16: AA TAX 6D17: E8 INX 6D18: 38 SEC 6D19: A5 82 LDA $82 6D1B: E5 84 SBC $84 6D1D: 85 82 STA $82 6D1F: A5 83 LDA $83 6D21: E9 00 SBC #$00 6D23: 85 83 STA $83 6D25: 18 CLC 6D26: A5 82 LDA $82 6D28: 65 6A ADC $6A 6D2A: 85 80 STA $80 6D2C: A5 83 LDA $83 6D2E: 69 00 ADC #$00 6D30: 85 81 STA $81 6D32: 4C 39 6D JMP $6D39 6D35: B1 82 LDA ($82),Y 6D37: 91 80 STA ($80),Y 6D39: 88 DEY 6D3A: D0 F9 BNE $6D35 6D3C: B1 82 LDA ($82),Y 6D3E: 91 80 STA ($80),Y 6D40: C6 81 DEC $81 6D42: C6 83 DEC $83 6D44: 88 DEY 6D45: CA DEX 6D46: D0 ED BNE $6D35 6D48: 60 RTS ; clear $7000-$AFFF 6D49: A9 00 LDA #$00 6D4B: 85 80 STA $80 6D4D: A9 70 LDA #$70 6D4F: 85 81 STA $81 6D51: A0 00 LDY #$00 6D53: A2 40 LDX #$40 6D55: A9 00 LDA #$00 6D57: 91 80 STA ($80),Y 6D59: C8 INY 6D5A: D0 FB BNE $6D57 6D5C: E6 81 INC $81 6D5E: CA DEX 6D5F: D0 F6 BNE $6D57 6D61: 60 RTS 6D62: A6 6E LDX $6E 6D64: 20 EC 61 JSR $61EC 6D67: A0 00 LDY #$00 6D69: B1 80 LDA ($80),Y 6D6B: 85 66 STA $66 6D6D: C8 INY 6D6E: B1 80 LDA ($80),Y 6D70: 85 67 STA $67 6D72: 20 47 6C JSR $6C47 6D75: A5 80 LDA $80 6D77: 85 83 STA $83 6D79: A5 81 LDA $81 6D7B: 85 84 STA $84 6D7D: 38 SEC 6D7E: A5 83 LDA $83 6D80: E9 01 SBC #$01 6D82: 85 83 STA $83 6D84: A5 84 LDA $84 6D86: E9 70 SBC #$70 6D88: 85 84 STA $84 6D8A: 18 CLC 6D8B: A5 83 LDA $83 6D8D: 6D 79 BA ADC $BA79 6D90: 85 83 STA $83 6D92: A5 84 LDA $84 6D94: 6D 7A BA ADC $BA7A 6D97: 85 84 STA $84 6D99: A5 66 LDA $66 6D9B: 05 67 ORA $67 6D9D: F0 14 BEQ $6DB3 6D9F: A0 00 LDY #$00 6DA1: B1 68 LDA ($68),Y 6DA3: C8 INY 6DA4: 11 68 ORA ($68),Y 6DA6: D0 0B BNE $6DB3 6DA8: A5 83 LDA $83 6DAA: 85 80 STA $80 6DAC: A5 84 LDA $84 6DAE: 85 81 STA $81 6DB0: 4C DB 6D JMP $6DDB 6DB3: 24 52 BIT $52 6DB5: 30 0D BMI $6DC4 6DB7: AD 77 BA LDA $BA77 6DBA: 85 80 STA $80 6DBC: AD 78 BA LDA $BA78 6DBF: 85 81 STA $81 6DC1: 4C DB 6D JMP $6DDB 6DC4: AD 58 BA LDA $BA58 6DC7: 85 80 STA $80 6DC9: AD 59 BA LDA $BA59 6DCC: 85 81 STA $81 6DCE: 38 SEC 6DCF: A5 80 LDA $80 6DD1: E9 03 SBC #$03 6DD3: 85 80 STA $80 6DD5: A5 81 LDA $81 6DD7: E9 70 SBC #$70 6DD9: 85 81 STA $81 6DDB: A9 00 LDA #$00 6DDD: 85 82 STA $82 6DDF: 85 85 STA $85 6DE1: 20 F4 6D JSR $6DF4 6DE4: A5 66 LDA $66 6DE6: 05 67 ORA $67 6DE8: F0 01 BEQ $6DEB 6DEA: 60 RTS 6DEB: AD 90 03 LDA $0390 6DEE: 09 80 ORA #$80 6DF0: 8D 90 03 STA $0390 6DF3: 60 RTS 6DF4: AD 90 03 LDA $0390 6DF7: 29 BF AND #$BF 6DF9: 8D 90 03 STA $0390 6DFC: AD 90 03 LDA $0390 6DFF: 29 7F AND #$7F 6E01: 8D 90 03 STA $0390 6E04: A5 80 LDA $80 6E06: 05 81 ORA $81 6E08: D0 04 BNE $6E0E 6E0A: A2 09 LDX #$09 6E0C: D0 71 BNE $6E7F 6E0E: A5 83 LDA $83 6E10: 05 84 ORA $84 6E12: F0 08 BEQ $6E1C 6E14: AD 90 03 LDA $0390 6E17: 09 40 ORA #$40 6E19: 8D 90 03 STA $0390 6E1C: A5 84 LDA $84 6E1E: C5 81 CMP $81 6E20: D0 04 BNE $6E26 6E22: A5 83 LDA $83 6E24: C5 80 CMP $80 6E26: 90 04 BCC $6E2C 6E28: A2 09 LDX #$09 6E2A: D0 53 BNE $6E7F 6E2C: AD 90 03 LDA $0390 6E2F: 09 80 ORA #$80 6E31: 8D 90 03 STA $0390 6E34: A5 83 LDA $83 6E36: 85 86 STA $86 6E38: A5 84 LDA $84 6E3A: 85 87 STA $87 6E3C: A5 85 LDA $85 6E3E: 85 88 STA $88 6E40: 06 83 ASL $83 6E42: 26 84 ROL $84 6E44: 26 85 ROL $85 6E46: 06 83 ASL $83 6E48: 26 84 ROL $84 6E4A: 26 85 ROL $85 6E4C: 06 83 ASL $83 6E4E: 26 84 ROL $84 6E50: 26 85 ROL $85 6E52: 18 CLC 6E53: A5 83 LDA $83 6E55: 65 86 ADC $86 6E57: 85 83 STA $83 6E59: A5 84 LDA $84 6E5B: 65 87 ADC $87 6E5D: 85 84 STA $84 6E5F: A5 85 LDA $85 6E61: 65 88 ADC $88 6E63: 85 85 STA $85 6E65: A2 00 LDX #$00 6E67: 38 SEC 6E68: A5 83 LDA $83 6E6A: E5 80 SBC $80 6E6C: 85 83 STA $83 6E6E: A5 84 LDA $84 6E70: E5 81 SBC $81 6E72: 85 84 STA $84 6E74: A5 85 LDA $85 6E76: E5 82 SBC $82 6E78: 85 85 STA $85 6E7A: 90 03 BCC $6E7F 6E7C: E8 INX 6E7D: D0 E8 BNE $6E67 6E7F: AD 8A 03 LDA $038A 6E82: E0 09 CPX #$09 6E84: 90 06 BCC $6E8C 6E86: 09 80 ORA #$80 6E88: A2 09 LDX #$09 6E8A: D0 02 BNE $6E8E 6E8C: 29 7F AND #$7F 6E8E: 8D 8A 03 STA $038A 6E91: BD CF 6E LDA $6ECF,X 6E94: 8D 89 03 STA $0389 6E97: 60 RTS 6E98: .DW $B88E, $B8A2, $B8B6, $B8CA, $B8DE 6EA2: .DW $B8F2, $B906, $B91A, $B92E, $B942 6EAC: .DW $B956, $B96A, $B97E, $B992, $B9A6 6EB6: .DW $B9BA, $B9CE, $B9E2, $B9F6, $BA0A 6EC0: .DW $BA1E 6EC2: .DB $00, $14, $28, $3C, $50, $64, $78 6EC9: 00 13 27 INT $2713 6ECC: 3B ?? 6ECD: 4F ?? 6ECE: 63 ?? 6ECF: 80 ?? 6ED0: C0 E0 CPY #$E0 6ED2: F0 F8 BEQ $6ECC 6ED4: FC ?? 6ED5: FE FF FF INC $FFFF,X 6ED8: FF ?? ; 调用信息框的参数 ; "无行号或行号有误" 6ED9: 80 6EDA: 05 6F 6EDC: 2A 14 6EDE: 08 6EDF: 04 6EE0: E2 6E 6EE2: 02 6EE3: .dw $5ECB, $5ECB, $5ECB, $5ECB, $5ECB, $5ECB, $5ECB, $5ECB 6EF3: .dw $5EB9, $5ECA, $5ED0, $5ED0, $5ED0, $5EDE, $5ED0, $5ED0 6F03: .dw $5F03 6F17: 00 3D INT $3D00 6F19: 3D 3D 3D AND $3D3D,X 6F1C: 3D 20 47 AND $4720,X 6F1F: 56 20 LSR $20,X 6F21: 42 ?? 6F22: 41 53 EOR ($53,X) 6F24: 49 43 EOR #$43 6F26: 20 3D 3D JSR $3D3D 6F29: 3D 3D 3D AND $3D3D,X 6F2C: 00 B0 B4 INT $B4B0 6F2F: 20 3C 11 JSR $113C 6F32: 3E 20 2C ROL $2C20,X 6F35: 20 3C 1E JSR $1E3C 6F38: 3E 20 2C ROL $2C20,X 6F3B: 20 3C 10 JSR $103C 6F3E: 3E 20 2C ROL $2C20,X 6F41: 00 3C 1F INT $1F3C 6F44: 3E 20 E4 ROL $E420,X 6F47: AF ?? 6F48: C0 C0 CPY #$C0 6F4A: A1 A3 LDA ($A3,X) 6F4C: 00 B0 B4 INT $B4B0 6F4F: 20 3C CC JSR $CC3C 6F52: F8 SED 6F53: B3 ?? 6F54: F6 3E INC $3E,X 6F56: 20 BC FC JSR $FCBC 6F59: CD CB B3 CMP $B3CB 6F5C: F6 B1 INC $B1,X 6F5E: E0 BC CPX #$BC 6F60: AD 00 BB LDA $BB00 6F63: F2 ?? 6F64: E4 AF CPX $AF 6F66: C0 C0 CPY #$C0 6F68: A1 A3 LDA ($A3,X) 6F6A: 00 C8 E7 INT $E7C8 6F6D: B9 FB BF LDA $BFFB,Y 6F70: C9 D2 CMP #$D2 6F72: D4 ?? 6F73: B1 E0 LDA ($E0),Y 6F75: BC AD 3A LDY $3AAD,X 6F78: 00 B0 B4 INT $B4B0 6F7B: 20 3C CA JSR $CA3C 6F7E: E4 C8 CPX $C8 6F80: EB ?? 6F81: 3E 20 BC ROL $BC20,X 6F84: FC ?? 6F85: B1 A3 LDA ($A3),Y 6F87: B4 E6 LDY $E6,X 6F89: B3 ?? 6F8A: CC D0 F2 CPY $F2D0 6F8D: 00 D0 D0 INT $D0D0 6F90: A1 A3 LDA ($A3,X) 6F92: 00 B0 B4 INT $B4B0 6F95: 20 3C 46 JSR $463C 6F98: 31 3E AND ($3E),Y 6F9A: 20 BC FC JSR $FCBC 6F9D: C7 ?? 6F9E: D0 BB BNE $6F5B 6FA0: BB ?? 6FA1: B2 ?? 6FA2: E5 C8 SBC $C8 6FA4: EB ?? 6FA5: A3 ?? 6FA6: AF ?? 6FA7: 00 CC E6 INT $E6CC 6FAA: BB ?? 6FAB: BB ?? 6FAC: C4 A3 CPY $A3 6FAE: CA DEX 6FAF: BD A1 A3 LDA $A3A1,X 6FB2: 00 B0 B4 INT $B4B0 6FB5: 20 3C 46 JSR $463C 6FB8: 32 ?? 6FB9: 3E 20 BC ROL $BC20,X 6FBC: FC ?? 6FBD: C9 BE CMP #$BE 6FBF: B3 ?? 6FC0: FD D7 D6 SBC $D6D7,X 6FC3: B7 ?? 6FC4: FB ?? 6FC5: A1 A3 LDA ($A3,X) 6FC7: 00 00 FF INT $FF00 ; jump to BASIC runtime 6000: 4C 03 60 JMP $6003
22.848624
77
0.573837
6bd51ae81affb258c4b9381864cf45a2c9160eeb
6,353
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_420_2071.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_420_2071.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_420_2071.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x1603a, %rsi lea addresses_UC_ht+0x805a, %rdi nop xor %r13, %r13 mov $114, %rcx rep movsl nop nop nop nop nop xor %rdx, %rdx lea addresses_normal_ht+0x1b82, %rsi lea addresses_WC_ht+0xdba, %rdi clflush (%rsi) sub %r14, %r14 mov $0, %rcx rep movsq nop nop nop nop cmp $4384, %rdx lea addresses_WT_ht+0x1343a, %rsi lea addresses_A_ht+0x813a, %rdi clflush (%rsi) and $5667, %rdx mov $102, %rcx rep movsw nop nop nop cmp %rdi, %rdi lea addresses_normal_ht+0x6a3a, %rsi lea addresses_WC_ht+0x10cfa, %rdi cmp $49255, %rbx mov $34, %rcx rep movsq nop nop nop nop add %rsi, %rsi lea addresses_A_ht+0xcc3a, %rdi dec %rsi movb $0x61, (%rdi) nop nop nop nop nop add %rbx, %rbx lea addresses_WC_ht+0x3dfa, %rcx clflush (%rcx) nop and %r13, %r13 movb $0x61, (%rcx) nop nop nop nop cmp $53666, %r13 lea addresses_normal_ht+0x1e23a, %rsi lea addresses_WC_ht+0x1c57a, %rdi nop cmp %r9, %r9 mov $50, %rcx rep movsl nop nop nop nop and %rdi, %rdi lea addresses_A_ht+0x16409, %rdi nop xor $53858, %rcx vmovups (%rdi), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %rbx nop nop nop sub $35440, %r13 lea addresses_normal_ht+0x1871a, %r14 nop nop sub $29148, %rdx movw $0x6162, (%r14) cmp %r14, %r14 lea addresses_normal_ht+0x3f3a, %rsi nop nop nop nop nop cmp %r9, %r9 movw $0x6162, (%rsi) nop cmp %rsi, %rsi lea addresses_WT_ht+0x1c6a, %rsi lea addresses_UC_ht+0x12367, %rdi nop nop nop cmp $10938, %rdx mov $118, %rcx rep movsw nop xor %rbx, %rbx lea addresses_WT_ht+0x147fa, %rcx nop nop xor %rbx, %rbx vmovups (%rcx), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $0, %xmm6, %r9 nop nop nop nop nop inc %rdi lea addresses_UC_ht+0x306a, %r14 xor %rcx, %rcx movb $0x61, (%r14) nop dec %r9 lea addresses_UC_ht+0x1e93a, %rsi sub %r13, %r13 movups (%rsi), %xmm1 vpextrq $0, %xmm1, %rbx nop nop nop nop nop sub $57498, %rbx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %rbp push %rdi push %rdx // Store lea addresses_UC+0x1743a, %r8 nop cmp $24266, %rdi movl $0x51525354, (%r8) nop dec %rbp // Store lea addresses_WC+0x1efba, %r12 clflush (%r12) nop nop inc %r8 mov $0x5152535455565758, %r15 movq %r15, %xmm3 movntdq %xmm3, (%r12) nop nop nop nop add %rdx, %rdx // Faulty Load lea addresses_RW+0xcc3a, %rbp dec %r11 mov (%rbp), %r8 lea oracles, %r11 and $0xff, %r8 shlq $12, %r8 mov (%r11,%r8,1), %r8 pop %rdx pop %rdi pop %rbp pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_RW', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_RW', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': True}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'32': 420} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
27.149573
1,259
0.653707
83d4f1f3db419c6665611d59387fea83e474e38d
31,523
asm
Assembly
data/evos_moves.asm
etdv-thevoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
1
2022-01-09T05:28:52.000Z
2022-01-09T05:28:52.000Z
data/evos_moves.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
data/evos_moves.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
EvosMovesPointerTable: dw Mon001_EvosMoves dw Mon002_EvosMoves dw Mon003_EvosMoves dw Mon004_EvosMoves dw Mon005_EvosMoves dw Mon006_EvosMoves dw Mon007_EvosMoves dw Mon008_EvosMoves dw Mon009_EvosMoves dw Mon010_EvosMoves dw Mon011_EvosMoves dw Mon012_EvosMoves dw Mon013_EvosMoves dw Mon014_EvosMoves dw Mon015_EvosMoves dw Mon016_EvosMoves dw Mon017_EvosMoves dw Mon018_EvosMoves dw Mon019_EvosMoves dw Mon020_EvosMoves dw Mon021_EvosMoves dw Mon022_EvosMoves dw Mon023_EvosMoves dw Mon024_EvosMoves dw Mon025_EvosMoves dw Mon026_EvosMoves dw Mon027_EvosMoves dw Mon028_EvosMoves dw Mon029_EvosMoves dw Mon030_EvosMoves dw Mon031_EvosMoves dw Mon032_EvosMoves dw Mon033_EvosMoves dw Mon034_EvosMoves dw Mon035_EvosMoves dw Mon036_EvosMoves dw Mon037_EvosMoves dw Mon038_EvosMoves dw Mon039_EvosMoves dw Mon040_EvosMoves dw Mon041_EvosMoves dw Mon042_EvosMoves dw Mon043_EvosMoves dw Mon044_EvosMoves dw Mon045_EvosMoves dw Mon046_EvosMoves dw Mon047_EvosMoves dw Mon048_EvosMoves dw Mon049_EvosMoves dw Mon050_EvosMoves dw Mon051_EvosMoves dw Mon052_EvosMoves dw Mon053_EvosMoves dw Mon054_EvosMoves dw Mon055_EvosMoves dw Mon056_EvosMoves dw Mon057_EvosMoves dw Mon058_EvosMoves dw Mon059_EvosMoves dw Mon060_EvosMoves dw Mon061_EvosMoves dw Mon062_EvosMoves dw Mon063_EvosMoves dw Mon064_EvosMoves dw Mon065_EvosMoves dw Mon066_EvosMoves dw Mon067_EvosMoves dw Mon068_EvosMoves dw Mon069_EvosMoves dw Mon070_EvosMoves dw Mon071_EvosMoves dw Mon072_EvosMoves dw Mon073_EvosMoves dw Mon074_EvosMoves dw Mon075_EvosMoves dw Mon076_EvosMoves dw Mon077_EvosMoves dw Mon078_EvosMoves dw Mon079_EvosMoves dw Mon080_EvosMoves dw Mon081_EvosMoves dw Mon082_EvosMoves dw Mon083_EvosMoves dw Mon084_EvosMoves dw Mon085_EvosMoves dw Mon086_EvosMoves dw Mon087_EvosMoves dw Mon088_EvosMoves dw Mon089_EvosMoves dw Mon090_EvosMoves dw Mon091_EvosMoves dw Mon092_EvosMoves dw Mon093_EvosMoves dw Mon094_EvosMoves dw Mon095_EvosMoves dw Mon096_EvosMoves dw Mon097_EvosMoves dw Mon098_EvosMoves dw Mon099_EvosMoves dw Mon100_EvosMoves dw Mon101_EvosMoves dw Mon102_EvosMoves dw Mon103_EvosMoves dw Mon104_EvosMoves dw Mon105_EvosMoves dw Mon106_EvosMoves dw Mon107_EvosMoves dw Mon108_EvosMoves dw Mon109_EvosMoves dw Mon110_EvosMoves dw Mon111_EvosMoves dw Mon112_EvosMoves dw Mon113_EvosMoves dw Mon114_EvosMoves dw Mon115_EvosMoves dw Mon116_EvosMoves dw Mon117_EvosMoves dw Mon118_EvosMoves dw Mon119_EvosMoves dw Mon120_EvosMoves dw Mon121_EvosMoves dw Mon122_EvosMoves dw Mon123_EvosMoves dw Mon124_EvosMoves dw Mon125_EvosMoves dw Mon126_EvosMoves dw Mon127_EvosMoves dw Mon128_EvosMoves dw Mon129_EvosMoves dw Mon130_EvosMoves dw Mon131_EvosMoves dw Mon132_EvosMoves dw Mon133_EvosMoves dw Mon134_EvosMoves dw Mon135_EvosMoves dw Mon136_EvosMoves dw Mon137_EvosMoves dw Mon138_EvosMoves dw Mon139_EvosMoves dw Mon140_EvosMoves dw Mon141_EvosMoves dw Mon142_EvosMoves dw Mon143_EvosMoves dw Mon144_EvosMoves dw Mon145_EvosMoves dw Mon146_EvosMoves dw Mon147_EvosMoves dw Mon148_EvosMoves dw Mon149_EvosMoves dw Mon150_EvosMoves dw Mon151_EvosMoves dw Mon152_EvosMoves dw MissingNoEvosMoves dw MissingNoEvosMoves dw MissingNoEvosMoves Mon001_EvosMoves: ;BULBASAUR ;Evolutions db EV_LEVEL,16,IVYSAUR db 0 ;Learnset db 7,LEECH_SEED db 10,VINE_WHIP db 14,POISONPOWDER db 18,RAZOR_LEAF db 23,SLEEP_POWDER db 28,TAKE_DOWN db 33,GROWTH db 40,SOLARBEAM db 0 Mon002_EvosMoves: ;IVYSAUR ;Evolutions db EV_LEVEL,36,VENUSAUR db 0 ;Learnset db 7,LEECH_SEED db 10,VINE_WHIP db 14,POISONPOWDER db 19,RAZOR_LEAF db 25,SLEEP_POWDER db 31,TAKE_DOWN db 37,GROWTH db 45,SOLARBEAM db 0 Mon003_EvosMoves: ;VENUSAUR ;Evolutions db 0 ;Learnset db 7,LEECH_SEED db 10,VINE_WHIP db 14,POISONPOWDER db 19,RAZOR_LEAF db 25,SLEEP_POWDER db 31,TAKE_DOWN db 36,ACID db 42,GROWTH db 55,SOLARBEAM db 0 Mon004_EvosMoves: ;CHARMANDER ;Evolutions db EV_LEVEL,16,CHARMELEON db 0 ;Learnset db 7,EMBER db 10,SMOKESCREEN db 14,RAGE db 18,SHARPEN db 23,DRAGON_RAGE db 28,FLAMETHROWER db 33,SLASH db 40,FIRE_SPIN db 0 Mon005_EvosMoves: ;CHARMELEON ;Evolutions db EV_LEVEL,36,CHARIZARD db 0 ;Learnset db 7,EMBER db 10,SMOKESCREEN db 14,RAGE db 19,SHARPEN db 25,DRAGON_RAGE db 31,FLAMETHROWER db 37,SLASH db 45,FIRE_SPIN db 0 Mon006_EvosMoves: ;CHARIZARD ;Evolutions db 0 ;Learnset db 7,EMBER db 10,SMOKESCREEN db 14,RAGE db 19,SHARPEN db 25,DRAGON_RAGE db 31,FLAMETHROWER db 36,WING_ATTACK db 42,SLASH db 55,FIRE_SPIN db 0 Mon007_EvosMoves: ;SQUIRTLE ;Evolutions db EV_LEVEL,16,WARTORTLE db 0 ;Learnset db 7,BUBBLE db 10,WITHDRAW db 14,DOUBLE_SLAP db 18,BITE db 23,BUBBLEBEAM db 28,BARRIER db 33,CLAMP db 40,HYDRO_PUMP db 0 Mon008_EvosMoves: ;WARTORTLE ;Evolutions db EV_LEVEL,36,BLASTOISE db 0 ;Learnset db 7,BUBBLE db 10,WITHDRAW db 14,DOUBLE_SLAP db 19,BITE db 25,BUBBLEBEAM db 31,BARRIER db 37,CLAMP db 45,HYDRO_PUMP db 0 Mon009_EvosMoves: ;BLASTOISE ;Evolutions db 0 ;Learnset db 7,BUBBLE db 10,WITHDRAW db 14,DOUBLE_SLAP db 19,BITE db 25,BUBBLEBEAM db 31,BARRIER db 36,AURORA_BEAM db 42,CLAMP db 55,HYDRO_PUMP db 0 Mon010_EvosMoves: ;CATERPIE ;Evolutions db EV_LEVEL,7,METAPOD db 0 ;Learnset db 0 Mon011_EvosMoves: ;METAPOD ;Evolutions db EV_LEVEL,10,BUTTERFREE db 0 ;Learnset db 7,HARDEN db 0 Mon012_EvosMoves: ;BUTTERFREE ;Evolutions db 0 ;Learnset db 10,CONFUSION db 13,SUPERSONIC db 16,POISONPOWDER db 20,GUST db 25,SLEEP_POWDER db 30,PSYBEAM db 35,HAZE db 0 Mon013_EvosMoves: ;WEEDLE ;Evolutions db EV_LEVEL,7,KAKUNA db 0 ;Learnset db 0 Mon014_EvosMoves: ;KAKUNA ;Evolutions db EV_LEVEL,10,BEEDRILL db 0 ;Learnset db 7,HARDEN db 0 Mon015_EvosMoves: ;BEEDRILL ;Evolutions db 0 ;Learnset db 10,FURY_ATTACK db 15,FOCUS_ENERGY db 20,TWINEEDLE db 25,RAGE db 30,PIN_MISSILE db 35,AGILITY db 0 Mon016_EvosMoves: ;PIDGEY ;Evolutions db EV_LEVEL,18,PIDGEOTTO db 0 ;Learnset db 5,SAND_ATTACK db 8,GUST db 12,QUICK_ATTACK db 17,WHIRLWIND db 23,WING_ATTACK db 30,AGILITY db 38,MIRROR_MOVE db 47,SKY_ATTACK db 0 Mon017_EvosMoves: ;PIDGEOTTO ;Evolutions db EV_LEVEL,36,PIDGEOT db 0 ;Learnset db 5,SAND_ATTACK db 8,GUST db 12,QUICK_ATTACK db 17,WHIRLWIND db 24,WING_ATTACK db 32,AGILITY db 41,MIRROR_MOVE db 51,SKY_ATTACK db 0 Mon018_EvosMoves: ;PIDGEOT ;Evolutions db 0 ;Learnset db 5,SAND_ATTACK db 8,GUST db 12,QUICK_ATTACK db 17,WHIRLWIND db 24,WING_ATTACK db 32,AGILITY db 36,TAKE_DOWN db 45,MIRROR_MOVE db 56,SKY_ATTACK db 0 Mon019_EvosMoves: ;RATTATA ;Evolutions db EV_LEVEL,20,RATICATE db 0 ;Learnset db 7,QUICK_ATTACK db 14,BITE db 21,HYPER_FANG db 28,FOCUS_ENERGY db 35,SUPER_FANG db 0 Mon020_EvosMoves: ;RATICATE ;Evolutions db 0 ;Learnset db 7,QUICK_ATTACK db 14,BITE db 22,HYPER_FANG db 31,FOCUS_ENERGY db 41,SUPER_FANG db 0 Mon021_EvosMoves: ;SPEAROW ;Evolutions db EV_LEVEL,20,FEAROW db 0 ;Learnset db 9,LEER db 15,FURY_ATTACK db 22,MIRROR_MOVE db 29,DRILL_PECK db 36,AGILITY db 0 Mon022_EvosMoves: ;FEAROW ;Evolutions db 0 ;Learnset db 9,LEER db 15,FURY_ATTACK db 25,MIRROR_MOVE db 34,DRILL_PECK db 43,AGILITY db 0 Mon023_EvosMoves: ;EKANS ;Evolutions db EV_LEVEL,22,ARBOK db 0 ;Learnset db 8,POISON_STING db 13,BITE db 20,GLARE db 25,ACID db 32,SCREECH db 37,SLUDGE db 44,HAZE db 0 Mon024_EvosMoves: ;ARBOK ;Evolutions db 0 ;Learnset db 8,POISON_STING db 13,BITE db 20,GLARE db 28,ACID db 38,SCREECH db 46,SLUDGE db 56,HAZE db 0 Mon025_EvosMoves: ;PIKACHU ;Evolutions db EV_ITEM,THUNDER_STONE,1,RAICHU db 0 ;Learnset db 8,THUNDER_WAVE db 11,QUICK_ATTACK db 15,DOUBLE_TEAM db 20,SLAM db 26,THUNDERBOLT db 33,AGILITY db 41,THUNDER db 50,LIGHT_SCREEN db 0 Mon026_EvosMoves: ;RAICHU ;Evolutions db 0 ;Learnset db 41,THUNDER db 0 Mon027_EvosMoves: ;SANDSHREW ;Evolutions db EV_LEVEL,22,SANDSLASH db 0 ;Learnset db 8,SAND_ATTACK db 13,POISON_STING db 20,SWIFT db 25,SHARPEN db 32,SLASH db 37,DIG db 44,PIN_MISSILE db 0 Mon028_EvosMoves: ;SANDSLASH ;Evolutions db 0 ;Learnset db 8,SAND_ATTACK db 13,POISON_STING db 20,SWIFT db 28,SHARPEN db 38,SLASH db 46,DIG db 56,PIN_MISSILE db 0 Mon029_EvosMoves: ;NIDORAN_F ;Evolutions db EV_LEVEL,16,NIDORINA db 0 ;Learnset db 8,POISON_STING db 12,DOUBLE_KICK db 17,BITE db 23,TAIL_WHIP db 30,FURY_SWIPES db 38,HORN_DRILL db 0 Mon030_EvosMoves: ;NIDORINA ;Evolutions db EV_ITEM,MOON_STONE,1,NIDOQUEEN db 0 ;Learnset db 8,POISON_STING db 12,DOUBLE_KICK db 19,BITE db 27,TAIL_WHIP db 36,FURY_SWIPES db 46,HORN_DRILL db 0 Mon031_EvosMoves: ;NIDOQUEEN ;Evolutions db 0 ;Learnset db 33,BODY_SLAM db 43,EARTHQUAKE db 53,SUBMISSION db 0 Mon032_EvosMoves: ;NIDORAN_M ;Evolutions db EV_LEVEL,16,NIDORINO db 0 ;Learnset db 8,POISON_STING db 12,DOUBLE_KICK db 17,HORN_ATTACK db 23,FOCUS_ENERGY db 30,FURY_ATTACK db 38,HORN_DRILL db 0 Mon033_EvosMoves: ;NIDORINO ;Evolutions db EV_ITEM,MOON_STONE,1,NIDOKING db 0 ;Learnset db 8,POISON_STING db 12,DOUBLE_KICK db 19,HORN_ATTACK db 27,FOCUS_ENERGY db 36,FURY_ATTACK db 46,HORN_DRILL db 0 Mon034_EvosMoves: ;NIDOKING ;Evolutions db 0 ;Learnset db 33,THRASH db 43,EARTHQUAKE db 53,MEGAHORN db 0 Mon035_EvosMoves: ;CLEFAIRY ;Evolutions db EV_ITEM,MOON_STONE,1,CLEFABLE db 0 ;Learnset db 8,SING db 13,COMET_PUNCH db 19,DEFENSE_CURL db 26,MINIMIZE db 34,METRONOME db 43,AMNESIA db 53,LIGHT_SCREEN db 0 Mon036_EvosMoves: ;CLEFABLE ;Evolutions db 0 ;Learnset db 34,METRONOME db 0 Mon037_EvosMoves: ;VULPIX ;Evolutions db EV_ITEM,FIRE_STONE,1,NINETALES db 0 ;Learnset db 9,EMBER db 18,ROAR db 26,CONFUSE_RAY db 34,FLAMETHROWER db 42,HYPNOSIS db 50,FIRE_SPIN db 0 Mon038_EvosMoves: ;NINETALES ;Evolutions db 0 ;Learnset db 34,FLAMETHROWER db 0 Mon039_EvosMoves: ;JIGGLYPUFF ;Evolutions db EV_ITEM,MOON_STONE,1,WIGGLYTUFF db 0 ;Learnset db 8,POUND db 13,DISABLE db 19,DOUBLE_SLAP db 26,DEFENSE_CURL db 34,BODY_SLAM db 43,REST db 53,DOUBLE_EDGE db 0 Mon040_EvosMoves: ;WIGGLYTUFF ;Evolutions db 0 ;Learnset db 34,BODY_SLAM db 0 Mon041_EvosMoves: ;ZUBAT ;Evolutions db EV_LEVEL,22,GOLBAT db 0 ;Learnset db 7,SUPERSONIC db 11,BITE db 16,SCREECH db 21,RAZOR_WIND db 26,CONFUSE_RAY db 31,HYPER_FANG db 36,HAZE db 0 Mon042_EvosMoves: ;GOLBAT ;Evolutions db 0 ;Learnset db 7,SUPERSONIC db 11,BITE db 16,SCREECH db 21,RAZOR_WIND db 28,CONFUSE_RAY db 35,HYPER_FANG db 42,HAZE db 0 Mon043_EvosMoves: ;ODDISH ;Evolutions db EV_LEVEL,21,GLOOM db 0 ;Learnset db 8,STUN_SPORE db 15,POISONPOWDER db 18,SLEEP_POWDER db 21,ACID db 26,MEGA_DRAIN db 33,GROWTH db 42,PETAL_DANCE db 0 Mon044_EvosMoves: ;GLOOM ;Evolutions db EV_ITEM,LEAF_STONE,1,VILEPLUME db 0 ;Learnset db 8,STUN_SPORE db 15,POISONPOWDER db 18,SLEEP_POWDER db 23,ACID db 29,MEGA_DRAIN db 38,GROWTH db 49,PETAL_DANCE db 0 Mon045_EvosMoves: ;VILEPLUME ;Evolutions db 0 ;Learnset db 23,ACID db 0 Mon046_EvosMoves: ;PARAS ;Evolutions db EV_LEVEL,24,PARASECT db 0 ;Learnset db 7,STUN_SPORE db 13,POISONPOWDER db 19,LEECH_LIFE db 25,SPORE db 31,SLASH db 37,GROWTH db 43,MEGA_DRAIN db 0 Mon047_EvosMoves: ;PARASECT ;Evolutions db 0 ;Learnset db 7,STUN_SPORE db 13,POISONPOWDER db 19,LEECH_LIFE db 28,SPORE db 37,SLASH db 46,GROWTH db 55,MEGA_DRAIN db 0 Mon048_EvosMoves: ;VENONAT ;Evolutions db EV_LEVEL,31,VENOMOTH db 0 ;Learnset db 9,DISABLE db 12,SUPERSONIC db 17,CONFUSION db 20,SCREECH db 25,LEECH_LIFE db 28,POISONPOWDER db 33,PSYBEAM db 36,SLEEP_POWDER db 41,PSYCHIC_M db 0 Mon049_EvosMoves: ;VENOMOTH ;Evolutions db 0 ;Learnset db 9,DISABLE db 12,SUPERSONIC db 17,CONFUSION db 20,SCREECH db 25,LEECH_LIFE db 28,POISONPOWDER db 31,GUST db 36,PSYBEAM db 42,SLEEP_POWDER db 52,PSYCHIC_M db 0 Mon050_EvosMoves: ;DIGLETT ;Evolutions db EV_LEVEL,26,DUGTRIO db 0 ;Learnset db 9,SAND_ATTACK db 17,DIG db 25,FURY_SWIPES db 33,EARTHQUAKE db 41,SLASH db 49,FISSURE db 0 Mon051_EvosMoves: ;DUGTRIO ;Evolutions db 0 ;Learnset db 9,SAND_ATTACK db 17,DIG db 25,FURY_SWIPES db 35,EARTHQUAKE db 45,SLASH db 55,FISSURE db 0 Mon052_EvosMoves: ;MEOWTH ;Evolutions db EV_LEVEL,28,PERSIAN db 0 ;Learnset db 9,PAY_DAY db 15,BITE db 21,SCREECH db 27,FURY_SWIPES db 33,SHARPEN db 39,REST Mon053_EvosMoves: ;PERSIAN ;Evolutions db 0 ;Learnset db 9,PAY_DAY db 15,BITE db 21,SCREECH db 27,FURY_SWIPES db 28,SLASH db 36,SHARPEN db 45,REST db 0 Mon054_EvosMoves: ;PSYDUCK ;Evolutions db EV_LEVEL,33,GOLDUCK db 0 ;Learnset db 5,WATER_GUN db 10,DISABLE db 16,CONFUSION db 23,FURY_SWIPES db 31,SCREECH db 40,AMNESIA db 50,HYDRO_PUMP db 0 Mon055_EvosMoves: ;GOLDUCK ;Evolutions db 0 ;Learnset db 5,WATER_GUN db 10,DISABLE db 16,CONFUSION db 23,FURY_SWIPES db 31,SCREECH db 33,PSYBEAM db 44,AMNESIA db 58,HYDRO_PUMP db 0 Mon056_EvosMoves: ;MANKEY ;Evolutions db EV_LEVEL,28,PRIMEAPE db 0 ;Learnset db 9,LOW_KICK db 15,KARATE_CHOP db 21,FURY_SWIPES db 27,FOCUS_ENERGY db 33,SEISMIC_TOSS db 39,THRASH db 45,SCREECH db 51,CROSS_CHOP db 0 Mon057_EvosMoves: ;PRIMEAPE ;Evolutions db 0 ;Learnset db 9,LOW_KICK db 15,KARATE_CHOP db 21,FURY_SWIPES db 27,FOCUS_ENERGY db 28,RAGE db 36,SEISMIC_TOSS db 45,THRASH db 54,SCREECH db 63,CROSS_CHOP db 0 Mon058_EvosMoves: ;GROWLITHE ;Evolutions db EV_ITEM,FIRE_STONE,1,ARCANINE db 0 ;Learnset db 9,EMBER db 18,ROAR db 26,TAKE_DOWN db 34,FLAMETHROWER db 42,AGILITY db 50,FIRE_SPIN db 0 Mon059_EvosMoves: ;ARCANINE ;Evolutions db 0 ;Learnset db 34,FLAMETHROWER db 50,EXTREMESPEED Mon060_EvosMoves: ;POLIWAG ;Evolutions db EV_LEVEL,25,POLIWHIRL db 0 ;Learnset db 7,TAIL_WHIP db 13,HYPNOSIS db 19,DOUBLE_SLAP db 25,BUBBLEBEAM db 31,BODY_SLAM db 37,AMNESIA db 43,HYDRO_PUMP db 0 Mon061_EvosMoves: ;POLIWHIRL ;Evolutions db EV_ITEM,WATER_STONE,1,POLIWRATH db 0 ;Learnset db 7,LEER db 13,HYPNOSIS db 19,DOUBLE_SLAP db 25,BUBBLEBEAM db 35,BODY_SLAM db 43,AMNESIA db 51,HYDRO_PUMP db 0 Mon062_EvosMoves: ;POLIWRATH ;Evolutions db 0 ;Learnset db 35,SUBMISSION db 51,WATERFALL db 0 Mon063_EvosMoves: ;ABRA ;Evolutions db EV_LEVEL,16,KADABRA db 0 ;Learnset db 0 Mon064_EvosMoves: ;KADABRA ;Evolutions db EV_LEVEL,36,ALAKAZAM db 0 ;Learnset db 16,CONFUSION db 18,DISABLE db 21,PSYBEAM db 25,REFLECT db 30,PSYCHIC_M db 36,RECOVER db 43,FUTURE_SIGHT db 0 Mon065_EvosMoves: ;ALAKAZAM ;Evolutions db 0 ;Learnset db 16,CONFUSION db 18,DISABLE db 21,PSYBEAM db 25,REFLECT db 30,PSYCHIC_M db 36,RECOVER db 45,FUTURE_SIGHT db 0 Mon066_EvosMoves: ;MACHOP ;Evolutions db EV_LEVEL,28,MACHOKE db 0 ;Learnset db 7,FOCUS_ENERGY db 13,KARATE_CHOP db 19,SEISMIC_TOSS db 25,COMET_PUNCH db 31,COUNTER db 37,SUBMISSION db 43,CROSS_CHOP db 0 Mon067_EvosMoves: ;MACHOKE ;Evolutions db EV_LEVEL,40,MACHAMP db 0 ;Learnset db 7,FOCUS_ENERGY db 13,KARATE_CHOP db 19,SEISMIC_TOSS db 25,COMET_PUNCH db 32,COUNTER db 39,SUBMISSION db 46,CROSS_CHOP db 0 Mon068_EvosMoves: ;MACHAMP ;Evolutions db 0 ;Learnset db 7,FOCUS_ENERGY db 13,KARATE_CHOP db 19,SEISMIC_TOSS db 25,COMET_PUNCH db 32,COUNTER db 39,SUBMISSION db 49,CROSS_CHOP db 0 Mon069_EvosMoves: ;BELLSPROUT ;Evolutions db EV_LEVEL,21,WEEPINBELL db 0 ;Learnset db 8,POISONPOWDER db 15,STUN_SPORE db 18,SLEEP_POWDER db 21,ACID db 26,RAZOR_LEAF db 33,GROWTH db 42,WRAP db 0 Mon070_EvosMoves: ;WEEPINBELL ;Evolutions db EV_ITEM,LEAF_STONE,1,VICTREEBEL db 0 ;Learnset db 8,POISONPOWDER db 15,STUN_SPORE db 18,SLEEP_POWDER db 23,ACID db 29,RAZOR_LEAF db 38,GROWTH db 49,WRAP db 0 Mon071_EvosMoves: ;VICTREEBEL ;Evolutions db 0 ;Learnset db 23,ACID db 0 Mon072_EvosMoves: ;TENTACOOL ;Evolutions db EV_LEVEL,30,TENTACRUEL db 0 ;Learnset db 6,CONSTRICT db 12,SUPERSONIC db 19,BIND db 25,ACID db 30,BUBBLEBEAM db 36,ACID_ARMOR db 43,SCREECH db 49,HYDRO_PUMP db 0 Mon073_EvosMoves: ;TENTACRUEL ;Evolutions db 0 ;Learnset db 6,CONSTRICT db 12,SUPERSONIC db 19,BIND db 25,ACID db 30,BUBBLEBEAM db 38,ACID_ARMOR db 47,SCREECH db 55,HYDRO_PUMP db 0 Mon074_EvosMoves: ;GEODUDE ;Evolutions db EV_LEVEL,25,GRAVELER db 0 ;Learnset db 8,DEFENSE_CURL db 12,ROCK_THROW db 16,SAND_ATTACK db 21,SELFDESTRUCT db 27,ROCK_SLIDE db 34,EARTHQUAKE db 42,DOUBLE_EDGE db 51,EXPLOSION db 0 Mon075_EvosMoves: ;GRAVELER ;Evolutions db EV_LEVEL,40,GOLEM db 0 ;Learnset db 8,DEFENSE_CURL db 12,ROCK_THROW db 16,SAND_ATTACK db 21,SELFDESTRUCT db 28,ROCK_SLIDE db 36,EARTHQUAKE db 45,DOUBLE_EDGE db 55,EXPLOSION db 0 Mon076_EvosMoves: ;GOLEM ;Evolutions db 0 ;Learnset db 8,DEFENSE_CURL db 12,ROCK_THROW db 16,SAND_ATTACK db 21,SELFDESTRUCT db 28,ROCK_SLIDE db 36,EARTHQUAKE db 46,DOUBLE_EDGE db 57,EXPLOSION db 0 Mon077_EvosMoves: ;PONYTA ;Evolutions db EV_LEVEL,40,RAPIDASH db 0 ;Learnset db 8,TAIL_WHIP db 13,EMBER db 19,GROWL db 26,STOMP db 34,AGILITY db 43,FIRE_SPIN db 53,FIRE_BLAST db 0 Mon078_EvosMoves: ;RAPIDASH ;Evolutions db 0 ;Learnset db 8,TAIL_WHIP db 13,EMBER db 19,GROWL db 26,STOMP db 34,AGILITY db 40,HORN_DRILL db 47,FIRE_SPIN db 61,FIRE_BLAST db 0 Mon079_EvosMoves: ;SLOWPOKE ;Evolutions db EV_LEVEL,37,SLOWBRO db 0 ;Learnset db 6,WATER_GUN db 15,CONFUSION db 20,DISABLE db 29,HEADBUTT db 34,WATERFALL db 43,AMNESIA db 48,PSYCHIC_M db 0 Mon080_EvosMoves: ;SLOWBRO ;Evolutions db 0 ;Learnset db 6,WATER_GUN db 15,CONFUSION db 20,DISABLE db 29,HEADBUTT db 34,WATERFALL db 37,WITHDRAW db 46,AMNESIA db 54,PSYCHIC_M db 0 Mon081_EvosMoves: ;MAGNEMITE ;Evolutions db EV_LEVEL,30,MAGNETON db 0 ;Learnset db 7,SUPERSONIC db 12,THUNDERSHOCK db 17,THUNDER_WAVE db 22,SONICBOOM db 29,SCREECH db 36,SWIFT db 43,THUNDER db 0 Mon082_EvosMoves: ;MAGNETON ;Evolutions db 0 ;Learnset db 7,SUPERSONIC db 12,THUNDERSHOCK db 17,THUNDER_WAVE db 22,SONICBOOM db 29,SCREECH db 40,SWIFT db 50,THUNDER db 0 Mon083_EvosMoves: ;FARFETCHD ;Evolutions db 0 ;Learnset db 7,SAND_ATTACK db 13,QUICK_ATTACK db 19,FOCUS_ENERGY db 25,FURY_ATTACK db 31,SWORDS_DANCE db 37,SLASH db 44,COUNTER db 0 Mon084_EvosMoves: ;DODUO ;Evolutions db EV_LEVEL,31,DODRIO db 0 ;Learnset db 9,QUICK_ATTACK db 13,DOUBLE_KICK db 21,FURY_ATTACK db 25,RAGE db 33,TRI_ATTACK db 37,DRILL_PECK db 45,AGILITY db 0 Mon085_EvosMoves: ;DODRIO ;Evolutions db 0 ;Learnset db 9,QUICK_ATTACK db 13,DOUBLE_KICK db 21,FURY_ATTACK db 25,RAGE db 38,TRI_ATTACK db 47,DRILL_PECK db 60,AGILITY db 0 Mon086_EvosMoves: ;SEEL ;Evolutions db EV_LEVEL,34,DEWGONG db 0 ;Learnset db 9,GROWL db 16,HEADBUTT db 23,AURORA_BEAM db 30,WATERFALL db 37,REST db 44,TAKE_DOWN db 51,ICE_BEAM db 0 Mon087_EvosMoves: ;DEWGONG ;Evolutions db 0 ;Learnset db 9,GROWL db 16,HEADBUTT db 23,AURORA_BEAM db 30,WATERFALL db 38,REST db 46,TAKE_DOWN db 54,ICE_BEAM db 0 Mon088_EvosMoves: ;GRIMER ;Evolutions db EV_LEVEL,38,MUK db 0 ;Learnset db 8,HARDEN db 16,DISABLE db 20,MINIMIZE db 24,SLUDGE db 32,SCREECH db 40,ACID_ARMOR db 44,HAZE db 48,SLUDGE_BOMB db 0 Mon089_EvosMoves: ;MUK ;Evolutions db 0 ;Learnset db 8,HARDEN db 16,DISABLE db 20,MINIMIZE db 24,SLUDGE db 32,SCREECH db 43,ACID_ARMOR db 50,HAZE db 57,SLUDGE_BOMB db 0 Mon090_EvosMoves: ;SHELLDER ;Evolutions db EV_ITEM,WATER_STONE,1,CLOYSTER db 0 ;Learnset db 8,WITHDRAW db 11,WATER_GUN db 15,SUPERSONIC db 20,LEER db 26,AURORA_BEAM db 33,CLAMP db 41,BARRIER db 50,ICE_BEAM db 0 Mon091_EvosMoves: ;CLOYSTER ;Evolutions db 0 ;Learnset db 26,AURORA_BEAM db 41,SPIKE_CANNON db 0 Mon092_EvosMoves: ;GASTLY ;Evolutions db EV_LEVEL,25,HAUNTER db 0 ;Learnset db 6,POISON_GAS db 11,CONFUSION db 16,CONFUSE_RAY db 21,NIGHT_SHADE db 26,HYPNOSIS db 31,PSYBEAM db 36,HAZE db 41,DREAM_EATER db 0 Mon093_EvosMoves: ;HAUNTER ;Evolutions db EV_LEVEL,40,GENGAR db 0 ;Learnset db 6,POISON_GAS db 11,CONFUSION db 16,CONFUSE_RAY db 21,NIGHT_SHADE db 27,HYPNOSIS db 33,PSYBEAM db 39,HAZE db 45,DREAM_EATER db 0 Mon094_EvosMoves: ;GENGAR ;Evolutions db 0 ;Learnset db 6,POISON_GAS db 11,CONFUSION db 16,CONFUSE_RAY db 21,NIGHT_SHADE db 27,HYPNOSIS db 33,PSYBEAM db 39,HAZE db 47,DREAM_EATER db 0 Mon095_EvosMoves: ;ONIX ;Evolutions db 0 ;Learnset db 10,BIND db 14,ROCK_THROW db 23,RAGE db 27,DIG db 36,SCREECH db 40,SLAM db 49,ROCK_SLIDE db 0 Mon096_EvosMoves: ;DROWZEE ;Evolutions db EV_LEVEL,26,HYPNO db 0 ;Learnset db 7,HYPNOSIS db 12,DISABLE db 17,CONFUSION db 24,HEADBUTT db 29,POISON_GAS db 32,PSYCHIC_M db 37,MEDITATE db 43,DREAM_EATER db 0 Mon097_EvosMoves: ;HYPNO ;Evolutions db 0 ;Learnset db 7,HYPNOSIS db 12,DISABLE db 17,CONFUSION db 24,HEADBUTT db 33,POISON_GAS db 37,PSYCHIC_M db 43,MEDITATE db 50,DREAM_EATER db 0 Mon098_EvosMoves: ;KRABBY ;Evolutions db EV_LEVEL,28,KINGLER db 0 ;Learnset db 5,LEER db 12,VICEGRIP db 16,HARDEN db 23,BIDE db 27,STOMP db 34,GUILLOTINE db 38,SLAM db 45,CRABHAMMER db 0 Mon099_EvosMoves: ;KINGLER ;Evolutions db 0 ;Learnset db 5,LEER db 12,VICEGRIP db 16,HARDEN db 23,BIDE db 27,STOMP db 35,GUILLOTINE db 41,SLAM db 50,CRABHAMMER db 0 Mon100_EvosMoves: ;VOLTORB ;Evolutions db EV_LEVEL,30,ELECTRODE db 0 ;Learnset db 7,SCREECH db 12,THUNDER_WAVE db 17,SELFDESTRUCT db 22,SONICBOOM db 29,LIGHT_SCREEN db 36,SWIFT db 43,EXPLOSION db 0 Mon101_EvosMoves: ;ELECTRODE ;Evolutions db 0 ;Learnset db 7,SCREECH db 12,THUNDER_WAVE db 17,SELFDESTRUCT db 22,SONICBOOM db 29,LIGHT_SCREEN db 40,SWIFT db 50,EXPLOSION db 0 Mon102_EvosMoves: ;EXEGGCUTE ;Evolutions db EV_ITEM,LEAF_STONE,1,EXEGGUTOR db 0 ;Learnset db 7,LEECH_SEED db 13,HYPNOSIS db 17,STUN_SPORE db 23,BARRAGE db 27,REFLECT db 33,POISONPOWDER db 37,PSYCHIC_M db 43,SLEEP_POWDER db 47,SOLARBEAM db 0 Mon103_EvosMoves: ;EXEGGUTOR ;Evolutions db 0 ;Learnset db 27,STOMP db 37,RAZOR_LEAF db 47,EGG_BOMB db 0 Mon104_EvosMoves: ;CUBONE ;Evolutions db EV_LEVEL,28,MAROWAK db 0 ;Learnset db 5,TAIL_WHIP db 9,LEER db 13,BONE_CLUB db 17,HEADBUTT db 21,FOCUS_ENERGY db 25,RAGE db 29,BONEMERANG db 33,THRASH db 37,DOUBLE_EDGE db 0 Mon105_EvosMoves: ;MAROWAK ;Evolutions db 0 ;Learnset db 5,TAIL_WHIP db 9,LEER db 13,BONE_CLUB db 17,HEADBUTT db 21,FOCUS_ENERGY db 25,RAGE db 32,BONEMERANG db 39,THRASH db 46,DOUBLE_EDGE db 0 Mon106_EvosMoves: ;HITMONLEE ;Evolutions db 0 ;Learnset db 11,LEER db 16,DOUBLE_KICK db 21,MEDITATE db 26,LOW_KICK db 31,ROLLING_KICK db 36,FOCUS_ENERGY db 41,JUMP_KICK db 46,COUNTER db 51,MEGA_KICK db 0 Mon107_EvosMoves: ;HITMONCHAN ;Evolutions db 0 ;Learnset db 11,LEER db 16,COMET_PUNCH db 21,AGILITY db 26,FIRE_PUNCH db 31,ICE_PUNCH db 36,THUNDERPUNCH db 41,SKY_UPPERCUT db 46,COUNTER db 51,MEGA_PUNCH db 0 Mon108_EvosMoves: ;LICKITUNG ;Evolutions db 0 ;Learnset db 7,DEFENSE_CURL db 19,BIND db 25,STOMP db 31,DISABLE db 37,SLAM db 43,SCREECH db 0 Mon109_EvosMoves: ;KOFFING ;Evolutions db EV_LEVEL,35,WEEZING db 0 ;Learnset db 8,SMOG db 16,SELFDESTRUCT db 20,SMOKESCREEN db 24,SLUDGE db 32,DOUBLE_TEAM db 40,EXPLOSION db 44,HAZE db 50,SLUDGE_BOMB db 0 Mon110_EvosMoves: ;WEEZING ;Evolutions db 0 ;Learnset db 8,SMOG db 16,SELFDESTRUCT db 20,SMOKESCREEN db 24,SLUDGE db 32,DOUBLE_TEAM db 43,EXPLOSION db 50,HAZE db 57,SLUDGE_BOMB db 0 Mon111_EvosMoves: ;RHYHORN ;Evolutions db EV_LEVEL,42,RHYDON db 0 ;Learnset db 7,TAIL_WHIP db 12,FURY_ATTACK db 21,LEER db 26,STOMP db 35,EARTHQUAKE db 40,HORN_DRILL db 49,SKULL_BASH db 54,MEGAHORN db 0 Mon112_EvosMoves: ;RHYDON ;Evolutions db 0 ;Learnset db 7,TAIL_WHIP db 12,FURY_ATTACK db 21,LEER db 26,STOMP db 35,EARTHQUAKE db 40,HORN_DRILL db 52,SKULL_BASH db 61,MEGAHORN db 0 Mon113_EvosMoves: ;CHANSEY ;Evolutions db 0 ;Learnset db 9,TAIL_WHIP db 13,DEFENSE_CURL db 17,DOUBLE_SLAP db 23,SOFTBOILED db 29,SING db 35,EGG_BOMB db 41,MINIMIZE db 49,LIGHT_SCREEN db 57,DOUBLE_EDGE db 0 Mon114_EvosMoves: ;TANGELA ;Evolutions db 0 ;Learnset db 12,ABSORB db 18,STUN_SPORE db 21,SLEEP_POWDER db 27,VINE_WHIP db 30,SLAM db 36,POISONPOWDER db 39,GROWTH db 45,WRAP db 48,MEGA_DRAIN db 0 Mon115_EvosMoves: ;KANGASKHAN ;Evolutions db 0 ;Learnset db 7,LEER db 13,BITE db 19,TAIL_WHIP db 25,RAGE db 31,DIZZY_PUNCH db 37,COUNTER db 43,MEGA_PUNCH db 0 Mon116_EvosMoves: ;HORSEA ;Evolutions db EV_LEVEL,32,SEADRA db 0 ;Learnset db 5,SMOKESCREEN db 12,POISON_STING db 16,LEER db 23,DRAGON_RAGE db 27,BUBBLEBEAM db 34,FOCUS_ENERGY db 38,AGILITY db 45,HYDRO_PUMP db 0 Mon117_EvosMoves: ;SEADRA ;Evolutions db 0 ;Learnset db 5,SMOKESCREEN db 12,POISON_STING db 16,LEER db 23,DRAGON_RAGE db 27,BUBBLEBEAM db 35,FOCUS_ENERGY db 41,AGILITY db 50,HYDRO_PUMP db 0 Mon118_EvosMoves: ;GOLDEEN ;Evolutions db EV_LEVEL,33,SEAKING db 0 ;Learnset db 6,TAIL_WHIP db 10,SUPERSONIC db 15,HORN_ATTACK db 24,FURY_ATTACK db 29,WATERFALL db 38,HORN_DRILL db 43,AGILITY db 52,HYDRO_PUMP db 0 Mon119_EvosMoves: ;SEAKING ;Evolutions db 0 ;Learnset db 6,TAIL_WHIP db 10,SUPERSONIC db 15,HORN_ATTACK db 24,FURY_ATTACK db 29,WATERFALL db 41,HORN_DRILL db 49,AGILITY db 61,HYDRO_PUMP db 0 Mon120_EvosMoves: ;STARYU ;Evolutions db EV_ITEM,WATER_STONE,1,STARMIE db 0 ;Learnset db 8,HARDEN db 11,WATER_GUN db 15,RECOVER db 20,SWIFT db 26,PSYBEAM db 33,MINIMIZE db 41,LIGHT_SCREEN db 50,HYDRO_PUMP db 0 Mon121_EvosMoves: ;STARMIE ;Evolutions db 0 ;Learnset db 26,PSYBEAM db 41,CONFUSE_RAY db 0 Mon122_EvosMoves: ;MR_MIME ;Evolutions db 0 ;Learnset db 11,MEDITATE db 16,DOUBLE_SLAP db 21,REFLECT db 26,PSYBEAM db 31,LIGHT_SCREEN db 36,PSYWAVE db 41,SUBSTITUTE db 0 Mon123_EvosMoves: ;SCYTHER ;Evolutions db 0 ;Learnset db 12,LEER db 18,FOCUS_ENERGY db 24,RAZOR_WIND db 30,DOUBLE_TEAM db 36,SLASH db 42,SWORDS_DANCE db 48,AGILITY db 0 Mon124_EvosMoves: ;JYNX ;Evolutions db 0 ;Learnset db 15,LEER db 22,ICE_PUNCH db 29,DOUBLE_SLAP db 36,DIZZY_PUNCH db 43,ICE_BEAM db 50,LOVELY_KISS db 57,BLIZZARD db 0 Mon125_EvosMoves: ;ELECTABUZZ ;Evolutions db 0 ;Learnset db 15,LEER db 22,THUNDERPUNCH db 29,THUNDER_WAVE db 36,KARATE_CHOP db 43,THUNDERBOLT db 50,LIGHT_SCREEN db 57,THUNDER db 0 Mon126_EvosMoves: ;MAGMAR ;Evolutions db 0 ;Learnset db 15,LEER db 22,FIRE_PUNCH db 29,SMOKESCREEN db 36,LOW_KICK db 43,FLAMETHROWER db 50,CONFUSE_RAY db 57,FIRE_BLAST db 0 Mon127_EvosMoves: ;PINSIR ;Evolutions db 0 ;Learnset db 12,HARDEN db 18,FOCUS_ENERGY db 24,VICEGRIP db 30,SEISMIC_TOSS db 36,GUILLOTINE db 42,SWORDS_DANCE db 48,MEGAHORN db 0 Mon128_EvosMoves: ;TAUROS ;Evolutions db 0 ;Learnset db 14,HORN_ATTACK db 20,STOMP db 27,RAGE db 35,TAKE_DOWN db 44,REST db 54,THRASH db 0 Mon129_EvosMoves: ;MAGIKARP ;Evolutions db EV_LEVEL,20,GYARADOS db 0 ;Learnset db 15,TACKLE db 0 Mon130_EvosMoves: ;GYARADOS ;Evolutions db 0 ;Learnset db 20,BITE db 25,DRAGON_RAGE db 31,WATERFALL db 38,LEER db 46,HYDRO_PUMP db 55,HYPER_BEAM db 0 Mon131_EvosMoves: ;LAPRAS ;Evolutions db 0 ;Learnset db 8,GROWL db 15,SING db 22,MIST db 29,BODY_SLAM db 36,CONFUSE_RAY db 43,ICE_BEAM db 50,HYDRO_PUMP db 0 Mon132_EvosMoves: ;DITTO ;Evolutions db 0 ;Learnset db 0 Mon133_EvosMoves: ;EEVEE ;Evolutions db EV_ITEM,WATER_STONE,1,VAPOREON db EV_ITEM,THUNDER_STONE,1,JOLTEON db EV_ITEM,FIRE_STONE,1,FLAREON db EV_ITEM,LEAF_STONE,1,LEAFEON db 0 Mon133_EvosEnd: ;Learnset db 8,SAND_ATTACK db 16,GROWL db 23,QUICK_ATTACK db 30,BITE db 36,FOCUS_ENERGY db 42,TAKE_DOWN db 0 Mon134_EvosMoves: ;VAPOREON ;Evolutions db 0 ;Learnset db 8,SAND_ATTACK db 16,WATER_GUN db 23,QUICK_ATTACK db 30,DOUBLE_SLAP db 36,AURORA_BEAM db 42,MIST db 47,ACID_ARMOR db 52,HYDRO_PUMP db 0 Mon135_EvosMoves: ;JOLTEON ;Evolutions db 0 ;Learnset db 8,SAND_ATTACK db 16,THUNDERSHOCK db 23,QUICK_ATTACK db 30,SWIFT db 36,PIN_MISSILE db 42,THUNDER_WAVE db 47,AGILITY db 52,THUNDER db 0 Mon136_EvosMoves: ;FLAREON ;Evolutions db 0 ;Learnset db 8,SAND_ATTACK db 16,EMBER db 23,QUICK_ATTACK db 30,BITE db 36,FIRE_SPIN db 42,SMOG db 47,SWORDS_DANCE db 52,FIRE_BLAST db 0 Mon137_EvosMoves: ;LEAFEON ;Evolutions db 0 ;Learnset db 8,SAND_ATTACK db 16,ABSORB db 23,QUICK_ATTACK db 30,DOUBLE_KICK db 36,RAZOR_LEAF db 42,SLEEP_POWDER db 47,GROWTH db 52,PETAL_DANCE db 0 Mon138_EvosMoves: ;PORYGON ;Evolutions db 0 ;Learnset db 8,CONVERSION db 12,PSYBEAM db 20,RECOVER db 24,SHARPEN db 32,THUNDER_WAVE db 36,TRI_ATTACK db 44,AGILITY db 0 Mon139_EvosMoves: ;OMANYTE ;Evolutions db EV_LEVEL,40,OMASTAR db 0 ;Learnset db 8,SMOKESCREEN db 13,WATER_GUN db 19,BITE db 26,LEER db 34,HYPER_FANG db 43,SPIKE_CANNON db 53,HYDRO_PUMP Mon140_EvosMoves: ;OMASTAR ;Evolutions db 0 ;Learnset db 8,SMOKESCREEN db 13,WATER_GUN db 19,BITE db 26,LEER db 34,HYPER_FANG db 45,SPIKE_CANNON db 57,HYDRO_PUMP db 0 Mon141_EvosMoves: ;KABUTO ;Evolutions db EV_LEVEL,40,KABUTOPS db 0 ;Learnset db 8,SAND_ATTACK db 13,LEECH_LIFE db 19,FURY_SWIPES db 26,LEER db 34,SLASH db 43,WATERFALL db 53,SKULL_BASH db 0 Mon142_EvosMoves: ;KABUTOPS ;Evolutions db 0 ;Learnset db 8,SAND_ATTACK db 13,LEECH_LIFE db 19,FURY_SWIPES db 26,LEER db 34,SLASH db 45,WATERFALL db 57,SKULL_BASH db 0 Mon143_EvosMoves: ;AERODACTYL ;Evolutions db 0 ;Learnset db 8,SUPERSONIC db 15,WING_ATTACK db 22,ROAR db 29,TAKE_DOWN db 36,AGILITY db 43,SKULL_BASH db 50,HYPER_BEAM db 0 Mon144_EvosMoves: ;SNORLAX ;Evolutions db 0 ;Learnset db 8,DEFENSE_CURL db 15,BIDE db 22,HEADBUTT db 29,REST db 36,BODY_SLAM db 43,AMNESIA db 50,DOUBLE_EDGE db 57,HYPER_BEAM db 0 Mon145_EvosMoves: ;ARTICUNO ;Evolutions db 0 ;Learnset db 16,AURORA_BEAM db 24,REST db 32,WING_ATTACK db 40,ICE_BEAM db 48,MIST db 56,RAZOR_WIND db 64,AGILITY db 72,BLIZZARD db 80,REFLECT db 0 Mon146_EvosMoves: ;ZAPDOS ;Evolutions db 0 ;Learnset db 16,THUNDERSHOCK db 24,REST db 32,FURY_ATTACK db 40,THUNDERBOLT db 48,THUNDER_WAVE db 56,DRILL_PECK db 64,AGILITY db 72,THUNDER db 80,LIGHT_SCREEN db 0 Mon147_EvosMoves: ;MOLTRES ;Evolutions db 0 ;Learnset db 16,EMBER db 24,REST db 32,WING_ATTACK db 40,FLAMETHROWER db 48,SCREECH db 56,FIRE_SPIN db 64,AGILITY db 72,SKY_ATTACK db 80,REFLECT db 0 Mon148_EvosMoves: ;DRATINI ;Evolutions db EV_LEVEL,30,DRAGONAIR db 0 ;Learnset db 1,LEER db 8,THUNDER_WAVE db 15,AGILITY db 22,DRAGON_RAGE db 29,WATERFALL db 36,EXTREMESPEED db 43,MIST db 50,OUTRAGE db 57,HYPER_BEAM db 0 Mon149_EvosMoves: ;DRAGONAIR ;Evolutions db EV_LEVEL,55,DRAGONITE db 0 ;Learnset db 1,LEER db 8,THUNDER_WAVE db 15,AGILITY db 22,DRAGON_RAGE db 29,WATERFALL db 38,EXTREMESPEED db 47,MIST db 56,OUTRAGE db 65,HYPER_BEAM db 0 Mon150_EvosMoves: ;DRAGONITE ;Evolutions db 0 ;Learnset db 1,LEER db 8,THUNDER_WAVE db 15,AGILITY db 22,DRAGON_RAGE db 29,WATERFALL db 38,EXTREMESPEED db 47,MIST db 55,WING_ATTACK db 61,OUTRAGE db 75,HYPER_BEAM db 0 Mon151_EvosMoves: ;MEWTWO ;Evolutions db 0 ;Learnset db 10,BARRIER db 20,PSYBEAM db 30,SWIFT db 40,PSYCHIC_M db 50,RECOVER db 60,FUTURE_SIGHT db 70,TRI_ATTACK db 80,AMNESIA db 90,MIST db 0 Mon152_EvosMoves: ;MEW ;Evolutions db 0 ;Learnset db 10,TRANSFORM db 20,METRONOME db 30,BARRIER db 40,PSYCHIC_M db 50,MEGA_PUNCH db 60,RECOVER db 70,AMNESIA db 80,LIGHT_SCREEN db 90,REFLECT db 0 MissingNoEvosMoves: ;MISSINGNO. ;Evolutions db 0 ;Learnset db 0
13.616847
35
0.7715
ebe305e8285dae7faa10be09c7cfb52c148bfaa3
91,209
asm
Assembly
Microsoft Word for Windows Version 1.1a/Word 1.1a CHM Distribution/Opus/asm/disptbn2.asm
lborgav/Historical-Source-Codes
c0aeaae1d482718e3b469d9eb7a6d0002faa1ff5
[ "MIT" ]
7
2017-01-12T17:48:48.000Z
2021-11-28T04:37:34.000Z
Microsoft Word for Windows Version 1.1a/Word 1.1a CHM Distribution/Opus/asm/disptbn2.asm
lborgav/Historical-Source-Codes
c0aeaae1d482718e3b469d9eb7a6d0002faa1ff5
[ "MIT" ]
null
null
null
Microsoft Word for Windows Version 1.1a/Word 1.1a CHM Distribution/Opus/asm/disptbn2.asm
lborgav/Historical-Source-Codes
c0aeaae1d482718e3b469d9eb7a6d0002faa1ff5
[ "MIT" ]
5
2017-03-28T08:04:30.000Z
2020-03-25T14:25:29.000Z
include w2.inc include noxport.inc include consts.inc include structs.inc createSeg disptbl_PCODE,disptbn2,byte,public,CODE ; DEBUGGING DECLARATIONS ifdef DEBUG midDisptbn2 equ 31 ; module ID, for native asserts NatPause equ 1 endif ifdef NatPause PAUSE MACRO int 3 ENDM else PAUSE MACRO ENDM endif ; EXTERNAL FUNCTIONS externFP <CacheTc> externFP <ClearRclInParentDr> externFP <CpFirstTap> externFP <CpFirstTap1> externFP <CpMacDocEdit> externFP <CpMacPlc> externFP <CpMin> externFP <CpPlc> externFP <DlkFromVfli> externFP <DrawEndMark> externFP <DrawTableRevBar> externFP <DrawStyNameFromWwDL> externFP <DrcToRc> externFP <DrclToRcw> externFP <FEmptyRc> externFP <FillRect> externFP <FInCa> externFP <FInitHplcedl> externFP <FInsertInPl> externFP <FMatchAbs> externFP <FrameTable> externFP <FreeDrs> externFP <FreeEdl> externFP <FreeEdls> externFP <FreePpv> externFP <FreeHpl> externFP <FreeHq> externFP <FShowOutline> externFP <GetPlc> externFP <HplInit2> externFP <IMacPlc> externFP <N_PdodMother> externFP <NMultDiv> externFP <PatBltRc> externFP <PutCpPlc> externFP <PutIMacPlc> externFP <PutPlc> externFP <N_PwwdWw> externFP <RcwPgvTableClip> externFP <ScrollDrDown> externFP <FSectRc> externFP <XwFromXl> externFP <XwFromXp> externFP <YwFromYl> externFP <YwFromYp> externFP <SetErrorMatProc> ifdef DEBUG externFP <AssertProcForNative> externFP <DypHeightTc> externFP <PutPlcLastDebugProc> externFP <S_CachePara> externFP <S_DisplayFli> externFP <S_FInTableDocCp> externFP <S_FormatDrLine> externFP <S_FreePdrf> externFP <S_FUpdateDr> externFP <S_ItcGetTcxCache> externFP <S_PdrFetch> externFP <S_PdrFetchAndFree> externFP <S_PdrFreeAndFetch> externFP <S_WidthHeightFromBrc> externFP <S_FUpdTableDr> else ; !DEBUG externFP <N_CachePara> externFP <N_DisplayFli> externFP <N_FInTableDocCp> externFP <N_FormatDrLine> externFP <N_FreePdrf> externFP <N_FUpdateDr> externFP <N_ItcGetTcxCache> externFP <N_PdrFetch> externFP <N_PdrFetchAndFree> externFP <N_PdrFreeAndFetch> externFP <N_WidthHeightFromBrc> externFP <PutPlcLastProc> endif ; DEBUG sBegin data ; ; /* E X T E R N A L S */ ; externW caTap externW dxpPenBrc externW dypPenBrc externW hbrPenBrc externW vfmtss externW vfli externW vfti externW vhbrGray externW vihpldrMac externW vmerr externW vpapFetch externW vrghpldr externW vsci externW vtapFetch externW vtcc sEnd data ; CODE SEGMENT _DISPTBN2 sBegin disptbn2 assumes cs,disptbn2 assumes ds,dgroup assumes ss,dgroup ; /* ; /* F U P D A T E T A B L E ; /* ; /* Description: Given the cp beginning a table row, format and display ; /* that table row. Returns fTrue iff the format was successful, with ; /* cp and ypTop correctly advanced. If format fails, cp and ypTop ; /* are left with their original values. ; /**/ ; NATIVE FUpdateTable ( ww, doc, hpldr, idr, pcp, pypTop, hplcedl, dlNew, dlOld, dlMac, ; ypFirstShow, ypLimWw, ypLimDr, rcwInval, fScrollOK ) ; int ww, doc, idr, dlNew, dlOld, dlMac; ; int ypFirstShow, ypLimWw, ypLimDr, fScrollOK; ; struct PLCEDL **hplcedl; ; struct PLDR **hpldr; ; CP *pcp; ; int *pypTop; ; struct RC rcwInval; ; { ; ; NATIVE NOTE, USE OF REGISTERS: Whenever there is a dr currently fetched, ; or recently FetchedAndFree'd, the pdr is kept in SI. After the early ; set-up code (see LUpdateTable), DI is used to store &drfFetch. This ; is used in scattered places through the code and should not be disturbed ; carelessly. The little helper routines also assume these uses. ; ; %%Function:FUpdateTable %%Owner:tomsax cProc N_FUpdateTable,<PUBLIC,FAR>,<si,di> ParmW ww ParmW doc ParmW hpldr ParmW idr ParmW pcp ParmW pypTop ParmW hplcedl ParmW dlNew ParmW dlOld ParmW dlMac ParmW ypFirstShow ParmW ypLimWw ParmW ypLimDr ParmW rcwInvalYwBottomRc ParmW rcwInvalXwRightRc ParmW rcwInvalYwTopRc ParmW rcwInvalXwLeftRc ParmW fScrollOK ; int idrTable, idrMacTable, itcMac; LocalW <idrTable,idrMacTable> LocalW itcMac ; int dylOld, dylNew, dylDr, dylDrOld; LocalW dylOld LocalW dylNew LocalW dylDrOld ; native note dylDr kept in register when need ; int dylAbove, dylBelow, dylLimPldr, dylLimDr; LocalW dylAbove LocalW dylBelow LocalW dylLimPldr LocalW dylLimDr ; int dylBottomFrameDirty = 0; LocalW dylBottomFrameDirty ; int dyaRowHeight, ypTop, ylT; native note: ylT registerized LocalW <dyaRowHeight, ypTop> ; Mac(int cbBmbSav); ; int dlLast, dlMacOld, lrk; LocalW dlLast LocalW dlMacOld LocalB lrk ; byte-size makes life easier ; BOOL fIncr, fTtpDr, fReusePldr, fFrameLines, fOverflowDrs; LocalB fIncr LocalB fTtpDr LocalB fReusePldr LocalB fFrameLines LocalB fOverflowDrs ; BOOL fSomeDrDirty, fLastDlDirty, fLastRow, fFirstRow, fAbsHgtRow; LocalB fSomeDrDirty LocalB fLastDlDirty LocalB fLastRow LocalB fFirstRow LocalB fAbsHgtRow ; BOOL fOutline, fPageView, fDrawBottom; LocalB fOutline LocalB fPageView LocalB fDrawBottom ; Win(BOOL fRMark;) LocalB fRMark ; CP cp = *pcp; LocalD cp ; struct WWD *pwwd; ; native note: registerized LocalW pdrTable ; struct DR *pdrT, *pdrTable; ; native note: registerized ; struct PLDR **hpldrTable, *ppldrTable; LocalW hpldrTable ; LocalW ppldrTable -- registerized ; struct RC rcwTableInval; LocalV rcwTableInval,cbRcMin ; struct CA caTapCur; LocalV caTapCur,cbCaMin ; struct EDL edl, edlLast, edlNext; LocalV edl,cbEdlMin LocalV edlLast,cbEdlMin LocalV edlNext,cbEdlMin ; struct DRF drfT,drfFetch; LocalV drfFetch,cbDrfMin LocalV drfT,cbDrfMin ; struct TCX tcx; LocalV tcx,cbTcxMin ; struct PAP papT; LocalV papT,cbPapMin ; this trick works on the assumption that *pypTop is not altered ; until the end of the routine. cBegin ;PAUSE ; ypTop = *pypTop; assume & assert *pypTop doesn't change until the end. mov bx,[pypTop] mov ax,[bx] mov [ypTop],ax ; dylBottomFrameDirty = Win(fRMark =) 0; ;PAUSE xor ax,ax mov [dylBottomFrameDirty],ax mov [fRMark],al ; cp = *pcp; mov si,pcp mov ax,[si+2] mov [SEG_cp],ax mov ax,[si] mov [OFF_cp],ax ; pwwd = PwwdWw(ww); call LN_PwwdWw ; fOutline = pwwd->fOutline; ; ax = pwwd xchg ax,di ; move to a more convenient register mov al,[di.fOutlineWwd] and al,maskFOutlineWwd mov [fOutline],al ; fPageView = pwwd->fPageView; mov al,[di.fPageViewWwd] and al,maskFPageViewWwd mov [fPageView],al ; CacheTc(ww,doc,cp,fFalse,fFalse); /* Call this before CpFirstTap for efficiency */ push [ww] push [doc] push [SEG_cp] push [OFF_cp] xor ax,ax push ax push ax cCall CacheTc,<> ; CpFirstTap1(doc, cp, fOutline); ;PAUSE push [doc] push [SEG_cp] push [OFF_cp] mov al,[fOutline] cbw push ax cCall CpFirstTap1,<> ; Assert(cp == caTap.cpFirst); ifdef DEBUG push ax push bx push cx push dx mov ax,[OFF_cp] mov dx,[SEG_cp] sub ax,[caTap.LO_cpFirstCa] sbb dx,[caTap.HI_cpFirstCa] or ax,dx je UT001 mov ax,midDisptbn2 mov bx,303 cCall AssertProcForNative,<ax,bx> UT001: pop dx pop cx pop bx pop ax endif ; DEBUG ; caTapCur = caTap; mov si,dataoffset [caTap] lea di,[caTapCur] push ds pop es errnz <cbCaMin-10> movsw movsw movsw movsw movsw ; itcMac = vtapFetch.itcMac; mov ax,[vtapFetch.itcMacTap] mov [itcMac],ax ; fAbsHgtRow = (dyaRowHeight = vtapFetch.dyaRowHeight) < 0; ;PAUSE mov cx,[vtapFetch.dyaRowHeightTap] mov [dyaRowHeight],cx xor ax,ax ; assume correct value is zero or cx,cx jge UT010 errnz <fTrue-1> ;PAUSE inc ax UT010: mov [fAbsHgtRow],al ; Assert ( FInCa(doc,cp,&caTapCur) ); ifdef DEBUG push ax push bx push cx push dx push [doc] push [SEG_cp] push [OFF_cp] lea ax,[caTapCur] push ax cCall FInCa,<> or ax,ax jnz UT020 mov ax,midDisptbn2 mov bx,169 cCall AssertProcForNative,<ax,bx> UT020: pop dx pop cx pop bx pop ax endif ; DEBUG ; pdrT = PdrFetchAndFree(hpldr, idr, &drfT); ; native note: this doesn't count as setting up di yet, ; we'll need di for some other things first... lea di,[drfT] push [hpldr] push [idr] push di ifdef DEBUG cCall S_PdrFetchAndFree,<> else cCall N_PdrFetchAndFree,<> endif xchg ax,si ; lrk = pdrT->lrk; ; si = pdrT mov al,[si.lrkDr] mov [lrk],al ; DrclToRcw(hpldr,&pdrT->drcl,&rcwTableInval); ; si = pdrT push [hpldr] errnz <drclDr> push si lea ax,[rcwTableInval] push ax cCall DrclToRcw,<> ; /* check to see if we need to force a first row or last row condition */ ; fFirstRow = fLastRow = fFalse; /* assume no override */ ; si = pdrT xor ax,ax mov [fFirstRow],al mov [fLastRow],al ; if (fPageView) ; ax = 0, si = pdrT cmp [fPageView],al jnz UT025 jmp LChkOutline ; { ; if (pdrT->fForceFirstRow) ; { UT025: ;PAUSE test [si.fForceFirstRowDr],maskfForceFirstRowDr jz UT060 ; if (caTap.cpFirst == pdrT->cpFirst || dlNew == 0) ; fFirstRow = fTrue; ;PAUSE ; ax = 0, si = pdrT cmp [dlNew],ax jz UT050 ;PAUSE mov cx,[caTap.LO_cpFirstCa] cmp cx,[si.LO_cpFirstDr] jnz UT040 ;PAUSE mov cx,[caTap.HI_cpFirstCa] cmp cx,[si.HI_cpFirstDr] jz UT050 ; else ; { UT040: ; Assert(dlNew > 0); ; dlLast = dlNew - 1; ; GetPlc(hplcedl,dlLast,&edlLast); ;PAUSE lea ax,[edlLast] mov cx,[dlNew] ifdef DEBUG push ax push bx push cx push dx or cx,cx jg UT005 mov ax,midDisptbn2 mov bx,1001 cCall AssertProcForNative,<ax,bx> UT005: pop dx pop cx pop bx pop ax endif ; DEBUG dec cx mov [dlLast],cx call LN_GetPlcParent ; if (caTapCur.cpFirst != CpPlc(hplcedl,dlLast) + edlLast.dcp) ; fFirstRow = fTrue; push [hplcedl] push [dlLast] cCall CpPlc,<> add ax,[edlLast.LO_dcpEdl] adc dx,[edlLast.HI_dcpEdl] sub ax,[caTapCur.LO_cpFirstCa] ; sub to re-zero ax sbb dx,[caTapCur.HI_cpFirstCa] or ax,dx je UT060 UT050: ;PAUSE mov [fFirstRow],fTrue xor ax,ax ; } ; } UT060: ; if (pdrT->cpLim != cpNil && pdrT->cpLim <= caTap.cpLim) ; { ; ax = 0, si = pdrT errnz <LO_cpNil+1> errnz <HI_cpNil+1> mov cx,[si.LO_cpLimDr] and cx,[si.HI_cpLimDr] inc cx jz UT062 ; to the else clause mov ax,[caTap.LO_cpLimCa] mov dx,[caTap.HI_cpLimCa] sub ax,[si.LO_cpLimDr] sbb dx,[si.HI_cpLimDr] js UT062 ; to the else clause ; if (pdrT->idrFlow == idrNil) ; fLastRow = fTrue; ;PAUSE cmp [si.idrFlowDr],0 js UT065 ; set fLastRow = fTrue, or fall through for else ; else ; { ; /* use the pdrTable and drfFetch momentarily... */ ; pdrTable = PdrFetchAndFree(hpldr, pdrT->idrFlow, &drfFetch); ; native note: this doesn't count as setting up di yet, ; we'll need di for some other things first... ;PAUSE lea di,[drfFetch] push [hpldr] push [si.idrFlowDr] push di ifdef DEBUG cCall S_PdrFetchAndFree,<> else cCall N_PdrFetchAndFree,<> endif xchg ax,bx ; Assert(pdrT->doc == pdrTable->doc); ifdef DEBUG ;Did this DEBUG stuff with a call so as not to mess up short jumps. call UT2130 endif ; DEBUG ; fLastRow = pdrT->xl != pdrTable->xl; mov cx,[si.xlDr] cmp cx,[bx.xlDr] jne UT065 ; set fLastRow = fTrue, or fall through for else ;PAUSE jmp short UT070 ; } ; } ; else ; { ; if (FInTableDocCp(doc,caTapCur.cpLim)) UT062: ;PAUSE push [doc] push [caTapCur.HI_cpLimCa] push [caTapCur.LO_cpLimCa] ifdef DEBUG cCall S_FInTableDocCp,<> else cCall N_FInTableDocCp,<> endif or ax,ax jz UT070 ; { ; CachePara(doc, caTapCur.cpLim); ;PAUSE push [doc] push [caTapCur.HI_cpLimCa] push [caTapCur.LO_cpLimCa] ifdef DEBUG cCall S_CachePara,<> else cCall N_CachePara,<> endif ; papT = vpapFetch; push si ; save pdrT mov si,dataoffset [vpapFetch] lea di,[papT] push ds pop es errnz <cbPapMin and 1> mov cx,cbPapMin SHR 1 rep movsw pop si ; restore pdrT ; CachePara(doc, cp); push [doc] push [SEG_cp] push [OFF_cp] ifdef DEBUG cCall S_CachePara,<> else cCall N_CachePara,<> endif ; if (!FMatchAbs(caPara.doc, &papT, &vpapFetch)) push [doc] lea ax,[papT] push ax mov ax,dataoffset [vpapFetch] push ax cCall FMatchAbs,<> or ax,ax jnz UT070 ; fLastRow = fTrue; ;PAUSE UT065: ;PAUSE mov [fLastRow],fTrue ; } ; } UT070: ; } ; native note: end of if fPageView clause ; else if (pwwd->fOutline) ; native note: use fOutline instead ; REVIEW - C should also use fOutline LChkOutline: ; si = pdrT cmp [fOutline],0 jz LChkOverride ; { ; if (!FShowOutline(doc, CpMax(caTap.cpFirst - 1, cp0))) ; fFirstRow = fTrue; ;PAUSE mov ax,[caTap.LO_cpFirstCa] mov dx,[caTap.HI_cpFirstCa] sub ax,1 sbb dx,0 jns UT075 xor ax,ax cwd UT075: push [doc] push dx ; SEG push ax ; OFF cCall FShowOutline,<> or ax,ax jnz UT080 ;PAUSE mov [fFirstRow],fTrue UT080: ; if (!FShowOutline(doc, CpMin(caTap.cpLim, CpMacDocEdit(doc)))) ; fLastRow = fTrue; push [doc] cCall CpMacDocEdit,<> push dx ; SEG push ax ; OFF push [caTap.HI_cpLimCa] push [caTap.LO_cpLimCa] cCall CpMin,<> push [doc] push dx ; SEG push ax ; OFF cCall FShowOutline,<> or ax,ax jnz UT085 ;PAUSE mov [fLastRow],fTrue UT085: ; } LChkOverride: ; /* Rebuild the cache if we need to override. */ ; if ((fFirstRow && !vtcc.fFirstRow) || (fLastRow && !vtcc.fLastRow)) ; CacheTc(ww,doc,cp,fFirstRow,fLastRow); ; si = pdrT xor ax,ax ; a zero register will be handy cmp [fFirstRow],al jz UT090 test [vtcc.fFirstRowTcc],maskFFirstRowTcc jz UT100 UT090: cmp [fLastRow],al jz UT110 test [vtcc.fLastRowTcc],maskFLastRowTcc jnz UT110 UT100: ;PAUSE ; ax = 0 push [ww] push [doc] push [SEG_cp] push [OFF_cp] mov al,[fFirstRow] push ax mov al,[fLastRow] push ax cCall CacheTc,<> UT110: ; fFirstRow = vtcc.fFirstRow; ; fLastRow = vtcc.fLastRow; errnz <fFirstRowTcc-fLastRowTcc> mov al,[vtcc.fFirstRowTcc] push ax and al,maskFFirstRowTcc mov [fFirstRow],al pop ax and al,maskFLastRowTcc mov [fLastRow],al ; dylAbove = vtcc.dylAbove; ;PAUSE mov ax,[vtcc.dylAboveTcc] mov [dylAbove],ax ; dylBelow = vtcc.dylBelow; mov ax,[vtcc.dylBelowTcc] mov [dylBelow],ax ; /* NOTE: The height available for an non-incremental update is extended ; /* past the bottom of the bounding DR so that the bottom border ; /* or frame line will not be shown if the row over flows. ; /**/ ; si = pdrT ; fFrameLines = FDrawTableDrsWw(ww); ; dylLimPldr = pdrT->dyl - *pypTop + dylBelow; ;PAUSE mov ax,[si.dylDr] sub ax,[ypTop] add ax,[dylBelow] mov [dylLimPldr],ax ; native note - do fFrameLines here so that we can jump ; over the next block without retesting it ; #define FDrawTableDrsWw(ww) \ ; (PwwdWw(ww)->grpfvisi.fDrawTableDrs || PwwdWw(ww)->grpfvisi.fvisiShowAll) call LN_PwwdWw xchg ax,bx xor ax,ax mov [fFrameLines],al ; assume fFalse test [bx.grpfvisiWwd],maskfDrawTableDrsGrpfvisi or maskfvisiShowAllGrpfvisi jz UT130 mov [fFrameLines],fTrue ; assumption failed ; fall through to next block with fFrameLines already tested true ; if (dylBelow == 0 && fFrameLines && !fPageView) ; dylLimPldr += DyFromBrc(brcNone,fTrue/*fFrameLines*/); ; si = pdrT, ax = 0 cmp [dylBelow],ax jnz UT130 cmp [fPageView],al jnz UT130 ; #define DyFromBrc(brc, fFrameLines) DxyFromBrc(brc, fFrameLines, fFalse) ; #define DxyFromBrc(brc, fFrameLines, fWidth) \ ; WidthHeightFromBrc(brc, fFrameLines | (fWidth << 1)) errnz <brcNone> ; si = pdrT, ax = 0 push ax inc ax ; fFrameLines | (fWidth << 1) == 1 push ax ifdef DEBUG cCall S_WidthHeightFromBrc,<> else cCall N_WidthHeightFromBrc,<> endif add [dylLimPldr],ax xor ax,ax UT130: ; if (fAbsHgtRow) ; dylLimPldr = min(dylLimPldr,DypFromDya(-dyaRowHeight) + dylBelow); ; si = pdrT, ax = 0 ;PAUSE cmp [fAbsHgtRow],al jz UT135 ; do screwy jump to set up ax for next block mov ax,[dyaRowHeight] neg ax call LN_DypFromDya add ax,[dylBelow] cmp ax,[dylLimPldr] jle UT140 UT135: mov ax,[dylLimPldr] UT140: mov [dylLimPldr],ax UT150: ; dylLimDr = dylLimPldr - dylAbove - dylBelow; ; si = pdrT, ax = dylLimPldr sub ax,[dylAbove] sub ax,[dylBelow] mov [dylLimDr],ax ; /* Check for incremental update */ ; Break3(); /* Mac only thing */ ; if (dlOld == dlNew && dlOld < dlMac && cp == CpPlc(hplcedl,dlNew)) mov ax,[dlOld] cmp ax,[dlNew] jne LChkFreeEdl ;PAUSE cmp ax,[dlMac] jge LChkFreeEdl push [hplcedl] push ax ; since dlNew == dlOld cCall CpPlc,<> ;PAUSE sub ax,[OFF_cp] sbb dx,[SEG_cp] or ax,dx jne LChkFreeEdl ; { ; /* we are about to either use dlOld, or trash it. The next ; /* potentially useful dl is therefore dlOld+1 ; /**/ ; GetPlc ( hplcedl, dlNew, &edl ); ;PAUSE lea ax,[edl] mov cx,[dlNew] call LN_GetPlcParent ; if ( edl.ypTop == *pypTop && edl.hpldr != hNil ) mov ax,[ypTop] sub ax,[edl.ypTopEdl] jne UT175 ; ax = 0 errnz <hNil> cmp [edl.hpldrEdl],ax jz UT175 ; { ; hpldrTable = edl.hpldr; mov ax,[edl.hpldrEdl] mov [hpldrTable],ax ; Assert ( !edl.fDirty ); ; Assert((*hpldrTable)->idrMac == itcMac + 1); ifdef DEBUG push ax push bx push cx push dx push di test [edl.fDirtyEdl],maskFDirtyEdl jz UT160 mov ax,midDisptbn2 mov bx,507 cCall AssertProcForNative,<ax,bx> UT160: mov di,[hpldrTable] mov di,[di] mov ax,[di.idrMacPldr] sub ax,[itcMac] dec ax jz UT170 mov ax,midDisptbn2 mov bx,517 cCall AssertProcForNative,<ax,bx> UT170: pop di pop dx pop cx pop bx pop ax endif ; DEBUG ; fIncr = fTrue; mov [fIncr],fTrue ; ++dlOld; inc [dlOld] ; goto LUpdateTable; jmp LUpdateTable ; } UT175: ; } LChkFreeEdl: ; if (dlNew == dlOld && dlOld < dlMac) /* existing edl is useless, free it */ mov ax,[dlOld] cmp ax,[dlNew] jne LClearFIncr cmp ax,[dlMac] jge LClearFIncr ; FreeEdl(hplcedl, dlOld++); ;PAUSE push [hplcedl] push ax inc ax mov [dlOld],ax cCall FreeEdl,<> ; Break3(); native note: Mac only ; fIncr = fReusePldr = fFalse; LClearFIncr: xor ax,ax mov [fIncr],al mov [fReusePldr],al ; /* new table row; init edl */ ; if (vihpldrMac > 0) mov cx,[vihpldrMac] jcxz LHpldrInit ; { ; hpldrTable = vrghpldr[--vihpldrMac]; ; vrghpldr[vihpldrMac] = hNil; /* we're gonna use or lose it */ ;PAUSE dec cx mov [vihpldrMac],cx sal cx,1 mov di,cx mov bx,[vrghpldr.di] mov [vrghpldr.di],hNil mov [hpldrTable],bx ; ppldrTable = *hpldrTable; mov di,[bx] ; if (ppldrTable->idrMax != itcMac+1 || !ppldrTable->fExternal) mov ax,[di.idrMaxPldr] sub ax,[itcMac] dec ax jnz LFreeHpldr ; ax = 0 cmp [di.fExternalPldr],ax jnz LReusePldr LFreeHpldr: ; { ; /* If ppldrTable->idrMac == 0, LcbGrowZone freed up all of ; /* the far memory associated with this hpldr. We now need to ; /* free only the near memory. */ ; if (ppldrTable->idrMax > 0) ; bx = hpldrTable, di = ppldrTable ;PAUSE mov cx,[di.idrMaxPldr] ; technically an uns jcxz LFreeHpldr2 ; { ; FreeDrs(hpldrTable, 0); ; if ((*hpldrTable)->fExternal) ; FreeHq((*hpldrTable)->hqpldre); push bx xor ax,ax push ax cCall FreeDrs,<> mov cx,[di.fExternalPldr] jcxz LFreeHpldr2 push [di.HI_hqpldrePldr] push [di.LO_hqpldrePldr] cCall FreeHq,<> LFreeHpldr2: ; } ; FreeH(hpldrTable); ; #define FreeH(h) FreePpv(sbDds,(h)) mov ax,sbDds push ax push [hpldrTable] cCall FreePpv,<> ; hpldrTable = hNil; mov [hpldrTable],hNil jmp short LHpldrInit ; } ; else ; { ; Assert(ppldrTable->brgdr == offset(PLDR, rgdr)); LReusePldr: ; bx = hpldrTable, di = ppldrTable ifdef DEBUG push ax push bx push cx push dx cmp [di.brgdrPldr],rgdrPldr je UT180 mov ax,midDisptbn2 mov bx,632 cCall AssertProcForNative,<ax,bx> UT180: pop dx pop cx pop bx pop ax endif ; DEBUG ; fReusePldr = fTrue; mov [fReusePldr],fTrue jmp short LChkHpldr ; } ; } ; if (!fReusePldr) ; native note: we jump directly into the right clause from above ; { ; hpldrTable = HplInit2(sizeof(struct DR),offset(PLDR, rgdr), itcMac+1, fTrue); LHpldrInit: mov ax,cbDrMin push ax mov ax,rgdrPldr push ax mov ax,[itcMac] inc ax push ax mov ax,fTrue push ax cCall HplInit2,<> mov [hpldrTable],ax xchg ax,bx ; Assert(hpldrTable == hNil || (*hpldrTable)->idrMac == 0); ifdef DEBUG push ax push bx push cx push dx mov bx,[hpldrTable] or bx,bx jz UT190 mov bx,[bx] cmp [bx.idrMacPldr],0 jz UT190 mov ax,midDisptbn2 mov bx,716 cCall AssertProcForNative,<ax,bx> UT190: pop dx pop cx pop bx pop ax endif ; DEBUG ; } LChkHpldr: ; bx = hpldrTable ; edl.hpldr = hpldrTable; mov [edl.hpldrEdl],bx ; if (hpldrTable == hNil || vmerr.fMemFail) or bx,bx jz UT200 cmp [vmerr.fMemFailMerr],0 jz UT210 ; { ; SetErrorMat(matDisp); UT200: mov ax,matDisp push ax cCall SetErrorMatProc,<> ; return fFalse; /* operation failed */ xor ax,ax jmp LExitUT ; } ; bx = hpldrTable ; edl.ypTop = *pypTop; UT210: mov ax,[ypTop] mov [edl.ypTopEdl],ax ; native note: the order of these next instructions has been altered ; from the C version for efficiency... ; ; /* this allows us to clobber (probably useless) dl's below */ ; Assert(FInCa(doc,cp,&vtcc.ca) && vtcc.itc == 0); ifdef DEBUG push ax push bx push cx push dx push [doc] push [SEG_cp] push [OFF_cp] mov ax,dataoffset [vtcc.caTcc] push ax cCall FInCa,<> or ax,ax jz UT220 cmp [vtcc.itcTcc],0 jz UT230 UT220: mov ax,midDisptbn2 mov bx,908 cCall AssertProcForNative,<ax,bx> UT230: pop dx pop cx pop bx pop ax endif ; DEBUG ; dylDrOld = dylLimDr; mov ax,[dylLimDr] mov [dylDrOld],ax ; edl.dyp = dylLimPldr; mov ax,[dylLimPldr] mov [edl.dypEdl],ax ; edl.dcpDepend = 1; ; edl.dlk = dlkNil; ; REVIEW is this right? errnz <dcpDependEdl+1-(dlkEdl)> mov [edl.grpfEdl],00001h ; edl.xpLeft = vtcc.xpCellLeft; mov ax,[vtcc.xpCellLeftTcc] mov [edl.xpLeftEdl],ax ; ppldrTable = *hpldrTable; ; set-up for fast moves.. mov di,[bx] add di,hpldrBackPldr push ds pop es ; ppldrTable->hpldrBack = hpldr; mov ax,[hpldr] stosw ; ppldrTable->idrBack = idr; errnz <hpldrBackPldr+2-idrBackPldr> mov ax,[idr] stosw ; ppldrTable->ptOrigin.xp = 0; errnz <idrBackPldr+2-ptOriginPldr> errnz <xwPt> xor ax,ax stosw ; ppldrTable->ptOrigin.yp = edl.ypTop; mov ax,[edl.ypTopEdl] stosw ; ppldrTable->dyl = edl.dyp; errnz <ptOriginPldr+ypPt+2-(dylPldr)> mov ax,[edl.dypEdl] stosw ; PutCpPlc ( hplcedl, dlNew, cp ); ; PutPlc ( hplcedl, dlNew, &edl ); ; bx = hpldrTable ; push arguments for PutCpPlc call push [hplcedl] push [dlNew] push [SEG_cp] push [OFF_cp] cCall PutCpPlc,<> call LN_PutPlc ; Break3(); LUpdateTable: ; native note: set up register variable, this is ; assumed by the remainder of the routine (and the ; little helper routines) ;PAUSE lea di,[drfFetch] ; fSomeDrDirty = fFalse; /* for second pass */ ; CpFirstTap1( doc, cp, fOutline ); ; idrMacTable = fIncr ? itcMac + 1 : 0; xor ax,ax mov [fSomeDrDirty],al cmp [fIncr],al jz UT300 ;PAUSE mov ax,[itcMac] inc ax UT300: mov [idrMacTable],ax ;PAUSE push [doc] push [SEG_cp] push [OFF_cp] mov al,[fOutline] cbw push ax cCall CpFirstTap1,<> ; dylNew = DypFromDya(abs(vtapFetch.dyaRowHeight)) - dylAbove - dylBelow; mov ax,[vtapFetch.dyaRowHeightTap] or ax,ax jns UT310 ;PAUSE neg ax UT310: call LN_DypFromDya sub ax,[dylAbove] sub ax,[dylBelow] mov [dylNew],ax ; dylOld = (*hpldrTable)->dyl; mov bx,[hpldrTable] mov bx,[bx] mov ax,[bx.dylPldr] mov [dylOld],ax ; for ( idrTable = fTtpDr = 0; !fTtpDr; ++idrTable ) ; { xor ax,ax mov [idrTable],ax mov [fTtpDr],al LIdrLoopTest: cmp fTtpDr,0 jz UT320 jmp LIdrLoopEnd ; fTtpDr = idrTable == itcMac; UT320: mov ax,[idrTable] cmp ax,[itcMac] jne UT330 mov [fTtpDr],fTrue UT330: ; Assert ( FInCa(doc,cp,&caTapCur) ); ifdef DEBUG push ax push bx push cx push dx push [doc] push [SEG_cp] push [OFF_cp] lea ax,[caTapCur] push ax cCall FInCa,<> or ax,ax jnz UT340 mov ax,midDisptbn2 mov bx,828 cCall AssertProcForNative,<ax,bx> UT340: pop dx pop cx pop bx pop ax endif ; DEBUG ; ax = idrTable ; if ( idrTable >= idrMacTable ) ; ax = idrTable sub ax,[idrMacTable] ; sub for zero register on branch jge LNewDr ; native note: we'll do the else clause here... ; else ; pdrTable = PdrFetch(hpldrTable,idrTable,&drfFetch); ;PAUSE call LN_PdrFetchTable jmp LValidateDr ; native note: we now return you to our regularly scheduled if statement ; native note: assert idrTable == idrMacTable, hence ax == 0 LNewDr: ifdef DEBUG push ax push bx push cx push dx xor ax,ax jz UT350 mov ax,midDisptbn2 mov bx,849 cCall AssertProcForNative,<ax,bx> UT350: pop dx pop cx pop bx pop ax endif ; DEBUG ; { /* this is a new cell in the table */ ; if (fReusePldr) ; ax = 0 cmp fReusePldr,al jz UT370 ; native note: branch expects ax = 0 ; { ; pdrTable = PdrFetch(hpldrTable, idrTable, &drfFetch); ;PAUSE call LN_PdrFetchTable ; Assert(drfFetch.pdrfUsed == 0); ifdef DEBUG push ax push bx push cx push dx cmp [drfFetch.pdrfUsedDrf],0 jz UT360 mov ax,midDisptbn2 mov bx,860 cCall AssertProcForNative,<ax,bx> UT360: pop dx pop cx pop bx pop ax endif ; DEBUG ; PutIMacPlc(drfFetch.dr.hplcedl, 0); push [drfFetch.drDrf.hplcedlDr] xor ax,ax push ax cCall PutIMacPlc,<> jmp short UT380 ; } ; else ; { UT370: ; SetWords ( &drfFetch, 0, sizeof(struct DRF) / sizeof(int) ); ; ax = 0, di = &drfFetch errnz <cbDrfMin and 1> mov cx,cbDrfMin SHR 1 push di ; save register variable push ds pop es rep stosw pop di ; } ; /* NOTE We are assuming that the 'xl' coordiates in the table frame (PLDR) ; /* are the same as the 'xp' coordinates of the bounding DR. ; /**/ ; ItcGetTcxCache(ww, doc, cp, &vtapFetch, idrTable/*itc*/, &tcx); UT380: ;PAUSE push [ww] push [doc] push [SEG_cp] push [OFF_cp] mov ax,dataoffset [vtapFetch] push ax push [idrTable] lea ax,[tcx] push ax ifdef DEBUG cCall S_ItcGetTcxCache else cCall N_ItcGetTcxCache endif ; native note: the following block of code has been rearranged from ; the C version of efficiency... ; push di ; save register variable push ds pop es lea di,[drfFetch.drDrf.xlDr] ; drfFetch.dr.xl = tcx.xpDrLeft; mov ax,[tcx.xpDrLeftTcx] stosw ; drfFetch.dr.yl = fTtpDr ? max(dyFrameLine,dylAbove) : dylAbove; errnz <xlDr+2-ylDr> mov ax,[dylAbove] ; right more often than not cmp [fTtpDr],0 jz UT390 ;PAUSE mov ax,[dylAbove] ; #define dyFrameLine dypBorderFti ; #define dypBorderFti vfti.dypBorder cmp ax,[vfti.dypBorderFti] jge UT390 mov ax,[vfti.dypBorderFti] UT390: stosw ; drfFetch.dr.dxl = tcx.xpDrRight - drfFetch.dr.xl; errnz <ylDr+2-dxlDr> mov ax,[tcx.xpDrRightTcx] sub ax,[drfFetch.drDrf.xlDr] stosw ; drfFetch.dr.dyl = edl.dyp - drfFetch.dr.yl - dylBelow; ;PAUSE errnz <dxlDr+2-dylDr> mov ax,[edl.dypEdl] sub ax,[drfFetch.drDrf.ylDr] sub ax,[dylBelow] stosw ; drfFetch.dr.cpLim = cpNil; ; drfFetch.dr.doc = doc; errnz <dylDr+2+4-cpLimDr> errnz <LO_cpNil+1> errnz <HI_cpNil+1> add di,4 mov ax,-1 stosw stosw errnz <cpLimDr+4-docDr> mov ax,[doc] stosw ; drfFetch.dr.fDirty = fTrue; ; drfFetch.dr.fCpBad = fTrue; ; drfFetch.dr.fInTable = fTrue; ; drfFetch.dr.fForceWidth = fTrue; ; this next one is silly since it is already set to zero... ; drfFetch.dr.fBottomTableFrame = fFalse; /* we'll set this correctly later */ errnz <docDr+2-dcpDependDr> errnz <dcpDependDr+1-fDirtyDr> errnz <fDirtyDr-fCpBadDr> errnz <fDirtyDr-fInTableDr> errnz <fDirtyDr-fForceWidthDr> ; native note: this stores 0 in dr.dcpDepend, which has ; no net effect (it's already zero by the SetWords) ;PAUSE errnz <maskFDirtyDr-00001h> errnz <maskFCpBadDr-00002h> errnz <maskFInTableDr-00020h> errnz <maskFForceWidthDr-00080h> ;mov ax,(maskFDirtyDr or maskFCpBadDr or fInTableDr or fForceWidthDr) SHL 8 mov ax,0A300h stosw ; how's that for C to 8086 compression? ; ; drfFetch.dr.dxpOutLeft = tcx.dxpOutLeft; errnz <dcpDependDr+6-(dxpOutLeftDr)> add di,4 ; advance di mov ax,[tcx.dxpOutLeftTcx] stosw ; drfFetch.dr.dxpOutRight = tcx.dxpOutRight; errnz <dxpOutLeftDr+2-dxpOutRightDr> mov ax,[tcx.dxpOutRightTcx] stosw ; drfFetch.dr.idrFlow = idrNil; errnz <dxpOutRightDr+2-idrFlowDr> errnz <idrNil+1> mov ax,-1 stosw ; drfFetch.dr.lrk = lrk; ; ax = -1 errnz <idrFlowDr+2-ccolM1Dr> errnz <ccolM1Dr+1-lrkDr> inc ax ; now it's zero mov ah,[lrk] stosw ; also stores 0 in ccolM1, again no net change ; drfFetch.dr.fCantGrow = fPageView || fAbsHgtRow; errnz <lrkDr+1-fCantGrowDr> mov al,[fPageView] or al,[fAbsHgtRow] jz UT400 ;PAUSE or bptr [di],maskFCantGrowDr UT400: ;PAUSE pop di ; restore register variable ; if (!fReusePldr) cmp [fReusePldr],0 jnz UT430 ; { ; if (!FInsertInPl ( hpldrTable, idrTable, &drfFetch.dr ) push [hpldrTable] push [idrTable] lea ax,[drfFetch.drDrf] push ax cCall FInsertInPl,<> or ax,ax jz LAbortUT ; if we branch, ax is zero as required ; || !FInitHplcedl(1, cpMax, hpldrTable, idrTable)) ; native note: hold on to your hats, this next bit is trickey errnz <LO_cpMax-0FFFFh> errnz <HI_cpMax-07FFFh> mov ax,1 push ax neg ax cwd shr dx,1 push dx ; SEG push ax ; OFF push [hpldrTable] push [idrTable] cCall FInitHplcedl,<> or ax,ax jnz UT420 ; { ; native note: as usual, the order of the following has been changed ; to save a few bytes... LAbortUT: ; NOTE ax must be zero when jumping to this label!!! ;PAUSE ; ax = 0 ; edl.hpldr = hNil; errnz <hNil> mov [edl.hpldrEdl],ax ; FreeDrs(hpldrTable, 0); push [hpldrTable] push ax cCall FreeDrs,<> ; FreeHpl(hpldrTable); push [hpldrTable] cCall FreeHpl,<> ; PutPlc(hplcedl, dlNew, &edl); call LN_PutPlc ; return fFalse; /* operation failed */ xor ax,ax jmp LExitUT ; } ; pdrTable = PdrFetch(hpldrTable,idrTable,&drfFetch); UT420: call LN_PdrFetchTable ; } UT430: ; ++idrMacTable; inc [idrMacTable] ; Assert (fReusePldr || (*hpldrTable)->idrMac == idrMacTable ); ifdef DEBUG push ax push bx push cx push dx cmp [fReusePldr],0 jnz UT440 mov bx,[hpldrTable] mov bx,[bx] mov ax,[bx.idrMacPldr] cmp ax,[idrMacTable] je UT440 mov ax,midDisptbn2 mov bx,1097 cCall AssertProcForNative,<ax,bx> UT440: pop dx pop cx pop bx pop ax endif ; DEBUG ; } ; native note: else clause done above LValidateDr: ; si = pdrTable ; if (pdrTable->fCpBad || pdrTable->cpFirst != cp) ; native note: this next block is somewhat verbose, ; to leave [cp] in ax,dx mov ax,[OFF_cp] mov dx,[SEG_cp] test [si.fCpBadDr],maskFCpBadDr jnz UT500 ;PAUSE cmp ax,[si.LO_cpFirstDr] jnz UT500 cmp dx,[si.HI_cpFirstDr] jz UT510 ; { ; pdrTable->cpFirst = cp; UT500: ; si = pdrTable, ax,dx = cp mov [si.HI_cpFirstDr],dx mov [si.LO_cpFirstDr],ax ; pdrTable->fCpBad = fFalse; and [si.fCpBadDr],not maskFCpBadDr ; pdrTable->fDirty = fTrue; or [si.fDirtyDr],maskFDirtyDr ; } ; if (pdrTable->yl != (ylT = fTtpDr ? max(dylAbove,dyFrameLine) : dylAbove)) UT510: mov ax,[dylAbove] cmp [fTtpDr],0 jz UT520 ; #define dyFrameLine dypBorderFti ; #define dypBorderFti vfti.dypBorder ;PAUSE cmp ax,[vfti.dypBorderFti] jge UT520 mov ax,[vfti.dypBorderFti] UT520: sub ax,[si.ylDr] ; sub for zero register on branch je UT530 ; { ; pdrTable->yl = ylT; ; ax = ylT - pdrTable->ylDr ;PAUSE add [si.ylDr],ax ; FreeEdls(pdrTable->hplcedl,0,IMacPlc(pdrTable->hplcedl)); ; PutIMacPlc(pdrTable->hplcedl,0); mov bx,[si.hplcedlDr] xor cx,cx ; zero register push bx ; arguments for push cx ; PutIMacPlc call push bx ; some arguments for push cx ; FreeEdls call call LN_IMacPlcTable push ax ; last argument for FreeEdls - IMacPlc result cCall FreeEdls,<> cCall PutIMacPlc,<> ; pdrTable->fDirty = fTrue; or [si.fDirtyDr],maskFDirtyDr jmp short LChkFTtpDr ; } ; else if (pdrTable->fBottomTableFrame != fLastRow || pdrTable->fDirty) UT530: ; ax = 0 test [si.fBottomTableFrameDr],maskFBottomTableFrameDr jz UT540 inc ax UT540: cmp [fLastRow],0 jz UT550 xor ax,1 UT550: or ax,ax jnz UT560 ;PAUSE test [si.fDirtyDr],maskFDirtyDr jz LChkFTtpDr ; { ; if ((dlLast = IMacPlc(pdrTable->hplcedl) - 1) >= 0) UT560: call LN_IMacPlcTable dec ax mov [dlLast],ax jl UT570 ; { ; GetPlc(pdrTable->hplcedl,dlLast,&edlLast); ;PAUSE xchg ax,cx call LN_GetPlcTable ; edlLast.fDirty = fTrue; or [edlLast.fDirtyEdl],maskFDirtyEdl ; PutPlcLast(pdrTable->hplcedl,dlLast,&edlLast); ; #ifdef DEBUG ; # define PutPlcLast(h, i, pch) PutPlcLastDebugProc(h, i, pch) ; #else ; # define PutPlcLast(h, i, pch) PutPlcLastProc() ; #endif ; } ifdef DEBUG push [si.hplcedlDr] push [dlLast] lea ax,[edlLast] push ax cCall PutPlcLastDebugProc,<> else ; !DEBUG call LN_PutPlcLast endif ; DEBUG UT570: ; pdrTable->fDirty = fTrue; or [si.fDirtyDr],maskFDirtyDr ; } ; if (fTtpDr) LChkFTtpDr: cmp [fTtpDr],0 jz UT620 ; { ; if (fAbsHgtRow) ;PAUSE cmp [fAbsHgtRow],0 jz UT590 ; dylNew = DypFromDya(abs(vtapFetch.dyaRowHeight)) + dylBelow; ;PAUSE mov ax,[vtapFetch.dyaRowHeightTap] ; native note: Assert(vtapFetch.dyaRowHeight < 0); ifdef DEBUG push ax push bx push cx push dx or ax,ax js UT580 mov ax,midDisptbn2 mov bx,1482 cCall AssertProcForNative,<ax,bx> UT580: pop dx pop cx pop bx pop ax endif ; DEBUG neg ax call LN_DypFromDya add ax,[dylBelow] jmp short UT600 ; else ; dylNew += dylAbove + dylBelow; UT590: ;PAUSE mov ax,[dylNew] add ax,[dylAbove] add ax,[dylBelow] UT600: mov [dylNew],ax ; leave dylNew in ax for next block... ; pdrTable->dyl = min(pdrTable->dyl, dylNew - pdrTable->yl - dylBelow); ; ax = dylNew sub ax,[si.ylDr] sub ax,[dylBelow] cmp ax,[si.dylDr] jge UT610 mov [si.dylDr],ax UT610: ; } UT620: ; Assert ( pdrTable->cpFirst == cp ); ;PAUSE ifdef DEBUG push ax push bx push cx push dx mov ax,[OFF_cp] cmp ax,[si.LO_cpFirstDr] jne UT630 mov ax,[SEG_cp] cmp ax,[si.HI_cpFirstDr] je UT640 UT630: mov ax,midDisptbn2 mov bx,1284 cCall AssertProcForNative,<ax,bx> UT640: pop dx pop cx pop bx pop ax endif ; DEBUG ; if (pdrTable->fDirty) test [si.fDirtyDr],maskFDirtyDr jnz UT650 jmp LSetDylNew ; { ; /* set DR to full row height */ ; if (fIncr) UT650: cmp [fIncr],0 jz LSetFBottom ; { ; /* we're betting that the row height doesn't change. ; /* record some info to check our bet and take corrective ; /* measures if we lose. ; /**/ ; dlMacOld = IMacPlc(pdrTable->hplcedl); ;PAUSE call LN_IMacPlcTable mov [dlMacOld],ax ; dylDrOld = pdrTable->dyl; mov ax,[si.dylDr] mov [dylDrOld],ax ; pdrTable->fCantGrow = pdrTable->dyl >= dylLimDr && (fPageView || fAbsHgtRow); call LN_SetFCantGrow ; pdrTable->dyl = edl.dyp - pdrTable->yl - dylBelow; mov ax,[edl.dypEdl] sub ax,[si.ylDr] sub ax,[dylBelow] mov [si.dylDr],ax ; } ; /* enable drawing the bottom table frame */ ; pdrTable->fBottomTableFrame = fLastRow; LSetFBottom: and [si.fBottomTableFrameDr],not maskFBottomTableFrameDr ; assume fFalse cmp [fLastRow],0 jz UT660 or [si.fBottomTableFrameDr],maskFBottomTableFrameDr ; assumption failed UT660: ; /* write any changes we have made, native code will need them */ ; pdrTable = PdrFreeAndFetch(hpldrTable,idrTable,&drfFetch); push [hpldrTable] push [idrTable] push di ifdef DEBUG cCall S_PdrFreeAndFetch,<> else cCall N_PdrFreeAndFetch,<> endif xchg ax,si ; if (!FUpdTableDr(ww,hpldrTable,idrTable)) ; if (!FUpdateDr(ww,hpldrTable,idrTable,rcwInval,fFalse,udmodTable,cpNil)) ; { ; LFreeAndAbort: ; FreePdrf(&drfFetch); ; goto LAbort; ; } ; NOTE: the local routine also does the assert with DypHeightTc ;PAUSE xor ax,ax ; flag to helper routine mov cx,[idrTable] errnz <xwLeftRc> lea bx,[rcwInvalXwLeftRc] call LN_FUpdateOneDr jnz UT670 LFreeAndAbortUT: call LN_FreePdrf xor ax,ax jmp LAbortUT ; note ax is zero, as required for the jump UT670: ; /* check for height change */ ; pdrTable->fCantGrow = pdrTable->dyl >= dylLimDr && (fPageView || fAbsHgtRow); call LN_SetFCantGrow ; if (pdrTable->dyl != dylDrOld) mov ax,[dylDrOld] cmp ax,[si.dylDr] je LSetFSomeDirty ; { ; if (fIncr && fLastRow && dylDrOld == dylOld - dylAbove - dylBelow ; && IMacPlc(pdrTable->hplcedl) >= dlMacOld) ; ax = [dylDrOld] cmp [fIncr],0 jz LSetFSomeDirty ;PAUSE cmp [fLastRow],0 jz LSetFSomeDirty sub ax,[dylOld] add ax,[dylAbove] add ax,[dylBelow] jnz LSetFSomeDirty call LN_IMacPlcTable cmp ax,[dlMacOld] jl LSetFSomeDirty ; { ; /* we probably have a dl that has a frame line in the ; /* middle of a DR. ; /**/ ; pdrTable->fDirty = fTrue; ;PAUSE or [si.fDirtyDr],maskFDirtyDr ; GetPlc(pdrTable->hplcedl,dlMacOld-1,&edlLast); mov cx,[dlMacOld] dec cx call LN_GetPlcTable ; edlLast.fDirty = fTrue; or [edlLast.fDirtyEdl],maskFDirtyEdl ; PutPlcLast(pdrTable->hplcedl,dlMacOld-1,&edlLast); ; #ifdef DEBUG ; # define PutPlcLast(h, i, pch) PutPlcLastDebugProc(h, i, pch) ; #else ; # define PutPlcLast(h, i, pch) PutPlcLastProc() ; #endif ; } ifdef DEBUG push [si.hplcedlDr] mov ax,[dlMacOld] dec ax push ax lea ax,[edlLast] push ax cCall PutPlcLastDebugProc,<> else ; !DEBUG call LN_PutPlcLast endif ; DEBUG ; } ; } ; fSomeDrDirty |= pdrTable->fDirty && !fTtpDr; LSetFSomeDirty: test [si.fDirtyDr],maskFDirtyDr jz LSetDylNew ;PAUSE cmp [fTtpDr],0 jnz LSetDylNew mov [fSomeDrDirty],fTrue ; } ; if (!fTtpDr) LSetDylNew: cmp [fTtpDr],0 jnz UT690 ; dylNew = max(dylNew, pdrTable->dyl); ;PAUSE mov ax,[si.dylDr] cmp ax,[dylNew] jle UT690 mov [dylNew],ax UT690: ; Win(fRMark |= pdrTable->fRMark;) ;PAUSE test [si.fRMarkDr],maskFRMarkDr je UT695 mov [fRMark],fTrue UT695: ; /* advance the cp */ ; cp = CpMacPlc ( pdrTable->hplcedl ); push [si.hplcedlDr] cCall CpMacPlc,<> mov [OFF_cp],ax mov [SEG_cp],dx ; FreePdrf(&drfFetch); call LN_FreePdrf ; } /* end of for idrTable loop */ inc [idrTable] jmp LIdrLoopTest LIdrLoopEnd: ; idrMacTable = (*hpldrTable)->idrMac = itcMac + 1; mov bx,[hpldrTable] mov bx,[bx] mov cx,[itcMac] inc cx mov [bx.idrMacPldr],cx ; /* adjust the TTP DR to the correct height, don't want it to dangle ; /* below the PLDR/outer EDL ; /**/ ; pdrTable = PdrFetch(hpldrTable, itcMac, &drfFetch); ; cx = itcMac + 1 dec cx call LN_PdrFetch ; if (pdrTable->yl + pdrTable->dyl + dylBelow > dylNew) mov ax,[dylNew] sub ax,[si.ylDr] sub ax,[dylBelow] cmp ax,[si.dylDr] jge LFreeDrMac ; { ; pdrTable->dyl = dylNew - pdrTable->yl - dylBelow; ; ax = dylNew - pdrTable->yl - dylBelow mov [si.dylDr],ax ; Assert(IMacPlc(pdrTable->hplcedl) == 1); ifdef DEBUG push ax push bx push cx push dx push [si.hplcedlDr] cCall IMacPlc,<> dec ax jz UT700 mov ax,midDisptbn2 mov bx,1559 cCall AssertProcForNative,<ax,bx> UT700: pop dx pop cx pop bx pop ax endif ; DEBUG ; if (dylOld >= dylNew) mov ax,[dylOld] cmp ax,[dylNew] jl LFreeDrMac ; { ; GetPlc(pdrTable->hplcedl, 0, &edlLast); xor cx,cx call LN_GetPlcTable ; edlLast.fDirty = fFalse; and [edlLast.fDirtyEdl],not maskFDirtyEdl ; PutPlcLast(pdrTable->hplcedl, 0, &edlLast); ; #ifdef DEBUG ; # define PutPlcLast(h, i, pch) PutPlcLastDebugProc(h, i, pch) ; #else ; # define PutPlcLast(h, i, pch) PutPlcLastProc() ; #endif ; } ifdef DEBUG push [si.hplcedlDr] xor ax,ax push ax lea ax,[edlLast] push ax cCall PutPlcLastDebugProc,<> else ; !DEBUG call LN_PutPlcLast endif ; DEBUG ; pdrTable->fDirty = fFalse; and [si.fDirtyDr],not maskFDirtyDr ; } ; } LFreeDrMac: ; FreePdrf(&drfFetch); call LN_FreePdrf ; Assert ( cp == caTap.cpLim ); ifdef DEBUG push ax push bx push cx push dx mov ax,[OFF_cp] mov dx,[SEG_cp] cmp ax,[caTap.LO_cpLimCa] jnz UT710 cmp dx,[caTap.HI_cpLimCa] jz UT720 UT710: mov ax,midDisptbn2 mov bx,1622 cCall AssertProcForNative,<ax,bx> UT720: pop dx pop cx pop bx pop ax endif ; DEBUG ; /* At this point, we have scanned the row of the table, ; /* found the fTtp para, and updated the cell's DR's up ; /* to the height of the old EDL. We know ; /* the number of cells/DRs in the row of the table. We now ; /* adjust the height of the mother EDL to the correct row height. ; /**/ ; if (fAbsHgtRow) cmp [fAbsHgtRow],0 jz LUpdateHeight ; { ; dylNew -= dylAbove + dylBelow; ; native note: we'll keep this transient value of dylNew in registers ;PAUSE mov si,[dylNew] sub si,[dylAbove] sub si,[dylBelow] ; for ( idrTable = itcMac; idrTable--; FreePdrf(&drfFetch)) ; di = &drfFetch, si = dylNew mov cx,[itcMac] LLoop2Body: dec cx push cx ; save idrTable ; { ; /* this depends on the theory that we never need a second ; /* pass for an absolute height row ; /**/ ; pdrTable = PdrFetch(hpldrTable, idrTable, &drfFetch); ; si = dylNew, di = &drfFetch, cx = idrTable call LN_PdrFetch ; now, ax = dylNew, si = pdrTable, di = &drfFetch ; if (pdrTable->dyl >= dylNew) cmp ax,[si.dylDr] jg UT725 ; { ; pdrTable->fCantGrow = fTrue; ;PAUSE or [si.fCantGrowDr],maskFCantGrowDr ; pdrTable->dyl = dylNew; mov [si.dylDr],ax jmp short LLoop2Next ; } ; else UT725: ; pdrTable->fCantGrow = fFalse; and [si.fCantGrowDr],not maskFCantGrowDr ; pdrTable->fDirty = fFalse; and [si.fDirtyDr],not maskFDirtyDr ; } LLoop2Next: xchg ax,si ; save dylNew call LN_FreePdrf pop cx ; restore itcTable jcxz LLoop2Exit jmp short LLoop2Body LLoop2Exit: ; dylNew += dylAbove + dylBelow; ; native note: didn't store the transient value in [dylNew], so no ; need to restore it... ; } LUpdateHeight: ; /* update hpldr and edl to correct height now for second scan, ; old height still in dylOld */ ; (*hpldrTable)->dyl = edl.dyp = dylNew; mov ax,[dylNew] mov [edl.dypEdl],ax mov bx,[hpldrTable] mov bx,[bx] mov [bx.dylPldr],ax ; if (dylNew == dylOld || (!fSomeDrDirty && !fLastRow)) ; ax = dylNew cmp ax,[dylOld] je UT730 mov al,[fSomeDrDirty] or al,[fLastRow] jnz UT735 UT730: ; goto LFinishTable; ;PAUSE jmp LFinishTable UT735: ; if (fOverflowDrs = (fPageView && dylNew > dylLimPldr - dylBelow)) ;PAUSE xor cx,cx ; clear high byte mov cl,[fPageView] mov ax,[dylNew] sub ax,[dylLimPldr] add ax,[dylBelow] jg UT740 xor cx,cx UT740: mov [fOverflowDrs],cl jcxz LChkLastRow ; { ; pdrT = PdrFetchAndFree(hpldr,idr,&drfFetch); ; di = &drfFetch ;PAUSE push [hpldr] push [idr] push di ifdef DEBUG cCall S_PdrFetchAndFree,<> else cCall N_PdrFetchAndFree,<> endif xchg ax,si ; if ((dylNew < pdrT->dyl || pdrT->lrk == lrkAbs) && !pdrT->fCantGrow) mov ax,[dylNew] cmp ax,[si.dylDr] jl UT745 cmp [si.lrkDr],lrkAbs jne UT750 UT745: test [si.fCantGrowDr],maskFCantGrowDr jnz UT750 ; /* force a repagination next time through */ ; { ; /* to avoid infinite loops, we won't repeat if the ; DRs are brand new */ ; pwwd = PwwdWw(ww); ;PAUSE call LN_PwwdWw xchg ax,bx ; pwwd->fDrDirty |= !pwwd->fNewDrs; test [bx.fNewDrsWwd],maskfNewDrsWwd jnz UT750 or [bx.fDrDirtyWwd],maskfDrDirtyWwd UT750: ; } ; for ( idrTable = itcMac; idrTable--; FreePdrf(&drfFetch)) mov si,[dylLimDr] mov cx,[itcMac] LLoop3Body: dec cx push cx ; save idrTable ; { ; pdrTable = PdrFetch(hpldrTable, idrTable, &drfFetch); ; cx = idrTable, si = dylLimDr, di = &drfFetch call LN_PdrFetch ; REVIEW - do I need to specify the stack segment? pop cx ; recover idrTable push cx ; save it back again ; if (pdrTable->dyl > dylLimDr) ; cx = idrTable, ax = dylLimDr, si = pdrTable, di = &drfFetch cmp ax,[si.dylDr] jge UT760 ; pdrTable->dyl = dylLimDr; mov [si.dylDr],ax UT760: pop cx push cx xchg ax,si ; save dylLimDr in si call LN_FreePdrf pop cx ; restore idrTable jcxz UT770 jmp short LLoop3Body UT770: ; } ; /* doctor dylNew and fix earlier mistake */ ; dylNew = dylLimPldr; mov ax,[dylLimPldr] mov [dylNew],ax ; (*hpldrTable)->dyl = edl.dyp = dylNew; ; ax = dylNew mov [edl.dypEdl],ax mov bx,[hpldrTable] mov bx,[bx] mov [bx.dylPldr],ax ; } LChkLastRow: ; if (fLastRow && fFrameLines) cmp [fLastRow],0 jz UT800 cmp [fFrameLines],0 jnz UT810 UT800: ;PAUSE jmp LSecondPass UT810: ; { ; /* Here we decide what cells have to be drawn because of the bottom frame ; /* line. State: All cells are updated to the original height of the edl, ; /* the last EDL of every cell that was drawn in the first update pass ; /* has been set dirty (even if the fDirty bit for the DR is not set) ; /* and does not have a bottom frame line. ; /**/ ; pwwd = PwwdWw(ww); ; fDrawBottom = dylBelow == 0 && YwFromYl(hpldrTable,dylNew) <= pwwd->rcwDisp.ywBottom; xor cx,cx cmp [dylBelow],cx jnz UT820 call LN_PwwdWw xchg ax,si ; save in less volatile register push [hpldrTable] push [dylNew] cCall YwFromYl,<> xor cx,cx cmp ax,[si.rcwDispWwd.ywBottomRc] jg UT820 errnz <fTrue-1> inc cl UT820: mov [fDrawBottom],cl ; Mac(cbBmbSav = vcbBmb); ifdef MAC move.w vcbBmb,cbBmbSav ; mem-to-mem moves, what a concept!! endif ; fLastDlDirty = fFalse; mov [fLastDlDirty],fFalse ; for ( idrTable = 0; idrTable < itcMac/*skip TTP*/; FreePdrf(&drfFetch),++idrTable ) ; native note: run the loop in the other direction... ;PAUSE mov si,[dylOld] mov cx,[itcMac] LLoop4Body: ;PAUSE dec cx ; decrement idrTable push cx ; save idrTable ; { ; pdrTable = PdrFetch(hpldrTable, idrTable, &drfFetch); ; cx = idrTable, si = dylOld call LN_PdrFetch ; if (pdrTable->fDirty) ; now ax = dylOld, si = pdrTable, di = &drfFetch push ax ; save dylOld for easy restore test [si.fDirtyDr],maskFDirtyDr jz UT840 ; { ; /* If the DR is dirty, there is little chance of a frame line ; /* problem. The test below catches the possible cases. ; /**/ ; if (pdrTable->yl + pdrTable->dyl >= dylOld && dylOld < dylNew) ; ax = dylOld, si = pdrTable, di = &drfFetch ;PAUSE mov cx,[si.ylDr] add cx,[si.dylDr] cmp cx,ax jl UT830 cmp ax,[dylNew] jge UT830 ; dylBottomFrameDirty = 1; mov [dylBottomFrameDirty],1 ; continue; UT830: ;PAUSE jmp short LLoop4Cont ; } UT840: ; dylDr = pdrTable->yl + pdrTable->dyl; ; GetPlc ( pdrTable->hplcedl, dlLast = IMacPlc(pdrTable->hplcedl) - 1, &edlLast ); call LN_IMacPlcTable dec ax mov [dlLast],ax xchg ax,cx call LN_GetPlcTable mov ax,[si.ylDr] add ax,[si.dylDr] mov cx,ax pop ax ; restore dylOld push ax ; re-save it ; /* does the last dl of the cell lack a needed bottom frame ? */ ; if ( (dylDr == dylNew && dylNew < dylOld && fDrawBottom) ; ax = dylOld, cx = dylDr, si = pdrTable, di = &drfFetch cmp cx,[dylNew] jne UT850 cmp cx,ax ; native note by first condition, cx = dylDr = dylNew jge UT850 cmp [fDrawBottom],0 jnz UT860 ; /* OR does the last dl have an unneeded bottom frame? */ ; || (dylDr == dylOld && dylOld < dylNew ) ) UT850: ; ax = dylOld, cx = dylDr, si = pdrTable, di = &drfFetch ;PAUSE cmp ax,cx jne UT870 cmp ax,[dylNew] jge UT870 ;PAUSE UT860: ; { ; /* verbose for native compiler bug */ ; fLastDlDirty = fTrue; ;PAUSE mov [fLastDlDirty],fTrue ; edlLast.fDirty = fTrue; or [edlLast.fDirtyEdl],maskFDirtyEdl ; pdrTable->fDirty = fTrue; or [si.fDirtyDr],maskFDirtyDr ; PutPlcLast ( pdrTable->hplcedl, dlLast, &edlLast ); ifdef DEBUG push [si.hplcedlDr] push [dlLast] lea ax,[edlLast] push ax cCall PutPlcLastDebugProc,<> else ; !DEBUG call LN_PutPlcLast endif ; DEBUG UT870: ; } LLoop4Cont: ; now di = &drfFetch; dylOld and idrTable stored on stack call LN_FreePdrf pop si ; recover dylOld pop cx ; recover idrTable jcxz UT900 jmp short LLoop4Body UT900: ; } /* end of for pdrTable loop */ ; /* If we are doing the second update scan only to redraw the last ; /* rows with the bottom border, then have DisplayFli use an ; /* off-screen buffer to avoid flickering. ; /**/ ; if ( fLastDlDirty && !fSomeDrDirty ) ; { ; Mac(vcbBmb = vcbBmbPerm); ; fSomeDrDirty = fTrue; ; } ; native note: because we don't have to play games with an offscreen ; buffer, the net effect of the above for !MAC is ; fSomeDrDirty |= fLastDlDirty; mov al,[fLastDlDirty] or [fSomeDrDirty],al ; } LSecondPass: ; /* If some DRs were not fully updated, finish updating them */ ; if (fSomeDrDirty) cmp [fSomeDrDirty],0 jnz UT905 ;PAUSE jmp LFinishTable ; { ; Break3(); some dopey mac thing ; /* If there's a potentially useful dl that's about to get ; /* blitzed, move it down some. ; /**/ ; if (dylNew > dylOld && dlOld < dlMac && dlNew < dlOld && fScrollOK) UT905: mov ax,[dylNew] cmp ax,[dylOld] jle LSetRcwInval ;PAUSE mov ax,[dlOld] cmp ax,[dlMac] jge LSetRcwInval cmp ax,[dlNew] jle LSetRcwInval cmp [fScrollOK],0 jz LSetRcwInval ; { ; GetPlc ( hplcedl, dlOld, &edlNext ); ; ax = dlOld xchg ax,cx lea ax,[edlNext] call LN_GetPlcParent ; if (edlNext.ypTop < *pypTop + dylNew) mov ax,[ypTop] add ax,[dylNew] cmp ax,[edlNext.ypTopEdl] jle UT910 ; ScrollDrDown ( ww, hpldr, idr, hplcedl, dlOld, ; dlOld, edlNext.ypTop, *pypTop + dylNew, ; ypFirstShow, ypLimWw, ypLimDr); ; ax = *pypTop + dylNew push [ww] push [hpldr] push [idr] push [hplcedl] push [dlOld] push [dlOld] push [edlNext.ypTopEdl] push ax push [ypFirstShow] push [ypLimWw] push [ypLimDr] cCall ScrollDrDown,<> UT910: ; dlMac = IMacPlc ( hplcedl ); mov ax,[hplcedl] call LN_IMacPlc mov [dlMac],ax ; } ; ; rcwTableInval.ywTop += *pypTop + min(dylNew,dylOld) - dylBottomFrameDirty; LSetRcwInval: mov ax,[dylNew] cmp ax,[dylOld] jle UT920 mov ax,[dylOld] UT920: add ax,[ypTop] sub ax,[dylBottomFrameDirty]; add [rcwTableInval.ywTopRc],ax ; rcwTableInval.ywBottom += *pypTop + max(dylNew,dylOld); mov ax,[dylNew] cmp ax,[dylOld] jge UT930 mov ax,[dylOld] UT930: add ax,[ypTop] add [rcwTableInval.ywBottomRc],ax ; ; DrawEndmark ( ww, hpldr, idr, *pypTop + edl.dyp, *pypTop + dylNew, emkBlank ); push [ww] push [hpldr] push [idr] mov ax,[ypTop] add ax,[edl.dypEdl] push ax mov ax,[ypTop] add ax,[dylNew] push ax errnz <emkBlank> xor ax,ax push ax cCall DrawEndMark,<> ; ; for ( idrTable = 0; idrTable < idrMacTable; ++idrTable ) ; native note: try the backwards loop and see how it looks... ;PAUSE mov cx,[idrMacTable] LLoop5Body: dec cx push cx ; save idrTable ; { ; pdrTable = PdrFetch(hpldrTable,idrTable,&drfFetch); ; cx = idrTable call LN_PdrFetch ; if ( pdrTable->fDirty ) test [si.fDirtyDr],maskFDirtyDr jz LLoop5Cont ; { ; /* Since we have already filled in the PLCEDL for the DR, ; /* the chance of this failing seems pretty small. It won't ; /* hurt to check, however. ; /**/ ; if (fIncr || !FUpdTableDr(ww,hpldrTable,idrTable)) ; if (!FUpdateDr(ww,hpldrTable,idrTable,rcwTableInval,fFalse,udmodTable,cpNil)) ; goto LFreeAndAbort; ; NOTE: the local routine also does the assert with DypHeightTc mov al,[fIncr] ; flag to helper routine pop cx ; recover idrTable push cx ; re-save idrTable lea bx,[rcwTableInval] ;PAUSE call LN_FUpdateOneDr jnz UT950 ;PAUSE pop cx jmp LFreeAndAbortUT UT950: ; if (fOverflowDrs && pdrTable->dyl > dylLimDr) ;PAUSE cmp [fOverflowDrs],0 jz UT960 ;PAUSE mov ax,[dylLimDr] cmp ax,[si.dylDr] jge UT960 ; pdrTable->dyl = dylLimDr; mov [si.dylDr],ax UT960: ; } LLoop5Cont: ; Win(fRMark |= pdrTable->fRMark;) ;PAUSE test [si.fRMarkDr],maskFRMarkDr je UT965 mov [fRMark],fTrue UT965: ; FreePdrf(&drfFetch); ; di = &drfFetch call LN_FreePdrf pop cx jcxz UT970 jmp short LLoop5Body ; } UT970: ; ick! Mac stuff ; if ( fLastRow ) ; Mac(vcbBmb = cbBmbSav); ; } /* end of if fSomeDrDirty */ LFinishTable: ; /* Now, clear out bits in edl not already drawn and draw cell ; /* borders. ; /**/ ; Assert(edl.dyp == dylNew); ;PAUSE ifdef DEBUG push ax push bx push cx push dx mov ax,[edl.dypEdl] cmp ax,[dylNew] je UT980 mov ax,midDisptbn2 mov bx,2324 cCall AssertProcForNative,<ax,bx> UT980: pop dx pop cx pop bx pop ax endif ; DEBUG ; FrameTable(ww,doc,caTapCur.cpFirst,hpldrTable, dylNew, fFirstRow, fLastRow ); push [ww] push [doc] push [caTapCur.HI_cpFirstCa] push [caTapCur.LO_cpFirstCa] push [hpldrTable] lea ax,[edl] push ax xor ax,ax mov al,[fFirstRow] push ax mov al,[fLastRow] push ax cCall FrameTable,<> ; /* update edl and pldrT to reflect what we have done */ ; edl.fDirty = edl.fTableDirty = fFalse; errnz <fDirtyEdl-fTableDirtyEdl> and [edl.fDirtyEdl],not (maskFDirtyEdl or maskFTableDirtyEdl) ; edl.dcp = cp - CpPlc(hplcedl,dlNew); push [hplcedl] push [dlNew] cCall CpPlc,<> mov bx,[OFF_cp] mov cx,[SEG_cp] sub bx,ax sbb cx,dx ; now, <bx,cx> = cp - CpPlc() mov [edl.LO_dcpEdl],bx mov [edl.HI_dcpEdl],cx ; ; /* because of the way borders and frame lines are drawn, ; /* a table row always depends on the next character ; /**/ ; edl.dcpDepend = 1; mov [edl.dcpDependEdl],1 ; ; PutPlc ( hplcedl, dlNew, &edl ); call LN_PutPlc ifdef WIN ifndef BOGUS ; if (fRMark) ; DrawTableRevBar(ww, idr, dlNew); ;PAUSE cmp [fRMark],0 jz UT990 push [ww] push [idr] push [dlNew] cCall DrawTableRevBar,<> UT990: else ; BOGUS ; if (vfRevBar) mov cx,[vfRevBar] jcxz UT1190 ; { ; int xwRevBar; ; ; if (!(pwwd = PwwdWw(ww))->fPageView) ;#define dxwSelBarSci vsci.dxwSelBar ;PAUSE push di ; save &drfFetch mov di,[vsci.dxwSelBarSci] ; store value is safe register sar di,1 ; for use later call LN_PwwdWw xchg ax,si test [si.fPageViewWwd],maskfPageViewWwd jnz UT1100 ; xwRevBar = pwwd->xwSelBar + dxwSelBarSci / 2; ; si = pwwd, di = [dxwSelBarSci]/2 mov ax,[si.xwSelBarWwd] jmp short UT1180 ; else ; { ; switch (PdodMother(doc)->dop.irmBar) UT1100: ; si = pwwd, di = [dxwSelBarSci]/2 push [doc] cCall N_PdodMother,<> xchg ax,bx mov al,[bx.dopDod.irmBarDop] errnz <irmBarLeft-1> dec al je UT1130 errnz <irmBarRight-irmBarLeft-1> dec al je UT1140 ; #ifdef DEBUG ; default: ; Assert(fFalse); ; /* fall through */ ; #endif ifdef DEBUG push ax push bx push cx push dx dec al je UT1110 mov ax,midDisptbn2 mov bx,2423 cCall AssertProcForNative,<ax,bx> UT1110: pop dx pop cx pop bx pop ax endif ; DEBUG ; { ; case irmBarOutside: ; if (vfmtss.pgn & 1) ; goto LRight; test [vfmtss.pgnFmtss],1 jnz UT1140 ; /* fall through */ ; case irmBarLeft: UT1130: ; xwRevBar = XwFromXp( hpldrTable, 0, edl.xpLeft ) ; - (dxwSelBarSci / 2); ; si = pwwd, di = [dxwSelBarSci]/2 neg di ; so that it will get subtracted db 0A8h ;turns next "stc" into "test al,immediate" ;also clears the carry flag ; break; ; case irmBarRight: ; LRight: ; xwRevBar = XwFromXp( hpldrTable, 0, edl.xpLeft + edl.dxp) ; + (dxwSelBarSci / 2); UT1140: stc mov ax,[edl.xpLeftEdl] jnc UT1150 add ax,[edl.dxpEdl] UT1150: push [hpldrTable] xor cx,cx push cx push ax cCall XwFromXp,<> ; break; ; } ; } ; DrawRevBar( PwwdWw(ww)->hdc, xwRevBar, ; YwFromYl(hpldrTable,0), dylNew); UT1180: ; ax + di = xwRevBar, si = pwwd add ax,di ; si = pwwd, ax = xwRevBar push [si.hdcWwd] ; some arguments push ax ; for DrawRevBar push [hpldrTable] xor ax,ax push ax cCall YwFromYl,<> push ax push [dylNew] cCall DrawRevBar,<> pop di ; restore &drfFetch UT1190: ; } endif ; BOGUS ; /* draw the style name area and border for a table row */ ; if (PwwdWw(ww)->xwSelBar) call LN_PwwdWw xchg ax,si mov cx,[si.xwSelBarWwd] jcxz UT1200 ; { ; DrawStyNameFromWwDl(ww, hpldr, idr, dlNew); ;PAUSE push [ww] push [hpldr] push [idr] push [dlNew] cCall DrawStyNameFromWwDl,<> ; } UT1200: endif ; WIN ; /* advance the caller's cp and ypTop */ ; *pcp = cp; mov bx,[pcp] mov ax,[OFF_cp] mov [bx],ax mov ax,[SEG_cp] mov [bx+2],ax ; *pypTop += dylNew; ; Assert(*pypTop == ypTop); ifdef DEBUG push ax push bx push cx push dx mov bx,[pypTop] mov ax,[bx] cmp ax,[ypTop] jz UT1210 mov ax,midDisptbn2 mov bx,2213 cCall AssertProcForNative,<ax,bx> UT1210: pop dx pop cx pop bx pop ax endif ; DEBUG mov bx,[pypTop] mov ax,[dylNew] add [bx],ax ; return fTrue; /* it worked! */ mov ax,fTrue ; } LExitUT: cEnd ; NATIVE NOTE: these are short cut routines used by FUpdateTable to ; reduce size of common calling seqeuences. ; upon entry: ax = dya ; upon exit: ax = dyp, + the usual registers trashed ; #define DypFromDya(dya) NMultDiv((dya), vfti.dypInch, czaInch) LN_DypFromDya: ;PAUSE push ax push [vfti.dypInchFti] mov ax,czaInch push ax cCall NMultDiv,<> ret ; upon entry: di = pdrf ; upon exit: the usual things munged LN_FreePdrf: push di ifdef DEBUG cCall S_FreePdrf,<> else cCall N_FreePdrf,<> endif ret ; LN_GetPlcTable = GetPlc(((DR*)si)->hplcedl, cx, &edlLast); ; LN_GetPlcParent = GetPlc(hplcedl, cx, ax); LN_GetPlcTable: lea ax,[edlLast] push [si.hplcedlDr] jmp short UT2000 LN_GetPlcParent: push [hplcedl] UT2000: push cx push ax cCall GetPlc,<> ret ; upon entry: si = pdrTable ; upon exit: ax = IMacPlc(pdrTable->hplcedl); ; plus the usual things munged LN_IMacPlcTable: mov ax,[si.hplcedlDr] ; upon entry: ax = hplcedl ; upon exit: ax = IMacPlc(pdrTable->hplcedl); ; plus the usual things munged LN_IMacPlc: push ax cCall IMacPlc,<> ret ; call this one for PdrFetch(hpldrTable, idrTable, &drfFetch); ; upon entry: di = &drfFetch ; upon exit: ax = old si value, si = pdr NOTE RETURN VALUE IN SI!!!! ; plus the usual things munged LN_PdrFetchTable: mov cx,[idrTable] ; call this one for PdrFetch(hpldrTable, ax, &drfFetch); ; upon entry: cx = idr, di = &drfFetch ; upon exit: ax = old si value, si = pdr NOTE RETURN VALUE IN SI!!!! ; plus the usual things munged LN_PdrFetch: push [hpldrTable] push cx push di ifdef DEBUG cCall S_PdrFetch,<> else cCall N_PdrFetch,<> endif xchg ax,si ret ; does PutPlc(hplcedl, dlNew, &edl) LN_PutPlc: push [hplcedl] push [dlNew] lea ax,[edl] push ax cCall PutPlc,<> ret ifndef DEBUG LN_PutPlcLast: cCall PutPlcLastProc,<> ret endif ; not DEBUG LN_PwwdWw: push [ww] cCall N_PwwdWw,<> ret LN_SetFCantGrow: ; pdrTable->fCantGrow = pdrTable->dyl >= dylLimDr && (fPageView || fAbsHgtRow); ; si = pdrTable and [si.fCantGrowDr],not maskFCantGrowDr ; assume fFalse mov ax,[si.dylDr] cmp ax,[dylLimDr] jl UT2050 ;PAUSE mov al,[fPageView] or al,[fAbsHgtRow] jz UT2050 ;PAUSE or [si.fCantGrowDr],maskFCantGrowDr ; assumption failed, fix it UT2050: ret LN_FUpdateOneDr: ; this is equivalent to: ; if ((al != 0) || !FUpdTableDr(ww, hpldrTable, cx=idrTable)) ; if (!FUpdateDr(ww,hpldrTable,cx,*(RC*)bx,fFalse,udmodTable,cpNil)) ; return fFalse; ; return fTrue; ; ; upon entry: ax = fTrue iff FUpdTableDr should be SKIPPED ; upon exit: ax = fTrue iff things worked, AND condition codes set accordingly ; ; if ((al != 0) || !FUpdTableDr(ww,hpldrTable,idrTable)) or al,al jnz UT2100 push bx ; save prc push cx ; save idrTable push [ww] push [hpldrTable] push cx ifdef DEBUG cCall S_FUpdTableDr,<> else call LN_FUpdTableDr endif pop cx ; recover idrTable pop bx ; recover prcwInval or ax,ax jnz UT2110 ; if (!FUpdateDr(ww,hpldrTable,idrTable,rcwTableInval,fFalse,udmodTable,cpNil)) UT2100: ;PAUSE push [ww] push [hpldrTable] push cx errnz <cbRcMin-8> push [bx+6] push [bx+4] push [bx+2] push [bx] xor ax,ax push ax errnz <udmodTable-2> inc ax inc ax push ax errnz <LO_CpNil+1> errnz <HI_CpNil+1> mov ax,LO_CpNil push ax push ax ifdef DEBUG cCall S_FUpdateDr,<> else cCall N_FUpdateDr,<> endif ; DEBUG UT2110: ifdef ENABLE ; /* FUTURE: this is bogus for windows, since DypHeightTc returns the height ; /* in printer units, not screen units. Further, it is questionable to call ; /* DypHeightTc without setting up vlm and vflm. ; /* ; /* Enable this next line to check that FUpdate table yields the same height ; /* as does DypHeightTc using the FormatLine and PHE's, slows down redrawing. ; /**/ ifdef DEBUG ; CacheTc(ww, doc, pdrTable->cpFirst, fFirstRow, fLastRow); ;PAUSE push ax push bx push cx push dx push [ww] push [doc] push [si.HI_cpFirstDr] push [si.LO_cpFirstDr] xor ax,ax mov al,[fFirstRow] push ax mov al,[fLastRow] push ax cCall CacheTc,<> ; Assert ( DypHeightTc(ww,doc,pdrTable->cpFirst) == pdrTable->dyl ); push [ww] push [doc] push [si.HI_cpFirstDr] push [si.LO_cpFirstDr] cCall DypHeightTc,<> cmp ax,[si.dylDr] je UT2120 mov ax,midDisptbn2 mov bx,2391 cCall AssertProcForNative,<ax,bx> UT2120: pop dx pop cx pop bx pop ax endif endif or ax,ax ret ;Did this DEBUG stuff with a call so as not to mess up short jumps. ; Assert(pdrT->doc == pdrTable->doc); ifdef DEBUG UT2130: push ax push bx push cx push dx mov cx,[si.docDr] cmp cx,[bx.docDr] jz UT2140 mov ax,midDisptbn2 mov bx,2869 cCall AssertProcForNative,<ax,bx> UT2140: pop dx pop cx pop bx pop ax ret endif ;DEBUG ; /* F U P D A T E T A B L E D R ; /* ; /* Description: Attempt to handle the most common table dr update ; /* in record time by simply calling FormatLine and DisplayFli. ; /* If simple checks show we have updated the entire DR, return ; /* fTrue, else record the EDL we wrote and return fFalse so that ; /* FUpdateDr() gets called to finish the job. ; /**/ ; %%Function:FUpdTableDr %%Owner:tomsax ; NATIVE FUpdTableDr(ww, hpldr, idr) ; int ww; ; struct PLDR **hpldr; ; int idr; ; { ; int dlMac; ; BOOL fSuccess, fOverflow; native note: fOverflow not necessary ; struct PLC **hplcedl; native note: won't be using this one ; struct DR *pdr; native note: register variable ; struct WWD *pwwd; ; struct EDL edl; ; struct DRF drf; ; ; register usage: ; si = pdr ; ifdef DEBUG cProc N_FUpdTableDr,<PUBLIC,FAR>,<si,di> else cProc LN_FUpdTableDr,<PUBLIC,NEAR>,<si,di> endif ParmW ww ParmW hpldr ParmW idr LocalW dlMac LocalW rgf ; first byte is fSuccess, second is fOverflow LocalW pwwd LocalV edl,cbEdlMin LocalV drf,cbDrfMin cBegin ; pdr = PdrFetch(hpldr, idr, &drf); ;PAUSE push [hpldr] push [idr] lea bx,[drf] push bx ifdef DEBUG cCall S_PdrFetch,<> else cCall N_PdrFetch,<> endif xchg ax,si ; fSuccess = fFalse; ; native note: di is used as a zero register xor di,di ; native note: fOverflow also initialized to zero errnz <fFalse> mov [rgf],di ; hplcedl = pdr->hplcedl; ; native note, forget this... ; Assert(hplcedl != hNil && (*hplcedl)->iMax > 1); ifdef DEBUG push ax push bx push cx push dx cmp [si.hplcedlDr],hNil jz UTD010 mov bx,[si.hplcedlDr] mov bx,[bx] cmp [bx.iMaxPlc],1 jg UTD020 UTD010: mov ax,midDisptbn2 mov bx,2809 cCall AssertProcForNative,<ax,bx> UTD020: pop dx pop cx pop bx pop ax endif ; DEBUG ; if ((dlMac = IMacPlc(hplcedl)) > 0) ; di = 0 mov bx,[si.hplcedlDr] mov bx,[bx] cmp [bx.iMacPlcSTR],di jle UTD040 ; { ; GetPlc(hplcedl, 0, &edl); ;PAUSE ; di = 0 push [si.hplcedlDr] push di ; 0 lea ax,[edl] push ax cCall GetPlc,<> ; Assert(edl.hpldr == hNil); /* no need to FreeEdl */ ifdef DEBUG push ax push bx push cx push dx cmp [edl.hpldrEdl],hNil je UTD030 mov ax,midDisptbn2 mov bx,2839 cCall AssertProcForNative,<ax,bx> UTD030: pop dx pop cx pop bx pop ax endif ; DEBUG ; if (!edl.fDirty) ; goto LRet; test [edl.fDirtyEdl],maskFDirtyEdl jnz UTD040 ;PAUSE UTDTemp: jmp LExitUTD ; } UTD040: ; FormatLineDr(ww, pdr->cpFirst, pdr); ; di = 0 push [ww] push [si.HI_cpFirstDr] push [si.LO_cpFirstDr] push si ifdef DEBUG cCall S_FormatDrLine,<> else cCall N_FormatDrLine,<> endif ; /* cache can be blown by FormatLine */ ; CpFirstTap(pdr->doc, pdr->cpFirst); ; di = 0 push [si.docDr] push [si.HI_cpFirstDr] push [si.LO_cpFirstDr] cCall CpFirstTap,<> ; pwwd = PwwdWw(ww); /* verbose for native compiler bug */ ; fOverflow = vfli.dypLine > pdr->dyl; ; native note: not a problem here! wait till we need it to compute it ; same for fOverflow ; if (fSuccess = vfli.fSplatBreak ; fSuccess set to false above... ; di = 0 test [vfli.fSplatBreakFli],maskFSplatBreakFli jz UTDTemp ; && vfli.chBreak == chTable ;PAUSE cmp [vfli.chBreakFli],chTable jne UTDTemp ; && (!fOverflow ;PAUSE mov cx,[vfli.dypLineFli] cmp cx,[si.dylDr] jle UTD060 errnz <maskFDirtyDr-1> inc bptr [rgf+1] ; sleazy bit trick, fill in the bit we want ; || idr == vtapFetch.itcMac ;PAUSE mov ax,[idr] cmp ax,[vtapFetch.itcMacTap] je UTD060 ; || YwFromYp(hpldr,idr,pdr->dyl) >= pwwd->rcwDisp.ywBottom)) ;PAUSE ; di = 0 push [ww] cCall N_PwwdWw,<> push ax ; we'll want this in a second here... push [hpldr] push [idr] push [si.dylDr] cCall YwFromYp,<> pop bx ; recover pwwd from above cmp ax,[bx.rcwDispWwd.ywBottomRc] jl LExitUTD ;PAUSE UTD060: errnz <fTrue-1> inc bptr [rgf] ; fSuccess = fTrue ** we win!!! ; { ; DisplayFli(ww, hpldr, idr, 0, vfli.dypLine); ; di = 0 push [ww] push [hpldr] push [idr] push di push [vfli.dypLineFli] ifdef DEBUG cCall S_DisplayFli,<> else cCall N_DisplayFli,<> endif ; pdr->dyl = vfli.dypLine; mov ax,[vfli.dypLineFli] mov [si.dylDr],ax ; pdr->fDirty = fOverflow; and [si.fDirtyDr],not maskFDirtyDr mov al,bptr [rgf+1] or [si.fDirtyDr],al ; pdr->fRMark = vfli.fRMark; ;PAUSE and [si.fRMarkDr],not maskFRMarkDr test [vfli.fRMarkFli],maskFRMarkFli je UTD070 or [si.fRMarkDr],maskFRMarkDr UTD070: ; DlkFromVfli(hplcedl, 0); ; PutCpPlc(hplcedl, 1, vfli.cpMac); ; PutIMacPlc(hplcedl, 1); ;PAUSE ; di = 0 mov bx,[si.hplcedlDr] ; arguments push bx inc di ; == 1 push di ; PutIMacPlc push bx ; arguments for push di ; PutCpPlc push [vfli.HI_cpMacFli] push [vfli.LO_cpMacFli] push bx dec di push di cCall DlkFromVfli,<> cCall PutCpPlc,<> cCall PutIMacPlc,<> ; } ; LRet: LExitUTD: ; FreePdrf(&drf); lea ax,[drf] push ax ifdef DEBUG cCall S_FreePdrf,<> else cCall N_FreePdrf,<> endif ; return fSuccess; mov al,bptr [rgf] cbw ; } cEnd ; /* F R A M E E A S Y T A B L E ; /* Description: Under certain (common) circumstances, it is possible ; /* to draw the table borders without going through all of the hoops ; /* to correctly join borders at corners. This routines handles those ; /* cases. ; /* ; /* Also uses info in caTap, vtapFetch and vtcc (itc = 0 cached). ; /**/ ; int ww; ; struct PLDR **hpldr; ; struct DR *pdrParent; ; int dyl; ; BOOL fFrameLines, fDrFrameLines, fFirstRow, fLastRow; ; HANDNATIVE C_FrameEasyTable(ww, doc, cp, hpldr, prclDrawn, pdrParent, dyl, fFrameLines, fDrFrameLines, fFirstRow, fLastRow) ; %%Function:FrameEasyTable %%Owner:tomsax cProc N_FrameEasyTable,<PUBLIC,FAR>,<si,di> ParmW <ww, doc> ParmD cp ParmW <hpldr, prclDrawn, pdrParent, dyl> ParmW <fFrameLines, fDrFrameLines, fFirstRow, fLastRow> ; { ; int dxwBrcLeft, dxwBrcRight, dxwBrcInside, dywBrcTop, dywBrcBottom; LocalW <dxwBrcLeft,dxwBrcRight,dxwBrcInside,dywBrcTop,dywBrcBottom> ; int dxLToW, dyLToW; LocalW <dxLToW, dyLToW> ; int xwLeft, xwRight, dylDrRow, dylDrRowM1, ywTop; ; native note: dylDrRowM1 used only in Mac version LocalW <xwLeft, xwRight, dylDrRow, ywTop> ; int itc, itcNext, itcMac; LocalW <itc, itcNext, itcMac> ; int brcCur; LocalW brcCur ; BOOL fRestorePen, fBottomFrameLine; LocalW <fRestorePen, fBottomFrameLine> ; struct DR *pdr; ; native note: registerized ; struct RC rclErase, rcw; LocalV rclErase,cbRcMin LocalV rcw,cbRcMin ; struct TCX tcx; LocalV tcx,cbTcxMin ; struct DRF drf; LocalV drf,cbDrfMin ; #ifdef WIN ; HDC hdc = PwwdWw(ww)->hdc; LocalW hdc ; struct RC rcDraw, rcwClip; LocalV rcDraw,cbRcMin LocalV rcwClip,cbRcMin ; int xwT, ywT; ; native note: registerized ; struct WWD *pwwd = PwwdWw(ww); ; native note: registerized cBegin ;PAUSE ; native note: do auto initializations... call LN_PwwdWwFET mov ax,[bx.hdcWwd] mov [hdc],ax ; ; if (pwwd->fPageView) ; bx = pwwd lea di,[rcwClip] test [bx.fPageViewWwd],maskFPageViewWwd jz FET010 ; RcwPgvTableClip(ww, (*hpldr)->hpldrBack, (*hpldr)->idrBack, &rcwClip); ;PAUSE ; di = &rcwClip push [ww] mov bx,[hpldr] mov bx,[bx] push [bx.hpldrBackPldr] push [bx.idrBackPldr] push di cCall RcwPgvTableClip,<> jmp short FET020 ; else ; rcwClip = pwwd->rcwDisp; FET010: ; bx = pwwd, di = &rcwClip lea si,[bx.rcwDispWwd] push ds pop es errnz <cbRcMin-8> movsw movsw movsw movsw FET020: ; #endif ; ; Assert(FInCa(doc, cp, &vtcc.ca)); ; Assert(vtcc.itc == 0); ; Assert(dyl > 0); ;PAUSE ifdef DEBUG push ax push bx push cx push dx push [doc] push [SEG_cp] push [OFF_cp] mov ax,dataoffset [vtcc.caTcc] push ax cCall FInCa,<> or ax,ax mov bx,3088 ; assert line number jz FET030 cmp [vtcc.itcTcc],0 mov bx,3092 ; assert line number jnz FET030 mov ax,[dyl] or ax,ax jg FET035 mov bx,3097 ; assert line number FET030: mov ax,midDisptbn2 cCall AssertProcForNative,<ax,bx> FET035: pop dx pop cx pop bx pop ax endif ;DEBUG ; native note: we clear fRestorePen here so we don't have it clear ; it every time through the loops. xor ax,ax mov [fRestorePen],ax ; dxLToW = XwFromXl(hpldr, 0); ; dyLToW = YwFromYl(hpldr, 0); ; ax = 0 push [hpldr] ; arguments push ax ; for YwFromYl push [hpldr] ; arguments push ax ; for XwFromXl cCall XwFromXl,<> mov [dxLToW],ax cCall YwFromYl,<> mov [dyLToW],ax ; ; LN_DxFromIbrc Does: ; DxFromBrc(*(int*)(si + rgbrcEasyTcc + bx), fFrameLines) lea si,[vtcc] ; dxwBrcLeft = DxFromBrc(vtcc.rgbrcEasy[ibrcLeft],fTrue/*fFrameLines*/); mov bx,ibrcLeft SHL 1 call LN_DxFromIbrc mov [dxwBrcLeft],ax ; dxwBrcRight = DxFromBrc(vtcc.rgbrcEasy[ibrcRight],fTrue/*fFrameLines*/); mov bx,ibrcRight SHL 1 call LN_DxFromIbrc mov [dxwBrcRight],ax ; dxwBrcInside = DxFromBrc(vtcc.rgbrcEasy[ibrcInside],fTrue/*fFrameLines*/); mov bx,ibrcInside SHL 1 call LN_DxFromIbrc mov [dxwBrcInside],ax ; dywBrcTop = vtcc.dylAbove; ; dywBrcBottom = vtcc.dylBelow; ; si = &vtcc mov ax,[si.dylAboveTcc] mov [dywBrcTop],ax mov cx,[si.dylBelowTcc] mov [dywBrcBottom],cx ; leave si = &vtcc, ax = dywBrcTop, cx = dywBrcBottom ; ; Assert(dywBrcTop == DyFromBrc(vtcc.rgbrcEasy[ibrcTop],fFalse/*fFrameLines*/)); ; Assert(dywBrcBottom == (fLastRow ? DyFromBrc(vtcc.rgbrcEasy[ibrcBottom],fFalse/*fFrameLines*/) : 0)); ; #define DyFromBrc(brc, fFrameLines) DxyFromBrc(brc, fFrameLines, fFalse) ; #define DxyFromBrc(brc, fFrameLines, fWidth) \ ; WidthHeightFromBrc(brc, fFrameLines | (fWidth << 1)) ifdef DEBUG ; si = &vtcc, ax = dywBrcTop, cx = dywBrcBottom push ax push bx push cx push dx mov bx,ibrcTop SHL 1 push [bx.si.rgbrcEasyTcc] xor ax,ax push ax ifdef DEBUG cCall S_WidthHeightFromBrc,<> else cCall N_WidthHeightFromBrc,<> endif cmp ax,[dywBrcTop] mov bx,3158 ; assert line number jne FET040 mov cx,[fLastRow] jcxz FET050 ;PAUSE mov bx,ibrcBottom SHL 1 push [bx.si.rgbrcEasyTcc] xor ax,ax push ax ifdef DEBUG cCall S_WidthHeightFromBrc,<> else cCall N_WidthHeightFromBrc,<> endif cmp ax,[dywBrcBottom] mov bx,3171 ; assert line number je FET050 FET040: mov ax,midDisptbn2 cCall AssertProcForNative,<ax,bx> FET050: pop dx pop cx pop bx pop ax endif ;DEBUG ; ; ywTop = dyLToW + dywBrcTop; ; si = &vtcc, ax = dywBrcTop, cx = dywBrcBottom mov dx,ax add dx,[dyLToW] mov [ywTop],dx ; dylDrRow = dyl - dywBrcTop - dywBrcBottom; add cx,ax mov ax,[dyl] sub ax,cx mov [dylDrRow],ax ; dylDrRowM1 = dylDrRow - 1; naitve note: needed only in Mac version ; itcMac = vtapFetch.itcMac; mov ax,[vtapFetch.itcMacTap] mov [itcMac],ax ; /* erase bits to the left of the PLDR */ lea di,[rclErase] push ds pop es ; rclErase.xlLeft = - pdrParent->dxpOutLeft; errnz <xlLeftRc> mov bx,[pdrParent] mov ax,[bx.dxpOutLeftDr] neg ax stosw ; rclErase.ylTop = 0; errnz <ylTopRc-2-xlLeftRc> xor ax,ax stosw ; rclErase.xlRight = vtcc.xpDrLeft - vtcc.dxpOutLeft - dxwBrcLeft; errnz <xlRightRc-2-ylTopRc> mov ax,[si.xpDrLeftTcc] sub ax,[si.dxpOutLeftTcc] sub ax,[dxwBrcLeft] stosw xchg ax,cx ; stash for later ; rclErase.ylBottom = dyl; errnz <ylBottomRc-2-xlRightRc> mov ax,[dyl] stosw ; xwLeft = rclErase.xlRight + dxLToW; /* will be handy later */ ; si = &vtcc, cx = rclErase.xlRight add cx,[dxLToW] mov [xwLeft],cx ; if (!FEmptyRc(&rclErase)) ; ClearRclInParentDr(ww,hpldr,rclErase,&rcwClip); call LN_ClearRclIfNotMT ; PenNormal(); ; #define PenNormal() /* some bogus Mac thing... */ ; /* the left border */ ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcLeft], fFalse/*fHoriz*/, fFrameLines); ;PAUSE mov bx,ibrcLeft SHL 1 call LN_SetPenBrcV ; #ifdef MAC ; MoveTo(xwLeft, ywTop); ; Line(0, dylDrRowM1); ; #else /* WIN */ ; PrcSet(&rcDraw, xwLeft, ywTop, ; xwLeft + dxpPenBrc, ywTop + dylDrRow); ; SectRc(&rcDraw, &rcwClip, &rcDraw); ; FillRect(hdc, (LPRECT)&rcDraw, hbrPenBrc); mov ax,[xwLeft] push ax mov cx,[ywTop] push cx add ax,[dxpPenBrc] push ax add cx,[dylDrRow] push cx call LN_SetSectAndFillRect ; #endif ; /* the inside borders */ ; itc = 0; ; itcNext = ItcGetTcxCache ( ww, doc, cp, &vtapFetch, itc, &tcx); xor cx,cx call LN_ItcGetTcxCache ; /* pre-compute loop invariant */ ; fBottomFrameLine = fLastRow && fFrameLines && dywBrcBottom == 0; mov cx,[fLastRow] jcxz FET055 ;PAUSE mov cx,[fFrameLines] jcxz FET055 ; cx = 0 xor cx,cx cmp [dywBrcBottom],cx jnz FET055 errnz <fTrue-1> ;PAUSE inc cx FET055: mov [fBottomFrameLine],cx ; ; ; if (itcNext >= itcMac) mov cx,[itcNext] cmp cx,[itcMac] jl FET060 ; { ; /* BEWARE the case of a single cell row, we have to hack things ; /* up a bit to avoid trying to draw a between border. ; /**/ ; if (brcCur != brcNone) ;PAUSE errnz <brcNone> mov cx,[brcCur] jcxz FET080 ; SetPenForBrc(ww, brcCur = brcNone, fFalse/*fHoriz*/, fFrameLines); call LN_SetPenBrcVNone jmp short FET080 ; } ; else if (brcCur != brcNone || brcCur != vtcc.rgbrcEasy[ibrcInside]) ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcInside], fFalse/*fHoriz*/, fFrameLines); FET060: ;PAUSE mov bx,ibrcInside SHL 1 call LN_ChkSetPenBrcV FET080: ; for ( ; ; ) ; { LInsideLoop: ifdef DEBUG push ax push bx push cx push dx cmp [fRestorePen],0 je FET085 mov ax,midDisptbn2 mov bx,3414 ; assert line number cCall AssertProcForNative,<ax,bx> FET085: pop dx pop cx pop bx pop ax endif ;DEBUG ;PAUSE ; pdr = PdrFetchAndFree(hpldr, itc, &drf); push [hpldr] push [itc] lea ax,[drf] push ax ifdef DEBUG cCall S_PdrFetchAndFree,<> else cCall N_PdrFetchAndFree,<> endif ; DEBUG xchg ax,si ; if (pdr->dyl < dylDrRow) ; si = pdr mov ax,[dylDrRow] cmp ax,[si.dylDr] jg FET087 jmp FET120 FET087: ; { ; DrclToRcw(hpldr, &pdr->drcl, &rcw); ;PAUSE ; si = pdr lea di,[rcw] push [hpldr] errnz <drclDr> push si push di cCall DrclToRcw,<> ; native note: these next four lines rearranged for efficiency... ; si = pdr, di = &rcw push ds pop es ; rcw.xwLeft -= pdr->dxpOutLeft; errnz <xwLeftRc> mov ax,[di] sub ax,[si.dxpOutLeftDr] stosw ; rcw.ywTop += pdr->dyl; errnz <ywTopRc-2-xwLeftRc> mov ax,[di] add ax,[si.dylDr] stosw ; rcw.xwRight += pdr->dxpOutRight; errnz <xwRightRc-2-ywTopRc> mov ax,[di] add ax,[si.dxpOutRightDr] stosw ; rcw.ywBottom += dylDrRow - pdr->dyl; errnz <ywBottomRc-2-xwRightRc> mov ax,[di] add ax,[dylDrRow] sub ax,[si.dylDr] stosw ; #ifdef WIN ; SectRc(&rcw, &rcwClip, &rcw); sub di,cbRcMin push di lea ax,[rcwClip] push ax push di ; #define SectRc(prc1,prc2,prcDest) FSectRc(prc1,prc2,prcDest) cCall FSectRc,<> ; #endif ; if (fBottomFrameLine) mov cx,[fBottomFrameLine] jcxz FET110 ; { ; --rcw.ywBottom; ; si = pdr, di = &rcw dec [di.ywBottomRc] ; if (fRestorePen = brcCur != brcNone) ; native note: fRestorePen was cleared above, ; so we only have to clear it if we set it mov cx,[brcCur] jcxz FET090 ;PAUSE ; SetPenForBrc(ww, brcCur = brcNone, fFalse/*fHoriz*/, fFrameLines); call LN_SetPenBrcVNone inc [fRestorePen] FET090: ; #ifdef MAC ; MoveTo(rcw.xwLeft,rcw.ywBottom); ; LineTo(rcw.xwRight-1,rcw.ywBottom); ; #else /* WIN */ ; FillRect(hdc, (LPRECT)PrcSet(&rcDraw, ; rcw.xwLeft, rcw.ywBottom, ; rcw.xwRight, rcw.ywBottom + dypPenBrc), ; hbrPenBrc); ; si = pdr, di = &rcw push [rcw.xwLeftRc] mov ax,[rcw.ywBottomRc] push ax push [rcw.xwRightRc] add ax,[dypPenBrc] push ax call LN_SetAndFillRect ; #endif ; if (fRestorePen) ; si = pdr, di = &rcw mov cx,[fRestorePen] jcxz FET100 ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcInside], fFalse/*fHoriz*/, fFrameLines); ;PAUSE mov bx,ibrcInside SHL 1 call LN_SetPenBrcV dec [fRestorePen] ; clear fRestorePen ; native note: Assert(fRestorePen == fFalse); FET100: ; if (rcw.ywTop >= rcw.ywBottom) ; goto LCheckItc; ; si = pdr, di = &rcw mov ax,[rcw.ywTopRc] cmp ax,[rcw.ywBottomRc] jge LCheckItc FET110: ; } ; EraseRc(ww, &rcw); ; si = pdr, di = &rcw ; #define EraseRc(ww, _prc) \ ; PatBltRc(PwwdWw(ww)->hdc, (_prc), vsci.ropErase) call LN_PwwdWwFET push [bx.hdcWwd] push di push [vsci.HI_ropEraseSci] push [vsci.LO_ropEraseSci] cCall PatBltRc,<> FET120: ; } LCheckItc: ; if (itcNext == itcMac) ; break; mov ax,[itcNext] cmp ax,[itcMac] je FET130 ; #ifdef MAC ; MoveTo(tcx.xpDrRight + tcx.dxpOutRight + dxLToW, ywTop); ; Line(0, dylDrRowM1); ; #else /* WIN */ ; xwT = tcx.xpDrRight + tcx.dxpOutRight + dxLToW; mov cx,[tcx.xpDrRightTcx] add cx,[tcx.dxpOutRightTcx] add cx,[dxLToW] ; PrcSet(&rcDraw, xwT, ywTop, ; xwT + dxpPenBrc, ywTop + dylDrRow); ; SectRc(&rcDraw, &rcwClip, &rcDraw); ; FillRect(hdc, (LPRECT)&rcDraw, hbrPenBrc); push cx mov ax,[ywTop] push ax add cx,[dxpPenBrc] push cx add ax,[dylDrRow] push ax call LN_SetSectAndFillRect ; #endif ; itc = itcNext; ; itcNext = ItcGetTcxCache ( ww, doc, cp, &vtapFetch, itc, &tcx); mov cx,[itcNext] call LN_ItcGetTcxCache jmp LInsideLoop ; } FET130: ; LTopBorder: ; Assert(itcNext == itcMac); ifdef DEBUG push ax push bx push cx push dx mov ax,[itcNext] cmp ax,[itcMac] je FET140 mov ax,midDisptbn2 mov bx,3414 ; assert line number cCall AssertProcForNative,<ax,bx> FET140: pop dx pop cx pop bx pop ax endif ;DEBUG ; xwRight = tcx.xpDrRight + tcx.dxpOutRight + dxLToW; mov ax,[tcx.xpDrRightTcx] add ax,[tcx.dxpOutRightTcx] add ax,[dxLToW] mov [xwRight],ax ; /* top */ ; if (brcCur != brcNone || brcCur != vtcc.rgbrcEasy[ibrcTop]) ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcTop], fTrue/*fHoriz*/, fFrameLines); errnz <ibrcTop> xor bx,bx call LN_ChkSetPenBrcH ; if (dywBrcTop > 0) mov cx,[dywBrcTop] jcxz FET150 ; { ; #ifdef MAC ; MoveTo(xwLeft, dyLToW); ; LineTo(xwRight + dxwBrcRight - 1, dyLToW); ; #else /* WIN */ ; PrcSet(&rcDraw, xwLeft, dyLToW, ; xwRight + dxwBrcRight, dyLToW + dypPenBrc); ; SectRc(&rcDraw, &rcwClip, &rcDraw); ; FillRect(hdc, (LPRECT)&rcDraw, hbrPenBrc); push [xwLeft] mov ax,[dyLToW] push ax mov cx,[xwRight] add cx,[dxwBrcRight] push cx add ax,[dypPenBrc] push ax call LN_SetSectAndFillRect ; #endif ; } FET150: ; /* right */ ; if (brcCur != brcNone || brcCur != vtcc.rgbrcEasy[ibrcRight]) ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcRight], fFalse/*fHoriz*/, fFrameLines); mov bx,ibrcRight SHL 1 call LN_ChkSetPenBrcV ; #ifdef MAC ; MoveTo(xwRight, ywTop); ; Line(0, dylDrRowM1); ; #else /* WIN */ ; PrcSet(&rcDraw, xwRight, ywTop, ; xwRight + dxwBrcRight, ywTop + dylDrRow); ; SectRc(&rcDraw, &rcwClip, &rcDraw); ; FillRect(hdc, (LPRECT)&rcDraw, hbrPenBrc); mov ax,[xwRight] push ax mov cx,[ywTop] push cx add ax,[dxwBrcRight] push ax add cx,[dylDrRow] push cx call LN_SetSectAndFillRect ; #endif ; /* bottom */ ; if (dywBrcBottom > 0) mov cx,[dywBrcBottom] jcxz FET165 ; { ; Assert(fLastRow); ;PAUSE ifdef DEBUG push ax push bx push cx push dx cmp [fLastRow],0 jnz FET160 mov ax,midDisptbn2 mov bx,3568 ; assert line number cCall AssertProcForNative,<ax,bx> FET160: pop dx pop cx pop bx pop ax endif ;DEBUG ; if (brcCur != brcNone || brcCur != vtcc.rgbrcEasy[ibrcBottom]) ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcBottom], fTrue/*fHoriz*/, fFrameLines); mov bx,ibrcBottom SHL 1 call LN_ChkSetPenBrcH ; #ifdef MAC ; MoveTo(xwLeft, dyLToW + dyl - dywBrcBottom); ; Line(xwRight + dxwBrcRight - xwLeft - 1, 0); ; #else /* WIN */ ; ywT = dyLToW + dyl - dywBrcBottom; mov cx,[dyLToW] add cx,[dyl] sub cx,[dywBrcBottom] ; PrcSet(&rcDraw, xwLeft, ywT, ; xwRight + dxwBrcRight, ywT + dypPenBrc); ; SectRc(&rcDraw, &rcwClip, &rcDraw); ; FillRect(hdc, (LPRECT)&rcDraw, hbrPenBrc); push [xwLeft] push cx mov ax,[xwRight] add ax,[dxwBrcRight] push ax add cx,[dypPenBrc] push cx call LN_SetSectAndFillRect ; #endif ; } FET165: ; /* clear any space above or below the fTtp DR */ ; pdr = PdrFetchAndFree(hpldr, itcMac, &drf); push [hpldr] push [itcMac] lea ax,[drf] push ax ifdef DEBUG cCall S_PdrFetchAndFree,<> else cCall N_PdrFetchAndFree,<> endif xchg ax,si ; DrcToRc(&pdr->drcl, &rclErase); lea di,[rclErase] errnz <drclDr> push si push di cCall DrcToRc,<> ; native note: the following lines have been rearranged ; for more hard core native trickery... ; di = &rclErase push ds pop es ; rclErase.xlLeft -= pdr->dxpOutLeft; errnz <xlLeftRc> mov ax,[di] sub ax,[si.dxpOutLeftDr] stosw ; if (fFrameLines && rclErase.ylTop == 0) ; rclErase.ylTop = dyFrameLine; errnz <ylDr-2-xlDr> mov ax,[di] mov cx,[fFrameLines] jcxz FET170 or ax,ax jnz FET170 ; #define dyFrameLine dypBorderFti ; #define dypBorderFti vfti.dypBorder mov ax,[vfti.dypBorderFti] FET170: stosw xchg ax,cx ; save rclErase.ylTop ; rclErase.xlRight += pdr->dxpOutRight; errnz <xlRightRc-2-ylDr> mov ax,[di] add ax,[si.dxpOutRightDr] stosw ; if (rclErase.ylTop > 0) ; cx = rclErase.ylTop jcxz FET180 ; { ; rclErase.ylBottom = rclErase.ylTop; mov ax,[rclErase.ylTopRc] mov [rclErase.ylBottomRc],ax ; rclErase.ylTop = 0; sub [rclErase.ylTopRc],ax ; ClearRclInParentDr(ww,hpldr,rclErase,&rcwClip); call LN_ClearRcl ; rclErase.ylBottom += pdr->drcl.dyl; mov ax,[si.drclDr.dylDrc] add [rclErase.ylBottomRc],ax ; } FET180: ; if (rclErase.ylBottom < dyl) mov cx,[dyl] cmp cx,[rclErase.ylBottomRc] jle FET190 ; { ; rclErase.ylTop = rclErase.ylBottom; ;PAUSE ; cx = dyl mov ax,[rclErase.ylBottomRc] mov [rclErase.ylTopRc],ax ; rclErase.ylBottom = dyl; ; cx = dyl mov [rclErase.ylBottomRc],cx ; ClearRclInParentDr(ww,hpldr,rclErase,&rcwClip); call LN_ClearRcl ; } FET190: ;PAUSE mov di,[prclDrawn] push ds pop es ; prclDrawn->xlLeft = xwLeft - dxLToW; mov ax,[xwLeft] sub ax,[dxLToW] stosw ; prclDrawn->ylTop = 0; xor ax,ax stosw ; prclDrawn->xlRight = rclErase.xlRight; mov ax,[rclErase.xlRightRc] stosw ; prclDrawn->ylBottom = dywBrcTop; mov ax,[dywBrcTop] stosw ; /* erase bits to the right of the PLDR */ ; native note: more rearranging... lea di,[rclErase] push ds pop es ; rclErase.xlLeft = rclErase.xlRight; errnz <xlLeftRc> mov ax,[di.xlRightRc-(xlLeftRc)] stosw ; rclErase.ylTop = 0; errnz <ylTopRc-2-xlLeftRc> xor ax,ax stosw ; rclErase.xlRight = pdrParent->dxl + pdrParent->dxpOutRight; errnz <xlRightRc-2-ylTopRc> mov bx,pdrParent mov ax,[bx.dxlDr] add ax,[bx.dxpOutRightDr] stosw ; rclErase.ylBottom = dyl; errnz <ylBottomRc-2-xlRightRc> mov ax,[dyl] stosw ; if (!FEmptyRc(&rclErase)) ; ClearRclInParentDr(ww,hpldr,rclErase,&rcwClip); call LN_ClearRclIfNotMT ; } cEnd ; Some utility routines for FrameEasyTable... ; LN_ClearRclIfNotMT Does: ; if (!FEmptyRc(&rclErase)) ; ClearRclInParentDr(ww,hpldr,rclErase,&rcwClip); LN_ClearRclIfNotMT: ;PAUSE lea ax,[rclErase] push ax cCall FEmptyRc,<> or ax,ax jnz FED1000 LN_ClearRcl: ;PAUSE push [ww] push [hpldr] push [rclErase.ylBottomRc] push [rclErase.xlRightRc] push [rclErase.YwTopRc] push [rclErase.xwLeftRc] lea ax,[rcwClip] push ax cCall ClearRclInParentDr,<> FED1000: ret ; LN_DxFromIbrc Does: ; DxFromBrc(*(int*)(si + rgbrcEasyTcc + bx), fTrue/*fFrameLines*/) ; Upon Entry: bx = ibrc, di = &vtcc.rgbrcEasy ; Upon Exit: ax = DxFromBrc(vtcc.rgbrcEasy[ibrcInside],fTrue/*fFrameLines*/); LN_DxFromIbrc: ; #define DxFromBrc(brc, fFrameLines) DxyFromBrc(brc, fFrameLines, fTrue) ; #define DxyFromBrc(brc, fFrameLines, fWidth) \ ; WidthHeightFromBrc(brc, fFrameLines | (fWidth << 1)) push [bx.si.rgbrcEasyTcc] mov ax,3 push ax ifdef DEBUG cCall S_WidthHeightFromBrc,<> else cCall N_WidthHeightFromBrc,<> endif ret ; %%Function:ItcGetTcxCache %%Owner:tomsax ; LN_ItcGetTcxCache does three things: ; itc = cx; ; ax = ItcGetTcxCache ( ww, doc, cp, &vtapFetch, itc, &tcx); ; itcNext = ax LN_ItcGetTcxCache: ;PAUSE mov [itc],cx push [ww] push [doc] push [SEG_cp] push [OFF_cp] mov ax,dataoffset [vtapFetch] push ax push cx lea ax,[tcx] push ax ifdef DEBUG cCall S_ItcGetTcxCache else cCall N_ItcGetTcxCache endif mov [itcNext],ax ret ; Upon entry: who cares, apart from FrameEasyTable's stack frame... ; Upon exit: bx = PwwdWw([ww]), + the usual registers trashed... LN_PwwdWwFET: ;PAUSE push [ww] cCall N_PwwdWw,<> xchg ax,bx ret ; PrcSet(&rcDraw, xwLeft, ywTop, ; xwLeft + dxpPenBrc, ywTop + dylDrRow); ; SectRc(&rcDraw, &rcwClip, &rcDraw); ; FillRect(hdc, (LPRECT)&rcDraw, hbrPenBrc); LN_SetSectAndFillRect: ;PAUSE db 0A8h ;turns next "stc" into "test al,immediate" ;also clears the carry flag LN_SetAndFillRect: stc ;PAUSE ; native note: blt from the stack into rcwDraw. pop bx ; save the return address mov dx,di ; save current di push ds pop es std ; blt backwards errnz <xwLeftRc> errnz <ywTopRc-2-xwLeftRc> errnz <xwRightRc-2-ywTopRc> errnz <ywBottomRc-2-xwRightRc> errnz <ywBottomRc+2-cbRcMin> lea di,[rcDraw.ywBottomRc] pop ax stosw pop ax stosw pop ax stosw pop ax stosw cld ; clear the direction flag push bx ; restore the return address push dx ; save original di value lea di,[di+2] ; doesn't affect condition flags jc FET1100 ; use that bit set above push di lea ax,[rcwClip] push ax push di ; #define SectRc(prc1,prc2,prcDest) FSectRc(prc1,prc2,prcDest) cCall FSectRc,<> FET1100: ; bx = &rcDraw push [hdc] push ds push di push [hbrPenBrc] cCall FillRect,<> pop di ; restore original di ret ; %%Function:SetPenForBrc %%Owner:tomsax ; NATIVE SetPenForBrc(ww, brc, fHoriz, fFrameLines) ; int ww; ; int brc; ; BOOL fHoriz, fFrameLines; ; { ; extern HBRUSH vhbrGray; ; Upon Entry: bx = ibrc*2 (ignored by SetPenBrcVNone) ;LN_ChkSetPenBrcH Does: ; if (brcCur != brcNone || brcCur != vtcc.rgbrcEasy[bx/2/*ibrc*/]) ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcInside], fTrue/*fHoriz*/, fFrameLines); ;LN_ChkSetPenBrcV Does: ; if (brcCur != brcNone || brcCur != vtcc.rgbrcEasy[bx/2/*ibrc*/]) ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ibrcInside], fFalse/*fHoriz*/, fFrameLines); ;LN_SetPenBrcV Does: ; SetPenForBrc(ww, brcCur = vtcc.rgbrcEasy[ax/2], fFalse/*fHoriz*/, fFrameLines) ;LN_SetPenBrcVNone Does: ; SetPenForBrc(ww, brcCur = brcNone, fFalse/*fHoriz*/, fFrameLines) LN_ChkSetPenBrcH: ;PAUSE db 0B8h ;this combines with the next opcode ; to become B8C031 = mov ax,c031 LN_ChkSetPenBrcV: xor ax,ax ; don't alter this opcode, see note above ;PAUSE ; si = &vtcc, bx = ibrcInside * 2 mov cx,[bx.vtcc.rgbrcEasyTcc] cmp cx,[brcCur] jne FET1200 errnz <brcNone> jcxz FET1250 ; jump to rts jmp short FET1200 LN_SetPenBrcV: xor ax,ax ;PAUSE mov cx,[bx.vtcc.rgbrcEasyTcc] db 03Dh ; this combines with the next opcode ; to become 3D33C9 = cmp ax,C933 LN_SetPenBrcVNone: errnz <brcNone> xor cx,cx ; don't alter this opcode, see note above ; NOTE: fHoriz doesn't get used if brc==brcNone, ; therefore it is OK to leave it uninitialized... ;PAUSE FET1200: ; cx = brc, ax = fHoriz (not restricted to 0,1 values) ; brcCur = whatever was passed for the new brc; mov [brcCur],cx ; switch (brc) ; { jcxz LBrcNone cmp cx,brcDotted je LBrcDotted ; default: ; Assert(fFalse); ifdef DEBUG push ax push bx push cx push dx cmp cx,brcSingle je FET1210 cmp cx,brcHairline je FET1210 cmp cx,brcThick je FET1210 mov ax,midDisptbn2 mov bx,3881 ; assert line number cCall AssertProcForNative,<ax,bx> FET1210: pop dx pop cx pop bx pop ax endif ;DEBUG ; case brcSingle: ; case brcHairline: ; case brcThick: ; hbrPenBrc = vsci.hbrText; mov bx,[vsci.hbrTextSci] jmp short FET1220 ; break; ; case brcNone: LBrcNone: ; if (!fFrameLines) ; { ; hbrPenBrc = vsci.hbrBkgrnd; ; break; ; } mov bx,[vsci.hbrBkgrndSci] cmp [fFrameLines],0 jz FET1220 ; /* else fall through */ ; case brcDotted: ; hbrPenBrc = vhbrGray; LBrcDotted: mov bx,[vhbrGray] ; break; ; } FET1220: mov [hbrPenBrc],bx ; cx = brc, ax = fHoriz (not restricted to 0,1 values) ; dxpPenBrc = dxpBorderFti; mov dx,[vsci.dxpBorderSci] mov [dxpPenBrc],dx ; dypPenBrc = dypBorderFti; mov dx,[vsci.dypBorderSci] mov [dypPenBrc],dx ; cx = brc, ax = fHoriz (not restricted to 0,1 values) ; if (brc == brcThick) cmp cx,brcThick jne FET1250 ; { ; if (fHoriz) ;PAUSE xchg ax,cx jcxz FET1240 ; dypPenBrc = 2 * dypBorderFti; sal [dypPenBrc],1 jmp short FET1250 ; else FET1240: ; dxpPenBrc = 2 * dxpBorderFti; sal [dxpPenBrc],1 ; } FET1250: ret ; } sEnd fetchtbn end
21.763064
126
0.669177
23208845344c6a2792c2e15069ac5afd6c6a1832
66,048
asm
Assembly
Library/Parse/parseDepend.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Parse/parseDepend.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Parse/parseDepend.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: parseDepend.asm AUTHOR: John Wedgwood, Feb 4, 1991 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- John 2/ 4/91 Initial revision DESCRIPTION: Code to generate dependency lists. $Id: parseDepend.asm,v 1.1 97/04/05 01:27:29 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ EvalCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FuncArgDependencies %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback to the application to generate dependencies for a list of function arguments. CALLED BY: PopOperatorAndEval PASS: es:di = Pointer to top of operator/function stack es:bx = Pointer to top of argument stack ss:bp = Pointer to EvalParameters structure on the stack. RETURN: carry set on error al = Error code Arguments popped off the stack DESTROYED: ax PSEUDO CODE/STRATEGY: count = func.nArgs; ArgDependencies( count ); KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FuncArgDependencies proc near uses cx .enter mov cx, es:[di].OSE_data.ESOD_function.EFD_nArgs call ArgDependencies jc quit ; Quit on error ; ; Now that we've added the arguments of the function to the ; dependency list we want to add the function as well. ; mov al, ESAT_FUNCTION ; Argument type push bx ; Save argument ptr mov bx, di ; es:bx <- ptr to EvalFunctionData inc bx call AddEntryToDependencyBlock pop bx ; Restore argument ptr jc quit ; Quit on error ; ; All functions return something. A function can only return a single ; argument... Therefore it doesn't matter what we push, as long as ; it's something... ; clr cx ; No extra space mov al, mask ESAT_NUMBER ; al <- type of the token call ParserEvalPushArgument ; Push the number token quit: .leave ret FuncArgDependencies endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OpArgDependencies %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Generate dependencies for the arguments of an operator. CALLED BY: PopOperatorAndEval PASS: es:di = Pointer to top of operator/function stack es:bx = Pointer to top of argument stack ss:bp = Pointer to EvalParameters structure on the stack. RETURN: carry set on error al = Error code Arguments popped off the stack DESTROYED: ax PSEUDO CODE/STRATEGY: count = opArgCountTable[opType]; ArgDependencies( count ); KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OpArgDependencies proc near uses cx, si .enter mov al, es:[di].OSE_data.ESOD_operator.EOD_opType cmp al, OP_RANGE_SEPARATOR je handleRangeSep cmp al, OP_RANGE_INTERSECTION je handleRangeInt clr ah mov si, ax ; si <- index into the arg-count table clr ch mov cl, cs:opArgCountTable[si] call ArgDependencies ; ; All operators (except the range-separator, handled above) produce ; a number as their result. It doesn't really matter actually, all ; that matters is that we put some result back on the argument ; stack so that evaluation can continue as it should. ; ; We can't really push a number because the fp-fixup code will choke ; after generating dependencies if it thinks we are returning a number. ; clr cx ; No extra space mov al, mask ESAT_NUMBER ; al <- type of the token call ParserEvalPushArgument ; Push the number token quit: .leave ret handleRangeSep: ; ; Ranges get handled separately since we actually want to accumulate ; them. ; call OpRangeSeparator jmp quit handleRangeInt: ; ; We also want to accumulate ranges defined by the range-intersection ; operator. ; call OpParserRangeIntersection jmp quit OpArgDependencies endp ; ; A list of the number of arguments each operator takes. ; opArgCountTable byte -1, ; OpRangeSeparator, 1, ; OpNegation, 1, ; OpPercent, 2, ; OpExponentiation, 2, ; OpMultiplication, 2, ; OpDivision, 2, ; OpModulo, 2, ; OpAddition, 2, ; OpSubtraction, 2, ; OpEqual, 2, ; OpNotEqual, 2, ; OpLessThan, 2, ; OpGreaterThan, 2, ; OpLessThanOrEqual, 2, ; OpGreaterThanOrEqual 2, ; OpStringConcat -1, ; OpParserRangeIntersection 2, ; OpNotEqualGraphic 2, ; OpDivisionGraphic 2, ; OpLessThanOrEqualGraphic 2 ; OpGreaterThanOrEqualGraphic COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ArgDependencies %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Call the application for each argument. CALLED BY: FuncArgDependencies, OpArgDependencies PASS: es:di = Pointer to top of operator/function stack es:bx = Pointer to top of argument stack ss:bp = Pointer to EvalParameters structure on the stack. cx = # of arguments to handle RETURN: carry set on error al = Error code Arguments popped off the stack DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/21/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ArgDependencies proc near uses cx .enter EC < cmp cl, -1 > EC < ERROR_Z ARG_COUNT_IS_VERY_UNREASONABLE > tst cx ; Check for no args ; (The tst instruction clears the carry, which is what I want) jz quit ; Quit if no arguments argLoop: push bx ; Save arg stack pointer mov al, es:[bx] ; al <- the token type inc bx ; es:bx <- ptr to the data call AddEntryToDependencyBlock ; Add a single entry pop bx ; Restore arg stack pointer jc quit ; Quit if error push cx ; Save arg count mov cx, 1 ; Pop one argument call ParserEvalPopNArgs ; Pop me jesus pop cx ; Restore arg count loop argLoop ; Loop while there are args clc ; Signal: no error quit: .leave ret ArgDependencies endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AddEntryToDependencyBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add an entry to the evaluators dependency block CALLED BY: ArgDependencies PASS: es:bx = Pointer to the data which we want to add to the dependency block al = EvalStackArgumentType ss:bp = Pointer to EvalParameters RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: The evaluator, when generating dependencies, keeps a list of the dependencies in a global memory block. This block is returned to the application so that it can actually add the dependencies in whatever way it wants. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/28/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AddEntryToDependencyBlock proc near uses bx, cx, dx, di, si, ds, es .enter ; ; We may not want to do anything with name-dependencies. We check ; for that here. ; test ss:[bp].EP_flags, mask EF_NO_NAMES jz skipNoNameCheck ; Branch if we don't care cmp al, ESAT_NAME ; Check for a name je quitNoErrorNoBlock ; Branch if it's a name skipNoNameCheck: ; ; We may be only adding name dependencies... If we are we want to make ; sure that we have the right type here. ; test ss:[bp].EP_flags, mask EF_ONLY_NAMES jz skipNameCheck ; Branch if we don't care cmp al, ESAT_NAME ; We do care, check for name jne quitNoErrorNoBlock ; Branch if not a name skipNameCheck: ; ; We only want to add the dependency if it's to a name, cell, range ; or externally defined function. ; cmp al, ESAT_FUNCTION ; Check for function type jne checkDependencyType ; Branch if not a function ; ; It's a function, check for externally defined. ; cmp es:[bx].EFD_functionID, FUNCTION_ID_FIRST_EXTERNAL_FUNCTION jb quitNoErrorNoBlock ; Quit if defined internally checkDependencyType: call NeedDependency ; Check for one of those things we ; want a dependency for jnc quitNoErrorNoBlock ; Branch if not ; ; We do want to add this dependency. ; mov si, bx ; es:si <- ptr to source for data mov cl, al ; Save the token push si call GetArgumentSize ; si <- size of the argument mov dx, si ; dx <- size of the argument pop si mov bx, ss:[bp].EP_depHandle tst bx ; Check for block existing jz createDepBlock ; Branch if it doesn't gotDepBlock: call MemLock ; ds <- seg address of the block mov ds, ax ; ; ds = segment address of the block ; bx = block handle ; dx = size of the token data (not including type byte) ; cl = token ; push cx ; Save the token mov ax, ds:DB_size ; ax <- size of the block inc dx ; Allow size for the type byte add ax, dx ; ax <- new size for the block clr ch ; No allocation flags call MemReAlloc ; Make the block bigger mov ds, ax ; Reset the segment address pop cx ; Restore the token ; ; Check for error ; mov al, PSEE_TOO_MANY_DEPENDENCIES jc quitUnlock ; Quit on error ; ; The block is bigger... Update the size ; mov di, ds:DB_size ; ds:di <- ptr to place to put data segxchg ds, es ; es:di <- ptr to dest ; ds:si <- ptr to source mov al, cl ; al <- the token stosb ; Save the type of the data mov cx, dx ; cx <- size of the data dec cx ; Move data, not the token rep movsb ; Save the data add es:DB_size, dx ; Update the size of the block clc ; Signal: no error quitUnlock: call MemUnlock ; Release the block (flags preserved) quit: .leave ret quitNoErrorNoBlock: ; ; We want to quit but we have no block yet. ; clc ; Signal: no error jmp quit createDepBlock: ; ; Allocate and initialize the dependency block. ; push cx ; Save the token mov ax, size DependencyBlock mov cl, mask HF_SWAPABLE mov ch, mask HAF_LOCK ; Want the block locked call MemAlloc pop cx ; Restore the token ; ; Carry set if not enough memory ; mov ds, ax ; ds <- seg address of the block ; ; Check for allocation error. ; mov al, PSEE_TOO_MANY_DEPENDENCIES jc quit ; Quit on error ; ; Block was allocated just fine, save the handle and initialize it. ; mov ss:[bp].EP_depHandle, bx mov ds:DB_size, size DependencyBlock jmp gotDepBlock AddEntryToDependencyBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NeedDependency %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check to see if we want a dependency for this argument type CALLED BY: AddEntryToDependencyBlock PASS: al = EvalStackArgumentType es:bx = Pointer to ParserToken...Data ss:bp = Pointer to EvalParameters on stack RETURN: carry set if we want to add a dependency carry clear otherwise DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 3/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ NeedDependency proc near uses ax .enter cmp al, ESAT_NAME je quit ; Carry clear if we branch cmp al, ESAT_FUNCTION je quit ; Carry clear if we branch test al, mask ESAT_RANGE ; Clears the carry jz noDependency ; ; It's a range... How amusing. Check to see if the range is in ; the legal bounds of the spreadsheet. If it's not, don't generate ; a dependency for it. ; mov ax, es:[bx].ERD_firstCell.CR_row and ax, mask CRC_VALUE cmp ax, ss:[bp].CP_maxRow ; Check for past end ja noDependency ; Branch if past end mov ax, es:[bx].ERD_lastCell.CR_row and ax, mask CRC_VALUE cmp ax, ss:[bp].CP_maxRow ; Check for past end ja noDependency ; Branch if past end mov ax, es:[bx].ERD_firstCell.CR_column and ax, mask CRC_VALUE cmp ax, ss:[bp].CP_maxColumn; Check for past end ja noDependency ; Branch if past end mov ax, es:[bx].ERD_lastCell.CR_column and ax, mask CRC_VALUE cmp ax, ss:[bp].CP_maxColumn; Check for past end ja noDependency ; Branch if past end clc ; We want the dependency jmp quit noDependency: stc ; Don't need a dependency quit: cmc ; Reverse the carry to get the return ; flag set correctly .leave ret NeedDependency endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserAddDependencies %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add a set of dependencies from a dependency block CALLED BY: Global PASS: bx = Handle of the dependency block ss:bp = Pointer to DependencyParameters on the stack RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/28/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ParserAddDependencies proc far uses dx .enter mov dx, offset ParserAddSingleDependencyNear ; dx <- routine to call call HandleDependencyBlock .leave ret ParserAddDependencies endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserRemoveDependencies %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Remove a set of dependencies from a dependency block CALLED BY: Global PASS: bx = Handle of the dependency block ss:bp = Pointer to DependencyParameters on the stack RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/28/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ParserRemoveDependencies proc far uses dx .enter mov dx, offset RemoveSingleDependency ; dx <- routine to call call HandleDependencyBlock .leave ret ParserRemoveDependencies endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HandleDependencyBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a set of dependencies CALLED BY: ParserAddDependencies, ParserRemoveDependencies PASS: bx = Block handle of the dependency block ss:bp = Pointer to the DependencyParameters on the stack dx = Offset of routine to call: Add/RemoveSingleDependency RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/28/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HandleDependencyBlock proc near uses cx, dx, di .enter mov cx, dx ; cx <- callback for callback :-) mov di, cs ; di:dx <- callback routine mov dx, offset cs:HandleBlockCallback call ParserForeachPrecedent ; Process the list .leave ret HandleDependencyBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HandleBlockCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback for ParserForeachPrecedent CALLED BY: HandleDependencyBlock via ParserForeachPrecedent PASS: dl = Type of the precedent entry es:di = Pointer to the precedent entry data ss:bp = DependencyParameters cx = Callback for callback RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 7/24/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HandleBlockCallback proc far uses ds, si, di, dx .enter segmov ds, es, si ; ds:si <- ptr to range data mov si, di ; ; dl still holds the precedent entry type. ; call GetDependencyHandler ; di <- routine to call mov dx, cx ; dx <- callback for callback call di ; Call the routine .leave ret HandleBlockCallback endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserForeachPrecedent %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Run through the precedent list calling a callback. CALLED BY: Global, HandleDependencyBlock PASS: bx = Block di:dx = Routine to call RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: Callback is defined as: PASS: cx, ds, si, bp = Same as passed in dl = Type of the precedent es:di = Pointer to the precedent data RETURN: Carry set to abort al = Error code DESTROYED: nothing KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 7/24/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ForeachPrecParams struct FPP_callback dword ; Callback FPP_block hptr ; Block handle of precedent list ForeachPrecParams ends ParserForeachPrecedent proc far uses bx, dx, di, es .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < push ax > EC < mov ax, cs > EC < cmp ax, di > EC < pop ax > EC < je xipSafe > EC < pushdw bxsi > EC < movdw bxsi, didx > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > xipSafe:: endif ; ; Create a stack frame by pushing the passed data ; push bx ; Save the memory handle push di ; Save segment of callback push dx ; Save offset of callback ;;; ;;; We haven't set up a pointer to the stack frame so don't mess with ;;; sp until we do. ;;; ; ; Now lock the block and start processing... ; call MemLock ; es <- address of dep block mov es, ax ; ; Set up a pointer to the stack frame. ; mov bx, sp ; ss:bx <- stack frame mov di, size DependencyBlock ; es:di <- ptr to 1st dep depLoop: ; ; es:0 = dependency block ; es:di = pointer to current dependency ; es:DB_size = offset past last entry in the block ; ss:bx = ForeachPrecParams ; cmp di, es:DB_size ; Check for done je endLoop ; Branch if done ; ; Load up the appropriate information for the single dependency ; mov dl, {byte} es:[di] ; dl <- the type of the arg inc di ; Point to the data if FULL_EXECUTE_IN_PLACE push bx mov ss:[TPD_dataAX], ax mov ax, ss:[bx].FPP_callback.offset mov bx, ss:[bx].FPP_callback.segment call ProcCallFixedOrMovable pop bx else call ss:[bx].FPP_callback ; Call the callback endif jc quit ; Branch on error ; ; Advance to the next dependency entry ; dl = the type of the current entry ; push si ; Save passed si mov al, dl ; al <- type call GetArgumentSize ; si <- size of the data add di, si ; es:di <- ptr to next entry pop si ; Restore passed si jmp depLoop ; Loop to do the next one endLoop: clc ; Signal no error quit: ; ; Carry set on error ; al = error code ; mov bx, ss:[bx].FPP_block ; bx <- block handle call MemUnlock ; Release the block lahf ; Save "error" flag (carry) add sp, size ForeachPrecParams ; Restore stack frame sahf ; Restore "error" flag (carry) .leave ret ParserForeachPrecedent endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetDependencyHandler %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the routine to handle a given dependency type CALLED BY: HandleDependencyBlock PASS: dl = EvalStackArgumentType RETURN: di = Routine to call DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 3/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetDependencyHandler proc near mov di, offset cs:HandleNameDependency cmp dl, ESAT_NAME je quit mov di, offset cs:HandleFunctionDependency cmp dl, ESAT_FUNCTION je quit mov di, offset cs:HandleRangeDependency test dl, mask ESAT_RANGE jnz quit ERROR ILLEGAL_DEPENDENCY_TYPE quit: ret GetDependencyHandler endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HandleRangeDependency %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a dependency block entry for a range CALLED BY: HandleDependencyBlock via depHandlerTable PASS: ss:bp = DependencyParameters ds:si = Pointer to EvalRangeData dx = Callback routine to use (Add/RemoveSingleDependency) RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: By the time we get here the cells have already been adjusted for relative references. This means that we don't need to worry about sign extending the value to the full 16 bits. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/28/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HandleRangeDependency proc near uses bx, cx, di, si .enter ; ; Load up a bunch of registers with stuff we need. ; mov ax, ds:[si].ERD_firstCell.CR_row mov cx, ds:[si].ERD_firstCell.CR_column mov bx, ds:[si].ERD_lastCell.CR_row mov si, ds:[si].ERD_lastCell.CR_column and ax, mask CRC_VALUE ; Just the value, not the and cx, mask CRC_VALUE ; flags and bx, mask CRC_VALUE and si, mask CRC_VALUE rowLoop: ; ; ax = start row ; bx = end row ; dx = routine to call ; cmp ax, bx ; Check for done last row ja endRowLoop ; Branch if finished push cx ; Save starting column columnLoop: ; ; on-stack: starting column ; cx = start column ; si = end column ; dx = routine to call ; cmp cx, si ; Check for done last column ja endColumnLoop ; Branch if finished a row ; ; Handle a single dependency. ax/cx = the dependency. ; mov di, ax ; Save current row call dx ; Handle the dependency jc error ; Quit on error mov ax, di ; Restore current row inc cx ; Move to next column jmp columnLoop ; Loop to handle it endColumnLoop: pop cx ; Restore starting column inc ax ; Move to next row jmp rowLoop ; Loop to handle it endRowLoop: clc ; Signal: no error quit: .leave ret error: pop cx ; Restore register from stack jmp quit HandleRangeDependency endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HandleNameDependency %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a dependency block entry for a name CALLED BY: HandleDependencyBlock via depHandlerTable PASS: ss:bp = DependencyParameters ds:si = Pointer to EvalNameData dx = Callback routine to use (Add/RemoveSingleDependency) RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: Call back to the application to get the row/column for the name. Handle the dependency for that row/column. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/28/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HandleNameDependency proc near uses cx, dx, di .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, ss:[bp].CP_callback > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif mov di, dx ; Save the routine to call in di mov cx, ds:[si].END_name ; cx <- the name token mov al, CT_NAME_TO_CELL ; Dereference the name if FULL_EXECUTE_IN_PLACE push bx mov ss:[TPD_dataBX], bx mov ss:[TPD_dataAX], ax movdw bxax, ss:[bp].CP_callback ; Call the application call ProcCallFixedOrMovable pop bx else call ss:[bp].CP_callback ; Call the application endif jc quit ; Quit on error ; ; dx/cx = Row/Column of the cell holding the name dependencies ; mov ax, dx ; ax/cx <- Row/Column of the cell call di ; Call the handling routine quit: .leave ret HandleNameDependency endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% HandleFunctionDependency %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a dependency block entry for a function CALLED BY: HandleDependencyBlock via depHandlerTable PASS: ss:bp = DependencyParameters ds:si = Pointer to EvalFunctionData dx = Callback routine to use (Add/RemoveSingleDependency) RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/28/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HandleFunctionDependency proc near uses cx, dx, di .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, ss:[bp].CP_callback > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif mov di, dx ; Save the routine to call in di mov cx, ds:[si].EFD_functionID mov al, CT_FUNCTION_TO_CELL ; Dereference the function if FULL_EXECUTE_IN_PLACE push bx mov ss:[TPD_dataBX], bx mov ss:[TPD_dataAX], ax movdw bxax, ss:[bp].CP_callback ; Call the application call ProcCallFixedOrMovable pop bx else call ss:[bp].CP_callback ; Call the application endif jc quit ; Quit on error ; ; dx/cx = Row/Column of the cell holding the name dependencies ; tst dx ; Check for no dependency required ; (clear the carry) jz quit ; Branch if none needed mov ax, dx ; ax/cx <- Row/Column of the cell call di ; Call the handling routine quit: .leave ret HandleFunctionDependency endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserAddSingleDependency %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add a single dependency to a cell CALLED BY: Global PASS: ds:si = CellFunctionParameters ax = Row of cell to add dependency to cx = Column of cell to add dependency to ss:bp = DependencyParameters RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 7/24/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ParserAddSingleDependency proc far call ParserAddSingleDependencyNear ret ParserAddSingleDependency endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserAddSingleDependencyNear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add a dependency to a dependency list CALLED BY: Global PASS: ax = Row of cell to add dependency to cx = Column of cell to add dependency to ss:bp = DependencyParameters RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: Lock the cell Get a pointer to the dependency list if the cell doesn't exist Call the application to create the cell endif Find the position to add the dependency if the dependency doesn't exist insert space for the dependency save the current row/cell in the dependency list endif Unlock the cell KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/22/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ParserAddSingleDependencyNear proc near uses ds, es, di, si, dx, bx .enter lockCellAgain: call LockFirstDepListBlock ; carry clear if cell doesn't exist jnc makeCellExist ; Branch to call the application tst si ; Check for no dependencies at all jz addNewEntry ; Branch if none ; ; ds:si = ptr to the dependency list ; call FindDependencyEntry ; Locate the dependency jc quitUnlock ; Quit if already exists addNewEntry: ; ; The entry wasn't found. We need to add a new one. ; ; ds:di = ptr to the start of the dependency list block ; ds:si = ptr to the place to add the new entry ; ax = Row ; cx = Column ; call AddDependencyListEntry ; ; Fill in the entry ; mov ax, ss:[bp].CP_row ; Row to add as a dependency mov ds:[si].D_row, ax mov ax, ss:[bp].CP_column ; Column to add as a dependency mov ds:[si].D_column, al quitUnlock: call UnlockDependencyList ; Release the dependency list clc ; Signal: no error quit: ; ; Carry should be set here if you want to indicate some sort of error. ; .leave ret makeCellExist: if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, ss:[bp].CP_callback > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif mov dx, ax ; Pass row in dx mov al, CT_CREATE_CELL ; al <- code ("make cell exist") if FULL_EXECUTE_IN_PLACE pushdw ss:[bp].CP_callback call PROCCALLFIXEDORMOVABLE_PASCAL else call ss:[bp].CP_callback ; Call the application to make the cell endif jc quit ; Quit if error mov ax, dx ; Restore row for re-lock jmp lockCellAgain ; Else branch to re-lock the cell ParserAddSingleDependencyNear endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UnlockDependencyList %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Unlock the dependency list. CALLED BY: ParserAddSingleDependencyNear, RemoveSingleDependency PASS: ds:si = Pointer to the dependency list item si = 0 if there is no dependency list RETURN: nothing DESTROYED: es, bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 6/25/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ UnlockDependencyList proc near push ds, si ; Save ptr to dependency list lds si, ss:[bp].CP_cellParams mov bx, ds:[si].CFP_file ; bx <- file handle pop es, si ; Restore ptr to dependency list ; ; es:si = Pointer to dependency list ; bx = File handle. ; tst si ; Check for no dependency list jz quit ; Branch if none (carry is clear here) call DBUnlock ; Unlock block pointed at by es quit: ret UnlockDependencyList endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RemoveSingleDependency %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Remove a dependency from a dependency list CALLED BY: Global PASS: ax = Row of cell to add dependency to cx = Column of cell to add dependency to ss:bp = DependencyParameters RETURN: carry set on error al = Error code DESTROYED: ax PSEUDO CODE/STRATEGY: Get a pointer to the dependency list if the cell doesn't exist <<<Fatal Error>>> endif Find the position of the dependency if the dependency doesn't exist It must have been deleted before this point, quit (no error) endif Delete the entry from the dependency list if the dependency list is empty call back to the application endif KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/22/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RemoveSingleDependency proc near uses ds, di, si, dx .enter call LockFirstDepListBlock ; carry clear if cell doesn't exist ; ; Simply exit if the cell doesn't exist. This case occurs if ; a cell is referred to twice in an expression (eg. =B1+B1). ; When the first reference is encountered, B1 will be deleted ; if it doesn't have any data in it other than dependencies. ; When the second reference is encountered, B1 is already gone ; so we simply exit. Note that there are more complicated ; cases where this can occur (eg. ranges that partially overlap), ; so it isn't really practical to eliminate redundant entries ; in general. -- eca 3/3/93. ; jnc quit ; branch if cell doesn't exist tst si ; Check for any dependencies at all jz noMoreDependencies ; Branch if there are no more ; ; ds:si = ptr to the dependency list ; call FindDependencyEntry ; Locate the dependency jnc quit ; Quit if entry is already gone ; ; ds:di = ptr to the start of the dependency list block ; ds:si = ptr to the dependency to delete ; call DeleteDependencyEntry ; Delete the entry ; This unlocks the dependency block. jz noMoreDependencies ; Branch if no more dependencies clc ; Signal: no error quit: .leave ret noMoreDependencies: if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, ss:[bp].CP_callback > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif mov dx, ax ; Pass row in dx mov al, CT_EMPTY_CELL ; al <- code (cell is empty) if FULL_EXECUTE_IN_PLACE pushdw ss:[bp].CP_callback call PROCCALLFIXEDORMOVABLE_PASCAL else call ss:[bp].CP_callback ; Let application know that there are ; no more dependencies for this item. endif jmp quit RemoveSingleDependency endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LockFirstDepListBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Lock the first dependency list block. CALLED BY: ParserAddSingleDependencyNear, RemoveSingleDependency PASS: ax,cx = Row/Column of the cell to lock RETURN: carry set if the cell exists ds:si = Ptr to the dependency list ds:di = Ptr to the dependency list si = 0 if there is no dependency list DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/22/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LockFirstDepListBlock proc near uses ax, bx, es .enter ; ; Get the dbase item for the cell (also checks to see if the cell exists) ; lds si, ss:[bp].CP_cellParams mov bx, ds:[si].CFP_file ; bx <- file handle call CellGetDBItem ; ax/di <- Group/Item of the cell jnc quit ; Quit if no cell ; ; Initialize the stack frame. ; mov ss:[bp].DP_prevIsCell, 0xff mov ss:[bp].DP_prev.segment, ax mov ss:[bp].DP_prev.offset, di call DBLock ; Lock the cell (*es:di <- cell ptr) ; ; The first dword of the cell data is the dbase item. ; mov si, es:[di] ; es:si <- ptr to cell data tst es:[si].segment ; Check for NULL segment (which means ; that no dependencies exist) jz quitNoDepsCellExists ; Branch if no dependencies ; ; OK, the cell exists and has dependencies, we need to lock the ; dependency list. ; push es, di ; Save cell ptr mov ax, es:[si].segment ; ax <- group mov di, es:[si].offset ; di <- item ; ; Save the dbase item which contains the dependency list. ; mov ss:[bp].DP_dep.segment, ax mov ss:[bp].DP_dep.offset, di ; ; Now lock down the dependency list item and return a pointer to it. ; call DBLock ; *es:di <- ptr to dependency list mov ss:[bp].DP_chunk, di ; Save chunk handle segmov ds, es, si ; *ds:si <- ptr to dependency list mov si, di mov si, ds:[si] ; ds:si <- ptr to dependency list pop es, di ; Restore cell ptr ; ; We should have: ; *es:di = Ptr to cell data ; ds:si = Ptr to dependency list ; ss:bp.DP_dep = DBase item containing the dependency list ; quitCellExists: ; ; Unlock the cell. We don't need it. ; push ds, si ; Save the ptr to the dependency list lds si, ss:[bp].CP_cellParams call CellUnlock ; Cell release thyself pop ds, si ; Restore ptr to the dependency list stc ; Signal: cell exists quit: mov di, si ; Return both registers the same .leave ret quitNoDepsCellExists: ; ; The cell exists but has no dependencies. ; clr si ; Assume no such item exists. mov ss:[bp].DP_dep.segment, si jmp quitCellExists LockFirstDepListBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindDependencyEntry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find a dependency in the dependency list CALLED BY: ParserAddSingleDependencyNear, RemoveSingleDependency PASS: ss:bp = DependencyParameters on stack ds:si = Pointer to the dependency list This MUST be valid RETURN: ds:si = Pointer to the dependency entry ds:di = Pointer to the base of the dependency list block carry set if it exists DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/22/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FindDependencyEntry proc near uses ax, bx, cx, dx .enter findDependencyInThisBlock: ; ; We need to know how many entries there are in this part of the ; dependency list. This actually turns out not to be quick to compute ; since the size of each entry is 3 bytes. As a result we just figure ; the size (in bytes) of this part of the list. ; ChunkSizePtr ds, si, cx ; cx <- size of this part of the list sub cx, size DependencyListHeader mov di, si ; Save ptr to start of the block add si, size DependencyListHeader ; ; cx = # of bytes in this part of the list. ; ds:si = Pointer to first entry in this part of the list. ; ds:di = Pointer to the start of this block. ; jcxz quitNotFound ; Quit if no entries mov bx, ss:[bp].CP_row ; bx <- row to find mov dx, ss:[bp].CP_column ; dl <- column to find findLoop: ; ; cx = # of bytes left to scan. ; ds:si = Pointer to next entry to check. ; ds:di = Pointer to the start of this block. ; bx = Row to find. ; dl = Column to find. ; cmp ds:[si].D_row, bx ; Check for same row jb nextEntry ; Branch if not found ja quitNotFound ; Quit if found place for new item cmp ds:[si].D_column, dl ; Check for same column ja quitNotFound ; Quit if found place for new item je found ; Branch if the same row and column nextEntry: add si, size Dependency ; Skip to next entry sub cx, size Dependency ; This many fewer bytes jnz findLoop ; Loop while there are still entries ; ; We ran out of bytes. Check to see if there is another block we can ; move to. ; call LockNextDependencyBlock ; Lock the next block jc findDependencyInThisBlock ; ; There is no next block. We're done and we haven't found the entry. ; quitNotFound: clc ; Signal: does not exist jmp quit ; found: stc ; Signal: found quit: .leave ret FindDependencyEntry endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LockNextDependencyBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Lock the next block in the dependency list chain. CALLED BY: FindDependencyEntry PASS: ds:di = Pointer to the current dependency block. ss:bp.DP_dep = DBase item for current dependency block. RETURN: carry set if another block exists ds:si = Pointer to the new block ss:bp.DP_dep = DBase item for the new block ss:bp.DP_prev = Previous dbase item ss:bp.DP_prevIsCell cleared carry clear if no more blocks exist. ds:si unchanged ss:bp.DP_dep unchanged DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 6/25/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LockNextDependencyBlock proc near uses ax, bx, di, es .enter tst ds:[di].DLH_next.segment ; Check for another block jz quit ; Branch if no more (carry clear) ; ; Copy the current item to the previous item. ; movdw ss:[bp].DP_prev, ss:[bp].DP_dep, ax mov ss:[bp].DP_prevIsCell, 0 ; Previous is no ; longer the cell ; ; There is another block. Unlock the current block and lock ; the new one. ; mov ax, ds:[di].segment ; ax <- group mov di, ds:[di].offset ; di <- item segmov es, ds, si ; es <- segment address of item lds si, ss:[bp].CP_cellParams ; ds:si <- cell paramters mov bx, ds:[si].CFP_file ; bx <- file handle call DBUnlock ; Unlock the item ; ; bx = File handle ; ax = Group containing the new dependencies ; di = Item containing the new dependencies ; mov ss:[bp].DP_dep.segment, ax ; Save group and item mov ss:[bp].DP_dep.offset, di call DBLock ; *es:di <- ptr to dependencies mov ss:[bp].DP_chunk, di ; Save chunk handle segmov ds, es, si ; ds:si <- ptr to dependencies mov si, ds:[di] stc ; Signal: block exists quit: ; ; Carry should be set here if a new block exists and is locked down. ; .leave ret LockNextDependencyBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AddDependencyListEntry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add an empty dependency list item CALLED BY: ParserAddSingleDependencyNear PASS: ds:di = Pointer to dependency list block ds:si = Pointer to place to insert new entry ss:bp.DP_dep = DBase item containing the dependency list block ax = Row of the cell cx = Column of the cell RETURN: ds:si = Place to put the dependency data DESTROYED: nothing PSEUDO CODE/STRATEGY: If (no dependencies) then Insert an empty block endif if (blockSize > maxBlockSize) then InsertBlock( block ) endif InsertSpace( block, entrySize ) KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/22/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ AddDependencyListEntry proc near uses ax, bx, cx, dx, es, di .enter ; ; Set up some registers we're going to need in a few places. ; segmov es, ds, ax ; es:di <- ptr to the base of the block mov ax, si ; Save pointer to place to insert lds si, ss:[bp].CP_cellParams mov bx, ds:[si].CFP_file ; bx <- file handle mov si, ax ; Restore pointer to place to insert ; ; Check for the case of no dependencies at all. If there are none then ; we are creating the first block in this dependency list. ; tst si ; Check for has blocks jnz hasBlock ; Branch if it has a block ; ; There are no blocks. We need to insert a whole new one. ; call InsertDepListBlock ; Insert an empty block jmp addItem ; Branch to add the item hasBlock: ; ; First set up some pointers and get the file handle and chunk size. ; ChunkSizePtr es, di, cx ; cx <- old size of the block ; ; Check to make sure that the chunk isn't too large. ; cmp cx, DEPENDENCY_BLOCK_MAX_SIZE jb addItem ; ; This block has grown too large, we need to split it ; call SplitDepListBlock ; Split the dependency list block addItem: ; ; Unlock the entry. ; ; es:di = Pointer to the chunk ; es:si = Pointer to the place to insert ; ss:bp = Frame ptr ; bx = File handle ; sub si, di ; si <- offset to insert at call DBUnlock ; Release the block ; ; bx = File handle ; si = Place to insert ; ss:bp.DP_dep = the dbase item reference. ; mov ax, ss:[bp].DP_dep.segment mov di, ss:[bp].DP_dep.offset mov dx, si ; dx <- position to insert at mov cx, size Dependency ; cx <- # of bytes to insert call DBInsertAt ; Make the block larger ; ; Now that the block has been resized we need to lock it down and get ; a pointer that we can return to the caller. ; ; bx = File handle ; ax = Group ; di = Item ; dx = Position we inserted at ; call DBLock ; *es:di <- ptr to the item segmov ds, es, si ; ds:si <- ptr to the item mov si, ds:[di] add si, dx ; ds:si <- ptr to the entry .leave ret AddDependencyListEntry endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InsertDepListBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Insert a dependency list block. CALLED BY: AddDependencyListEntry PASS: bx = File handle ss:bp = DependencyParameters RETURN: es:si = Pointer to the first entry in the block es:di = Pointer to the base of the block (The block is locked, obviously) DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 6/26/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InsertDepListBlock proc near uses ax, cx .enter ; ; Lock the previous entry down. ; mov ax, ss:[bp].DP_prev.segment ; ax <- group mov di, ss:[bp].DP_prev.offset ; di <- item call DBLock ; *es:di <- ptr to data mov si, di ; *es:si <- ptr to data ; ; Allocate a new item to be the next list block. ; mov cx, size DependencyListHeader ; cx <- size for new block mov ax, DB_UNGROUPED ; No group needed thanks call DBAlloc ; ax <- group, di <- item ; ; Save the new block as the next pointer of the previous block and ; move the next pointer of the previous block to be the next pointer ; of the current block. ; mov si, es:[si] ; es:si <- ptr to prev entry push es:[si].segment, es:[si].offset ; Save the "next" link mov es:[si].segment, ax ; Save new block as "next" mov es:[si].offset, di call DBDirty ; Dirty the previous item call DBUnlock ; Release the previous item ; ; Lock down the new block. ; mov ss:[bp].DP_dep.segment, ax ; Save new blocks group/item mov ss:[bp].DP_dep.offset, di call DBLock ; *es:di <- new block mov di, es:[di] ; es:di <- new block pop es:[di].segment, es:[di].offset ; Save the "next" pointer call DBDirty ; Dirty the item mov si, di ; es:si <- ptr to place to insert add si, size DependencyListHeader .leave ret InsertDepListBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SplitDepListBlock %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Split a dependency list block at a given point. CALLED BY: AddDependencyListEntry PASS: bx = File handle es:di = Pointer to the base of the block es:si = Pointer to the place to split ss:bp = DependencyParameters RETURN: es:di = Pointer to the base of the block to insert into es:si = Pointer to the place to insert DESTROYED: nothing PSEUDO CODE/STRATEGY: Divide the block into two parts. Set the pointer into the correct block. KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 6/26/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SplitDepListBlock proc near uses ax, cx, ds .enter sub si, di ; si <- offset to insert at push si ; Save offset to insert at mov ax, DB_UNGROUPED ; Ungrouped please ChunkSizePtr es, di, cx ; cx <- Size of current block push cx ; Save old size ; ; Compute the size for the new block: ; (Size of entries / 2) + Header size ; sub cx, size DependencyListHeader shr cx, 1 add cx, size DependencyListHeader call DBAlloc ; ax <- group, di <- item segmov ds, es ; ds:si <- ptr to current block mov si, ss:[bp].DP_chunk mov si, ds:[si] ; ; bx = File handle ; ax = Group ; di = Item ; cx = Size of new block ; ds:si = Pointer to the old block ; On Stack: ; Size of the old block ; Offset to insert at in old block ; pushdw axdi ; Save group, item call DBLock ; *es:di <- ptr to new block mov di, es:[di] ; es:di <- ptr to new block movdw es:[di].DLH_next, ds:[si].DLH_next, ax ; ; Set the "next" link for the current block to the new item. ; popdw ds:[si].DLH_next ; ; OK... The "next" links are all set up and we have: ; ds:si = Pointer to the current block ; es:di = Pointer to the new block ; cx = Size for new block ; on stack: ; Size of the old block ; Offset to insert at in old block ; sub cx, size DependencyListHeader pop ax push di ; Save ptr to base of new block sub ax, cx add si, ax ; ds:si <- ptr to bytes to copy add di, size DependencyListHeader rep movsb ; Copy the dependencies pop di ; Restore ptr to base of new block ; ; Now... We've copied the dependencies, we've set the links up. ; We need to: ; ReAlloc the original block smaller ; Dirty both blocks ; Figure which block contains the position to insert at ; Unlock the other block ; Set the pointer correctly ; ; ; Mark dirty and unlock the NEW block ; call DBDirty call DBUnlock ; ; Mark dirty and unlock the OLD block. ; segmov es, ds ; es <- segment address of old block call DBDirty ; Dirty the block before unlocking call DBUnlock ; Unlock it mov_tr cx, ax ; cx <- new size mov ax, ss:[bp].DP_dep.segment ; ax <- group mov di, ss:[bp].DP_dep.offset ; di <- item call DBReAlloc ; ReAlloc the item smaller ; into es ; ; Lock the old block again. ; mov ax, ss:[bp].DP_dep.segment ; ax <- group mov di, ss:[bp].DP_dep.offset ; di <- item call DBLock ; *es:di <- ptr to old block mov di, es:[di] ; es:di <- ptr to old block pop si ; Restore offset into the block cmp si, cx ; Check for offset too large jb quit ; Branch if offset is OK ; ; The offset is into the second block. We need to release the first one ; and lock the second one. We also need to update the stack frame. ; Luckily we have a routine to do this :-) ; push si ; Save offset segmov ds, es ; ds:di <- ptr to base of old block call LockNextDependencyBlock ; ds:si <- ptr to new block segmov es, ds ; es:di <- ptr to new block mov di, si pop si ; Restore offset sub si, cx ; Make into offset into 2nd block add si, size DependencyListHeader quit: add si, di ; Make offset into a pointer .leave ret SplitDepListBlock endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DeleteDependencyEntry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Delete a dependency list item CALLED BY: RemoveSingleDependency PASS: ds:si = Pointer to place to delete ds:di = Pointer to the start of the dependency list block ss:bp.DP_dep = DBase item containing the dependency list block RETURN: zero flag set if there are no more entries in the dependency list. Dependency list block pointed at by ds unlocked DESTROYED: nothing PSEUDO CODE/STRATEGY: if (blockSize - entrySize == 0) then Unlink( block ) Free( block ) endif KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 2/22/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DeleteDependencyEntry proc near uses ax, bx, cx, dx, di, si, es .enter ; ; For DBDeleteAt we need: ; bx = File handle ; ax = Group ; di = Item ; dx = Offset to delete at ; cx = # of bytes to delete ; mov dx, si ; dx <- offset to delete at sub dx, di segmov es, ds, si ; es:di <- ptr to block lds si, ss:[bp].CP_cellParams mov bx, ds:[si].CFP_file ; bx <- file handle ; ; Check for removing this block entirely ; ChunkSizePtr es, di, cx ; cx <- old size of the block sub cx, size Dependency + size DependencyListHeader tst cx ; Check for nuking the block jnz unlockAndDelete ; Branch if we're not ; ; We are nuking the entire block. ; push es:[di].segment, es:[di].offset call DBUnlock ; Unlock the item mov ax, ss:[bp].DP_dep.segment mov di, ss:[bp].DP_dep.offset call DBFree ; Free the entry mov ax, ss:[bp].DP_prev.segment mov di, ss:[bp].DP_prev.offset call DBLock ; *es:di <- previous entry mov di, es:[di] ; es:di <- previous entry ; ; Restore the link from the nuked block into the current block. ; pop es:[di].segment, es:[di].offset call DBDirty ; Dirty the item mov ax, es:[di].segment ; ax == 0 if we've removed the tail block ; in the chain call DBUnlock ; Release the block ; ; Now we check for an empty list. We do this by checking the following: ; group/item of block we just nuked are zero (ax == 0) ; previous block is the cell ; tst ax ; Check for removed last block jnz quitNotEmpty ; Branch if we have not tst ss:[bp].DP_prevIsCell ; Check for nuked all references jz quitNotEmpty ; Branch if we haven't clr ax ; Set the zero flag (empty list) jmp quit ; Branch to quit unlockAndDelete: call DBUnlock ; Release the block ; ; bx = File handle ; dx = Offset to delete at ; mov cx, size Dependency ; cx <- # of bytes to nuke mov ax, ss:[bp].DP_dep.segment mov di, ss:[bp].DP_dep.offset call DBDeleteAt ; Resize the block smaller quitNotEmpty: or ax, -1 ; Clear the zero flag (not an empty list) quit: .leave ret DeleteDependencyEntry endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserForeachReference %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Process each reference in an expression. CALLED BY: Global PASS: es:di = Pointer to the expression cx:dx = Callback routine (Callback *must* be vfptr for XIP) ss:bp = Arguments to the callback ds:si = More arguments to the callback RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: Callback should be defined as far: PASS: es:di = Pointer to the cell reference ss:bp = Passed parameters ds:si = More passed parameters al = Type of reference: PARSER_TOKEN_CELL PARSER_TOKEN_NAME RETURN: nothing DESTROYED: nothing KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 7/16/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ParserForeachReferenceOLD proc far FALL_THRU ParserForeachReference ParserForeachReferenceOLD endp ParserForeachReference proc far uses ax, bx, di .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, cxdx > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif push cx ; Save the segment of the callback push dx ; Save the offset of the callback mov bx, sp ; ss:bx = ptr to the callback tokenLoop: ; ; es:di = Pointer to next token ; ds:si = Passed ds:si ; ds = Segment address of parsers dgroup ; On stack: ; Callback (far ptr) ; mov al, {byte} es:[di] ; ax <- type of the token inc di ; es:di <- ptr past the token cmp al, PARSER_TOKEN_END_OF_EXPRESSION je quit ; Branch if no more expression cmp al, PARSER_TOKEN_CELL ; Check for a cell reference je callCallback ; Branch if not a cell reference cmp al, PARSER_TOKEN_NAME ; Check for a name reference jne nextToken ; Branch if not a name reference callCallback: if FULL_EXECUTE_IN_PLACE push bx, ax mov ss:[TPD_dataBX], bx mov ss:[TPD_dataAX], ax mov ax, ss:[bx].offset mov bx, ss:[bx].segment call ProcCallFixedOrMovable pop bx, ax else call {dword} ss:[bx] ; Call the callback routine endif nextToken: call ParserPointToNextToken jmp tokenLoop ; Loop to process it quit: pop dx ; Restore passed dx pop cx ; Restore passed cx .leave ret ParserForeachReference endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserPointToNextToken %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Point at the next token in the token stream CALLED BY: ParserForeachReference, ParserForeachToken PASS: al - ParserTokenType es:di - pointing at the PT_data part of a ParserToken RETURN: es:di - updated DESTROYED: ah (cleared), cx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 11/11/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ParserPointToNextToken proc near uses ds, si .enter EC < cmp al, ParserTokenType > EC < ERROR_A EVAL_ILLEGAL_PARSER_TOKEN > cbw ; clr ah ; ; If the current token is PARSER_TOKEN_STRING, then add the ; string size to DI ; cmp al, PARSER_TOKEN_STRING jne afterAdd if DBCS_PCGEOS mov si, es:[di].PTSD_length shl si, 1 ; si <- string size add di, si ; di <- ptr after string else add di, es:[di].PTSD_length endif afterAdd: ; ; Add in the size of the token to get to the next one. ; NOFXIP < segmov ds, dgroup, si ; ds <- dgroup > FXIP < mov si, bx ; si = value of bx > FXIP < mov bx, handle dgroup > FXIP < call MemDerefDS ; ds = dgroup > FXIP < mov bx, si ; restore bx > mov si, ax ; si <- index into list of token mov cl, ds:parserTokenSizeTable[si] clr ch add di, cx ; Skip to next token .leave ret ParserPointToNextToken endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserForeachToken %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Process each token in an expression. CALLED BY: Global PASS: es:di = Pointer to the expression cx:dx = Callback routine (Callback *must* be vfptr for XIP) ss:bp = Arguments to the callback ds:si = More arguments to the callback RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: Callback should be defined as far: PASS: es:di = Pointer to the cell reference ss:bp = Passed parameters ds:si = More passed parameters al = Type of reference: PARSER_TOKEN_CELL PARSER_TOKEN_NAME RETURN: nothing DESTROYED: nothing KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 7/16/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ParserForeachTokenOLD proc far FALL_THRU ParserForeachToken ParserForeachTokenOLD endp ParserForeachToken proc far uses ax, bx, di .enter if FULL_EXECUTE_IN_PLACE ; ; Make sure the fptr passed in is valid ; EC < pushdw bxsi > EC < movdw bxsi, cxdx > EC < call ECAssertValidFarPointerXIP > EC < popdw bxsi > endif push cx ; Save the segment of the callback push dx ; Save the offset of the callback mov bx, sp ; ss:bx = ptr to the callback tokenLoop: ; ; es:di = Pointer to next token ; ds:si = Passed ds:si ; ds = Segment address of parsers dgroup ; On stack: ; Callback (far ptr) ; mov al, {byte} es:[di] ; ax <- type of the token inc di ; es:di <- ptr past the token cmp al, PARSER_TOKEN_END_OF_EXPRESSION je quit ; Branch if no more expression callCallback:: if FULL_EXECUTE_IN_PLACE push bx, ax mov ss:[TPD_dataBX], bx mov ss:[TPD_dataAX], ax mov ax, ss:[bx].offset mov bx, ss:[bx].segment call ProcCallFixedOrMovable pop bx, ax else call {dword} ss:[bx] ; Call the callback routine endif call ParserPointToNextToken jmp tokenLoop ; Loop to process it quit: pop dx ; Restore passed dx pop cx ; Restore passed cx .leave ret ParserForeachToken endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ParserRemoveDependenciesInRange (COMMENTED OUT) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Remove from the dependency list of a cell any references which fall in a given range. CALLED BY: Global PASS: ss:bp = Pointer to the rectangle of cells to nuke from the dependency list ax = Row cx = Column ds:si = CellFunctionParameters RETURN: carry set if the cell is devoid of dependencies DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 7/16/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if 0 ParserRemoveDependenciesInRange proc far uses ax, bx, cx, dx, bp, di, si, ds .enter mov bx, bp ; ss:bx <- rectangle to check sub sp, size DependencyParameters ; Allocate stack frame mov bp, sp ; ss:bp <- stack frame ; ; Fill in only the stuff we need. ; mov ss:[bp].CP_cellParams.segment, ds mov ss:[bp].CP_cellParams.offset, si call LockFirstDepListBlock ; ds:si <- dependency list ; ds:di <- dependency list ; si == 0 if no dependencies tst si ; Check for no dependencies jz noMoreDependencies ; Branch if none findInThisBlock: ; ; Check each entry to see if it is in the passed range. ; ChunkSizePtr ds, si, cx ; cx <- size of this part sub cx, size DependencyListHeader ; cx <- size w/o header mov di, si ; Save ptr to block start add si, size DependencyListHeader ; ds:si <- first entry ; ; cx = # of bytes in this part of the list ; ds:si = Pointer to first entry in this part ; ds:di = Pointer to the start of this block ; ss:bx = Pointer to the rectangle ; EC < tst cx > EC < ERROR_Z -1 > findLoop: mov ax, ds:[si].D_row ; ax <- row mov dl, ds:[si].D_column ; dl <- column call IsEntryInRange ; Check for entry in range jnc nextEntry ; Branch if it's not ; ; The entry falls inside the range. We want to delete it. ; call DeleteDependencyEntry ; Remove the dependency jz noMoreDependencies ; Branch if no more here ; ; Well... We deleted an entry. This means that we have one less entry ; to process, but we are already pointing at it... ; jmp nextEntryKeepPointer nextEntry: add si, size Dependency ; Move to next entry nextEntryKeepPointer: sub cx, size Dependency ; This many fewer bytes jnz findLoop ; Loop to process it ; ; There were no more entries in this block, check the next one. ; call LockNextDependencyBlock ; Lock next block jc findInThisBlock ; Loop to check it out ; ; There are no more dependencies at all. ; clc ; Signal: there are dependencies quit: lahf ; Save "no dependencies" flag add sp, size DependencyParameters ; Restore stack frame sahf ; Rstr "no dependencies" flag .leave ret noMoreDependencies: stc ; Signal: no more dependencies jmp quit ParserRemoveDependenciesInRange endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IsEntryInRange (COMMENTED OUT) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if an entry falls inside a rectangle. CALLED BY: ParserRemoveDependenciesInRange PASS: ax = Row dl = Column ss:bx = Pointer to rectangle RETURN: carry set if entry falls in the rectangle DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 7/16/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ IsEntryInRange proc near cmp ax, ss:[bx].R_top ; Check for above top jb outside cmp ax, ss:[bx].R_bottom ; Check for beyond bottom ja outside cmp dl, {byte} ss:[bx].R_left ; Check for below top jb outside cmp dl, {byte} ss:[bx].R_right ; Check for beyond right ja outside stc ; Signal: Cell is in range jmp quit outside: clc ; Signal: not in range quit: ret IsEntryInRange endp endif EvalCode ends
26.366467
79
0.603864
5bf7d492c17ae2c66967f9788592f40ae5b00379
448
asm
Assembly
oeis/344/A344057.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/344/A344057.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/344/A344057.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A344057: a(n) = (2*n)! / CatalanNumber(n - 1) for n >= 1 and a(0) = 1. ; Submitted by Jon Maiga ; 1,2,24,360,8064,259200,11404800,660441600,48771072000,4477184409600,500391198720000,66920738734080000,10554356508917760000,1938789402181632000000,410402940653807861760000,99180710658003566592000000,27141314475238493257728000000 mov $1,2 mov $2,1 mov $3,1 lpb $0 mul $1,$0 mul $2,$0 sub $0,1 mov $3,$2 add $2,$1 mul $3,$1 lpe mov $0,$3
26.352941
229
0.723214
4aeab02d25e9a656cc6960f7becf0b916968082e
11,652
asm
Assembly
lib/misc_micro/PIC/ibw26.asm
terrillmoore/maxim-onewire-pd
c32bd4ed1b2d0e54fdf496639ed399d147d41809
[ "MIT" ]
null
null
null
lib/misc_micro/PIC/ibw26.asm
terrillmoore/maxim-onewire-pd
c32bd4ed1b2d0e54fdf496639ed399d147d41809
[ "MIT" ]
null
null
null
lib/misc_micro/PIC/ibw26.asm
terrillmoore/maxim-onewire-pd
c32bd4ed1b2d0e54fdf496639ed399d147d41809
[ "MIT" ]
1
2021-09-01T06:29:42.000Z
2021-09-01T06:29:42.000Z
; File: IBW26.ASM ; iButton reader with 26 bit Wiegand output - ; This code reads an arriving iButton and then presents the compromised ; iButton ID out as Wiegand formatted pulses. Output pulses are low-going, ; 100us wide with 2ms minimum between pulses. ; The clock/crystal frequency is assumed to be nominally 4 MHz +/- 20%. #Define SiteCode 123 ; We use a fioxed Wiegand site code ; processor 12C508A processor 16C54A radix dec ; include 12C508.asm include 16C54.asm include picmacs.asm #Define gpio RB ; Cross-define for PIC 16C54 testing CBLOCK 8 LoopCounter ; General Purpose Loop Counter RcvByte ; Working I/O byte crcl ; CRC-8 Working Accumulator flags ; Varios boolean flag bits Delay ; A counter for time delays RomData0 ; ROM ID as read from arriving iButton device RomData1 ; and also the Wiegand message workspace RomData2 RomData3 ENDC ; We re-use the RomData bytes to save RAM - #Define Wiegand0 RomData3 ; Different names when they become Wiegand buffer #Define Wiegand1 RomData2 #Define Wiegand2 RomData1 #Define Wiegand3 RomData0 #Define Data0Pin gpio,0 ; Data 0 Line #Define Data1Pin gpio,1 ; Data 1 Line #Define GreenLED gpio,3 ; Line that drives GREEN LED (input) #Define OptDevice gpio,4 ; Auxilliary 1-Wire Device Data Line #Define iBPin gpio,5 ; iButton Probe Data line #Define AllHiZ 11111111B ; GPIO TRIS write to make all Hi-Z #Define Data0 11111110B ; TRIS value to gen pulse on DATA0 line #Define Data1 11111101B ; TRIS value to gen pulse on DATA1 line #Define iButton 11011111B ; TRIS value to gen low on iButton data line #Define EP flags,1 ; Define an Even Parity bit #Define OP flags,2 ; Define an Odd Parity bit #Define Presence flags,3 ; Define a presence pulse flag bit #Define Short flags,3 ; Define a shoted bus flag bit ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; ; ; iButton Serial Number as read into RomData0-7: ; ; Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 ; 01234567 01234567 01234567 01234567 01234567 01234567 01234567 01234567 ; <- FC -> <-L------------------------ Serial Number -----------------------M-> <-CRC8-> ; ; ; 26-bit Wiegand Format: ; ; Byte 0 Byte 1 Byte 2 Byte 3 ; 01234567 01234567 01234567 01XXXXXX ; P0123456 70123456 70123456 7PXXXXXX ; E<----------><---------------------->O ; Site Code Key ID Number ; ; E=Even parity of adjacent 12 bits ; O=Odd parity of adjacent 12 bits ; org 0 goto Start ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Function: TReset ; Desc: Generate a Touch Reset pulse on the probe and see if there is ; a device present. These timings can be off by +/- 20% and ; remain valid. Crystal/clock frequency can be between 3.33 Mhz and ; 4.8 Mhz and timings remain valid. ; Entry: None ; Exit: Presence flag set if a presence pulse was observed ; Short flag set if line was shorted on entry ; Uses: Delay TReset: bsf Short btfss iBPin ; If we see a presence pulse, then retlw 0 bcf Short movlw iButton tris gpio ; Take 1-Wire bus LOW movlw 192 movwf Delay DlyLp5: nop decfsz Delay,f ; Delay 580us (480us + 20%) goto DlyLp5 movlw AllHiZ tris gpio ; Release the bus nop nop nop nop ; Allow for rise time nop nop bcf Presence ; Assume no presence pulse will be seen movlw 145 movwf Delay PWaitLp: btfss iBPin ; If we see a presence pulse, then bsf Presence ; Indicate that it was observed decfsz Delay,f ; Watch for 580us (480us + 20%) goto PWaitLp retlw 0 ; Return ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Function: TBit, TByte, RByte ; Desc: Perform a Standard Speed 1-Wire Touch Bit, Touch Byte, ; or Read Byte function. These timings can be off by +/- 20% and ; remain valid. Crystal/clock frequency can be between 3.33 Mhz and ; 4.8 Mhz and timings remain valid. ; Entry: None for RByte ; RcvByte = Byte to send for TByte ; RcvByte.0 = Bit to send for TBit ; Exit: WREG.7, RcvBit.7 = Received bit for TBit ; WREG, RcvByte = Byte Read for RByte ; WREG, RcvByte = Echo of byte sent for TByte ; Uses: LoopCounter, Delay, RcvByte, WREG ; Timing: Nominal: -20%: +20%: ; ; Write-One/Read Low Time 7 us 5.833 us 8.4 us ; Write-Zero Low Time 72 us 60 us 86.4 us ; Sample time 15 us 12.5 us 18 us ; Recovery time 6 us 5 us 7.2 us ; Overall Time Slot 78 us 65 us 93.6 us ; Date rate 12,820 BPS 15384 BPS 10,683 BPS ; Note: These timings should be extended for long line 1-Wire operations. TBit: movlw 1 ; Ask for a loop of only one goto TBEnt ; Do it like the rest RByte: movlw 255 ; For receives, always send 0xFF movwf RcvByte ; from the RcvByte register TByte: movlw 8 ; Normal process 8 bits per byte TBEnt: movwf LoopCounter ; Start a processing loop once per bit TBLp: nop ; 75 75 nop ; 76 76 movlw iButton ; 77 77 tris gpio ; 00/78 00/78 -> Start Time Slot btfss RcvByte,0 ; 01 01 goto BIsZero1 ; 02 02 nop ; 03 - nop ; 04 - nop ; 05 - movlw AllHiZ ; 06 tris gpio ; 07 - -> End a read or write one bit movlw 1 ; 08 - goto FinBit1 ; 09 - BIsZero1: ; - - movlw 3 ; - 03 nop ; - 04 FinBit1: ; - - movwf Delay ; 10 05 BDLoop11: ; - - decfsz Delay,f ; 11 06 goto BDLoop11 ; 12 12 bcf C ; 13 13 nop ; 14 14 btfsc iBPin ; 15 15 -> Sample the line bsf C ; 16 16 rrf RcvByte,1 ; 17 17 movlw 25 ; 18 18 movwf Delay ; 19 19 BDLoop21: ; - - decfsz Delay,f ; 20 20 goto BDLoop21 ; 21 21 movlw AllHiZ ; 71 71 tris gpio ; 72 72 -> End a write zero bit decfsz LoopCounter,f ; 73 goto TBLp ; 74 retlw 0 ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Function: crc8, crc8first ; Desc: Perform a the 8 bit CRC on the value in WREG on entry. ; Entry: WREG = New byte ; Exit: crcl holds the resulting crc8 ; Uses: RcvByte as a working register ; Call crc8first to process the first byte, and crc8 for subsequent bytes. ; Note: This code is a direct translation from 8051 code and can likely be ; optimized. crc8first: clrf crcl crc8: movwf RcvByte movf crcl,w xorwf RcvByte,f movf RcvByte,w movwf crcl movlw 0F0H andwf crcl,f swapf RcvByte,f movf RcvByte,w xorwf crcl,f rrf RcvByte,w rrf RcvByte,f movf RcvByte,w xorwf crcl,f rrf RcvByte,w rrf RcvByte,f swapf RcvByte,f movlw 0C7H andwf RcvByte,f movlw 00001000B btfsc RcvByte,2 xorwf RcvByte,f movf RcvByte,w xorwf crcl,f swapf RcvByte,f movlw 0CH andwf RcvByte,f movf RcvByte,w xorwf crcl,f rrf RcvByte,w rrf RcvByte,f movf RcvByte,w xorwf crcl,f retlw 0 ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Start: movlw 00001111B option clrf gpio ; Prepare to make zeros on all GPIO pins movlw AllHiZ ; Leave Test Pin on Output mode tris gpio ; Take all I/O pins to Hi-Z ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; The reader loops emitting presence pulses and waiting for an iButton to ; arrive. The iButton is then read for ID number. Main: clrwdt call TReset ; Issue 480 us Touch Reset pulse btfss Short goto Main ; Loop in wait if the bus is shorted btfss Presence goto Main ; Loop in wait for a presence to be seen movlw 33H movwf RcvByte call TByte ; Perform the Read ROM command byte call RByte ; Read 8 bytes of iButton serial number movf RcvByte,w btfsc Z goto Main ; Bad read if Family Code = 0 movwf RomData0 call crc8first call RByte movf RcvByte,w movwf RomData1 call crc8 call RByte movf RcvByte,w movwf RomData2 call crc8 call RByte movf RcvByte,w call crc8 call RByte movf RcvByte,w call crc8 call RByte movf RcvByte,w call crc8 call RByte movf RcvByte,w call crc8 call RByte movf RcvByte,w call crc8 clrwdt ; Check the CRC8 of the ROMID. If it's BAD then goto MAIN and try again - movf crcl,w btfss Z goto Main ; Loop back if CRC8 is not good GotKeyID: ; Map the Rom Data bits to Wiegand bits - MapBits26: movlw SiteCode ; Start with the constant site code movwf Wiegand0 ; Compute the Wiegand Parity Bits ; We rotate the entire 24 bit Wiegand register around and count bits - ComputeParity: ; Count the 12 EP-related bits - clrf RcvByte ; Use RcvByte as a bit counter bcf EP ; Assume EP bit is zero movlw 12 ; We will count 12 bits movwf LoopCounter BCLp5: rlf Wiegand0,w ; Get the LS bit into the carry flag rlf Wiegand2,f rlf Wiegand1,f ; Rotate the entire 24 bit Wiegand value right rlf Wiegand0,f ; so carry is the LS bit btfsc C ; If the bit is a "1" then incf RcvByte,f ; Increment the "1" bit counter decfsz LoopCounter,f goto BCLp5 ; Loop until 12 bits are counted btfsc RcvByte,0 ; The Parity is the LS bit of the bit count bsf EP ; We will need an EP bit if the count was odd ; Count the 12 OP-related bits - clrf RcvByte ; Use RcvByte as a bit counter bcf OP ; Assume OP bit is zero movlw 12 ; We will count 12 bits movwf LoopCounter BCLp2: rlf Wiegand0,w ; Get the LS bit into the carry flag rlf Wiegand2,f rlf Wiegand1,f ; Rotate the entire 24 bit Wiegand value right rlf Wiegand0,f ; so carry is the LS bit btfsc C incf RcvByte,f decfsz LoopCounter,f goto BCLp2 ; Loop until 12 bits are counted btfss RcvByte,0 ; The Parity is the LS bit of the bit count bsf OP ; We will need an OP bit if the count was even ; Insert the parity bits into the Wiegand data - clrf Wiegand3 ; Assume all upper-bits to be zero bcf C btfsc OP ; Set CY to equal OP flag bsf C rrf Wiegand3,f ; Insert the Odd Parity bit first bcf C btfsc EP bsf C ; Make carry equal the EP flag rrf Wiegand0,f rrf Wiegand1,f ; Add EP bit, rotate all left once rrf Wiegand2,f rrf Wiegand3,f ; Now Wiegand 0-3 equal 26 bit message clrwdt ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Function: WiegandOut ; Desc: Given a site code and a key ID, output the Wiegand bit stream WiegandOut: movlw 26 ; Prepare to generate 26 Wiegand pulses movwf LoopCounter WBSLoop: clrwdt rlf Wiegand3,f rlf Wiegand2,f rlf Wiegand1,f rlf Wiegand0,f btfsc C goto GenDataOne GenDataZero: movlw Data0 tris gpio ; Take the Data0 line LOW goto InterBit GenDataOne: movlw Data1 tris gpio ; Take the Data1 line LOW InterBit: movlw 55 ; 55 Loops = 110 cycles = 110us movwf Delay DlyLp1: decfsz Delay,f goto DlyLp1 movlw AllHiZ tris gpio ; Release DATA0 and DATA1 to Hi-Z movlw 0 ; 256 Loops, 256*8 = 2048 cycles = 2.048 ms movwf Delay DlyLp2: nop nop nop nop nop nop decfsz Delay,f goto DlyLp2 decfsz LoopCounter,f goto WBSLoop ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Wait for the iButton to be gone - WaitGone: clrwdt movlw 50 ; We will expect 50 Resets without any presence movwf LoopCounter WtLp1: call TReset ; Issue Touch Resets btfsc Presence ; If presence, start the wait over again goto WaitGone decfsz LoopCounter,f ; Keep checking to make sure it is gone goto WtLp1 goto Main END
22.537718
99
0.637401
aa4f2c8ffafea5442b62ef2aac815506e75da2e6
1,217
asm
Assembly
programs/oeis/127/A127934.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/127/A127934.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/127/A127934.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A127934: a(8n)=8n+1, a(8n+1)=a(8n+2)=a(8n+3)=8n+5, a(8n+4)=8n+6, a(8n+5)=a(8n+6)=a(8n+7)=8n+8. ; 1,5,5,5,6,8,8,8,9,13,13,13,14,16,16,16,17,21,21,21,22,24,24,24,25,29,29,29,30,32,32,32,33,37,37,37,38,40,40,40,41,45,45,45,46,48,48,48,49,53,53,53,54,56,56,56,57,61,61,61,62,64,64,64,65,69,69,69,70,72,72,72,73,77,77,77,78,80,80,80,81,85,85,85,86,88,88,88,89,93,93,93,94,96,96,96,97,101,101,101,102,104,104,104,105,109,109,109,110,112,112,112,113,117,117,117,118,120,120,120,121,125,125,125,126,128,128,128,129,133,133,133,134,136,136,136,137,141,141,141,142,144,144,144,145,149,149,149,150,152,152,152,153,157,157,157,158,160,160,160,161,165,165,165,166,168,168,168,169,173,173,173,174,176,176,176,177,181,181,181,182,184,184,184,185,189,189,189,190,192,192,192,193,197,197,197,198,200,200,200,201,205,205,205,206,208,208,208,209,213,213,213,214,216,216,216,217,221,221,221,222,224,224,224,225,229,229,229,230,232,232,232,233,237,237,237,238,240,240,240,241,245,245,245,246,248,248,248,249,253 mov $3,$0 add $0,8 mov $2,1 lpb $0,1 add $0,2 mov $1,$2 add $4,4 add $1,$4 sub $1,1 mov $2,$4 trn $4,$0 sub $0,1 trn $0,5 add $1,$4 sub $2,$1 mov $4,1 lpe lpb $3,1 add $1,1 sub $3,1 lpe sub $1,3
46.807692
895
0.657354
21abf16202e119bfe852bd506011921208111741
668
asm
Assembly
oeis/163/A163114.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/163/A163114.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/163/A163114.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A163114: a(n) = 5*a(n-2) for n > 2; a(1) = 3, a(2) = 5. ; Submitted by Jon Maiga ; 3,5,15,25,75,125,375,625,1875,3125,9375,15625,46875,78125,234375,390625,1171875,1953125,5859375,9765625,29296875,48828125,146484375,244140625,732421875,1220703125,3662109375,6103515625,18310546875,30517578125,91552734375,152587890625,457763671875,762939453125,2288818359375,3814697265625,11444091796875,19073486328125,57220458984375,95367431640625,286102294921875,476837158203125,1430511474609375,2384185791015625,7152557373046875,11920928955078125,35762786865234375,59604644775390625 mov $1,5 mov $2,3 lpb $0 sub $0,1 mul $2,5 mov $3,$1 mov $1,$2 mov $2,$3 lpe mov $0,$2
44.533333
486
0.788922
bf5364b3ae00cc245c6e0615f028c72eb5409783
2,874
asm
Assembly
Assembly/Examples/primes.asm
p-rivero/CESCA
7772671e36ef137bdb468bc09f50e53f0371ce20
[ "MIT" ]
7
2020-05-18T15:33:30.000Z
2021-02-07T09:24:05.000Z
Assembly/Examples/primes.asm
p-rivero/CESCA
7772671e36ef137bdb468bc09f50e53f0371ce20
[ "MIT" ]
null
null
null
Assembly/Examples/primes.asm
p-rivero/CESCA
7772671e36ef137bdb468bc09f50e53f0371ce20
[ "MIT" ]
1
2021-01-30T22:56:36.000Z
2021-01-30T22:56:36.000Z
#include "CESCA.cpu" #include "startup.asm" ; This program finds all primes that fit in 16 bits #bank data str_start: #d "Starting...\0" str_found: #d "found: \0" str_end: #d "Found all primes below 2^16\0" temp_n: #res 2 temp_i: #res 1 #bank program PRINT_PRIMES: mov R0, str_start call PRINT.string mov R2, 0 ; Counter of the current number we are testing mov R3, 0 .loop: mov R0, R2 mov R1, R3 call Is_Prime ; If (R1,R0) is prime, returns a non-zero value test R0 jz ..skip_print mov LCDCmd, Clr mov R0, str_found call PRINT.string mov R0, R2 ; Print number mov R1, R3 call PRINT.uint16 ..skip_print: inc R2 jnc skip(2) ; If lower bits overflow, increment upper bits inc R3 jc .end ; If upper bits overflow, end execution jmp .loop ; Continue looping .end: ; Wait? mov LCDCmd, Clr mov R0, str_end call PRINT.string hlt ; bool Is_Prime(uint16_t n) { ; if (n <= 1) return false; ; if (n <= 3) return true; ; if (n % 2 == 0 || n % 3 == 0) return false; ; for (uint8_t i = 5; i * i <= n; i += 6) ; if (n % i == 0 || n % (i + 2) == 0) ; return false; ; return true; ; } ; If (R1,R0) is prime, returns a non-zero value Is_Prime: ; Store context push R2 push R3 ; Store n mov [temp_n], R0 mov [temp_n+1], R1 .initial_tests: test R1 jnz ..skip cmp R0, 1 jleu .return.false ; n <= 1 cmp R0, 3 jleu .return.true ; n <= 3 ..skip: mask R0, 0x01 ; n % 2 jz .return.false mov R2, 3 call MATH.UDiv16 test R3 ; n % 3 jz .return.false ; Begin for loop mov R0, 5 mov [temp_i], R0 ; uint8_t i = 5 .loop: mov R2, R0 ; Copy i to R2 mov R3, 0 call MATH.UMult16 ; i * i mov R2, [temp_n+1] ; Compare upper bits of (i*i) and n cmp R2, R1 jltu .return.true ; n < i*i: End for loop, return true jne ..skip mov R2, [temp_n] ; Upper bits are equal, compare lower bits cmp R2, R0 jltu .return.true ; n < i*i: End for loop, return true ..skip: ; if (n % i == 0) return false; mov R0, [temp_n] ; Load n mov R1, [temp_n+1] mov R2, [temp_i] ; Load i call MATH.UDiv16 test R3 ; n % i jz .return.false ; if (n % (i + 2) == 0) return false; mov R0, [temp_n] ; Load n mov R1, [temp_n+1] add R2, R2, 2 ; R2 still contains i call MATH.UDiv16 test R3 ; n % (i + 2) jz .return.false ; i += 6 mov R0, [temp_i] add R0, R0, 6 jc .return.true ; i overflowed: End for loop, return true mov [temp_i], R0 jmp .loop ; Restore context and return .return: ..false: mov R0, 0 jmp skip(1) ..true: mov R0, 1 pop R3 pop R2 ret #include "PRINT.asm"
20.097902
67
0.549756
8ecca9b647e4042c4473d539ba0c04bdd667cb8d
800
asm
Assembly
src/game/over.asm
danielg0/yatzy-gb
510bb007f4f830750d146894f58868ab5c82b558
[ "MIT" ]
null
null
null
src/game/over.asm
danielg0/yatzy-gb
510bb007f4f830750d146894f58868ab5c82b558
[ "MIT" ]
null
null
null
src/game/over.asm
danielg0/yatzy-gb
510bb007f4f830750d146894f58868ab5c82b558
[ "MIT" ]
null
null
null
INCLUDE "hardware.inc" INCLUDE "macros.inc" SECTION "Over", ROM0 ; draw game over message ; draw's over the game roll and held columns, whilst preserving the scored ; categories, their values as well as the score and highscore columns DrawGameOver:: ; copying of string to screen is inlined to save cycles AT _SCRN0, 1, 1 DEF I = 0 REPT 18 ; strings in rgbds are one-indexed DEF I = I + 1 ; take a single character from LINE1 ld a, STRSUB("GAME A - NEW GAME", I, 1) ; draw to screen ldi [hl], a ENDR AT _SCRN0, 1, 2 DEF I = 0 REPT 14 DEF I = I + 1 ld a, STRSUB("OVER B - MENU", I, 1) ldi [hl], a ENDR ret ; cleanup game over message CleanupGameOver:: xor a ; ld a, $00 AT _SCRN0, 1, 1 REPT 18 ld [hl], a inc hl ENDR AT _SCRN0, 1, 2 REPT 18 ld [hl], a inc hl ENDR ret
15.686275
74
0.67
5dbe578ec348a771c3469f65f001f140d5908779
2,868
asm
Assembly
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_48_987.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_48_987.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/US/_zr_/i3-7100_9_0x84_notsx.log_48_987.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r15 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0x147c9, %r13 nop nop nop nop sub %r10, %r10 mov (%r13), %rbx dec %rsi lea addresses_A_ht+0x1ce09, %r15 nop and %rax, %rax mov (%r15), %r13d nop cmp %rsi, %rsi lea addresses_WT_ht+0x145d1, %r10 nop nop nop cmp %r15, %r15 movb (%r10), %bl nop cmp $12732, %rsi lea addresses_D_ht+0x596d, %rax clflush (%rax) nop nop nop cmp %rcx, %rcx mov $0x6162636465666768, %r15 movq %r15, %xmm1 and $0xffffffffffffffc0, %rax movntdq %xmm1, (%rax) nop nop nop nop nop xor $31759, %rax lea addresses_D_ht+0xbd09, %rsi lea addresses_D_ht+0x2709, %rdi clflush (%rdi) nop nop nop nop sub %r13, %r13 mov $111, %rcx rep movsw nop nop inc %rdi lea addresses_D_ht+0x15109, %rsi lea addresses_D_ht+0x4109, %rdi clflush (%rdi) nop nop nop nop cmp %r10, %r10 mov $20, %rcx rep movsb nop nop nop nop add %rbx, %rbx lea addresses_D_ht+0x149b9, %rbx nop nop add $25697, %rsi movl $0x61626364, (%rbx) nop nop add %rdi, %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r15 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r13 push %r14 push %r8 push %r9 push %rax // Faulty Load lea addresses_US+0x6509, %r14 nop nop nop sub %r13, %r13 vmovups (%r14), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $0, %xmm0, %r8 lea oracles, %r14 and $0xff, %r8 shlq $12, %r8 mov (%r14,%r8,1), %r8 pop %rax pop %r9 pop %r8 pop %r14 pop %r13 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_US', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_US', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'00': 48} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
20.197183
147
0.650976
b8e6440573ad95e751fa0b5400dad6783d300d55
167
asm
Assembly
src/subtraction.asm
MrPivato/mips_files
f0782d70a810b9fdb8923fc1f3d8882b021d079b
[ "MIT" ]
null
null
null
src/subtraction.asm
MrPivato/mips_files
f0782d70a810b9fdb8923fc1f3d8882b021d079b
[ "MIT" ]
null
null
null
src/subtraction.asm
MrPivato/mips_files
f0782d70a810b9fdb8923fc1f3d8882b021d079b
[ "MIT" ]
null
null
null
.data x: .word 180 y: .word 120 .text lw $s0, x lw $s1, y sub $t0, $s0, $s1 # t0 = s0 - s1 li $v0, 1 move $a0, $t0 # pseudo instruction, a0 = t03 syscall
12.846154
45
0.54491
92022e896411700a26a0d6bef1852f541f045250
869
asm
Assembly
programs/oeis/023/A023537.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/023/A023537.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/023/A023537.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A023537: a(n) = Lucas(n+4) - (3*n+7). ; 1,5,13,28,54,98,171,291,487,806,1324,2164,3525,5729,9297,15072,24418,39542,64015,103615,167691,271370,439128,710568,1149769,1860413,3010261,4870756,7881102,12751946,20633139,33385179,54018415,87403694,141422212,228826012,370248333,599074457,969322905,1568397480,2537720506,4106118110,6643838743,10749956983,17393795859,28143752978,45537548976,73681302096,119218851217,192900153461,312119004829,505019158444,817138163430,1322157322034,2139295485627,3461452807827,5600748293623,9062201101622,14662949395420,23725150497220,38388099892821,62113250390225,100501350283233,162614600673648,263115950957074,425730551630918,688846502588191,1114577054219311,1803423556807707,2918000611027226,4721424167835144,7639424778862584 mov $3,1 lpb $0 sub $0,1 add $2,3 mov $1,$2 add $4,1 add $2,$4 add $3,$4 mov $4,$1 lpe add $1,$3
57.933333
716
0.821634
7df0e9a80211d7626ce3b787acbf178b79669a42
412
asm
Assembly
programs/oeis/016/A016789.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/016/A016789.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
69
2021-08-28T10:34:30.000Z
2022-03-20T19:16:19.000Z
programs/oeis/016/A016789.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A016789: a(n) = 3*n + 2. ; 2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188,191,194,197,200,203,206,209,212,215,218,221,224,227,230,233,236,239,242,245,248,251,254,257,260,263,266,269,272,275,278,281,284,287,290,293,296,299 mul $0,3 add $0,2
68.666667
365
0.694175
32ce9d6de986168357df1e1c6803af976b45e278
442
nasm
Assembly
winxp_sp3/trun/pop_calc/winexec/calc_winexec.nasm
danf42/vulnserver
1b01aaa0f0b5706b5bc24c5f64d99dddcdcfe913
[ "MIT" ]
null
null
null
winxp_sp3/trun/pop_calc/winexec/calc_winexec.nasm
danf42/vulnserver
1b01aaa0f0b5706b5bc24c5f64d99dddcdcfe913
[ "MIT" ]
null
null
null
winxp_sp3/trun/pop_calc/winexec/calc_winexec.nasm
danf42/vulnserver
1b01aaa0f0b5706b5bc24c5f64d99dddcdcfe913
[ "MIT" ]
null
null
null
[BITS 32] global _start section .text _start: xor edx, edx ; zero out edx push edx ; push null byte onto stack push 0x6578652e ; push '.exe' onto stack push 0x636c6163 ; push 'calc' onto stack mov ebx, esp ; save stack pointer inc edx ; add 1 for SW_SHOWNORMAL push edx ; push SW_SHOWNORMAL onto stack push ebx ; push pointer to 'calc.exe' mov edx, 0x7c8623ad ; mov address of WinExec call edx
23.263158
47
0.669683
ae9881efa97edb43fcd3dda71b47bd46570c197e
4,898
asm
Assembly
audio/Venus.asm
AleffCorrea/BrickBreaker
625eec4e6c7c0053720a378c91f530f6ce58bcbe
[ "MIT" ]
4
2017-07-20T07:27:21.000Z
2021-04-18T03:59:44.000Z
audio/Venus.asm
AleffCorrea/BrickBreaker
625eec4e6c7c0053720a378c91f530f6ce58bcbe
[ "MIT" ]
null
null
null
audio/Venus.asm
AleffCorrea/BrickBreaker
625eec4e6c7c0053720a378c91f530f6ce58bcbe
[ "MIT" ]
1
2021-04-18T04:00:08.000Z
2021-04-18T04:00:08.000Z
;this file for FamiTone2 library generated by text2data tool Venus_music_data: .db 1 .dw .instruments .dw .samples-3 .dw .song0ch0,.song0ch1,.song0ch2,.song0ch3,.song0ch4,409,341 .instruments: .db $30 ;instrument $00 .dw .env3,.env0,.env0 .db $00 .db $30 ;instrument $02 .dw .env1,.env0,.env0 .db $00 .db $30 ;instrument $04 .dw .env2,.env6,.env0 .db $00 .db $30 ;instrument $08 .dw .env4,.env7,.env0 .db $00 .db $30 ;instrument $0d .dw .env3,.env0,.env0 .db $00 .db $30 ;instrument $12 .dw .env5,.env0,.env0 .db $00 .samples: .db $00+FT_DPCM_PTR,$00,$00 ;1 .db $00+FT_DPCM_PTR,$00,$00 ;2 .db $00+FT_DPCM_PTR,$00,$00 ;3 .db $00+FT_DPCM_PTR,$00,$00 ;4 .db $00+FT_DPCM_PTR,$00,$00 ;5 .db $00+FT_DPCM_PTR,$00,$00 ;6 .db $00+FT_DPCM_PTR,$00,$00 ;7 .db $00+FT_DPCM_PTR,$00,$00 ;8 .db $00+FT_DPCM_PTR,$00,$00 ;9 .db $00+FT_DPCM_PTR,$00,$00 ;10 .db $00+FT_DPCM_PTR,$00,$00 ;11 .db $00+FT_DPCM_PTR,$00,$00 ;12 .db $00+FT_DPCM_PTR,$00,$00 ;13 .db $00+FT_DPCM_PTR,$00,$00 ;14 .db $00+FT_DPCM_PTR,$00,$00 ;15 .db $00+FT_DPCM_PTR,$00,$00 ;16 .db $00+FT_DPCM_PTR,$00,$00 ;17 .db $00+FT_DPCM_PTR,$00,$00 ;18 .db $00+FT_DPCM_PTR,$00,$00 ;19 .db $00+FT_DPCM_PTR,$00,$00 ;20 .db $00+FT_DPCM_PTR,$00,$00 ;21 .db $00+FT_DPCM_PTR,$00,$00 ;22 .db $00+FT_DPCM_PTR,$00,$00 ;23 .db $00+FT_DPCM_PTR,$00,$00 ;24 .db $00+FT_DPCM_PTR,$27,$0f ;25 .db $00+FT_DPCM_PTR,$00,$00 ;26 .db $0a+FT_DPCM_PTR,$4c,$0f ;27 .db $00+FT_DPCM_PTR,$00,$00 ;28 .db $1e+FT_DPCM_PTR,$2d,$0f ;29 .db $2a+FT_DPCM_PTR,$77,$0f ;30 .db $00+FT_DPCM_PTR,$00,$00 ;31 .db $00+FT_DPCM_PTR,$00,$00 ;32 .db $00+FT_DPCM_PTR,$00,$00 ;33 .db $00+FT_DPCM_PTR,$00,$00 ;34 .db $00+FT_DPCM_PTR,$00,$00 ;35 .db $00+FT_DPCM_PTR,$00,$00 ;36 .db $00+FT_DPCM_PTR,$00,$00 ;37 .db $00+FT_DPCM_PTR,$00,$00 ;38 .db $00+FT_DPCM_PTR,$00,$00 ;39 .db $00+FT_DPCM_PTR,$00,$00 ;40 .db $00+FT_DPCM_PTR,$00,$00 ;41 .db $00+FT_DPCM_PTR,$00,$00 ;42 .db $00+FT_DPCM_PTR,$00,$00 ;43 .db $00+FT_DPCM_PTR,$00,$00 ;44 .db $00+FT_DPCM_PTR,$00,$00 ;45 .db $00+FT_DPCM_PTR,$00,$00 ;46 .db $00+FT_DPCM_PTR,$00,$00 ;47 .db $00+FT_DPCM_PTR,$00,$00 ;48 .db $00+FT_DPCM_PTR,$00,$00 ;49 .db $00+FT_DPCM_PTR,$00,$00 ;50 .db $00+FT_DPCM_PTR,$00,$00 ;51 .db $00+FT_DPCM_PTR,$00,$00 ;52 .db $00+FT_DPCM_PTR,$00,$00 ;53 .db $00+FT_DPCM_PTR,$00,$00 ;54 .db $00+FT_DPCM_PTR,$00,$00 ;55 .db $00+FT_DPCM_PTR,$00,$00 ;56 .db $00+FT_DPCM_PTR,$00,$00 ;57 .db $00+FT_DPCM_PTR,$00,$00 ;58 .db $00+FT_DPCM_PTR,$00,$00 ;59 .db $00+FT_DPCM_PTR,$00,$00 ;60 .db $00+FT_DPCM_PTR,$00,$00 ;61 .db $00+FT_DPCM_PTR,$00,$00 ;62 .db $00+FT_DPCM_PTR,$00,$00 ;63 .env0: .db $c0,$00,$00 .env1: .db $cc,$c9,$c6,$c4,$c2,$c0,$00,$05 .env2: .db $cc,$c9,$c9,$c8,$02,$c6,$c5,$c5,$c4,$c4,$c3,$c2,$c1,$c1,$c0,$00 .db $0e .env3: .db $cf,$00,$00 .env4: .db $cc,$03,$cb,$02,$ca,$ca,$c9,$c6,$04,$c5,$05,$c4,$05,$c3,$05,$c2 .db $05,$c1,$04,$c0,$00,$13 .env5: .db $cf,$ce,$cd,$cd,$cc,$cb,$ca,$ca,$c9,$02,$c8,$c7,$c6,$c6,$c5,$02 .db $c4,$c3,$c2,$02,$c1,$04,$c0,$00,$16 .env6: .db $c0,$02,$c1,$02,$c2,$00,$04 .env7: .db $c0,$c0,$c4,$00,$02 .song0ch0: .db $fb,$08 .song0ch0loop: .ref0: .db $8a,$4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38 .db $32,$40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e .db $28 .ref1: .db $42,$38,$2e,$2a,$42,$38,$2e,$2a,$42,$38,$2e,$2a,$42,$38,$2e,$2a .db $3c,$32,$2a,$24,$3c,$32,$2a,$24,$3c,$32,$2a,$24,$3c,$32,$2a,$24 .ref2: .db $4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38,$32,$4a,$40,$38,$32 .db $40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e,$28,$40,$36,$2e,$28 .db $ff,$20 .dw .ref1 .ref4: .db $4a,$85,$4f,$50,$85,$4f,$4b,$47,$40,$85,$47,$36,$85,$47,$36,$85 .ref5: .db $39,$3d,$43,$42,$85,$41,$43,$47,$4a,$8d,$48,$8d .db $ff,$10 .dw .ref4 .ref7: .db $39,$3d,$43,$42,$85,$41,$43,$47,$50,$8d,$54,$8d .db $fd .dw .song0ch0loop .song0ch1: .song0ch1loop: .ref8: .db $bf .ref9: .db $bf .ref10: .db $bf .ref11: .db $bf .ref12: .db $bf .ref13: .db $bf .ref14: .db $bf .ref15: .db $bf .db $fd .dw .song0ch1loop .song0ch2: .song0ch2loop: .ref16: .db $bf .ref17: .db $bf .ref18: .db $bf .ref19: .db $bf .ref20: .db $bf .ref21: .db $bf .ref22: .db $bf .ref23: .db $bf .db $fd .dw .song0ch2loop .song0ch3: .song0ch3loop: .ref24: .db $86,$11,$84,$17,$82,$09,$84,$16,$85,$17,$82,$09,$84,$16,$1a,$83 .db $17,$82,$09,$84,$16,$85,$17,$82,$09,$84,$16,$1a .db $ff,$12 .dw .ref24 .db $ff,$12 .dw .ref24 .db $ff,$12 .dw .ref24 .db $ff,$12 .dw .ref24 .db $ff,$12 .dw .ref24 .db $ff,$12 .dw .ref24 .db $ff,$12 .dw .ref24 .db $fd .dw .song0ch3loop .song0ch4: .song0ch4loop: .ref32: .db $32,$85,$3a,$85,$32,$85,$3a,$85,$32,$85,$3a,$85,$32,$85,$3a,$85 .db $ff,$10 .dw .ref32 .db $ff,$10 .dw .ref32 .db $ff,$10 .dw .ref32 .db $ff,$10 .dw .ref32 .db $ff,$10 .dw .ref32 .db $ff,$10 .dw .ref32 .db $ff,$10 .dw .ref32 .db $fd .dw .song0ch4loop
21.768889
68
0.587383
823407885d5594fda34eff7c0177fe752e388ce4
733
asm
Assembly
data/pokemon/base_stats/pikachu.asm
Karkino/KarkCrystal16
945dde0354016f9357e9d3798312cc6efa52ff7a
[ "blessing" ]
null
null
null
data/pokemon/base_stats/pikachu.asm
Karkino/KarkCrystal16
945dde0354016f9357e9d3798312cc6efa52ff7a
[ "blessing" ]
null
null
null
data/pokemon/base_stats/pikachu.asm
Karkino/KarkCrystal16
945dde0354016f9357e9d3798312cc6efa52ff7a
[ "blessing" ]
null
null
null
db 0 ; species ID placeholder db 45, 60, 45, 90, 60, 50 ; hp atk def spd sat sdf db ELECTRIC, FAIRY ; type db 190 ; catch rate db 82 ; base exp db NO_ITEM, BERRY ; items db GENDER_F50 ; gender ratio db 100 ; unknown 1 db 10 ; step cycles to hatch db 5 ; unknown 2 INCBIN "gfx/pokemon/pikachu/front.dimensions" db 0, 0, 0, 0 ; padding db GROWTH_MEDIUM_FAST ; growth rate dn EGG_GROUND, EGG_FAIRY ; egg groups ; tm/hm learnset tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, NUZZLE, IRON_HEAD, MOONBLAST, THUNDER, RETURN, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, PURSUIT, REST, ATTRACT, THIEF, STRENGTH, FLASH, THUNDERBOLT ; end
33.318182
268
0.716235
9a0417920bed42b71226f85c368137103d28ea23
675
asm
Assembly
oeis/311/A311481.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/311/A311481.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/311/A311481.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A311481: Coordination sequence Gal.6.219.2 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; Submitted by Christian Krause ; 1,4,8,12,17,21,27,31,36,40,44,48,52,56,60,65,69,75,79,84,88,92,96,100,104,108,113,117,123,127,132,136,140,144,148,152,156,161,165,171,175,180,184,188,192,196,200,204,209,213 sub $2,$0 seq $0,313788 ; Coordination sequence Gal.6.326.3 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. mul $0,2 add $0,$2 mov $1,2 add $1,$0 mul $1,2 div $1,3 sub $1,1 add $1,$2 add $1,$2 mov $0,$1
39.705882
182
0.722963
a29e29c2fbe35263b2a0170dc7916ae1c6d1c47d
191
asm
Assembly
u7si/eop-selectAndUseKey.asm
JohnGlassmyer/UltimaHacks
f9a114e00c4a1edf1ac7792b465feff2c9b88ced
[ "MIT" ]
68
2018-03-04T22:34:22.000Z
2022-03-10T15:18:32.000Z
u7si/eop-selectAndUseKey.asm
ptrie/UltimaHacks
2c3557a86d94ad8b54b26bc395b9aed1604f8be1
[ "MIT" ]
19
2018-11-20T04:06:49.000Z
2021-11-08T16:37:10.000Z
u7si/eop-selectAndUseKey.asm
ptrie/UltimaHacks
2c3557a86d94ad8b54b26bc395b9aed1604f8be1
[ "MIT" ]
4
2020-09-01T17:57:36.000Z
2022-01-04T20:51:11.000Z
%include "include/u7si-all-includes.asm" %assign USE_KEY_SOUND 94 ; sound of dialog opening %assign NO_KEY_SOUND 43 ; "can not" sound %include "../u7-common/patch-eop-selectAndUseKey.asm"
27.285714
53
0.759162
659015d3f0d700c9cf955f5e28d516d43fe6bdaa
381
asm
Assembly
programs/oeis/193/A193348.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/193/A193348.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/193/A193348.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A193348: Number of odd divisors of tau(n). ; 1,1,1,2,1,1,1,1,2,1,1,2,1,1,1,2,1,2,1,2,1,1,1,1,2,1,1,2,1,1,1,2,1,1,1,3,1,1,1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1,1,1,1,1,1,2,1,1,2,2,1,1,1,2,1,1,1,2,1,1,2,2,1,1,1,2,2,1,1,2,1,1,1,1,1,2,1,2,1,1,1,2,1,2,2,3 seq $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n. sub $0,1 seq $0,1227 ; Number of odd divisors of n.
54.428571
201
0.577428
42fcf738e7cb0e8a187a4f805b733c67954b065d
6,195
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_1050.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_1050.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0xca_notsx.log_21829_1050.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r14 push %r15 push %rcx push %rdi push %rsi lea addresses_WC_ht+0xb38e, %rsi lea addresses_normal_ht+0x7df7, %rdi nop nop nop nop nop add %r15, %r15 mov $55, %rcx rep movsl nop nop sub %r11, %r11 lea addresses_WT_ht+0x3437, %rsi lea addresses_WT_ht+0x14f7, %rdi nop cmp %r11, %r11 mov $49, %rcx rep movsl nop nop nop nop nop add %r15, %r15 lea addresses_D_ht+0x1be07, %r10 sub %r14, %r14 mov $0x6162636465666768, %r15 movq %r15, %xmm3 and $0xffffffffffffffc0, %r10 vmovntdq %ymm3, (%r10) and %rdi, %rdi lea addresses_UC_ht+0x12ef7, %r11 clflush (%r11) nop nop nop nop nop sub $13412, %r10 mov (%r11), %rdi add %rsi, %rsi lea addresses_UC_ht+0x75f7, %r10 nop nop sub %r15, %r15 mov (%r10), %rsi nop nop nop nop and $58278, %r15 lea addresses_WT_ht+0xb1a7, %rcx nop inc %rsi mov $0x6162636465666768, %r15 movq %r15, %xmm6 movups %xmm6, (%rcx) nop nop nop add %rcx, %rcx lea addresses_WC_ht+0x15f2f, %rcx nop nop nop nop inc %r11 mov (%rcx), %di nop nop nop nop nop add %r11, %r11 lea addresses_WT_ht+0xe3f7, %r10 nop cmp %r11, %r11 vmovups (%r10), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $1, %xmm7, %rcx nop nop nop nop nop add %rsi, %rsi lea addresses_A_ht+0x198f7, %r11 xor %r10, %r10 mov (%r11), %rdi nop nop nop nop nop add $39869, %r11 pop %rsi pop %rdi pop %rcx pop %r15 pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %rbx push %rdi push %rdx // Faulty Load lea addresses_normal+0x40f7, %r11 nop nop nop nop inc %rdx mov (%r11), %edi lea oracles, %r11 and $0xff, %rdi shlq $12, %rdi mov (%r11,%rdi,1), %rdi pop %rdx pop %rdi pop %rbx pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_normal', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}} {'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': True, 'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False}} {'src': {'same': False, 'congruent': 9, 'NT': True, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False}} {'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
38.478261
2,999
0.659241
321ef7fad6bd9d86affc716d138dee77a196a891
16,622
asm
Assembly
Appl/Games/Pyramid/pyramidDeck.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Games/Pyramid/pyramidDeck.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Games/Pyramid/pyramidDeck.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% (c) Copyright GeoWorks 1991-1995. All Rights Reserved. GEOWORKS CONFIDENTIAL PROJECT: GEOS MODULE: Pyramid FILE: pyramidDeck.asm AUTHOR: Jon Witort, Jan 7, 1991 ROUTINES: Name Description ---- ----------- MTD MSG_PYRAMID_DECK_NUKE Nuke this card! MTD MSG_PYRAMID_DECK_NOTIFY_SON_IS_DEAD We're being told that one of our children is history. MTD MSG_PYRAMID_DECK_BECOME_DETECTABLE_IF_SONS_DEAD Recover our detectable state based on dead sons. MTD MSG_DECK_DRAW_MARKER Draw the dithered background on which the deck sits. MTD MSG_DECK_UPDATE_TOPLEFT Don't do anything for MyDiscard deck. MTD MSG_DECK_PUSH_CARD Add a card to this deck. MTD MSG_PYRAMID_DECK_RESURRECT_SONS Fixup instance to show that this card has two children. MTD MSG_PYRAMID_DECK_CARD_FLIP_IF_COVERED If we're not detectable, flip over (face down). MTD MSG_PYRAMID_DECK_GET_FLAGS Return flags for this deck. MTD MSG_PYRAMID_DECK_ENABLE_REDRAW Jump through hoops to make deck redraw. REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version DESCRIPTION: this file contains handlers for VisTalon class $Id: pyramidDeck.asm,v 1.1 97/04/04 15:14:58 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CommonCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckNuke %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Nuke this card! CALLED BY: MSG_PYRAMID_DECK_NUKE PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: nothing DESTROYED: ax, cx, dx, bp PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckNuke method dynamic PyramidDeckClass, MSG_PYRAMID_DECK_NUKE .enter ; ; Clear the currently selected card. ; mov ax, MSG_DECK_CLEAR_INVERTED call ObjCallInstanceNoLock ; ...if it was inverted ; ; Enable the Undo trigger. ; mov dl, VUM_NOW CallObject UndoTrigger, MSG_GEN_SET_ENABLED, MF_FIXUP_DS ; ; If we're nuking a card from the Discard deck, ; don't count it towards winning. ; PointDi2 Game_offset test ds:[di].PDI_deckFlags, mask PDF_DECK_NOT_IN_TREE jnz nuke ; ; Inc number of nukes, see if they won, etc. ; mov ax, MSG_PYRAMID_INC_NUKES call VisCallParent nuke: ; ; Update undo information to say a card was nuked. ; mov cl, PMT_NUKED_CARDS mov ax, MSG_PYRAMID_SET_LAST_MOVE_TYPE call VisCallParent ; ; Take the card off the deck... ; mov ax, MSG_DECK_POP_CARD call ObjCallInstanceNoLock jc done ; ; ...and put it in the Discard pile. ; CallObject MyDiscard, MSG_DECK_PUSH_CARD, MF_FIXUP_DS ; ; Stuff the first optr in the undoInfo, or if that's ; already set, the second, with the optr of this deck. ; mov cx, ds:[LMBH_handle] mov dx, si mov ax, MSG_PYRAMID_SET_UNDO_OPTR call VisCallParent ; ; Set up the instance data for this deck to indicate ; that there's no card in it, and redraw. ; mov ax, MSG_PYRAMID_DECK_ENABLE_REDRAW call ObjCallInstanceNoLock ; ; Notify left parent (if any) that we're dead. ; push si PointDi2 Deck_offset mov bx, ds:[di].PDI_leftParent.handle tst bx jz afterLeftParent mov si, ds:[di].PDI_leftParent.chunk mov cl, mask PDF_RIGHT_SON_DEAD mov ax, MSG_PYRAMID_DECK_NOTIFY_SON_IS_DEAD mov di, mask MF_FIXUP_DS call ObjMessage afterLeftParent: ; ; Notify right parent (if any) that we're dead. ; pop si PointDi2 Deck_offset mov bx, ds:[di].PDI_rightParent.handle tst bx jz done mov si, ds:[di].PDI_rightParent.chunk mov cl, mask PDF_LEFT_SON_DEAD mov ax, MSG_PYRAMID_DECK_NOTIFY_SON_IS_DEAD mov di, mask MF_FIXUP_DS call ObjMessage done: .leave ret PyramidDeckNuke endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckNotifySonIsDead %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: We're being told that one of our children is history. CALLED BY: MSG_NOTIFY_SON_IS_DEAD (via PyramidDeckNuke) PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: nothing DESTROYED: ax, cx, dx, bp PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckNotifySonIsDead method dynamic PyramidDeckClass, MSG_PYRAMID_DECK_NOTIFY_SON_IS_DEAD .enter ; ; Both children dead? If not => done. ; ornf ds:[di].PDI_deckFlags, cl cmp ds:[di].PDI_deckFlags, mask PDF_LEFT_SON_DEAD \ or mask PDF_RIGHT_SON_DEAD jne done ; ; Make ourselves detectable. ; mov cx, mask VA_DETECTABLE mov dl, VUM_NOW mov ax, MSG_VIS_SET_ATTRS call ObjCallInstanceNoLock ; ; If cards are being hidden, and we've just become ; detectable, flip ourselves over. ; mov ax, MSG_PYRAMID_QUERY_HIDE call VisCallParent jnc done mov ax, MSG_CARD_FLIP_CARD call ObjCallInstanceNoLock done: .leave ret PyramidDeckNotifySonIsDead endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckBecomeDetectableIfSonsDead %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Recover our detectable state based on dead sons. CALLED BY: PyramidGameRestoreState PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: nothing DESTROYED: ax, cx, dx, bp PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckBecomeDetectableIfSonsDead method dynamic PyramidDeckClass, MSG_PYRAMID_DECK_BECOME_DETECTABLE_IF_SONS_DEAD .enter ; ; assume dead ; ornf ds:[di].PDI_deckFlags, mask PDF_LEFT_SON_DEAD \ or mask PDF_RIGHT_SON_DEAD ; ; add our # of children to the passed # ; mov bx, cx mov ax, MSG_DECK_GET_N_CARDS call ObjCallInstanceNoLock add bx, cx push bx ; ; Check left son for pulse. ; mov di, ds:[si] add di, ds:[di].PyramidDeck_offset pushdw ds:[di].PDI_rightChild movdw bxax, ds:[di].PDI_leftChild tst bx jz checkRight push si mov_tr si, ax mov ax, MSG_DECK_GET_N_CARDS mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage pop si jcxz checkRight mov di, ds:[si] add di, ds:[di].PyramidDeck_offset BitClr ds:[di].PDI_deckFlags, PDF_LEFT_SON_DEAD checkRight: popdw bxax tst bx jz doCheck push si mov_tr si, ax mov ax, MSG_DECK_GET_N_CARDS mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage pop si mov di, ds:[si] add di, ds:[di].PyramidDeck_offset jcxz doCheck BitClr ds:[di].PDI_deckFlags, PDF_RIGHT_SON_DEAD doCheck: ; ; Now that we've set our instance properly, see if we ; should be detectable. ; test ds:[di].PDI_deckFlags, mask PDF_LEFT_SON_DEAD jz done test ds:[di].PDI_deckFlags, mask PDF_RIGHT_SON_DEAD jz done mov cx, mask VA_DETECTABLE mov dl, VUM_NOW mov ax, MSG_VIS_SET_ATTRS call ObjCallInstanceNoLock done: pop cx ;cx <- total cards so far .leave ret PyramidDeckBecomeDetectableIfSonsDead endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckDrawMarker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw the dithered background on which the deck sits. CALLED BY: MSG_DECK_DRAW_MARKER PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckDrawMarker method dynamic PyramidDeckClass, MSG_DECK_DRAW_MARKER .enter ; ; Only draw the markers for the talon & topOfHand decks. ; test ds:[di].PDI_deckFlags, mask PDF_DECK_NOT_IN_TREE jz done test ds:[di].PDI_deckFlags, mask PDF_IS_DISCARD jnz done mov di, offset PyramidDeckClass call ObjCallSuperNoLock done: .leave ret PyramidDeckDrawMarker endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckUpdateTopLeft %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Don't do anything for MyDiscard deck. CALLED BY: MSG_DECK_UPDATE_TOPLEFT PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckUpdateTopLeft method dynamic PyramidDeckClass, MSG_DECK_UPDATE_TOPLEFT .enter test ds:[di].PDI_deckFlags, mask PDF_IS_DISCARD jnz done mov di, offset PyramidDeckClass call ObjCallSuperNoLock done: .leave ret PyramidDeckUpdateTopLeft endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckPushCard %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add a card to this deck. CALLED BY: MSG_DECK_PUSH_CARD PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: nothing DESTROYED: cx, dx, bp PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckPushCard method dynamic PyramidDeckClass, MSG_DECK_PUSH_CARD uses ax .enter ; ; Discard deck? If not => call super. ; test ds:[di].PDI_deckFlags, mask PDF_IS_DISCARD jz callSuper ; ; We're pushing a card onto the discard deck: make the ; card so small as to be invisible. ; push cx, dx, si movdw bxsi, cxdx mov cx, -1 mov dx, -1 mov ax, MSG_VIS_SET_SIZE mov di, mask MF_FIXUP_DS call ObjMessage pop cx, dx, si callSuper: .leave mov di, offset PyramidDeckClass GOTO ObjCallSuperNoLock PyramidDeckPushCard endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckResurrectSons %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fixup instance to show that this card has two children. CALLED BY: PyramidNewGame, PyramidUndoMove PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data cl = mask of PyramidDeckFlags to clear RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckResurrectSons method dynamic PyramidDeckClass, MSG_PYRAMID_DECK_RESURRECT_SONS uses ax, cx, dx, bp .enter ; ; Make sure they're not trying to clear any bits ; besides LEFT_SON_DEAD or RIGHT_SON_DEAD. ; EC < test cl, not (mask PDF_LEFT_SON_DEAD or mask PDF_RIGHT_SON_DEAD) > EC < ERROR_NZ TRYING_TO_SET_INVALID_BITS_IN_RESURRECT_SONS > not cl andnf ds:[di].PDI_deckFlags, cl ; ; If we're not always detectable, clear the VA_DETECTABLE ; bit. ; test ds:[di].PDI_deckFlags, mask PDF_ALWAYS_DETECTABLE jnz done mov cx, (mask VA_DETECTABLE shl 8) ; clear it mov dl, VUM_NOW mov ax, MSG_VIS_SET_ATTRS call ObjCallInstanceNoLock ; ; If we're hiding cards, turn top card face down. ; mov ax, MSG_PYRAMID_QUERY_HIDE call VisCallParent ; carry set = hidden jnc done mov ax, MSG_CARD_TURN_FACE_DOWN call VisCallFirstChild mov ax, MSG_VIS_INVALIDATE call ObjCallInstanceNoLock done: .leave ret PyramidDeckResurrectSons endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckFlipIfCovered %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Flip face-up or face-down depending on passed option. CALLED BY: PyramidSetHideStatus PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data cx = PyramidGameOptions RETURN: nothing DESTROYED: ax, cx, dx, bp PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Jon 1/7/91 Initial Version stevey 8/95 rewrote & probably mangled horribly %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckFlipIfCovered method dynamic PyramidDeckClass, MSG_PYRAMID_DECK_CARD_FLIP_IF_COVERED uses cx .enter ; ; If we're not-detectable, flip face-down (hide cards) ; or face-up (!hide cards). Detectable cards must be ; redrawn because the cards above them covered them if ; they flip. This means we get a flicker when you change ; a non-hide option, but I can live with it. ; PointDi2 Vis_offset test ds:[di].VI_attrs, mask VA_DETECTABLE jnz done mov ax, MSG_CARD_TURN_FACE_DOWN clr dx ; not CA_FACE_UP test cx, mask PGO_HIDE_CARDS jnz flip mov ax, MSG_CARD_TURN_FACE_UP mov dx, mask CA_FACE_UP flip: ; ; To avoid redraws when changing options other than ; PGO_HIDE_CARDS, we don't redraw if we're not changing. ; clr bp ; top card push ax, dx mov ax, MSG_DECK_GET_NTH_CARD_ATTRIBUTES call ObjCallInstanceNoLock ; bp = CardAttrs pop ax, dx jc exit ; error! andnf bp, mask CA_FACE_UP ; isolate cmp bp, dx je exit ; no change! call VisCallFirstChild done: mov ax, MSG_DECK_REDRAW call ObjCallInstanceNoLock exit: .leave ret PyramidDeckFlipIfCovered endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckGetFlags %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return flags for this deck. CALLED BY: MSG_PYRAMID_DECK_GET_FLAGS (UTILITY) PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: cl = PyramidDeckFlags DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 8/ 9/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckGetFlags method dynamic PyramidDeckClass, MSG_PYRAMID_DECK_GET_FLAGS mov cl, ds:[di].PDI_deckFlags ret PyramidDeckGetFlags endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PyramidDeckEnableRedraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Jump through hoops to make deck redraw. CALLED BY: INTERNAL (after anyone pops a card from a deck). PASS: *ds:si = PyramidDeckClass object ds:di = PyramidDeckClass instance data RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- stevey 8/10/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PyramidDeckEnableRedraw method dynamic PyramidDeckClass, MSG_PYRAMID_DECK_ENABLE_REDRAW uses ax, cx, dx, bp .enter ; ; I don't know why all this stuff is necessary... ; mov ax, MSG_CARD_SET_DRAWABLE call VisCallFirstChild mov ax, MSG_CARD_MAXIMIZE call VisCallFirstChild mov ax, MSG_DECK_UPDATE_TOPLEFT call ObjCallInstanceNoLock mov ax, MSG_VIS_INVALIDATE call ObjCallInstanceNoLock .leave ret PyramidDeckEnableRedraw endm CommonCode ends
24.735119
79
0.597521
2b9a1762ddf2413671755253d0cbe94d6ca91963
964
asm
Assembly
programs/oeis/017/A017199.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/017/A017199.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/017/A017199.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A017199: a(n) = (9*n + 3)^3. ; 27,1728,9261,27000,59319,110592,185193,287496,421875,592704,804357,1061208,1367631,1728000,2146689,2628072,3176523,3796416,4492125,5268024,6128487,7077888,8120601,9261000,10503459,11852352,13312053,14886936,16581375,18399744,20346417,22425768,24642171,27000000,29503629,32157432,34965783,37933056,41063625,44361864,47832147,51478848,55306341,59319000,63521199,67917312,72511713,77308776,82312875,87528384,92959677,98611128,104487111,110592000,116930169,123505992,130323843,137388096,144703125,152273304,160103007,168196608,176558481,185193000,194104539,203297472,212776173,222545016,232608375,242970624,253636137,264609288,275894451,287496000,299418309,311665752,324242703,337153536,350402625,363994344,377933067,392223168,406869021,421875000,437245479,452984832,469097433,485587656,502459875,519718464,537367797,555412248,573856191,592704000,611960049,631628712,651714363,672221376,693154125,714516984 mul $0,9 add $0,3 pow $0,3
137.714286
904
0.862033
a6720595e148454f5ef31f83a98d954dd2052e84
453
asm
Assembly
oeis/160/A160445.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/160/A160445.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/160/A160445.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A160445: Numerator of Hermite(n, 20/21). ; Submitted by Jon Maiga ; 1,40,718,-41840,-3573428,4674400,15945793480,613094814400,-73925536369520,-7283018465187200,295500169093761760,76056229626701574400,175306544520386380480,-797966872588194008230400,-33928739742998510567799680,8496145352999079190916992000 add $0,1 mov $3,1 lpb $0 sub $0,1 mul $2,8 add $2,$3 mov $3,$1 mov $1,$2 mul $2,5 mul $3,-441 mul $3,$0 mul $3,2 lpe mov $0,$1
23.842105
238
0.735099
7913113a78d7aa4d2bc3affe35e0be722b517868
547
asm
Assembly
data/baseStats/marill.asm
longlostsoul/EvoYellow
fe5d0d372c4e90d384c4005a93f19d7968f2ff13
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
data/baseStats/marill.asm
longlostsoul/EvoYellow
fe5d0d372c4e90d384c4005a93f19d7968f2ff13
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
data/baseStats/marill.asm
longlostsoul/EvoYellow
fe5d0d372c4e90d384c4005a93f19d7968f2ff13
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
db DEX_MARILL ; pokedex id db 70 ; base hp db 20 ; base attack db 50 ; base defense db 50 ; base speed db 50 ; base special db WATER ; species type 1 db FAIRY ; species type 2 db 83 ; catch rate db 66 ; base exp yield INCBIN "pic/ymon/marill.pic",0,1 ; 55, sprite dimensions dw MarillPicFront dw MarillPicBack ; attacks known at lvl 0 db TACKLE db LEER db 0 db 0 db 3 ; growth rate ; learnset tmlearn 1,5,6,8 tmlearn 9,10,11,12,13,14 tmlearn 17,18,19,20 tmlearn 28,31,32 tmlearn 33,34,40 tmlearn 44 tmlearn 50,53,54 db BANK(MarillPicFront)
18.862069
56
0.729433
7c5d9e2c1e9cf87aa83c589a870239411192190c
425
asm
Assembly
libsrc/_DEVELOPMENT/string/c/sccz80/strnlen_callee.asm
UnivEngineer/z88dk
9047beba62595b1d88991bc934da75c0e2030d07
[ "ClArtistic" ]
1
2022-03-08T11:55:58.000Z
2022-03-08T11:55:58.000Z
libsrc/_DEVELOPMENT/string/c/sccz80/strnlen_callee.asm
UnivEngineer/z88dk
9047beba62595b1d88991bc934da75c0e2030d07
[ "ClArtistic" ]
2
2022-03-20T22:17:35.000Z
2022-03-24T16:10:00.000Z
libsrc/_DEVELOPMENT/string/c/sccz80/strnlen_callee.asm
jorgegv/z88dk
127130cf11f9ff268ba53e308138b12d2b9be90a
[ "ClArtistic" ]
null
null
null
; size_t strnlen(const char *s, size_t maxlen) SECTION code_clib SECTION code_string PUBLIC strnlen_callee EXTERN asm_strnlen strnlen_callee: IF __CPU_GBZ80__ pop de pop bc pop hl push de call asm_strnlen ld d,h ld e,l ret ELSE pop hl pop bc ex (sp),hl jp asm_strnlen ENDIF ; SDCC bridge for Classic IF __CLASSIC PUBLIC _strnlen_callee defc _strnlen_callee = strnlen_callee ENDIF
11.805556
46
0.729412
543e897c29ded5f5e133d74e943e7d6412d1793b
423
asm
Assembly
arch/lib/string/right_string.asm
Mosseridan/Compiler-Principles
6c72a462b90ca6c6db380976c2aa60471fa65325
[ "MIT" ]
null
null
null
arch/lib/string/right_string.asm
Mosseridan/Compiler-Principles
6c72a462b90ca6c6db380976c2aa60471fa65325
[ "MIT" ]
null
null
null
arch/lib/string/right_string.asm
Mosseridan/Compiler-Principles
6c72a462b90ca6c6db380976c2aa60471fa65325
[ "MIT" ]
null
null
null
/* right_string.asm * Copy the right N chars in a string: * R0 = dest <- right_string(dest, src, N)) * * Programmer: Mayer Goldberg, 2010 */ RIGHT_STRING: MOV(R1, STARG(1)); PUSH(R1); CALL(STRLEN); POP(R1); MOV(R3, STARG(2)); SUB(R0, R3); MOV(R2, STARG(1)); MOV(R1, STARG(0)); PUSH(R3); PUSH(R0); PUSH(R2); PUSH(R1); CALL(MID_STRING); POP(R1); POP(R1); POP(R1); POP(R1); RETURN;
15.666667
43
0.574468
82ea810012e0b2796e53f1765bd9b5192000f15d
3,587
asm
Assembly
src/spread/fpars/itemscn.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/spread/fpars/itemscn.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
src/spread/fpars/itemscn.asm
olifink/qspread
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
[ "MIT" ]
null
null
null
* Formular Parser 18/12-91 * - item scanning include win1_spread_fpars_keys include win1_mac_oli include win1_keys_err xdef prs_item section pars *+++ * Get Item from formular string * * Entry Exit * A0 pointer to formular string preserved * A1 item buffer preserved * D1.w parsing position updated * D2.b delimiter code * * D0 error code set *--- prs_item subr a0/a1/d4/d5 move.w (a0)+,d5 moveq #0,d4 ; item length counter item_nxt moveq #cc.end,d0 ; signal end delimiter cmp.w d1,d5 ; ..if char would be beq.s item_fnd ; ..outside the string move.b (a0,d1.w),d0 ; current character addq.w #1,d1 ; parsing position counter cmpi.b #' ',d0 ; spaces have no effect.. beq.s item_nxt ; ..whatsoever bsr.s prs_dtst ; test for delimiting character beq.s item_delfnd ; found something move.b d0,2(a1,d4.w) ; put character in item buffer addq.w #1,d4 ; update item count bra.s item_nxt ; try next character item_delfnd cmp.w #1,d1 ; first item? cannot be delimiter! bne.s item_fnd cmp.b #'(',d0 ; open bracket is allowed, however beq.s item_fnd cmp.b #'-',d0 ; ... and negative sign beq.s item_fnd err_iexp moveq #err.iexp,d0 ; return error in expression bra.s item_return item_fnd cmp.b #'-',d0 ; negative at end? bne.s item_fnd2 cmp.w d1,d5 ; end of string? beq.s err_iexp ; not allowed!!!s item_fnd2 bsr tst_end beq.s item_x move.b d0,d2 ; store current delimiter lsl.w #8,d2 move.b (a0,d1.w),d2 move.w d2,-(sp) bsr.s tst_cmp ; find cmp operation bne.s item_dbl ; not found, use old move.w (sp)+,d2 cmp.b (a0,d1.w),d0 ; same character? bne.s item_x ; no, must be okay cmp.w #cc.open<<8+cc.open,d2 ; only open and close brackets .. beq.s item_x ; .. may occur twice or more times cmp.w #cc.clos<<8+cc.clos,d2 beq.s item_x moveq #err.ipar,d0 bra.s item_return item_dbl addq.w #2,sp ; adjust stack move.b d2,d0 addq.w #1,d1 item_x move.w d4,(a1) ; set length of item buffer move.b d0,d2 ; return delimiter code moveq #0,d0 ; return no errors item_return subend * * test for delimiting character prs_dtst subr a0/d1 lea prs_dlst,a0 ; start of character list dtst_nxt move.b (a0)+,d1 ; possible character cmp.b #-1,d1 ; end of list found beq.s dtst_end cmp.b d0,d1 ; matching character? bne.s dtst_nxt ; test next character moveq #0,d1 bsr.s tst_cmp ; test for multiple char delim. dtst_end tst.b d1 ; set condition code subend ds.w 0 ; word alinged prs_dlst dc.b op.add,op.sub dc.b op.mul,op.div dc.b op.pow,op.perc dc.b cc.open,cc.clos dc.b cc.end1,cc.end2 dc.b cp.and,cp.or dc.b cp.not,cp.eq dc.b cp.gt,cp.lt dc.b -1 ; end of list ds.w 0 cmp_lst dc.w cp.ne,cpc.ne ; multiple char operators dc.w cp.ge,cpc.ge dc.w cp.le,cpc.le dc.w -1,0 ; test compare operation ; d2.w 2 char operation tst_cmp subr a0/d0/d3 lea cmp_lst,a0 cmp_lp move.w (a0)+,d0 move.w (a0)+,d3 beq.s cmp_exit cmp.w d0,d2 bne.s cmp_lp ;;; move.w d2,d3 cmp_exit move.w d3,d2 subend ; test for end character ; d0 char, Z set if end character tst_end cmp.b #cc.end,d0 beq.s tend_x cmp.b #cc.end1,d0 beq.s tend_x cmp.b #cc.end2,d0 tend_x rts end
22.006135
63
0.607471
8d6127f591d00c2183a98cdd8fe8de15f8da3a01
2,385
asm
Assembly
programs/oeis/016/A016846.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/016/A016846.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/016/A016846.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A016846: a(n) = (4*n + 3)^10. ; 59049,282475249,25937424601,576650390625,6131066257801,41426511213649,205891132094649,819628286980801,2758547353515625,8140406085191601,21611482313284249,52599132235830049,119042423827613001,253295162119140625,511116753300641401,984930291881790849,1822837804551761449,3255243551009881201,5631351470947265625,9468276082626847201,15516041187205853449,24842341419143568849,38941611811810745401,59873693923837890625,90438207500880449001,134391637934412192049,196715135728956532249,283942098606901565601,404555773570791015625,569468379011812486801,792594609605189126649,1091533853073393531649,1488377021731616101801,2010655586861806640625,2692452204196940400601,3575694237941010577249,4711653532607691047049,6162677950336718514001,8004182490046884765625,10326930237613180030401,13239635967018160063849,16871927924929095158449,21377706189197971362201,26938938999176025390625,33769941616283277616201,42122185590781554706449,52289689788971837545849,64615048177878503606401,79496153175699228515625,97393677359695041798001,118839380482575369225049,144445313087602911489249,174913992535407978606601,211049631965666494140625,253770507618165375615801,304122555034158459939649,363294289954110647868649,432633155225742562122801,513663400740527822265625,608105609331265108509601,717897987691852588770249,845219547726738091164049,992515310305509690315001,1162523670191533212890625,1358306067936240628319401,1583279121786431447236849,1841249380144573175455449,2136450862855381637743201,2473585567569732666015625,2857867125663008313285201,3295067800663118480459449,3791569030877467700422849,4354415726901861885367401,4991374543951576181640625,5710996358479337764047001,6522683188340621511158049,7436759805837217107346249,8464550303319308288547601,9618459881658113759765625,10912062142819279835644801,12360192178975492163652649,13979045762098993055105649,15786284949774657045043801,17801150435075795400390625,20044580980751735469518601,22539340290692258087863249,25310151684662980796181049,28383840955651551463016001,31789487802830871103515625,35558586247136301325508401,39725214450772735983309849,44326214376618333352652449,49401381738478419529024201,54993666708469390869140625,61149385863482168213854201,67918445868691693423112449,75354579412446914492199849,83515593923598484276028401,92463633619402804697265625,102265455449584888327196001 mul $0,4 add $0,3 pow $0,10
340.714286
2,323
0.944235
9363a68a1281633d8d5e661faeb28c91299c926b
208
asm
Assembly
libsrc/stdio/abc80/getk.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/stdio/abc80/getk.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/stdio/abc80/getk.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; ; ABC80 Routines ; ; getk() Read key status ; ; Maj 2000 - Stefano Bodrato ; ; ; $Id: getk.asm,v 1.4 2015/01/19 01:33:17 pauloscustodio Exp $ ; PUBLIC getk .getk in a,(56) and 127 ld l,a ld h,0 ret
10.4
62
0.625
5401d809b85597b03684be08cf5a729194a8bc49
4,959
asm
Assembly
kernel/arch/x86/kernel/_start.asm
GhostBirdOperatingSystemProject/GhostBirdOS
15d3499208029d1a811cccda435f0cfbbf08b482
[ "BSD-2-Clause" ]
10
2017-06-08T07:38:37.000Z
2022-01-27T20:15:52.000Z
kernel/arch/x86/kernel/_start.asm
GhostBirdOperatingSystemProject/GhostBirdOS
15d3499208029d1a811cccda435f0cfbbf08b482
[ "BSD-2-Clause" ]
1
2018-07-07T15:47:33.000Z
2018-07-07T15:47:33.000Z
kernel/arch/x86/kernel/_start.asm
MakeOS/GhostBirdOS
15d3499208029d1a811cccda435f0cfbbf08b482
[ "BSD-2-Clause" ]
13
2017-06-06T05:26:04.000Z
2022-01-28T22:18:00.000Z
;Copyright 2013-2015 by Explorer Developers. ;made by Lab Explorer Developers<1@GhostBirdOS.org> ;Explorer function _start ;Explorer/arch/kernel/_start.asm ;version:Alpha ;7/9/2014 8:25 AM:created ;1/3/2015 3:23 PM:cancel function kernel_start ;1/18/2015 12:18 PM:add init for arch code from fun_c.c ;Explorer在x86平台地址管理的相关信息*/ ;全局描述符表(64KB) GDT_addr equ 0x60000 GDT_size equ 65536 ;全局变量及全局函数 extern task_0 ;任务0的联合体,在Explorer/arch/x86/kernel/task/task.c中定义 extern init_Architecture ;初始化架构函数,在Explorer/arch/x86/Architecture.c中实现 extern main ;内核的主函数,位于Explorer/init/main.c中实现 global _start ;内核的入口函数 global boot_info_ptr ;指向boot_info的指针*/ ;TSC函数 global read_tsc ;初始化段寄存器函数 global init_seg_reg ;描述符寄存器操作函数 global write_IDTR global write_TR global write_GDTR ;IDT操作函数 global clean_IDT global create_IDT ;GDT操作函数 global clean_GDT global set_GDT ;控制寄存器读写 global read_CR0,write_CR0 global read_CR2,write_CR2 global read_CR3,write_CR3 ;特殊大小内存读写函数 global write_mem24 TASK_SIZE equ 8192 ;相关宏定义 ;void write_IDTR(u32 IDTR.base, u16 IDTR.size) %macro call_write_IDTR 2 push word %2 push dword %1 call write_IDTR add esp,6 %endmacro ;void write_GDTR(u32 GDTR.base, u16 GDTR.size) %macro call_write_GDTR 2 push word %2 push dword %1 call write_GDTR add esp,6 %endmacro ;void write_TR(u16 selector) %macro call_write_TR 1 push word %1 call write_TR add esp,2 %endmacro ;u16 set_GDT(u32 segment_base, u32 limit, u32 attribute) %macro call_set_GDT 3 push dword %3 push dword %2 push dword %1 call set_GDT add esp,12 %endmacro ;void create_IDT(u32 number, u32 selector, u32 offset, u32 attribute) %macro call_create_IDT 4 push dword %4 push dword %3 push dword %2 push dword %1 call create_IDT add esp,16 %endmacro ;全局描述符表的相关宏定义 %define GDT_G 0x800000 %define GDT_P 0x8000 %define GDT_DPL_0 0x00 %define GDT_DPL_1 0x2000 %define GDT_DPL_2 0x4000 %define GDT_DPL_3 0x6000 ;注意:都为可读的代码段 %define GDT_code_32_conforming 0x401E00 %define GDT_code_32_non_conforming 0x401A00 ;为向上的数据段,向下的数据段有风险,不可使用 %define GDT_data_32 0x200 ;系统段 %define GDT_TSS_data 0x900 ;NOTICE:能自由使用的寄存器只有EAX\ECX\EDX [section .text] [bits 32] ;整个内核的入口函数 _start: ;初始化堆栈指针指向内核栈 mov esp,task_0 + TASK_SIZE ;将eax代表的启动信息放入启动信息指针中 mov [boot_info_ptr],eax ;初始化平台相关信息 call init_Architecture ;调用主函数开始进行各项的初始化 call main ;怠速运行 .sleep: hlt jmp .sleep strr db "_start: window test",0x00 ;平台相关控制代码 ;初始化段寄存器函数 init_seg_reg: mov ax,[esp+4] mov ds,ax mov es,ax mov fs,ax mov gs,ax mov ss,ax ret ;时间戳寄存器(Time Stamp Counter,TSC)从奔腾(Pentium)系列开始被引入, ;是x86 CPU中一个特殊的寄存器,该寄存器在CPU每经过一个时钟周期时加1, ;当计算机reset后,TSC将被清空。 ;TSC是个64位的寄存器,使用rdtsc指令读取它。指令执行后,EAX:EDX存放TSC的值。 ;3GHz的CPU运行195年,TSC寄存器才会溢出。 ;TSC读取函数 read_tsc: rdtsc ret ;描述符寄存器操作函数 write_IDTR: ;void write_IDT(u32 base, u16 size) mov eax,[esp+4] mov [IDTR.base],eax mov ax,[esp+8] mov [IDTR.size],ax lidt [cs:IDTR] ;加载IDTR ret write_TR: ;void write_TR(u16 select) mov ax,[esp+4] ltr ax ret write_GDTR: ;void write_GDTR(u32 base, u16 size) mov eax,[esp+4] mov [GDTR.base],eax mov ax,[esp+8] mov [GDTR.size],ax lgdt [cs:GDTR] ;加载GDTR ret ;IDT操作函数 clean_IDT: ;void clean_IDT(void) mov edx,[IDTR.base] mov ecx,IDTR.size shr ecx,2 .loop: mov dword[edx],0x0 add edx,4 loop .loop ret create_IDT: ;void create_IDT(u32 number, u32 selector, u32 offset, u32 attribute) xor eax,eax mov al,[esp+4] ;number参数 shl eax,3 ;相当于乘8 add eax,[IDTR.base];加上addr的起始地址 mov dx,[esp+8] ;selector参数 mov [eax+2],dx mov edx,[esp+12] ;offset参数 mov [eax],dx ;dx=offset低16位 shr edx,16 mov [eax+6],dx ;dx=offset高16位 mov word[eax+4],0;清空属性区域 mov edx,[esp+16];attribute参数 add [eax+4],edx ;加上属性 ret ;GDT操作函数 clean_GDT: ;void clean_GDT(void) mov edx,[GDTR.base] mov ecx,GDTR.size shr ecx,2 .loop: mov dword[edx],0x0 add edx,4 loop .loop ret set_GDT: ;u16 set_GDT(u32 segment_base, u32 limit, u32 attribute) push ebp mov ebp,esp push esi ;表基地址 mov esi,[GDTR.base] .loop: ;跳过空描述符以及循环查找功能 add esi,8 ;判断该GDT表项是否是8字节的0 cmp dword[esi],0x00 jnz .loop cmp dword[esi+4],0x00 jnz .loop ;将段基址放置到GDT中 mov eax,[ebp+8] mov [esi+2],ax shr eax,16 mov [esi+4],al mov [esi+7],ah ;将界限放置到GDT mov eax,[ebp+12] mov [esi],ax ;震荡eax,保证高12位为0 shl eax,12 shr eax,12+16 mov [esi+6],al ;将属性加入表项中 mov eax,[ebp+16] add [esi+4],eax ;计算出select value mov eax,esi sub eax,[GDTR.base] pop esi pop ebp ret ;控制寄存器的读写 read_CR0: mov eax,cr0 ret read_CR2: mov eax,cr2 ret read_CR3: mov eax,cr3 ret write_CR0: mov eax,[esp+4] mov cr0,eax ret write_CR2: mov eax,[esp+4] mov cr2,eax ret write_CR3: mov eax,[esp+4] mov cr3,eax ret write_mem24: mov edx,[esp+8] mov ecx,[esp+4] mov [ecx],dx shr dx,16 mov [ecx+2],dl ret ;数据区 [section .data] ;启动信息结构体指针*/ boot_info_ptr dd 0 ;GDTR GDTR: .size dw 0 ;GDT的长度 .base dd 0 ;GDT的物理地址 ;IDTR IDTR: .size dw 0 ;IDT的长度 .base dd 0 ;IDT的物理地址
16.64094
70
0.727364
3c3820d2e3a4a7cc752a627cf7591b353af7ad8d
678
asm
Assembly
oeis/281/A281593.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/281/A281593.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/281/A281593.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A281593: a(n) = b(n) - Sum_{j=0..n-1} b(n) with b(n) = binomial(2*n, n). ; 1,1,3,11,41,153,573,2157,8163,31043,118559,454479,1747771,6740059,26055459,100939779,391785129,1523230569,5931153429,23126146629,90282147849,352846964649,1380430179489,5405662979649,21186405207549,83101804279101,326199124351701,1281301484103605,5036113233567821,19805998531587981,77936047097367325,306835237222905565,1208602671654973923,4762782823786058595,18776967430994103855,74057162297175795807,292197146940686884147,1153302630722639535571,4553662150744648470507,17985435722557157776907 lpb $0 mov $2,$0 sub $0,2 add $2,$0 bin $2,$0 add $0,1 add $1,$2 lpe mul $1,2 add $1,1 mov $0,$1
45.2
492
0.797935
6ceb7541756559ffd537915067c6ba2a3699dadb
6,528
asm
Assembly
waifu.asm
hwreverse/PC-G850V
53a4dca7b31f940412e0ebddba395f2b8deda895
[ "MIT" ]
7
2020-09-30T19:56:39.000Z
2021-09-30T12:05:18.000Z
waifu.asm
hwreverse/PC-G850V
53a4dca7b31f940412e0ebddba395f2b8deda895
[ "MIT" ]
1
2021-09-04T02:52:33.000Z
2021-09-04T02:52:33.000Z
waifu.asm
hwreverse/PC-G850V
53a4dca7b31f940412e0ebddba395f2b8deda895
[ "MIT" ]
2
2021-09-03T12:28:16.000Z
2021-09-30T13:47:01.000Z
10 ORG 100H 20 JP MAIN 30GPF EQU 0BFD0H 40WAITK EQU 0BFCDH 50RPTCHR EQU 0BFEEH 60MAIN: CALL CLS 60 LD HL, L0 70 LD B, 144 80 LD DE, 0000H 90 CALL GPF 100 LD HL, L1 110 LD B, 144 120 LD DE, 0100H 130 CALL GPF 140 LD HL, L2 150 LD B, 144 160 LD DE, 0200H 170 CALL GPF 180 LD HL, L3 190 LD B, 144 200 LD DE, 0300H 210 CALL GPF 220 LD HL, L4 230 LD B, 144 240 LD DE, 0400H 250 CALL GPF 260 LD HL, L5 270 LD B, 144 280 LD DE, 0500H 290 CALL GPF 300MAIN0: CALL WAITK 310 CP 0 320 JP Z, MAIN0 330 RET 340CLS: LD B, 144 350 LD DE, 0 360CLS0: LD A, 32 370 CALL RPTCHR 380 RET 1000L0: DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1001 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1002 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1003 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1004 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1005 DB 000H, 000H, 000H, 000H, 040H, 0F0H, 018H, 030H 1006 DB 000H, 090H, 0C0H, 058H, 0D0H, 008H, 044H, 028H 1007 DB 008H, 080H, 060H, 030H, 070H, 050H, 048H, 048H 1008 DB 008H, 020H, 030H, 0C0H, 022H, 0A5H, 041H, 028H 1009 DB 001H, 000H, 000H, 000H, 030H, 070H, 0C0H, 000H 1010 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 0FFH 1011 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1012 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1013 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1014 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1015 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1016 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1017 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1018L1: DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 040H 1019 DB 020H, 0E0H, 0D8H, 000H, 0C0H, 0E0H, 09CH, 054H 1020 DB 002H, 002H, 0C0H, 0C0H, 0C0H, 0C0H, 022H, 0C2H 1021 DB 002H, 022H, 022H, 002H, 002H, 002H, 002H, 092H 1022 DB 0CAH, 08AH, 00AH, 00CH, 000H, 000H, 081H, 043H 1023 DB 040H, 001H, 004H, 044H, 0C3H, 005H, 0EEH, 06AH 1024 DB 0E3H, 098H, 0D0H, 030H, 010H, 000H, 000H, 0E0H 1025 DB 020H, 020H, 020H, 030H, 030H, 030H, 030H, 010H 1026 DB 030H, 030H, 020H, 010H, 000H, 000H, 008H, 00FH 1027 DB 01FH, 01FH, 010H, 060H, 0C0H, 002H, 003H, 00FH 1028 DB 030H, 0C0H, 080H, 000H, 000H, 000H, 000H, 0FFH 1029 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1030 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1031 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1032 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1033 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1034 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1035 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1036L2: DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 0C8H 1037 DB 007H, 007H, 008H, 000H, 000H, 001H, 001H, 000H 1038 DB 000H, 020H, 0C8H, 07CH, 070H, 018H, 018H, 098H 1039 DB 080H, 025H, 029H, 03AH, 07AH, 07EH, 03FH, 01FH 1040 DB 01FH, 0BFH, 000H, 000H, 000H, 078H, 0F8H, 0F8H 1041 DB 0F8H, 0F0H, 080H, 080H, 009H, 010H, 00EH, 01FH 1042 DB 0FFH, 07FH, 03DH, 001H, 001H, 001H, 003H, 003H 1043 DB 002H, 003H, 001H, 000H, 000H, 000H, 000H, 000H 1044 DB 000H, 010H, 000H, 010H, 000H, 000H, 000H, 000H 1045 DB 000H, 000H, 000H, 001H, 003H, 0FFH, 000H, 000H 1046 DB 000H, 000H, 002H, 01EH, 078H, 0C0H, 000H, 0FFH 1047 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1048 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1049 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1050 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1051 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1052 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1053 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1054L3: DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 008H 1055 DB 000H, 060H, 0C0H, 080H, 000H, 002H, 01CH, 070H 1056 DB 0C0H, 001H, 011H, 012H, 017H, 016H, 01EH, 08EH 1057 DB 01EH, 0DEH, 090H, 030H, 090H, 000H, 03CH, 074H 1058 DB 0F0H, 0A0H, 000H, 080H, 070H, 050H, 056H, 077H 1059 DB 03FH, 08FH, 006H, 021H, 00EH, 09EH, 0FEH, 0C3H 1060 DB 001H, 000H, 000H, 080H, 000H, 000H, 000H, 000H 1061 DB 000H, 000H, 000H, 000H, 000H, 080H, 080H, 0C0H 1062 DB 0C0H, 0E0H, 070H, 000H, 040H, 07EH, 038H, 020H 1063 DB 080H, 000H, 000H, 000H, 000H, 001H, 082H, 08CH 1064 DB 080H, 010H, 000H, 000H, 000H, 0FFH, 000H, 0FFH 1065 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1066 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1067 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1068 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1069 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1070 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1071 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1072L4: DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1073 DB 000H, 000H, 004H, 005H, 010H, 01DH, 002H, 008H 1074 DB 007H, 00BH, 0CFH, 00FH, 00DH, 00BH, 000H, 000H 1075 DB 004H, 004H, 004H, 000H, 020H, 030H, 0C0H, 0C4H 1076 DB 0C4H, 0C4H, 084H, 005H, 006H, 0ECH, 00CH, 064H 1077 DB 05CH, 000H, 003H, 002H, 007H, 005H, 007H, 024H 1078 DB 002H, 00EH, 002H, 007H, 013H, 000H, 016H, 012H 1079 DB 028H, 032H, 032H, 022H, 042H, 002H, 082H, 002H 1080 DB 080H, 000H, 002H, 0C0H, 000H, 0C0H, 000H, 000H 1081 DB 000H, 001H, 002H, 004H, 004H, 00FH, 00FH, 01FH 1082 DB 01FH, 01FH, 05FH, 008H, 008H, 007H, 000H, 0FFH 1083 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1084 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1085 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1086 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1087 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1088 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1089 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1090L5: DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1091 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1092 DB 000H, 001H, 001H, 000H, 000H, 000H, 000H, 000H 1093 DB 000H, 001H, 000H, 010H, 000H, 000H, 000H, 000H 1094 DB 004H, 000H, 000H, 000H, 005H, 007H, 00DH, 000H 1095 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1096 DB 000H, 000H, 000H, 000H, 000H, 000H, 000H, 000H 1097 DB 000H, 000H, 000H, 000H, 000H, 000H, 001H, 000H 1098 DB 001H, 002H, 000H, 000H, 001H, 000H, 000H, 000H 1099 DB 000H, 000H, 000H, 000H, 03EH, 07FH, 03FH, 03EH 1100 DB 03EH, 000H, 040H, 07EH, 000H, 000H, 000H, 0FFH 1101 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1102 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1103 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1104 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1105 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1106 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 1107 DB 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH, 0FFH 
43.52
57
0.692402
a8ed2bef71de1a746416f22c5b023ecf071111a2
712
asm
Assembly
oeis/166/A166588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/166/A166588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/166/A166588.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A166588: Partial sums of A097331; binomial transform of A166587. ; 1,2,2,3,3,5,5,10,10,24,24,66,66,198,198,627,627,2057,2057,6919,6919,23715,23715,82501,82501,290513,290513,1033413,1033413,3707853,3707853,13402698,13402698,48760368,48760368,178405158,178405158,656043858,656043858,2423307048,2423307048,8987427468,8987427468,33453694488,33453694488,124936258128,124936258128,467995871778,467995871778,1757900019102,1757900019102,6619846420554,6619846420554,24987199492706,24987199492706,94520750408710,94520750408710,358268702159070,358268702159070,1360510918810438 lpb $0 sub $0,1 mov $2,$0 max $2,0 seq $2,126120 ; Catalan numbers (A000108) interpolated with 0's. add $1,$2 lpe add $1,1 mov $0,$1
54.769231
500
0.811798
86a745887274dc7d6ee6401557c6aee800b4109e
335
asm
Assembly
text/maps/cerulean_mart.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
text/maps/CeruleanMart.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
text/maps/CeruleanMart.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
_CeruleanMartText2:: text "Use REPEL to keep" line "bugs and weak" cont "#MON away." para "Put your strongest" line "#MON at the" cont "top of the list" cont "for best results!" done _CeruleanMartText3:: text "Have you seen any" line "RARE CANDY?" para "It's supposed to" line "make #MON go" cont "up one level!" done
16.75
26
0.683582
d4982b4d41eb68e2abaeb55108611423fe5d5915
368
asm
Assembly
CLICK_DRUMS/pwm/test/hh1.asm
bushy555/ZX-Spectrum-1-Bit-Routines
4d336dec9d7abc979a97af76d515104a9263f127
[ "BSD-3-Clause" ]
59
2015-02-28T14:15:56.000Z
2022-03-26T12:06:01.000Z
CLICK_DRUMS/pwm/test/hh1.asm
bushy555/ZX-Spectrum-1-Bit-Routines
4d336dec9d7abc979a97af76d515104a9263f127
[ "BSD-3-Clause" ]
1
2016-08-22T05:32:43.000Z
2016-08-22T09:33:28.000Z
CLICK_DRUMS/pwm/test/hh1.asm
bushy555/ZX-Spectrum-1-Bit-Routines
4d336dec9d7abc979a97af76d515104a9263f127
[ "BSD-3-Clause" ]
9
2015-02-28T14:16:31.000Z
2022-01-18T17:52:48.000Z
; The format is 0 ; High value is 224 ; Low value is 15 db $02,$0A,$0D,$0C,$0E,$06,$0D,$06,$0E,$07,$09,$06,$43,$04,$42,$0B db $1A,$0B,$34,$08,$0E,$09,$2E,$04,$0B,$0C,$0B,$06,$21,$04,$55,$2A db $30,$05,$12,$15,$02,$1C,$01,$04,$0A,$07,$0A,$04,$19,$1C,$05,$1C db $19,$02,$18,$02,$08,$13,$19,$0B,$0B,$06,$6E,$0B,$08,$15,$22,$05 db $7D,$08,$86,$0B,$00
36.8
70
0.505435
e730b2dd1fcccf055724a4f7049e8c03a573fe4e
317
asm
Assembly
src/intel/tools/tests/gen5/pln.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen5/pln.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen5/pln.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
pln(8) g2<1>F g3.4<0,1,0>F g8<8,8,1>F { align1 }; pln(16) g10<1>F g3.4<0,1,0>F g6<8,8,1>F { align1 compr }; pln(8) m4<1>F g5.4<0,1,0>F g6<8,8,1>F { align1 }; pln(16) m4<1>F g5.4<0,1,0>F g6<8,8,1>F { align1 compr4 };
63.4
82
0.384858
c3151ffdcc395ce75e85552fffc6e5393c2004a9
1,296
asm
Assembly
programs/oeis/115/A115113.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/115/A115113.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/115/A115113.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A115113: a(n) = 3*a(n-1) + 4*a(n-2), with a(0) = 2, a(1) = 6. ; 2,6,10,54,202,822,3274,13110,52426,209718,838858,3355446,13421770,53687094,214748362,858993462,3435973834,13743895350,54975581386,219902325558,879609302218,3518437208886,14073748835530,56294995342134,225179981368522,900719925474102,3602879701896394,14411518807585590,57646075230342346,230584300921369398,922337203685477578,3689348814741910326,14757395258967641290,59029581035870565174,236118324143482260682,944473296573929042742,3777893186295716170954,15111572745182864683830,60446290980731458735306,241785163922925834941238,967140655691703339764938,3868562622766813359059766,15474250491067253436239050,61897001964269013744956214,247588007857076054979824842,990352031428304219919299382,3961408125713216879677197514,15845632502852867518708790070,63382530011411470074835160266,253530120045645880299340641078,1014120480182583521197362564298,4056481920730334084789450257206,16225927682921336339157801028810,64903710731685345356631204115254,259614842926741381426524816461002,1038459371706965525706099265844022,4153837486827862102824397063376074,16615349947311448411297588253504310,66461399789245793645190353014017226,265845599156983174580761412056068918 mul $0,2 trn $0,1 seq $0,133190 ; a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3). mul $0,2
162
1,150
0.890432
9f484f18202093bbf72c613af24a9e2c6a0dabf8
710
asm
Assembly
oeis/123/A123025.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/123/A123025.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/123/A123025.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A123025: a(n) = n!*b(n), where b(n) = (1 + n - n^2)*b(n-2)/(n*(n-1)), b(0) = b(1) = 1. ; Submitted by Jon Maiga ; 1,1,-1,-5,11,95,-319,-3895,17545,276545,-1561505,-30143405,204557155,4672227775,-37024845055,-976495604975,8848937968145,264630308948225,-2698926080284225,-90238935351344725,1022892984427721275,37810113912213439775,-471553665821179507775,-19094107525667787086375,259826069867469908784025,11437370407875004464738625,-168627119343987970800832225,-8017596655920378129781776125,127313475104710917954628329875,6502270887951426663253020437375,-110635409865993787702572018661375 mov $3,2 lpb $0 mov $2,$3 mul $2,$0 sub $0,1 mul $2,$0 sub $0,1 div $2,-1 add $3,$2 lpe mov $0,$3 div $0,2
41.764706
473
0.75493
f6e020c7304547baed9a3e666f33ba3efae4e7e6
6,160
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_979.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_979.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_979.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r15 push %r8 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0xc32b, %r8 nop nop nop nop nop add %rcx, %rcx mov (%r8), %rdx nop xor %rdx, %rdx lea addresses_UC_ht+0x6873, %r15 nop nop nop nop nop add %rdx, %rdx movl $0x61626364, (%r15) nop sub $17390, %rdi lea addresses_WC_ht+0x1aff3, %rsi lea addresses_WC_ht+0x10473, %rdi cmp $5956, %rbp mov $21, %rcx rep movsw nop sub $43759, %r15 lea addresses_D_ht+0xb1f3, %rsi lea addresses_D_ht+0xe7df, %rdi nop nop and %r14, %r14 mov $104, %rcx rep movsb nop nop and %rdx, %rdx lea addresses_WC_ht+0x16a73, %rsi lea addresses_A_ht+0x5573, %rdi nop nop nop nop inc %r8 mov $109, %rcx rep movsw nop nop nop sub $26646, %rcx lea addresses_normal_ht+0x18e73, %rsi lea addresses_D_ht+0xa9f3, %rdi clflush (%rsi) nop nop nop nop nop xor $2927, %r14 mov $95, %rcx rep movsq nop inc %r14 lea addresses_WC_ht+0xc73, %rsi lea addresses_UC_ht+0x476a, %rdi nop inc %rbp mov $108, %rcx rep movsq nop nop sub $64833, %r8 lea addresses_WT_ht+0x8021, %r14 nop dec %rsi movb $0x61, (%r14) nop nop lfence lea addresses_D_ht+0x8c73, %rbp nop nop sub $8459, %rdx mov (%rbp), %edi nop nop cmp %r14, %r14 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r8 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r15 push %rcx push %rsi // Faulty Load lea addresses_UC+0x1b073, %r10 nop nop nop nop and %r13, %r13 mov (%r10), %r15w lea oracles, %rcx and $0xff, %r15 shlq $12, %r15 mov (%rcx,%r15,1), %r15 pop %rsi pop %rcx pop %r15 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}} {'src': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}} {'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}} {'src': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}} {'src': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 4, 'type': 'addresses_D_ht'}} {'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}} {'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
40
2,999
0.659903
664c395726c13853931ad78d855e3de31d2f121e
378
asm
Assembly
programs/oeis/202/A202304.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/202/A202304.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/202/A202304.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A202304: a(n) = floor(sqrt(3*n)). ; 0,1,2,3,3,3,4,4,4,5,5,5,6,6,6,6,6,7,7,7,7,7,8,8,8,8,8,9,9,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,17,17,17 mul $0,3 lpb $0 add $1,2 sub $0,$1 trn $0,1 lpe div $1,2 mov $0,$1
31.5
267
0.589947
86483a7c25ebf644587729d4838df4cc7715c287
316
asm
Assembly
programs/oeis/306/A306007.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/306/A306007.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/306/A306007.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A306007: Number of non-isomorphic intersecting antichains of weight n. ; 1,1,1,1,2,2,6,6,14,22 pow $0,2 mov $2,$0 mov $4,4 lpb $0 mov $0,$2 add $1,1 div $1,2 mov $3,$4 add $3,1 div $0,$3 sub $0,$3 add $1,$0 sub $4,1 mul $4,2 lpe lpb $2 mul $1,2 add $1,1 mod $2,10 lpe mov $0,$1 add $0,1
12.153846
72
0.556962
270df59fd5767ca7e2b46eaa3a5d296772baba56
5,508
asm
Assembly
Transynther/x86/_processed/NONE/_zr_xt_/i9-9900K_12_0xa0.log_21829_1318.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_xt_/i9-9900K_12_0xa0.log_21829_1318.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_xt_/i9-9900K_12_0xa0.log_21829_1318.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r14 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x83e0, %rsi lea addresses_WC_ht+0x12fe0, %rdi inc %r12 mov $95, %rcx rep movsl nop sub $19148, %r14 lea addresses_A_ht+0x7a88, %rsi lea addresses_WC_ht+0x1e720, %rdi xor $41449, %r11 mov $47, %rcx rep movsw cmp %r14, %r14 lea addresses_normal_ht+0x13740, %r11 nop xor $39701, %r13 movb (%r11), %r14b nop nop nop add $37550, %r14 lea addresses_WT_ht+0x1ae0e, %rsi lea addresses_A_ht+0x156e0, %rdi nop nop nop xor $19412, %rbx mov $105, %rcx rep movsb nop nop nop and $45618, %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %r14 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %rcx push %rdi push %rdx push %rsi // Load lea addresses_WT+0x1cf60, %r11 nop nop nop sub %rdi, %rdi mov (%r11), %r15 nop nop nop nop nop add $9380, %r15 // Store lea addresses_D+0x18887, %rdi nop nop nop nop nop dec %rcx movl $0x51525354, (%rdi) nop nop nop nop nop inc %rdx // Faulty Load lea addresses_RW+0x1a3e0, %r14 clflush (%r14) nop nop nop xor %rsi, %rsi vmovups (%r14), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %rdi lea oracles, %r11 and $0xff, %rdi shlq $12, %rdi mov (%r11,%rdi,1), %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'NT': True, 'same': False, 'congruent': 3, 'type': 'addresses_WT', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': True, 'size': 4}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_RW', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}} {'src': {'same': True, 'congruent': 2, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}} {'src': {'NT': True, 'same': True, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}} {'00': 1, '32': 21828} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
41.413534
2,999
0.660131
df575b8c2a7231ca553e3e807317f51f9161c2fc
407
asm
Assembly
libsrc/osca/get_file_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/osca/get_file_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/osca/get_file_size.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; ; Old School Computer Architecture - interfacing FLOS ; Stefano Bodrato, 2011 ; ; Get the size for the given file ; ; $Id: get_file_size.asm,v 1.4 2015/01/19 01:33:00 pauloscustodio Exp $ ; INCLUDE "flos.def" PUBLIC get_file_size get_file_size: ; __FASTCALL__, HL points to filename push iy call kjt_find_file push ix pop de push iy pop hl pop iy ret z ld hl,0 ld d,h ld e,l ret
14.034483
71
0.700246
143a1c9b4b417ddb84f566e895b88af458b66b96
786
asm
Assembly
programs/oeis/312/A312684.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/312/A312684.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/312/A312684.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A312684: Coordination sequence Gal.6.252.1 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,4,8,14,20,26,32,38,44,48,52,56,60,66,72,78,84,90,96,100,104,108,112,118,124,130,136,142,148,152,156,160,164,170,176,182,188,194,200,204,208,212,216,222,228,234,240,246,252,256 mov $3,$0 add $3,1 mov $6,$0 lpb $3 mov $0,$6 sub $3,1 sub $0,$3 mov $2,1 mov $4,0 mov $5,0 lpb $0 add $0,$2 mov $2,$0 mov $0,1 mod $2,10 add $2,7 add $4,$2 add $4,8 add $0,$4 div $0,10 seq $5,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). lpe add $5,$0 add $5,$0 add $5,1 add $1,$5 lpe mov $0,$1
24.5625
179
0.613232
d4e70f2c952d3c93761c4d74b318b88fa0a59f20
104,397
asm
Assembly
Appl/Startup/CommonStartup/CMain/cmainProcess.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Startup/CommonStartup/CMain/cmainProcess.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Startup/CommonStartup/CMain/cmainProcess.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1988 -- All Rights Reserved PROJECT: PC GEOS MODULE: Startup FILE: cmainProcess.asm REVISION HISTORY: Name Date Description ---- ---- ----------- atw 2/89 Initial version DESCRIPTION: This file contains a Startup application $Id: cmainProcess.asm,v 1.1 97/04/04 16:52:21 newdeal Exp $ ------------------------------------------------------------------------------@ ;############################################################################## ; Initialized data ;############################################################################## ;------------------------------------------------------------------------------ ; Variables ;------------------------------------------------------------------------------ idata segment ;------------------------------------------------------------------------------ ; Startup Process class table ;------------------------------------------------------------------------------ StartupProcessClass mask CLASSF_NEVER_SAVED StartupClass mask CLASSF_NEVER_SAVED StartupProcessFlags record SPF_MONITOR_ACTIVE:1 ;Set if the keyboard moniker is in SPF_DETACH_PENDING:1 ;Set if a detach was aborted because a room was still open. SPF_DETACHING:1 ; Set if user has selected an option requiring a shutdown, which is ; now in progress. Used to prevent multiple shutdowns. SPF_IGNORING_INPUT:1 ; Set if ignoring input (while waiting for room to shutdown) SPF_PENDING_FIELD:1 ; Set if we are waiting for the current field to exit before we ; open a new field (pendingField) SPF_DETACH_AFTER_VERIFY:1 ; Set if a MSG_META_DETACH has come in, but the verify thread ; is still going. :3 StartupProcessFlags end ; ; general state flags ; processFlags StartupProcessFlags 0 ; ; currently opened field ; currentField optr 0 ; ; field waiting to be opened ; pendingField optr 0 ;------------------------------------------------------------------------------ ; Monitor stuff ;------------------------------------------------------------------------------ ; ; So that we can watch for the "Hot key" being pressed, in order to ; switch back to the Startup main screen ; hotKeyMonitor Monitor <> ifdef ISTARTUP KeySequenceMode record :5 KSM_LOGOUT_QUERY:1 ; we are querying the user about logout KSM_ESCAPE:1 ; we are in escape sequence mode KSM_EDLAN:1 ; we are in edlan compatibility mode (bios key) KeySequenceMode end ; ; Watch for the sequence: ; keySequenceMode KeySequenceMode 0 keySequenceState byte 0 ; current state of FSM keySequenceEndState byte 0 ; final state of FSM keySequence byte 8 dup (0) ; array of scancodes to watch for endif idata ends ;############################################################################## ; Uninitialized data ;############################################################################## udata segment ;------------------------------------------------------------------------------ ; Death/Detach stuff ;------------------------------------------------------------------------------ inEngineMode byte (?) ;Is non-zero if we are in engine mode. detachOD optr ;Object to send ACK to after detach is finished detachID word ;ID passed with detach ifdef ISTARTUP autologCountdown byte (?) ;number of minutes to wait for the ;user to acknowledge autologin. ;if -1, then autologin was ack'ed. autologRoom dword ;room to go to, if autologin. verifyThread hptr keyboardDriverStrategy fptr endif udata ends ;############################################################################## ; MAIN CODE ;############################################################################## InitCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupOpenEngine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Sets a flag letting Startup know we are in engine mode. CALLED BY: GLOBAL PASS: don't care RETURN: don't care DESTROYED: whatever superclass trashes PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 10/18/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupOpenEngine method StartupClass, MSG_GEN_PROCESS_OPEN_ENGINE mov es:[inEngineMode],TRUE mov di, offset StartupClass GOTO ObjCallSuperNoLock StartupOpenEngine endm COMMENT @---------------------------------------------------------------------- METHOD: StartupOpenApplication DESCRIPTION: Startup application, then startup our help text banner PASS: *ds:si - instance data es - segment of StartupClass ax - MSG_GEN_PROCESS_OPEN_APPLICATION bp - handle of state block dx - handle of AppLaunchBlock cx - AppAttachFlags RETURN: carry - ? ax, cx, dx, bp - ? DESTROYED: bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version ------------------------------------------------------------------------------@ StartupOpenApplication method StartupClass, MSG_GEN_PROCESS_OPEN_APPLICATION EC < tst es:[inEngineMode] > EC < ERROR_NZ STARTUP_ERROR > ifndef GPC ; no main window ifdef WELCOME push ax, cx, dx, bp mov bx, handle StartupWindow mov si, offset StartupWindow mov ax, MSG_GEN_SET_USABLE mov dl, VUM_MANUAL mov di, mask MF_CALL call ObjMessage pop ax, cx, dx, bp endif endif mov di, offset StartupClass call ObjCallSuperNoLock ; ; now, after attaching to state file, change owner of field ; resources to UI, so that flushing via input queue will be ; happy (the fields are run by the global UI thread) ; mov bx, handle Room1Field call ChangeResourceOwner mov bx, handle Room2Field call ChangeResourceOwner mov bx, handle Room3Field call ChangeResourceOwner ifdef ISTARTUP mov bx, handle LoginRoomField call ChangeResourceOwner ifdef MOUSETUTORIAL mov bx, handle MouseRoomField call ChangeResourceOwner endif call IStartupOpenApplication endif ifdef WELCOME call WelcomeOpenApplication endif ret StartupOpenApplication endm ifdef WELCOME COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WelcomeOpenApplication %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Open application handler for WELCOME CALLED BY: StartupOpenApplication PASS: ds - dgroup RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 7/ 1/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ WelcomeOpenApplication proc near .enter if (0) ; No express menu trigger and just return to Welcome call CreateExpressMenuTrigger endif ; (0) ; ; Return to the field from which we shutdown. There will be no such ; field if we are starting for the first time, if we exited from the ; Startup main screen, or if we exited using "Exit to DOS". (The ; last only applies to Welcome, not IStartup). ; call SysGetConfig test al, mask SCF_RESTARTED jz skipReturnField mov ax, MSG_STARTUP_APP_GET_RETURN_FIELD call GenCallApplication jc enterRoom skipReturnField: ; ; If first time using device, run set up program in CUI field ; ifdef GPC push ds segmov ds, cs, cx mov si, offset startupCat mov dx, offset startupKey call InitFileReadBoolean pop ds jnc gotStartup mov ax, FALSE gotStartup: cmp ax, TRUE je doneStartup mov bx, handle Room1Field mov si, offset Room1Field mov ax, MSG_STARTUP_FIELD_START_SET_UP mov di, mask MF_CALL call ObjMessage ; ; open field ; mov cx, handle Room1Field mov dx, offset Room1Field mov ax, MSG_STARTUP_OPEN_FIELD ; Enter selected room mov bx, handle 0 mov di, mask MF_FIXUP_DS call ObjMessage ; ; run set up application ; mov dx, MSG_GEN_PROCESS_OPEN_APPLICATION call IACPCreateDefaultLaunchBlock ; dx = ALB jc doneStartupErr ; mem error mov bx, dx ; bx = ALB call MemLock jc doneStartupErr ; mem error (block left) mov es, ax mov ax, handle Room1Field mov es:[ALB_genParent].handle, ax mov ax, offset Room1Field mov es:[ALB_genParent].offset, ax call MemUnlock segmov es, cs, di mov di, offset startupToken clr ax call IACPConnect jc doneStartupErr ; couldn't launch error clr cx call IACPShutdown mov bx, handle Room1Field mov si, offset Room1Field mov ax, MSG_STARTUP_FIELD_FINISH_SET_UP mov di, mask MF_CALL call ObjMessage jmp doneWithInitialRoom doneStartupErr: mov bx, handle Room1Field mov si, offset Room1Field mov ax, MSG_STARTUP_FIELD_CLEAN_UP_SET_UP mov di, mask MF_CALL call ObjMessage clr cx mov ax, MSG_GEN_FIELD_LOAD_DEFAULT_LAUNCHER mov di, mask MF_CALL call ObjMessage jmp doneWithInitialRoom doneStartup: endif ifdef PRODUCT_WIN_DEMO mov bx, handle WelcomeDialog mov si, offset WelcomeDialog call UserCreateDialog call UserDoDialog call UserDestroyDialog endif ; ; FIND OUT WHAT ROOM THE USER WANTS TO STARTUP IN ; call StartupGetStartupRoom jz enterRoom mov bx, handle StartupApp mov si, offset StartupApp mov di, mask MF_CALL mov ax, MSG_STARTUP_APP_SWITCH_TO_STARTUP call ObjMessage jmp doneWithInitialRoom enterRoom: mov ax, MSG_STARTUP_OPEN_FIELD ; Enter selected room mov bx, handle 0 mov di, mask MF_CALL call ObjMessage doneWithInitialRoom: ; INSTALL MONITOR test ds:[processFlags], mask SPF_MONITOR_ACTIVE jnz monitorIn mov bx, offset dgroup:hotKeyMonitor ; Install just after kbd chars converted mov al, ML_DRIVER+1 mov cx, segment Resident mov dx, offset StartupHotKeyMonitor call ImAddMonitor or ds:[processFlags], mask SPF_MONITOR_ACTIVE monitorIn: .leave ret WelcomeOpenApplication endp ifdef GPC startupCat char 'welcome',0 startupKey char 'finishedSetup',0 startupToken GeodeToken <<'GPCs'>,0> endif endif ifdef ISTARTUP COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupOpenApplication %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Open application for IStartup CALLED BY: StartupOpenApplication PASS: ds, es - dgroup RETURN: nothing DESTROYED: ax,bx,cx,dx,si,di,bp,ds,es REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 7/ 1/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ IStartupOpenApplication proc near .enter ; ; Get escape sequence ; mov di, offset keySequence ;es:di = ;sequence buffer call IclasGetEscapeSequence ;get escape sequence mov es:[keySequenceEndState], cl ; ; Check to see if anyone is logged in. Call the Net Library routine ; because the Iclas Library is not initialized yet. ; call IclasNetGetUserType cmp ah, UT_LOGIN jne realUser ; ; No one's logged in. Open Login field. ; mov cx, handle LoginRoomField mov dx, offset LoginRoomField jmp enterRoom realUser: ; ; Check to see if we are returning from running courseware (or ; shelling out to DOS). If yes, then skip link verification ; and don't bother checking for autologin. Just return to the ; field from which we shutdown. ; mov ax, MSG_STARTUP_APP_GET_RETURN_FIELD call GenCallApplication jc wasRunningCourseware ; ; We're restarting GEOS as a user after logging in with ; slowLogin = true ; call IclasInitUserVariables call IclasSetupUserHome jc alreadyLoggedIn call IclasEnterUserHome call IclasInitOtherVariables ; depends on ; SP_TOP and ini file call IStartupInitUser jc doneWithInitialRoom call IStartupGetStartupRoom jc enterRoom mov bx, handle StartupApp mov si, offset StartupApp mov di, mask MF_CALL mov ax, MSG_STARTUP_APP_SWITCH_TO_STARTUP call ObjMessage jmp doneWithInitialRoom alreadyLoggedIn: ; ; another user is already logged in with the same login ID, or ; the license limit is exceeded. Logout right away. ; mov ax, MSG_STARTUP_APP_LOGOUT mov cx, FALSE ; do not query user call GenCallApplication jmp done wasRunningCourseware: call IclasInitUserVariables call IclasEnterUserHome call IclasInitOtherVariables call IStartupBeginPollingForMessages call CreateTriggerIfPermissionSet enterRoom: ; ; Enter the room. Do this FORCE_QUEUE, so that the spooler is ; loaded before the room is entered. Otherwise, things will ; crash. ; mov ax, MSG_STARTUP_OPEN_FIELD ; Enter selected room mov bx, handle 0 mov di, mask MF_FORCE_QUEUE call ObjMessage doneWithInitialRoom: ; INSTALL MONITOR test ds:[processFlags], mask SPF_MONITOR_ACTIVE jnz done ; ; Save strategy routine for keyboard driver ; mov ax, GDDT_KEYBOARD call GeodeGetDefaultDriver push ds, si mov bx, ax call GeodeInfoDriver movdw es:[keyboardDriverStrategy], ds:[di].DIS_strategy, ax pop ds, si mov bx, offset dgroup:hotKeyMonitor ; Install just after kbd chars converted mov al, ML_DRIVER+1 mov cx, segment Resident mov dx, offset StartupHotKeyMonitor call ImAddMonitor or ds:[processFlags], mask SPF_MONITOR_ACTIVE done: ; ; Do this last -- after we've already entered the user's home, ; so that the spooler will find state files from a shutdown, ; if necessary. ; call IStartupLoadSpooler ; ; Also need to do this last, because we need to be in the ; user's home so that the INI files are set up correctly, lest ; we get weird off-by-one errors in the default printer when ; shutting down and restoring f ; call IStartupDeterminePrinterStatus .leave ret IStartupOpenApplication endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ChangeResourceOwner %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Load the resource in, and set its owner to be UI CALLED BY: StartupOpenApplication PASS: bx - resource handle RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 7/ 1/93 added header %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ChangeResourceOwner proc near ; ; force resource to load in, so it can be relocated using startup's ; relocation tables ; .assert (offset Room1Field eq offset Room2Field) .assert (offset Room2Field eq offset Room3Field) ifdef ISTARTUP .assert (offset Room3Field eq offset LoginRoomField) ifdef MOUSETUTORIAL .assert (offset LoginRoomField eq offset MouseRoomField) endif endif mov si, offset Room1Field mov ax, MSG_GEN_GET_USABLE ; something handle in Gen mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage ; ; change owner to ui ; mov ax, handle ui ; ax = UI call HandleModifyOwner ret ChangeResourceOwner endp ifdef ISTARTUP ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupLoadSpooler %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Load the spooler. Do this AFTER entering the user's home, so that print jobs that were cancelled the last time we shut down to DOS will be restarted. CALLED BY: IStartupOpenApplication PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 6/25/93 Copied from UserLoadSpooler %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ EC <spoolerName char "SPOOLEC.GEO",0 > NEC <spoolerName char "SPOOL.GEO",0 > IStartupLoadSpooler proc near uses ax,bx,cx,dx,si,di,bp,ds,es .enter ; ; See if it's already loaded ; segmov ds, dgroup, ax tst ds:[spoolerHandle] jnz done ; ; Load it. We need to create an AppLaunchBlock, ; since the parent field needs to be the global UI field, ; otherwise the spooler will exit when the currently displayed ; field is exited ; mov ax, size AppLaunchBlock mov cx, ALLOC_DYNAMIC_NO_ERR_LOCK or \ mask HF_SHARABLE or (mask HAF_ZERO_INIT shl 8) call MemAlloc mov es, ax mov ax, MSG_GEN_FIND_PARENT call UserCallApplication movdw es:[ALB_genParent], cxdx mov dx, bx ; AppLaunchBlock handle call MemUnlock ; necessary? clr ax mov cx, MSG_GEN_PROCESS_OPEN_APPLICATION segmov ds, cs mov si, offset spoolerName mov bx, SP_SYSTEM call UserLoadApplication jc done segmov ds, dgroup, ax mov ds:[spoolerHandle], bx done: .leave ret IStartupLoadSpooler endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CallSpoolSetDefaultPrinter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the default printer for the system, either after returning from state as a user, or the first time the system boots. If this is a first-time boot, then just store the printer number for later, since the spooler won't have been loaded yet. CALLED BY: IStartupLoadSpooler, FindPrinterWithMatchingQueueCB PASS: ax - printer number to make default RETURN: nothing DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: Things happen radically differently in slow vs. fast login, so any changes made here should be tested in both. Things to watch out for: - If a user has printers defined in her user .ini file, then this routine has to be called AFTER IStartupInitUser, so that the user's .ini file is correctly in-use, and thus, the correct printer is selected. REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 6/25/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CallSpoolSetDefaultPrinter proc near uses ds, bx .enter ; ; In slow login, this routine is called before the spooler is ; loaded, so we just bail if this is the case, in the hope ; that this routine will get called again later. In fast ; login, things seem to happen at the right time. Please do ; not change ANY of this hooey unless you are absolutely sure ; of what you're doing, because people keep breaking it, and I ; keep fixing it, and I'm sick of doing this. ; ; segmov ds, dgroup, bx mov bx, ds:[spoolerHandle] tst bx jz done push ax mov ax, enum SpoolSetDefaultPrinter call ProcGetLibraryEntry pop ss:[TPD_dataAX] call ProcCallFixedOrMovable done: .leave ret CallSpoolSetDefaultPrinter endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupInitUser %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Init IStartup for user. If autologin, also goes into the room. CALLED BY: IStartupOpenApplication (slow login) StartupFieldNotifyNoFocus (fast login) PASS: nothing RETURN: if carry set, autologin. DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JS 4/16/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ IStartupInitUser proc far uses ax, bx, si, di, bp .enter call IStartupBeginPollingForMessages call CreateTriggerIfPermissionSet ; ; Set the capture to the default queue, if any, for this workstation. ; call IStartupSetDefaultPrinter ; ; Start link verification. ; call IStartupVerifyLinks ; ; hide/show K2-level trigger as needed ; mov cx, MSG_GEN_SET_USABLE ; assume student call IclasGetCurrentUserType cmp ah, UT_STUDENT je setK2level cmp ah, UT_GENERIC je setK2level CheckHack <MSG_GEN_SET_NOT_USABLE eq MSG_GEN_SET_USABLE+1> inc cx setK2level: push ax ; UserType mov_tr ax, cx mov bx, handle Room1 mov si, offset Room1 call callObjMessageVumNow ; ; Set the SelfGuided screen not usable if user can't enter it. ; call IclasGetUserPermissions test ax, mask UP_SELF_GUIDED_LEVEL mov ax, MSG_GEN_SET_USABLE jnz gotMessage CheckHack <MSG_GEN_SET_NOT_USABLE eq MSG_GEN_SET_USABLE+1> inc ax gotMessage: mov bx, handle Room3 mov si, offset Room3 call callObjMessageVumNow pop ax ; UserType ; ; Check autologin ; cmp ah, UT_STUDENT je checkAutologin cmp ah, UT_GENERIC jne noAutoLogin checkAutologin: call GetAutologStatus jc noAutoLogin ;al = autologin timeout, ah = IclasAutologinLevel, ;and ^lcx:dx = room to enter. clr ah ; ax = timeout period call WaitForAutologTimeout stc ; indicate autologin jmp done noAutoLogin: clc done: .leave ret callObjMessageVumNow: clr di mov dl, VUM_NOW call ObjMessage retn IStartupInitUser endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupSetDefaultPrinter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set this user's default printer to the one that was set when the machine was first booted. CALLED BY: IStartupInitUser PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: This code has broken so many times it's not even funny. In slow login, IStartupInitUser (which calls IStartupSetDefaultPrinter) is called by IStartupOpenApplication before the spooler is loaded, so this routine basically does nothing, but that's OK, because IStartupDeterminePrinterStatus is called later, which does the right thing. In fast login, IStartupInitUser is called by StartupFieldNotifyNoFocus, after the user has logged in, so this routine does the right thing. What a mess!!! KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 6/10/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ IStartupSetDefaultPrinter proc near uses ax,bx,cx,dx,es .enter mov bx, handle DefaultPrinterQueue push bx call ObjLockObjBlock mov es, ax assume es:AppResource mov bx, es:[DefaultPrinterQueue] assume es:dgroup ; ; es:bx - queue name ; call FindPrinterWithMatchingQueue pop bx call MemUnlock .leave ret IStartupSetDefaultPrinter endp endif ;---------------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupGetStartupRoom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the optr of the field we should start in CALLED BY: IStartupOpenApplication, WelcomeOpenApplication PASS: nothing RETURN: if zero flag set, ^lcx:dx = field we should start in DESTROYED: ax,bx,cx,dx,si,di,bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ???? 4/ 9/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupGetStartupRoom proc far push ds mov bx, handle IniStrings ;Lock resource call MemLock mov ds, ax mov_tr cx, ax ;CX <- strings resource assume ds:IniStrings mov dx, ds:[StartupRoomKeyString] ;CX:DX <- key string mov si, ds:[CategoryString] ;DS:SI <- category string call InitFileReadInteger jnc 10$ ;Branch if string found clr ax ;Else, enter Startup room. 10$: mov bx, handle IniStrings ;Unlock strings resource call MemUnlock assume ds:dgroup pop ds ; IF THE USER WANTS TO STARTUP IN ONE OF THE ROOMS, GO ; THERE DIRECTLY mov cx, handle Room1Field ;assume room 1 mov dx, offset Room1Field dec ax je done mov cx, handle Room2Field ;assume room 2 mov dx, offset Room2Field dec ax je done mov cx, handle Room3Field ;assume room 3 mov dx, offset Room3Field dec ax done: ret StartupGetStartupRoom endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupGetStartupRoom %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get optr of field we should startup in CALLED BY: IStartupOpenApplication, StartupFieldNotifyNoFocus PASS: nothing RETURN: carry set if we have a field to startup in ^lcx:dx = field to startup in DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JS 7/24/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- IStartupGetStartupRoom proc far uses ax,bx,si,di,bp .enter ; ; FIND OUT WHAT ROOM THE USER WANTS TO STARTUP IN ; call StartupGetStartupRoom stc ; assume we have startup room jz done ; ; No startup room in .ini file. ; call IclasNetGetUserType cmp ah, UT_STUDENT jz student cmp ah, UT_GENERIC clc ; assume no startup room jnz done student: ; ; Students should automatically enter K2Shell if they don't have a ; preferred startup room set in their .ini file. ; mov cx, handle Room1Field mov dx, offset Room1Field stc ; we have a startup room done: .leave ret IStartupGetStartupRoom endp endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupDeterminePrinterStatus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Since we're returning from DOS, where the user may have changed the current LPT capture, see if we can figure out which queue LPT1 is rerouted to, and see if there's a printer in the .INI file that uses that queue, and if so, make that our current default printer. CALLED BY: IStartupOpenApplication PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 11/14/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- noQueueName char "nONe",0 ForceRef noQueueName IStartupDeterminePrinterStatus proc near ifdef BUILD_STATE_FILE ; ; If we pass this compilation flag, then istartup will keep ; the DefaultPrinterQueue chunk empty, which is what we want ; for the template state file. We DON'T want this in the ; normal case! ; %out ********** WARNING: BUILD_STATE_FILE constant is set *********** ret else uses ax,bx,cx,dx,di,si,ds,es queueName local NetObjectName queueNamePtr local fptr.char .enter segmov ds, ss lea si, ss:[queueName] mov bx, PARALLEL_LPT1 call NetPrintGetCaptureQueue jc done tst <{char} ds:[si]> jnz haveQueue ; ; If there was no capture, then we still need to initialize ; the DefaultPrinterQueue variable to some non-null value. ; God help us if a sysop ever creates a queue called "nONe" ; segmov ds, cs mov si, offset noQueueName haveQueue: movdw ss:[queueNamePtr], dssi ; ; If this is the first boot, then store the queue name in the ; "DefaultPrinterQueue" chunk, so that subsequent logins will set ; their printers to this value. ; segmov es, ds mov di, si call LocalStringSize inc cx mov bx, handle DefaultPrinterQueue call ObjLockObjBlock mov ds, ax mov si, offset DefaultPrinterQueue mov di, ds:[si] tst <{char} ds:[di]> jnz afterStoreDefaultQueue ; ; The queue name is blank, so reallocate the chunk, and copy ; it in. ; mov ax, si call LMemReAlloc call ObjMarkDirty segmov es, ds mov di, es:[si] lds si, ss:[queueNamePtr] LocalCopyString afterStoreDefaultQueue: call MemUnlock ; ; Now, find a printer with this queue, and make it the default. ; lea bx, ss:[queueName] segmov es, ss call FindPrinterWithMatchingQueue ; ; Stop capturing, so GEOS apps can print to the local printer, ; if need be. ; mov bx, PARALLEL_LPT1 call NetPrintEndCapture done: .leave ret endif ; ifdef BUILD_STATE_FILE IStartupDeterminePrinterStatus endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindPrinterWithMatchingQueue %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find a printer whose queue matches the passed queue CALLED BY: IStartupDeterminePrinterStatus PASS: es:bx - null-terminated queue name RETURN: nothing. Calls SpoolSetDefaultPrinter to set the default. DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 6/10/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ printerCategoryStr char "printer",0 printersKeyStr char "printers",0 FindPrinterWithMatchingQueue proc near uses ax,cx,dx,di,si,bp,ds .enter tst <{char} es:[bx]> jz done ; ; Look for a printer that is redirected to this queue ; mov cx, cs mov ds, cx mov si, offset printerCategoryStr mov dx, offset printersKeyStr mov bp, mask IFRF_READ_ALL mov di, cx mov ax, offset FindPrinterWithMatchingQueueCB call InitFileEnumStringSection done: .leave ret FindPrinterWithMatchingQueue endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindPrinterWithMatchingQueueCB %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback routine. For each named printer, see if it's defined as going to a network queue, and if so, see if that queue name matches the passed queue name, and if so, set that printer to be the default printer CALLED BY: FindPrinterWithMatchingQueue PASS: es:bx - passed queue name ds:si - printer name dx - printer number RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 11/14/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ initCodeQueueKey char "queue",0 FindPrinterWithMatchingQueueCB proc far uses es, bx passedQueue local fptr.char push es, bx initFileQueueName local NetObjectName .enter ; ; See if this printer is defined as going to a queue ; mov cx, cs push dx, bp mov dx, offset initCodeQueueKey segmov es, ss lea di, ss:[initFileQueueName] mov bp, size initFileQueueName call InitFileReadString pop dx, bp jc doneCLC ; ; Compare the two queue names ; clr cx lds si, ss:[passedQueue] call LocalCmpStrings jne doneCLC ; ; They match, so make this printer the new default ; mov_tr ax, dx call CallSpoolSetDefaultPrinter stc jmp done doneCLC: clc done: .leave ret FindPrinterWithMatchingQueueCB endp endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CreateExpressMenuTrigger %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Create a trigger in all existing express menus, and add ourselves to the express menu notification CALLED BY: WelcomeOpenApplication, IStartupOpenApplication PASS: nothing RETURN: nothing DESTROYED: ax,bx,cx,dx,si,di,bp,ds,es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 3/18/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifndef WELCOME CreateExpressMenuTrigger proc far .enter ; ; Add a button to all currently existing ExpressMenuControl ; objects. ; mov dx, size CreateExpressMenuControlItemParams sub sp, dx mov bp, sp mov ss:[bp].CEMCIP_feature, CEMCIF_UTILITIES_PANEL mov ss:[bp].CEMCIP_class.segment, segment GenTriggerClass mov ss:[bp].CEMCIP_class.offset, offset GenTriggerClass mov ss:[bp].CEMCIP_itemPriority, CEMCIP_NETMSG_SEND_MESSAGE mov ss:[bp].CEMCIP_responseMessage, MSG_STARTUP_EXPRESS_MENU_CONTROL_ITEM_CREATED mov ss:[bp].CEMCIP_responseDestination.handle, handle 0 mov ss:[bp].CEMCIP_responseDestination.chunk, 0 movdw ss:[bp].CEMCIP_field, 0 ; field doesn't matter mov ax, MSG_EXPRESS_MENU_CONTROL_CREATE_ITEM mov di, mask MF_RECORD or mask MF_STACK call ObjMessage ; di = event handle mov cx, di ; cx = event handle clr dx ; no extra data block mov bx, MANUFACTURER_ID_GEOWORKS mov ax, GCNSLT_EXPRESS_MENU_OBJECTS clr bp ; no cached event call GCNListSend ; send to all EMCs add sp, size CreateExpressMenuControlItemParams ; ; THEN, add ourselves to the GCNSLT_EXPRESS_MENU_CHANGE system ; notification list so we can create a "Return to Welcome" trigger for ; any new Express Menu Control objects that come along ; mov cx, handle 0 clr dx mov bx, MANUFACTURER_ID_GEOWORKS mov ax, GCNSLT_EXPRESS_MENU_CHANGE call GCNListAdd .leave ret CreateExpressMenuTrigger endp endif ; not WELCOME COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetAutologStatus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check if autologin. If yes, get room to which we should autolog into. CALLED BY: IStartupInitUser PASS: nothing RETURN: carry clear if autologin, carry set if not autologin al = autologin timeout for the class ah = IclasAutologinLevel ^lcx:dx = room to enter if autologin DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JS 3/ 6/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- GetAutologStatus proc near autologInfo local IclasPathStruct uses bx,si,ds .enter mov cx, ss lea dx, autologInfo clr ax ;only get autologin info call IclasGetAutologClass jc done ; ; User was autologged in. Get autolog info (timeout and room). ; call FilePushDir mov ds, cx mov si, dx call IclasSetClassDir call IclasGetAutologInfo call FilePopDir ; ; Get room optr ; mov ax, cx mov cx, handle Room1Field mov dx, offset Room1Field cmp ah, AUTOLOG_K2_LEVEL je haveRoom ;guided: cmp ah, AUTOLOG_GUIDED_LEVEL jne unGuided mov cx, handle Room2Field mov dx, offset Room2Field unGuided: cmp ah, AUTOLOG_UNGUIDED_LEVEL jne haveRoom mov cx, handle Room3Field mov dx, offset Room3Field haveRoom: clc done: .leave ret GetAutologStatus endp endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% WaitForAutologTimeout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Wait for the user's acknowledgement of the autologin. If the user responds before the timeout, then go to the desired room. Otherwise logout. CALLED BY: IStartupInitUser PASS: al = timeout period cx:dx = room to go to. RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 3/2/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- WaitForAutologTimeout proc near userName local NET_USER_FULL_NAME_BUFFER_SIZE + USER_ID_LENGTH + 4 \ dup (char) ; fullname + CR + '(' + ID + ')' + null uses ax,bx,cx,dx,ds,es,si,di,bp .enter ; ; setup the autologCountdown variable, which is used by ; CountdownAutologinTimeout. ; mov bx, segment udata mov ds, bx mov ds:[autologCountdown], al movdw ds:[autologRoom], cxdx if 0 ;do we still need this? push bp mov ax, MSG_STARTUP_APP_SWITCH_TO_STARTUP call GenCallApplication pop bp endif ; ; AutologInter should display the user's name in big letters. ; mov cx, ss lea dx, userName call IclasGetUserFullName EC < ERROR_C STARTUP_ERROR > ; append CR and user ID mov ds, cx ; ds = ss movdw esdi, cxdx LocalStrLength TRUE ; es:di = char after null, cx = length SBCS < mov {word} es:[di - 1], C_CR + (C_LEFT_PAREN shl 8) > DBCS < movdw es:[di - 2], <C_CR + (C_LEFT_PAREN shl 16)> > LocalNextChar esdi mov si, di ; ds:si = beginning of ID call NetUserGetLoginName LocalStrLength TRUE ; es:di = char after null, cx = length SBCS < mov {word} es:[di - 1], C_RIGHT_PAREN + (C_NULL shl 8) > DBCS < movdw es:[di - 2], <C_RIGHT_PAREN + (C_NULL shl 16)> > push bp mov bp, dx mov dx, ss ; dx:bp = userName clr cx mov bx, handle AutologName mov si, offset AutologName mov ax, MSG_VIS_TEXT_REPLACE_ALL_PTR mov di, mask MF_CALL call ObjMessage pop bp ; ; enable AutologInter, and start the timeout countdown. ; push bp mov bx, handle AutologInter mov si, offset AutologInter mov ax, MSG_GEN_INTERACTION_INITIATE mov di, mask MF_CALL call ObjMessage pop bp ;This was causing the autolog timeout to be one minute longer than ;requested! ;mov cx, 3600 ;one minute timer... mov cx, 60 mov al, TIMER_EVENT_ONE_SHOT call GeodeGetProcessHandle ;returns bx = process handle clr si mov dx, MSG_STARTUP_COUNTDOWN_AUTOLOGIN call TimerStart push ds mov dx, segment dgroup mov ds, dx mov ds:[autologTimerHandle], bx mov ds:[autologTimerID], ax pop ds ; unblank screen and then disable screen saver call ImInfoInputProcess ; rtn bx = hptr of input process mov ax, MSG_IM_DEACTIVATE_SCREEN_SAVER clr di call ObjMessage mov ax, MSG_IM_DISABLE_SCREEN_SAVER clr di call ObjMessage .leave ret WaitForAutologTimeout endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupCountdownAutologin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Countdown another minute of the autologin timeout. If the timeout expired, then logout. Otherwise, decrement autologCountdown and restart the timer. CALLED BY: MSG_STARTUP_COUNTDOWN_AUTOLOGIN PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of StartupClass ax = message # RETURN: DESTROYED: SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 5/ 7/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupCountdownAutologin method dynamic StartupClass, MSG_STARTUP_COUNTDOWN_AUTOLOGIN uses ax,bx,cx,dx,ds,si,di,bp .enter push ds mov bx, segment udata mov ds, bx ; ; if autologCountdown = -1, then the user already acknowledged ; the autologin, so just ignore. ; cmp ds:[autologCountdown], -1 je popAndExit cmp ds:[autologCountdown], 0 je logoutNow ; ; there's still time left on the clock. Decrement a minute, and ; re-start the timer. ; dec ds:[autologCountdown] mov cx, 3600 ;one minute timer... mov al, TIMER_EVENT_ONE_SHOT call GeodeGetProcessHandle ;returns bx = process handle clr si mov dx, MSG_STARTUP_COUNTDOWN_AUTOLOGIN call TimerStart mov ds:[autologTimerHandle], bx mov ds:[autologTimerID], ax jmp popAndExit logoutNow: pop ds push bp mov bx, handle AutologInter mov si, offset AutologInter mov cx, IC_DISMISS mov ax, MSG_GEN_GUP_INTERACTION_COMMAND mov di, mask MF_CALL call ObjMessage pop bp mov ax, MSG_STARTUP_APP_LOGOUT mov cx, FALSE ; do not query user call GenCallApplication ; re-enable screen saver call ImInfoInputProcess ; rtn bx = hptr of input process mov ax, MSG_IM_ENABLE_SCREEN_SAVER clr di call ObjMessage exit: .leave ret popAndExit: pop ds jmp exit StartupCountdownAutologin endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupAutologinUser %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: In response to the user acknowledging the autologin, complete the autologin. CALLED BY: MSG_STARTUP_AUTOLOGIN_USER PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of StartupClass ax = message # RETURN: DESTROYED: SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 5/ 6/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ wshellUnguidedStateFile char "WSHELLUN.STA", C_NULL StartupAutologinUser method dynamic StartupClass, MSG_STARTUP_AUTOLOGIN_USER ;kill the autologin timer -- otherwise it'll be left around for the ;next autologin and can mess things up. push ds mov bx, segment dgroup mov ds, bx mov bx, ds:[autologTimerHandle] mov ax, ds:[autologTimerID] call TimerStop pop ds mov bx, handle AutologInter mov si, offset AutologInter mov cx, IC_DISMISS mov ax, MSG_GEN_GUP_INTERACTION_COMMAND mov di, mask MF_CALL call ObjMessage ; re-enable screen saver call ImInfoInputProcess ; rtn bx = hptr of input process mov ax, MSG_IM_ENABLE_SCREEN_SAVER clr di call ObjMessage ; ; complete autologin by flagging that the timeout was acknowledged, ; and going into the room. ; mov bx, segment udata mov ds, bx mov ds:[autologCountdown], -1 movdw cxdx, ds:[autologRoom] cmp cx, handle Room3Field jne openField ; ; We were autologged into the Unguided room. Since we want to ; have the classes and class folders open, we need to delete ; WSHELL_UN.STA so wshellba won't restore from state. ; mov ax, SP_STATE call FileSetStandardPath push dx segmov ds, cs mov dx, offset wshellUnguidedStateFile call FileDelete pop dx openField: mov ax, MSG_STARTUP_OPEN_FIELD ; Enter selected room mov bx, handle 0 mov di, mask MF_CALL GOTO ObjMessage StartupAutologinUser endm endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupVerifyLinks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Spawn a low-priority thread that will whir away in the background, verifying links, etc. CALLED BY: IStartupOpenApplication PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 2/11/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- IStartupVerifyLinks proc far uses ax,bx,cx,dx,di,si,ds .enter ; ; Clear the iclas abort flag so that we don't skip out on verification ; by accident. ; call IclasClearAbort mov al, PRIORITY_LOW clr bx mov cx, segment VerifyLinksInThread mov dx, offset VerifyLinksInThread mov di, 2000 ; lots o' stack space, for ; file stuff mov bp, handle 0 call ThreadCreate segmov ds, dgroup, ax mov ds:[verifyThread], bx .leave ret IStartupVerifyLinks endp endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CreateTriggerIfPermissionSet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Create a trigger for the express menu if the UP_MESSAGING permission flag is set CALLED BY: VerifyLinksInThread PASS: nothing RETURN: nothing DESTROYED: ax,bx,si,di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 3/19/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- CreateTriggerIfPermissionSet proc far uses cx, dx, bp .enter call IclasGetUserPermissions test ax, mask UP_MESSAGING jz done call CreateExpressMenuTrigger done: .leave ret CreateTriggerIfPermissionSet endp endif ;-------------------------------------------------------------- InitCode ends idata segment COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VerifyLinksInThread %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Verify the links in our very own thread CALLED BY: IStartupVerifyLinks via ThreadCreate PASS: nothing RETURN: doesn't REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 2/11/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- VerifyLinksInThread proc near ; ; Grab the verify semaphore to prevent early logout ; call IclasGrabVerifySem mov bx, handle UpgradeInteraction mov si, offset UpgradeInteraction call IclasInitUserOptr ; ; Release the verify semaphore. Logout is now enabled ; call IclasReleaseVerifySem clr cx, bp, si mov dx, handle 0 call ThreadDestroy .UNREACHED VerifyLinksInThread endp endif ;-------------------------------------------------------------- idata ends InitCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupAttach %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check extraData word from the AppLaunchBlock to see if we are being launched from the install program. Copied from Proc/procClass.asm: ; MSG_META_ATTACH is sent to any Geode which has a process, when it is ; first loaded. It is also used in the object world to notify objects on ; an "active list" that the application has been brought back up from a ; state file. As the method is used for different purposes, the data ; passed varies based on usage: ; ; As sent automatically by GeodeLoad when loading a geode in which ; GA_APPLICATION IS set (cx, dx values passed to GeodeLoad in di, bp): ; ; Pass: ; dx - Block handle to block of structure AppLaunchBlock ; (MUST BE PASSED) ; Return: ; Nothing PSEUDO CODE/STRATEGY: This page intentionally left blank KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 8/ 1/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupAttach method StartupClass, MSG_META_ATTACH if (1) ; Before any messages go flying about, change the GenFields that ; Welcome has to be run by the global UI thread. See routine header ; for more info. -- Doug 6/1/92 ; call ChangeFieldsToBeRunByGlobalUIThread endif mov di, offset StartupClass GOTO ObjCallSuperNoLock StartupAttach endm COMMENT @---------------------------------------------------------------------- FUNCTION: ChangeFieldsToBeRunByGlobalUIThread DESCRIPTION: Change running thread of Startup's fields to be the global UI thread, to prevent horrible death that would otherwise occur when the fields are added below the GenSystem object. Yes, this is a pretty bizarre thing for an app to be doing, but Startup is a pretty bizarre app. We do this at the very start of MSG_ATTACH to make sure that the change occurs before any message is sent to the field objects. As the fields are marked as "ui-object" in the .gp file, you might be concerned that MSG_PROCESS_CREATE_UI_THREAD will come along & stomp over the "other info" thread, undoing our work here. Not so. MSG_PROCESS_CREATE_UI_THREAD will only set the running thread for blocks still having an "other info" value of -2. We escape with impunity. We can also do this before the call to ObjAssocVMFile, which associates Welcome's resources with its state files. This is possible because ObjAssocVMFile doesn't care what thread runs any of a geode's resources; it only needs to know what thread should run any duplicated resources that are suddenly now being loaded. Similarly, we should be able to exit, or detach, without having to do anything further, as the effected resources are part of Welcome's original resources; the new running thread we stuff here won't be saved out to state, rather it will just be discarded as the memory handle is freed. Next time we start up, we'll need to do this same operation, again at MSG_META_ATTACH. CALLED BY: INTERNAL WelcomeAttach PASS: nothing RETURN: nothing DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 6/1/92 Initial version ------------------------------------------------------------------------------@ if (1) ChangeFieldsToBeRunByGlobalUIThread proc near uses ax, bx .enter mov bx, handle ui ; get FIRST thread of UI (which at call ProcInfo ; this time runs system object) mov ax, bx ; pass in ax, as new running thread push ax mov bx, handle Room1Field ; bx = handle of block to modify ; ax = new HM_otherInfo value call MemModifyOtherInfo pop ax push ax mov bx, handle Room2Field ; bx = handle of block to modify ; ax = new HM_otherInfo value call MemModifyOtherInfo pop ax push ax mov bx, handle Room3Field ; bx = handle of block to modify ; ax = new HM_otherInfo value call MemModifyOtherInfo pop ax ifdef ISTARTUP push ax mov bx, handle LoginRoomField ; bx = handle of block to modify ; ax = new HM_otherInfo value call MemModifyOtherInfo pop ax ifdef MOUSETUTORIAL mov bx, handle MouseRoomField ; bx = handle of block to modify ; ax = new HM_otherInfo value call MemModifyOtherInfo endif endif .leave ret ChangeFieldsToBeRunByGlobalUIThread endp endif InitCode ends CommonCode segment COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupMouseTutorial %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This method is called when the user clicks on the Mouse Tutorial trigger from the startup screen. It runs the Mouse Tutorial, and changes the keyboard default to the Entry Level trigger. CALLED BY: MSG_STARTUP_MOUSE_TUTORIAL PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of StartupClass ax = message # RETURN: DESTROYED: ax, bx, cx, dx, ds, si SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- CL 11/14/92 Initial version Joon 3/8/93 Mouse tutorial runs in it's own room %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef MOUSETUTORIAL ;------------------------------------------------------ StartupMouseTutorial method dynamic StartupClass, MSG_STARTUP_MOUSE_TUTORIAL .enter ; ; Open field from which mouse tutorial will be run ; mov ax, MSG_STARTUP_OPEN_FIELD mov bx, handle 0 mov cx, handle MouseRoomField mov dx, offset MouseRoomField mov di, mask MF_CALL call ObjMessage ; ; once the mouse tutorial is run, the default action becomes ; entering k2 shell for students and entry level for everyone else ; call IclasGetCurrentUserType mov bx, handle Room1 mov si, offset Room1 cmp ah, UT_STUDENT je haveRoom cmp ah, UT_GENERIC je haveRoom mov bx, handle Room2 mov si, offset Room2 haveRoom: mov ax, MSG_META_GRAB_FOCUS_EXCL mov di, mask MF_FORCE_QUEUE call ObjMessage .leave ret StartupMouseTutorial endm endif ; ifdef MOUSETUTORIAL --------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupOpenField %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Open field CALLED BY: MSG_STARTUP_OPEN_FIELD PASS: ds = es = dgroup ^lcx:dx = field to open RETURN: nothing DESTROYED: anything PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/16/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupOpenField method dynamic StartupClass, MSG_STARTUP_OPEN_FIELD ; ; if we are detaching or waiting for another field to exit before ; opening a new field, ignore any request to open a field ; ifdef ISTARTUP test ds:[processFlags], mask SPF_DETACHING or \ mask SPF_PENDING_FIELD or mask SPF_DETACH_AFTER_VERIFY else test ds:[processFlags], mask SPF_DETACHING or mask SPF_PENDING_FIELD endif LONG jnz done tstdw ds:[currentField] ; no current field? jz openField ; yes, open requested one cmpdw cxdx, ds:[currentField] ; entering current field again? je openField ; yes, do it ; ; else, close current field before opening new one. Wait for ; current field to finishing detaching (MSG_META_FIELD_NOTIFY_DETACH) ; before opening new field ; movdw ds:[pendingField], cxdx ; save field to open ornf ds:[processFlags], mask SPF_PENDING_FIELD ; We need to ask everyone concerned if this is ok. When this ; procedure is done, the ACK message below will be sent back ; to us and we can begin closing this field. ; mov ax, CFCT_BEGIN_FIELD_CHANGE mov dx, handle 0 clr cx mov bx, MSG_STARTUP_CONFIRM_FIELD_CHANGE_ACK call UserConfirmFieldChange jnc done ; If carry set form UserConfirmFieldChange, then a confirmation ; process is already in progress. In that case, clean up and ; bail. andnf ds:[processFlags], not mask SPF_PENDING_FIELD clrdw ds:[pendingField] jmp done openField: ; ; open requested field ; movdw ds:[currentField], cxdx ; save field movdw bxsi, cxdx ; ^lbx:si = field to open ; ; Set the field we should return to after a shutdown to DOS ; mov ax, MSG_STARTUP_APP_SET_RETURN_FIELD call GenCallApplication ifdef WELCOME cmp bx, handle Room1Field ; no background bitmap for je noBitmap ; consumer ui field endif mov ax, MSG_GEN_FIELD_ENABLE_BITMAP mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage ifdef WELCOME noBitmap: endif mov ax, MSG_META_ATTACH mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage mov dl, VUM_NOW mov ax, MSG_GEN_SET_USABLE mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage mov ax, MSG_GEN_BRING_TO_TOP mov di, mask MF_CALL or mask MF_FIXUP_DS GOTO ObjMessage done: ret StartupOpenField endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupConfirmFieldChangeAck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback from UserConfirmFieldChange. CALLED BY: MSG_STARTUP_CONFIRM_FIELD_CHANGE_ACK PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of StartupClass ax = message # cx = TRUE : go ahead and begin change FALSE : abort field change RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JimG 8/26/99 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupConfirmFieldChangeAck method dynamic StartupClass, MSG_STARTUP_CONFIRM_FIELD_CHANGE_ACK ; CX = 0 -- abort field change! jcxz diveDiveDive ; We're coo'. Begin changing the field by zapping current one. ; ; start ignoring input while we wait for current field to detach, ; we'll accept input again when we get MSG_META_FIELD_NOTIFY_DETACH ; call StartupIgnoreInput ; ; tell current field to detach ; movdw bxsi, ds:[currentField] clr cx clr dx clr bp mov ax, MSG_META_DETACH mov di, mask MF_CALL or mask MF_FIXUP_DS GOTO ObjMessage ; <-- EXIT POINT diveDiveDive: andnf ds:[processFlags], not mask SPF_PENDING_FIELD clrdw ds:[pendingField] ret ; <-- EXIT POINT StartupConfirmFieldChangeAck endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupFieldNotifyStartLauncherError %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Error starting launcher for field, detach field. CALLED BY: MSG_META_FIELD_NOTIFY_START_LAUNCHER_ERROR PASS: ds = es = dgroup ^lcx:dx = GenField RETURN: nothing DESTROYED: anything PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/19/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupFieldNotifyStartLauncherError method dynamic StartupClass, MSG_META_FIELD_NOTIFY_START_LAUNCHER_ERROR clr bp ; always return to Startup ; and detach field GOTO ReturnToStartupAndDetachField StartupFieldNotifyStartLauncherError endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupFieldNotifyNoFocus %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Note that no more stuff in room, detach it. CALLED BY: MSG_META_FIELD_NOTIFY_NO_FOCUS PASS: ds = es = dgroup ^lcx:dx = GenField bp = non-zero if shutdown RETURN: nothing DESTROYED: anything PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/19/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifndef ISTARTUP ;-------------------------------------------------------------- ifndef GPC ; nowhere to return to StartupFieldNotifyNoFocus method dynamic StartupClass, MSG_META_FIELD_NOTIFY_NO_FOCUS tst bp jz notShutdown ; ; Shutdown, ReturnToStartupAndDetachField will not return us to Startup ; main screen, but we also want to set the main screen primary ; not-usable so when this no-focus field gets set not-usable and ; disappears, the main screen won't show itself ; push cx, dx, bp mov bx, handle StartupWindow mov si, offset StartupWindow mov ax, MSG_GEN_SET_NOT_USABLE mov dl, VUM_NOW mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop cx, dx, bp notShutdown: ; if shutdown, don't return ; to Startup FALL_THRU ReturnToStartupAndDetachField StartupFieldNotifyNoFocus endm endif else ; ISTARTUP ------------------------------------------------------------ StartupFieldNotifyNoFocus method dynamic StartupClass, MSG_META_FIELD_NOTIFY_NO_FOCUS uses cx, dx .enter ; Don't do anything if ignoring input ; test ds:[processFlags], mask SPF_IGNORING_INPUT LONG jnz detachField ; Assume we don't want to see the CYWA screen. ; push cx, dx, bp mov bx, handle StartupWindow mov si, offset StartupWindow mov ax, MSG_GEN_SET_NOT_USABLE mov dl, VUM_NOW mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage pop cx, dx, bp ; Check to see if we are shutting down. ; tst bp jnz fallThru ; We are not shutting down. ; cmp cx, handle LoginRoomField je login call IclasGetIStartupRoomToEnter cmp cx, IIR_LOGIN_ROOM je returnToLogin cmp cx, IIR_K2_ROOM jne notK2 mov cx, handle Room1Field mov dx, offset Room1Field jmp openField notK2: cmp cx, IIR_GUIDED_ROOM jne notGuided mov cx, handle Room2Field mov dx, offset Room2Field jmp openField notGuided: cmp cx, IIR_UNGUIDED_ROOM EC < ERROR_NE -1 ; IclasIStartupRoom unknown > jne returnToLogin mov cx, handle Room3Field mov dx, offset Room3Field jmp openField returnToLogin: call IStartupStopTimer ; stop polling for messages call IStartupRemoveFromGCNList mov cx, handle LoginRoomField mov dx, offset LoginRoomField jmp openField login: ; IStartupInitUser will return carry set and open the field itself ; if we are doing autologin. ; call IStartupInitUser jc detachField ; FIND OUT WHAT ROOM THE USER WANTS TO STARTUP IN ; clr bp ; assume we want to return to startup call IStartupGetStartupRoom jnc fallThru openField: mov ax, MSG_STARTUP_OPEN_FIELD mov bx, handle 0 clr di call ObjMessage detachField: mov bp, -1 ; just detach field fallThru: .leave FALL_THRU ReturnToStartupAndDetachField StartupFieldNotifyNoFocus endm endif ;---------------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ReturnToStartupAndDetachField %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: ReturnToStartupAndDetachField CALLED BY: INTERNAL StartupFieldNotifyStartLauncherError StartupFieldNotifyNoFocus PASS: ds = es = dgroup ^lcx:dx = GenField bp = non-zero to just detach field bp = zero to return to Startup and detach field RETURN: DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: When this is called, there are no apps in the field, so we can just detach it, and not worry about whether we should saving to state or quit apps. REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/19/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ReturnToStartupAndDetachField proc far ; ; return to Startup screen ; pushdw cxdx ; save field tst bp ; return to Startup? jnz detachField ; nope mov ax, MSG_STARTUP_APP_SWITCH_TO_STARTUP mov bx, handle StartupApp mov si, offset StartupApp clr di call ObjMessage detachField: ; ; start ignoring input while we wait for field to detach, ; we'll accept input again when we get MSG_META_FIELD_NOTIFY_DETACH ; call StartupIgnoreInput ; ; detach field ; popdw bxsi ; ^lbx:si = field mov ax, MSG_META_DETACH clr cx clr dx clr bp clr di GOTO ObjMessage ReturnToStartupAndDetachField endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupProcessGotoField %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle (most likely IACP) message to go to a particular field. CALLED BY: MSG_STARTUP_PROCESS_GOTO_FIELD PASS: *ds:si = StartupProcessClass object ds:di = StartupProcessClass instance data ds:bx = StartupProcessClass object (same as *ds:si) es = segment of StartupProcessClass ax = message # cx = StartupField RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- joon 12/09/98 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupProcessGotoField method dynamic StartupProcessClass, MSG_STARTUP_PROCESS_GOTO_FIELD mov ax, cx cmp ax, SF_WELCOME jne checkField1 mov bx, handle StartupApp mov si, offset StartupApp mov di, mask MF_CALL mov ax, MSG_STARTUP_APP_SWITCH_TO_STARTUP GOTO ObjMessage checkField1: mov cx, handle Room1Field ;assume room 1 mov dx, offset Room1Field cmp ax, SF_FIELD1 je gotoField ifndef WELCOME mov cx, handle Room2Field ;assume room 2 mov dx, offset Room2Field cmp ax, SF_FIELD2 je gotoField endif mov cx, handle Room3Field ;assume room 3 mov dx, offset Room3Field cmp ax, SF_FIELD3 jne done gotoField: mov bx, handle 0 mov ax, MSG_STARTUP_OPEN_FIELD mov di, mask MF_CALL GOTO ObjMessage done: ret StartupProcessGotoField endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupRemoveFromGCNList %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Remove IStartup from the express menu change GCN list, since the current user is logging out, and the next user may or may not have permission to send messages. Also prevents bogus "send messages appears twice" that I've seen occasionally CALLED BY: StartupFieldNotifyNoFocus PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 5/25/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP IStartupRemoveFromGCNList proc near uses ax,bx,cx,dx .enter mov cx, handle 0 clr dx mov bx, MANUFACTURER_ID_GEOWORKS mov ax, GCNSLT_EXPRESS_MENU_CHANGE call GCNListRemove .leave ret IStartupRemoveFromGCNList endp endif COMMENT @---------------------------------------------------------------------- METHOD: StartupTryToSwitchToStartup -- MSG_STARTUP_TRY_TO_SWITCH_TO_STARTUP for StartupClass DESCRIPTION: Tries to switch to startup. Actually, begins the process. PASS: *ds:si - instance data es - segment of MetaClass ax - MSG_STARTUP_TRY_TO_SWITCH_TO_STARTUP RETURN: nothing ax, cx, dx, bp - destroyed ALLOWED TO DESTROY: bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chris 8/ 2/93 Initial Version, taken from OLField in spec UI ------------------------------------------------------------------------------@ ifndef _VS150 ;normal stuff StartupTryToSwitchToStartup method StartupClass, MSG_STARTUP_TRY_TO_SWITCH_TO_STARTUP ; ; Inform current field that we are going to detach it. If it is in ; 'quitOnClose' mode, it will quit all apps and detach itself, at ; which time we'll get MSG_META_FIELD_NOTIFY_NO_FOCUS when we'll ; switch to main screen. If not, we'll just switch to main screen ; now and wait for user to exit Startup (when we'll detach this field) ; or enter another field (when we'll detach this field). ; tstdw ds:[currentField] ; no current field jz switchBackNow movdw bxsi, ds:[currentField] ; ^lbx:si = current field mov ax, MSG_GEN_FIELD_ABOUT_TO_CLOSE mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage ; carry clear if not 'quitOnClose' jnc switchBackNow ; ; Else, we have to wait until all applications in the field quit ; themselves. When that happens, the field will detach itself and ; we'll get MSG_META_FIELD_NOTIFY_NO_FOCUS. The user can choose to ; abort the field-close by aborting exiting of one of the apps, so ; we can't really turn on ignore-input or anything like that. ; ret switchBackNow: ; ; switch back to main screen now ; mov ax, MSG_STARTUP_APP_SWITCH_TO_STARTUP mov bx, handle StartupApp mov si, offset StartupApp clr di GOTO ObjMessage StartupTryToSwitchToStartup endp else ;REDWOOD StartupTryToSwitchToStartup method dynamic StartupClass, \ MSG_STARTUP_TRY_TO_SWITCH_TO_STARTUP ; ; Record our true application launch message and send out a ; query now to the document group of the current application. ; call MemOwner ;get the process handle mov ax, MSG_STARTUP_REALLY_TRY_TO_SWITCH_TO_STARTUP mov di, mask MF_RECORD call ObjMessage mov cx, di ;pass in cx to MSG_META_QUERY_DOCUMENTS ; ; Let's try saving any documents that are open, by sending a message ; to the application with the full screen exclusive. 7/27/93 cbh ; push si mov ax, MSG_META_QUERY_SAVE_DOCUMENTS mov bx, segment GenClass mov si, offset GenClass mov di, mask MF_RECORD call ObjMessage clr bp mov bx, MANUFACTURER_ID_GEOWORKS mov ax, GCNSLT_TRANSPARENT_DETACH_FULL_SCREEN_EXCL mov cx, di clr dx call GCNListSend pop si ret StartupTryToSwitchToStartup endm endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupReallyTryToSwitchToStartup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Switch to Startup main screen, leaving current field. CALLED BY: MSG_STARTUP_REALLY_TRY_TO_SWITCH_TO_STARTUP (F2 monitor or "Return to Welcome" button in ExpressMenuControl control panel) PASS: ds = es = dgroup RETURN: DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: Tell current field that we are about to close it. It will want to quit all current apps if it is in 'quitOnClose' mode. If so, we'll wait to get MSG_META_FIELD_NOTIFY_NO_FOCUS before we actually switch to Startup's main screen. If not, we can switch immediately. REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 10/26/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef _VS150 StartupReallyTryToSwitchToStartup method StartupClass, MSG_STARTUP_REALLY_TRY_TO_SWITCH_TO_STARTUP ; ; Inform current field that we are going to detach it. If it is in ; 'quitOnClose' mode, it will quit all apps and detach itself, at ; which time we'll get MSG_META_FIELD_NOTIFY_NO_FOCUS when we'll ; switch to main screen. If not, we'll just switch to main screen ; now and wait for user to exit Startup (when we'll detach this field) ; or enter another field (when we'll detach this field). ; tstdw ds:[currentField] ; no current field jz switchBackNow movdw bxsi, ds:[currentField] ; ^lbx:si = current field mov ax, MSG_GEN_FIELD_ABOUT_TO_CLOSE mov di, mask MF_CALL or mask MF_FIXUP_DS call ObjMessage ; carry clear if not 'quitOnClose' ; Changed 7/23/93 cbh to not wait for apps before switching. ; jnc switchBackNow ; ; Else, we have to wait until all applications in the field quit ; themselves. When that happens, the field will detach itself and ; we'll get MSG_META_FIELD_NOTIFY_NO_FOCUS. The user can choose to ; abort the field-close by aborting exiting of one of the apps, so ; we can't really turn on ignore-input or anything like that. ; ; ret switchBackNow: ; ; switch back to main screen now ; mov ax, MSG_STARTUP_APP_SWITCH_TO_STARTUP mov bx, handle StartupApp mov si, offset StartupApp clr di GOTO ObjMessage StartupReallyTryToSwitchToStartup endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupShellToDOS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Shell to DOS CALLED BY: MSG_STARTUP_SHELL_TO_DOS PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of StartupClass ax = message # RETURN: nothing DESTROYED: ax,cx,dx,bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- Joon 11/10/92 Initial version Joon 5/16/93 Write out batch file before shutting down dlitwin 9/8/93 Added Iclas call to inform that we are shelling to DOS, not logging out. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- SPAWN_MAX_BATCH_SIZE equ 4096 idline char "@ECHO OFF", C_CR, C_LF, \ "CD Z:\\PUBLIC", C_CR, C_LF, "H:", C_CR, C_LF, \ "SET ID=", C_NULL dline char C_CR, C_LF, "SET D=", C_NULL cvline char C_CR, C_LF, "SET CV=", C_NULL gline char C_CR, C_LF, "SET G=", C_NULL hvline char C_CR, C_LF, "SET HV=", C_NULL path char "PATH", C_NULL teacher char "TEACHERS", C_NULL student char "STUDENTS", C_NULL generic char "GENERICS", C_NULL office char "OFFICE", C_NULL admin char "ADMIN", C_NULL IStartupShellToDOS method dynamic StartupClass, MSG_STARTUP_SHELL_TO_DOS ; ; Add drive mapping commands ; mov ax, SPAWN_MAX_BATCH_SIZE mov cx, ALLOC_DYNAMIC_LOCK call MemAlloc ; create batch buffer LONG jc done mov bp, bx ; bp <= memory block handle mov es, ax clr di ; es:di = buffer ; ; Write out 'SET ID=<loginName>' ; segmov ds, cs mov si, offset cs:[idline] ; ds:si = idline call MyLocalCopyString push ds segmov ds, es mov si, di call NetUserGetLoginName pop ds call MyLocalScanEOBuffer ; ; Write out 'SET D=<paddedID>' ; mov si, offset cs:[dline] ; ds:si = dline call MyLocalCopyString call IclasGetUserDir call MyLocalScanEOBuffer ; ; Write out 'SET CV=<connection number> if generic ; call IclasGetCurrentUserType cmp ah, UT_GENERIC jne writeG mov si, offset cs:[cvline] call MyLocalCopyString call IclasGetUserDir ; UserDir == connection number call MyLocalScanEOBuffer writeG: ; ; Write out 'SET G=<userType>' ; mov si, offset cs:[gline] call MyLocalCopyString call IclasGetCurrentUserType mov si, offset cs:[teacher] cmp ah, UT_TEACHER je haveUser mov si, offset cs:[student] cmp ah, UT_STUDENT je haveUser mov si, offset cs:[generic] cmp ah, UT_GENERIC je haveUser mov si, offset cs:[office] cmp ah, UT_OFFICE je haveUser mov si, offset cs:[admin] cmp ah, UT_ADMIN je haveUser mov si, offset cs:[nullString] haveUser: call MyLocalCopyString ; ; Write out 'SET HV=<homeVolume>' ; mov si, offset cs:[hvline] call MyLocalCopyString mov ax, SGIT_SYSTEM_DISK call SysGetInfo mov bx, ax call DiskGetVolumeName call MyLocalScanEOBuffer mov al, ':' stosb mov ax, C_CR or (C_LF shl 8) stosw ; ; Write out path statement ; mov si, offset cs:[path] call MyLocalCopyString mov al, '=' stosb mov cx, 0ffh ; what's the maximum mov si, offset cs:[path] ; ds:si = path environment var call SysGetDosEnvironment jc crlf cmp {word} es:[di], 'Z:' je crlf push di call MyLocalScanEOBuffer not cx segmov ds, es mov si, di add di, 8 ; length of 'Z:.;Y:.;' std rep movsb cld pop di ; ; Write 'Z:.;Y:.' ; mov ax, 'Z:' stosw mov ax, '.;' stosw mov ax, 'Y:' stosw mov ax, '.;' stosw crlf: call MyLocalScanEOBuffer mov ax, C_CR or (C_LF shl 8) stosw ; ; Write out map commands ; segmov ds, es mov si, di ; ds:si = buffer mov dx, di ; dx = bytes already in buffer call IclasAddMapCommandsToBatchFile mov cx, dx ; ; Write everything to temp.bat ; call IStartupCreateTempFile jc memFree clr ax, dx call FileWrite pushf call FileClose popf memFree: pushf mov bx, bp call MemFree popf jc done mov ax, SST_CLEAN clr cx, dx, bp call SysShutdown done: ret MyLocalCopyString: LocalCopyString dec di ; es:di = C_NULL retn MyLocalScanEOBuffer: mov al, C_NULL mov cx, -1 repne scasb dec di ; es:di = C_NULL retn IStartupShellToDOS endm ; ; Pass: nothing ; Return: if carry set, error ; else bx = handle ; environmentVariable char "V" nullString char C_NULL batchfile char "TEMP.BAT",C_NULL IStartupCreateTempFile proc near tempFile local PathName uses ds, es, cx .enter ; ; Get "virtual drive" environment variable. ; segmov ds, cs mov si, offset cs:[environmentVariable] segmov es, ss lea di, ss:[tempFile] mov cx, size PathName call SysGetDosEnvironment jc done clr al mov cx, -1 repne scasb dec di ; ; Append TEMP.BAT to virtual drive ; mov si, offset cs:[batchfile] mov cx, size batchfile rep movsb ; ; Create batch file ; segmov ds, ss lea dx, ss:[tempFile] clr cx ; cx = FileAttrs mov ax, (FileCreateFlags <1,0,FILE_CREATE_TRUNCATE> shl 8)\ + FileAccessFlags <FE_NONE, FA_WRITE_ONLY> call FileCreate mov_tr bx, ax ; bx = file handle done: .leave ret IStartupCreateTempFile endp endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% IStartupBeginEDLANMode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Bring up dialog box asking user whether or not to begin EDLAN compatibility mode (pass keys on to BIOS). Begin EDLAN compatibility mode if appropriate. CALLED BY: MSG_STARTUP_BEGIN_EDLAN_MODE PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of StartupClass ax = message # RETURN: nothing DESTROYED: ax,cx,dx,bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JS 3/25/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- IStartupBeginEDLANMode method dynamic StartupClass, MSG_STARTUP_BEGIN_EDLAN_MODE mov bx, handle EDLanQueryString mov si, offset EDLanQueryString call MemLock mov ds, ax mov si, ds:[si] ; ds:si = EDLanQueryString .assert (offset SDP_helpContext eq offset SDP_customTriggers+4) .assert (offset SDP_customTriggers eq offset SDP_stringArg2+4) .assert (offset SDP_stringArg2 eq offset SDP_stringArg1+4) .assert (offset SDP_stringArg1 eq offset SDP_customString+4) .assert (offset SDP_customString eq offset SDP_customFlags+2) .assert (offset SDP_customFlags eq 0) clr ax pushdw axax ; don't care about SDP_helpContext pushdw axax ; don't care about SDP_customTriggers pushdw axax ; don't care about SDP_stringArg2 pushdw axax ; don't care about SDP_stringArg1 pushdw dssi ; save SDP_customString (ax:dx) mov ax, CustomDialogBoxFlags <TRUE, CDT_QUESTION, GIT_AFFIRMATION,0> push ax call UserStandardDialog call MemUnlock cmp ax, IC_YES je enterEDLan ANDNF es:[keySequenceMode], not (mask KSM_EDLAN) ret ; <==== EXIT HERE enterEDLan: mov di, DR_KBD_ADD_HOTKEY clr ax mov cx, (VC_ISCTRL shl 8) or VC_INVALID_KEY mov bx, handle StartupApp mov si, offset StartupApp mov bp, MSG_STARTUP_APP_KEYBOARD_DRIVER_CHAR jmp es:[keyboardDriverStrategy] ; call keyboard driver IStartupBeginEDLANMode endm endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupNotifyExpressMenuChange %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Create a button in the express menu whenever one is created. In WELCOME, we create a "Return to Welcome" button. In IStartup, we create a "Send Messages" button. PASS: *ds:si = StartupClass object ds:di = StartupClass instance data es = dgroup bp = GCNExpressMenuNotificationType ^lcx:dx = Express Menu Controller RETURN: nothing DESTROYED: ax,cx,dx,bp REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 11/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifndef WELCOME StartupNotifyExpressMenuChange method dynamic StartupClass, MSG_NOTIFY_EXPRESS_MENU_CHANGE .enter cmp bp, GCNEMNT_CREATED jne done mov bx, cx ; ^lbx:si <- ExpressMenuControl mov si, dx mov dx, size CreateExpressMenuControlItemParams sub sp, dx mov bp, sp mov ss:[bp].CEMCIP_feature, CEMCIF_UTILITIES_PANEL mov ss:[bp].CEMCIP_class.segment, segment GenTriggerClass mov ss:[bp].CEMCIP_class.offset, offset GenTriggerClass mov ss:[bp].CEMCIP_itemPriority, CEMCIP_NETMSG_SEND_MESSAGE mov ss:[bp].CEMCIP_responseMessage, MSG_STARTUP_EXPRESS_MENU_CONTROL_ITEM_CREATED mov ss:[bp].CEMCIP_responseDestination.handle, handle 0 mov ss:[bp].CEMCIP_responseDestination.chunk, 0 movdw ss:[bp].CEMCIP_field, 0 ; field doesn't matter mov ax, MSG_EXPRESS_MENU_CONTROL_CREATE_ITEM mov di, mask MF_STACK call ObjMessage add sp, size CreateExpressMenuControlItemParams done: .leave ret StartupNotifyExpressMenuChange endm endif ; not WELCOME COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupExpressMenuControlItemCreated %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: PASS: *ds:si = StartupClass object ds:di = StartupClass instance data es = dgroup ss:bp = CreateExpressMenuControlItemResponseParams RETURN: DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 11/11/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifndef WELCOME StartupExpressMenuControlItemCreated method dynamic StartupClass, MSG_STARTUP_EXPRESS_MENU_CONTROL_ITEM_CREATED movdw bxsi, ss:[bp].CEMCIRP_newItem ; ; Now, set the action message of the trigger ; mov ax, MSG_GEN_TRIGGER_SET_ACTION_MSG ifdef WELCOME mov cx, MSG_STARTUP_TRY_TO_SWITCH_TO_STARTUP else mov cx, MSG_STARTUP_SEND_TEXT_MESSAGE endif clr di call ObjMessage ; ; Set the destination of the trigger ; mov ax, MSG_GEN_TRIGGER_SET_DESTINATION mov cx, handle 0 mov dx, 0 clr di call ObjMessage ; ; Set its moniker properly. ; mov cx, handle StartupUtilitiesPanelMoniker mov dx, offset StartupUtilitiesPanelMoniker mov bp, VUM_MANUAL mov ax, MSG_GEN_REPLACE_VIS_MONIKER_OPTR clr di call ObjMessage ; ; Set it usable, finally. ; mov ax, MSG_GEN_SET_USABLE mov dl, VUM_NOW clr di call ObjMessage ret StartupExpressMenuControlItemCreated endm endif ; not WELCOME COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupIngoreInput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: begin ingore input, if not already doing so CALLED BY: PASS: ds - dgroup of StartupClass (dgroup) RETURN: nothing DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 11/13/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupIgnoreInput proc far test ds:[processFlags], mask SPF_IGNORING_INPUT jnz alreadyIgnoring mov ax, MSG_GEN_APPLICATION_IGNORE_INPUT call GenCallApplication ornf ds:[processFlags], mask SPF_IGNORING_INPUT alreadyIgnoring: ret StartupIgnoreInput endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StarutpAcceptInput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: end ingore input, if haven't already done so CALLED BY: PASS: ds - dgroup of StartupClass (dgroup) RETURN: nothing DESTROYED: ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 11/13/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupAcceptInput proc far test ds:[processFlags], mask SPF_IGNORING_INPUT jz afterAcceptInput mov ax, MSG_GEN_APPLICATION_ACCEPT_INPUT call GenCallApplication andnf ds:[processFlags], not mask SPF_IGNORING_INPUT afterAcceptInput: ret StartupAcceptInput endp CommonCode ends ExitCode segment COMMENT @---------------------------------------------------------------------- METHOD: StartupDetach DESCRIPTION: Detach the Startup application PASS: *ds:si - instance data es - segment of StartupClass ax - MSG_META_DETACH cx, dx, bp - ? RETURN: carry - ? ax, cx, dx, bp - ? DESTROYED: bx, si, di, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Doug 12/89 Initial version ------------------------------------------------------------------------------@ StartupDetach method StartupClass, MSG_META_DETACH tst es:[inEngineMode] ;If in engineMode, just pass to jz 1$ ; superclass mov di, offset StartupClass GOTO ObjCallSuperNoLock 1$: cmp dx, -1 ;If DETACH sent by Startup, don't ACK. jne 3$ mov dx, ds:[detachOD].handle mov bp, ds:[detachOD].chunk 3$: mov ds:[detachOD].handle,dx ;Save OD to ACK away... mov ds:[detachOD].chunk,bp mov ds:[detachID], cx ifdef ISTARTUP ; ; If verify thread is active, can't detach ; tst ds:[verifyThread] jz threadGone ornf ds:[processFlags], mask SPF_DETACH_AFTER_VERIFY ret threadGone: endif ; ; If any field still open, we can't detach. ; cmpdw ds:[currentField], 0 jz normalDetach ; ; A field is still open, we are waiting for it to detach (a DETACH was ; sent to it by the same guy that sent a detach to our field). We'll ; just wait until that field exits (we'll get ; MSG_META_FIELD_NOTIFY_DETACH). ; ornf ds:[processFlags], mask SPF_DETACH_PENDING ret normalDetach: test ds:[processFlags], mask SPF_MONITOR_ACTIVE jz MonitorOut push cx,dx,bp,es mov bx, offset dgroup:hotKeyMonitor mov al, mask MF_REMOVE_IMMEDIATE call ImRemoveMonitor pop cx,dx,bp,es and ds:[processFlags], not mask SPF_MONITOR_ACTIVE MonitorOut: ; ; call superclass to detach ; mov ax, MSG_META_DETACH mov di, offset StartupClass GOTO ObjCallSuperNoLock StartupDetach endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupAck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Handle notification that the verify thread is done. PASS: ds, es - dgroup dx - verify thread handle RETURN: nothing DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 3/ 8/93 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- StartupAck method dynamic StartupClass, MSG_META_ACK cmp dx, ds:[verifyThread] jne gotoSuper clr ds:[verifyThread] test ds:[processFlags], mask SPF_DETACH_AFTER_VERIFY jnz reSendDetach ; <- EXIT ret ; <- EXIT gotoSuper: mov di, offset StartupClass GOTO ObjCallSuperNoLock ; <- EXIT StartupAck endm endif ;-------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupFieldNotifyDetach %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Note that another room is closed. If none open and detach pending, call ourselves with MSG_META_DETACH and the original parameters. CALLED BY: MSG_META_FIELD_NOTIFY_DETACH PASS: ds = es = dgroup ^lcx:dx = GenField bp = non-zero if shutdown RETURN: nothing DESTROYED: anything PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/28/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupFieldNotifyDetach method dynamic StartupClass, MSG_META_FIELD_NOTIFY_DETACH ; ; if the current field has detached, note this ; cmpdw cxdx, ds:[currentField] jne notCurrentField clrdw ds:[currentField] notCurrentField: ; ; if we were ignoring input while waiting for the field to detach, ; we'll accept input now ; call StartupAcceptInput ; ; if we were waiting for the field to exit before we exit ourselves, ; exit now ; test ds:[processFlags], mask SPF_DETACH_PENDING jz notDetachPending reSendDetach label near mov dx, ds:[detachOD].handle mov bp, ds:[detachOD].chunk mov cx, ds:[detachID] mov ax, MSG_META_DETACH mov bx, handle 0 mov di, mask MF_CALL GOTO ObjMessage ; <-- EXIT HERE notDetachPending: ; ; if we were waiting for the current field to exit before opening ; a new field, open that new field now ; test ds:[processFlags], mask SPF_PENDING_FIELD jz noPendingField andnf ds:[processFlags], not mask SPF_PENDING_FIELD movdw cxdx, ds:[pendingField] ; ^lcx:dx = pending field mov ax, MSG_STARTUP_OPEN_FIELD mov bx, handle 0 clr di GOTO ObjMessage ; <-- EXIT HERE ALSO noPendingField: ret StartupFieldNotifyDetach endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupCloseApplication %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: This routine does misc closing/cleanup before we exit. CALLED BY: GLOBAL PASS: nothing RETURN: cx = 0 (no state block) DESTROYED: ax,cx,dx,bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 1/16/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifndef WELCOME StartupCloseApplication method StartupClass, MSG_GEN_PROCESS_CLOSE_APPLICATION ; ; remove ourselves from the GCNSLT_EXPRESS_MENU_CHANGE system ; mov cx, handle 0 clr dx mov bx, MANUFACTURER_ID_GEOWORKS mov ax, GCNSLT_EXPRESS_MENU_CHANGE call GCNListRemove ifdef ISTARTUP call IStartupStopTimer endif clr cx ; no state block ret StartupCloseApplication endm endif ; not WELCOME COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupShutdownAck %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: restore owner of field resources CALLED BY: MSG_META_SHUTDOWN_ACK PASS: *ds:si = StartupClass object ds:di = StartupClass instance data es = segment of StartupClass ax = MSG_META_SHUTDOWN_ACK ^lcx:si = ack OD ^ldx:bp = object that sent ack back to us RETURN: nothing ALLOWED TO DESTROY: ax, cx, dx, bp bx, si, di, ds, es SIDE EFFECTS: PSEUDO CODE/STRATEGY: We can leave the burden thread as that doesn't matter when shutting down. The owner is relevant for unrelocating. REVISION HISTORY: Name Date Description ---- ---- ----------- brianc 1/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ StartupShutdownAck method dynamic StartupClass, MSG_META_SHUTDOWN_ACK mov bx, handle Room1Field mov ax, handle 0 call HandleModifyOwner mov bx, handle Room2Field mov ax, handle 0 call HandleModifyOwner mov bx, handle Room3Field mov ax, handle 0 call HandleModifyOwner ifdef ISTARTUP mov bx, handle LoginRoomField mov ax, handle 0 call HandleModifyOwner ifdef MOUSETUTORIAL mov bx, handle MouseRoomField mov ax, handle 0 call HandleModifyOwner endif endif mov ax, MSG_META_SHUTDOWN_ACK mov di, offset StartupClass GOTO ObjCallSuperNoLock StartupShutdownAck endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupCreateNewStateFile %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Always use same state filename - ISTARTUP.STA. CALLED BY: MSG_GEN_PROCESS_CREATE_NEW_STATE_FILE PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of StartupClass ax = message # dx = Block handle to block of structure AppLaunchBlock CurPath = Set to state directory RETURN: ax = VM file handle (0 if we don't want a state file/couldn't create one). DESTROYED: cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JS 5/26/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef ISTARTUP ;-------------------------------------------------------------- statefileName char "ISTARTUP.STA", C_NULL StartupCreateNewStateFile method dynamic StartupClass, MSG_GEN_PROCESS_CREATE_NEW_STATE_FILE mov bp, dx ; bp = AppLaunchBlock segmov ds, cs mov dx, offset cs:[statefileName] mov ax, (VMO_CREATE_TRUNCATE shl 8) or mask VMAF_FORCE_DENY_WRITE \ or mask VMAF_USE_BLOCK_LEVEL_SYNCHRONIZATION clr cx ; Use standard compaction threshhold call VMOpen jc error xchg bp, bx ; bp = VM file, bx = AppLaunchBlock mov si, dx ; ds:si = state file name call MemLock ; lock AppLaunchBlock mov es, ax mov di, offset AIR_stateFile mov cx, size statefileName rep movsb call MemUnlock mov ax, bp ret ; <==== GOOD EXIT error: clr ax ; no state file created ret ; <==== BAD EXIT StartupCreateNewStateFile endm endif ;-------------------------------------------------------------- ExitCode ends ;############################################################################## ; FIXED, RESIDENT CODE ;############################################################################## Resident segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupHotKeyMonitor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: An input monitor to detect when the hot key is pressed. CALLED BY: IM PASS: al = MF_DATA di = event type cx, dx, bp - event data ds = segment of Monitor being called si = nothing ss:sp = IM's stack RETURN: al = MF_DATA (never MF_MORE_TO_DO) di = event type cx, dx, bp, si = event data DESTROYED: maybe ah, bx, ds, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- doug 12/89 Initial version joon 11/92 IStartup: shutdown on key sequence ayuen 05/23/00 GPC: restart with default video mode on hotkey %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ifdef GPC screen0Cat char "screen 0", 0 StartupHotKeyMonitor proc far cmp di, MSG_META_KBD_CHAR jne exit ; ; Check if RCtrl-LShift-F12. ; SBCS < cmp cx, (CS_CONTROL shl 8) or VC_F12 > DBCS < cmp cx, C_SYS_F12 > jne exit ;If not, exit cmp dh, mask SS_RCTRL or mask SS_LSHIFT jne exit ; ; Only accept first-press. ; test dl, mask CF_FIRST_PRESS ; see if press or not jz Done ; if not, don't send method, but ; skill consume event test ds:[processFlags], mask SPF_DETACHING jne Done ;Ignore if detaching ; ; Hot key is pressed. Remove [screen 0] settings in GEOS.INI, and ; then restart the system. Can't call SysShutdown directly from here ; because the IM thread stack is too small, so we need to call it on ; our own thread. ; pusha segmov ds, cs mov si, offset screen0Cat ; ds:si = screen0Cat call InitFileDeleteCategory mov bx, handle 0 mov ax, MSG_PROCESS_CALL_ROUTINE push SST_RESTART ; PCRP_dataAX push seg SysShutdown, offset SysShutdown ; PCRP_address ; ss:sp = ProcessCallRoutineParams, valid up to PCRP_dataAX mov bp, sp ; ss:bp = ProcessCallRoutineParams mov dx, size ProcessCallRoutineParams mov di, mask MF_STACK call ObjMessage add sp, offset PCRP_dataAX + size PCRP_dataAX popa Done: clr ax ; consume the event. exit: ret StartupHotKeyMonitor endp elifndef ISTARTUP ;-------------------------------------------------------------- StartupHotKeyMonitor proc far ; If not a kbd char, return immediately if 0 ; no hotkey cmp di, MSG_META_KBD_CHAR jne exit mov bx, segment idata mov ds, bx ; see if hot key cmp cx, (0xff00 or VC_F2) jne exit ;If not, exit test dh, mask ShiftState ;If any modifier pressed, ignore it. jnz exit ; ; Test CharFlags test dl, mask CF_FIRST_PRESS ; see if press or not jz Done ; if not, don't send method, but ; skill consume event test ds:[processFlags], mask SPF_DETACHING jne Done ;Ignore if detaching ; if hot key pressed, try to jump user back to ; main screen. mov bx, handle 0 mov ax, MSG_STARTUP_TRY_TO_SWITCH_TO_STARTUP mov di, mask MF_FORCE_QUEUE call ObjMessage Done: clr ax ; consume the event. exit: endif ret StartupHotKeyMonitor endp else ; ISTARTUP ----------------------------------------------------------- StartupHotKeyMonitor proc far ; ; If not a kbd char, return immediately ; cmp di, MSG_META_KBD_CHAR LONG jne exit test dl, mask CF_FIRST_PRESS LONG jz exit ; must be first press mov bx, segment idata mov ds, bx cmp ds:[currentField].handle, handle LoginRoomField LONG je exit test ds:[keySequenceMode], mask KSM_ESCAPE jnz inEscapeSequenceMode ; ; Check if we should run switch to host connectivity app... ; cmp cx, C_BACKQUOTE jne checkQuizDialog mov bl, dh and bl, mask SS_LALT or mask SS_RALT or \ mask SS_LCTRL or mask SS_RCTRL LONG jz exit mov ax, MSG_STARTUP_SWITCH_TO_HOST mov bx, handle 0 mov di, mask MF_FORCE_QUEUE call ObjMessage jmp consumeKey checkQuizDialog: ; ; If both shift keys are down, bring up the quiz edit dialog ; mov bl, dh and bl, mask SS_LSHIFT or mask SS_RSHIFT cmp bl, mask SS_LSHIFT or mask SS_RSHIFT je doQuizDialog ; ; Also bring it up on ALT + ; cmp cx, '+' jne checkCtrlScrollLock test dh, mask SS_LALT or mask SS_RALT LONG jz exit doQuizDialog: mov ax, MSG_STARTUP_DO_QUIZ_DIALOG mov bx, handle 0 mov di, mask MF_FORCE_QUEUE call ObjMessage jmp consumeKey checkCtrlScrollLock: ; ; Test for Ctrl-ScrollLock (EDLan mode) ; cmp cx, (VC_ISCTRL shl 8) or VC_SCROLLLOCK jne checkEscape test dh, mask SS_LALT or mask SS_RALT LONG jz exit test dh, mask SS_LCTRL or mask SS_RCTRL jz exit test ds:[keySequenceMode], mask KSM_EDLAN jnz consumeKey ; skip if already in EDLan mode ornf ds:[keySequenceMode], mask KSM_EDLAN mov bx, handle 0 mov ax, MSG_STARTUP_BEGIN_EDLAN_MODE mov di, mask MF_FORCE_QUEUE call ObjMessage jmp short consumeKey checkEscape: ; ; Test for Ctrl-Alt-Shift-ESC ; cmp cx, (VC_ISCTRL shl 8) or VC_ESCAPE jne exit test dh, mask SS_LCTRL or mask SS_RCTRL jz exit test dh, mask SS_LALT or mask SS_RALT jz exit test dh, mask SS_LSHIFT or mask SS_RSHIFT jz exit ; start escape sequence mode ornf ds:[keySequenceMode], mask KSM_ESCAPE jmp short consumeKey inEscapeSequenceMode: test dl, mask CF_STATE_KEY or mask CF_TEMP_ACCENT jnz exit ; ignore state keys test dh, mask SS_LALT or mask SS_RALT ; ALT should be down jz resetState clr bh mov bl, ds:[keySequenceState] ; bl <= state number mov bh, ds:[bx + keySequence] ; bh <= sequence char mov ax, bp ; ah <= scancode cmp ah, bh jne resetState ; reset if not ; in sequence inc bl ; increment state number mov ds:[keySequenceState], bl ; upate state number cmp bl, ds:[keySequenceEndState] ; have we ; reached final state? jne consumeKey ; done if not test ds:[processFlags], mask SPF_DETACHING or mask SPF_PENDING_FIELD jnz resetState ; ignore if detaching mov bx, handle 0 mov ax, MSG_STARTUP_SHELL_TO_DOS mov di, mask MF_FORCE_QUEUE call ObjMessage resetState: andnf ds:[keySequenceMode], not (mask KSM_ESCAPE) mov ds:[keySequenceState], 0 ; reset state consumeKey: clr ax ; consume the event exit: ret StartupHotKeyMonitor endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% StartupSwitchToHost %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Run the host connectivity app CALLED BY: MSG_STARTUP_SWITCH_TO_HOST PASS: *ds:si = StartupClass object ds:di = StartupClass instance data ds:bx = StartupClass object (same as *ds:si) es = segment of class ax = message # RETURN: nothing DESTROYED: bx, si, di, ds, es allowed SIDE EFFECTS: PSEUDO CODE/STRATEGY: KNOWN BUGS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- dloft 4/19/94 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ HostAppInfoStruct CoursewareInfoStruct < 0,0,<0,0>,0,"SEH.ITM",0 > ;FakeItemFile char \ ; '?|Host Connectivity^ECHO RUNNING HOST CONNECTIVITY^SEH^%V%G^:SEH', \ ; C_CR, C_LF, 0 sehPath char 'SEH.ITM', 0 StartupSwitchToHost method dynamic StartupClass, MSG_STARTUP_SWITCH_TO_HOST uses cx, dx, bp .enter call FilePushDir mov al, IDT_SPECUTIL clr cx call IclasChangeDir segmov ds, cs, ax mov dx, offset sehPath call IclasFileRead jc done push bx segmov es, cs ; ds:dx -> item line mov bp, offset HostAppInfoStruct ; es:bp -> CIS call IclasExecItemLine pop bx call MemFree done: call FilePopDir .leave ret StartupSwitchToHost endm endif ; ifdef ISTARTUP ---------------------------------------------- Resident ends
24.004829
109
0.611723
badd7c6a5ee3c2449798a288da26c0d98645d8c9
288
asm
Assembly
libsrc/games/ticalc/bit_close.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/games/ticalc/bit_close.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/games/ticalc/bit_close.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; $Id: bit_close.asm,v 1.4 2016/06/16 20:23:52 dom Exp $ ; ; TI calculator "Infrared port" 1 bit sound functions stub ; ; void bit_close(); ; ; Stefano Bodrato - 24/10/2001 ; SECTION code_clib PUBLIC bit_close PUBLIC _bit_close .bit_close ._bit_close ret
16
58
0.649306
facd022098c8549ce7e1f568736e9f9c69951dad
474
asm
Assembly
oeis/320/A320327.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/320/A320327.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/320/A320327.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A320327: Triangle T(n,m) = C(2*n,m)*C(2*n-1,n), 0 <= m <= 2*n, n >= 0. ; Submitted by Jon Maiga ; 1,1,2,1,3,12,18,12,3,10,60,150,200,150,60,10,35,280,980,1960,2450,1960,980,280,35,126,1260,5670,15120,26460,31752,26460,15120,5670,1260,126,462,5544,30492,101640,228690,365904,426888,365904,228690,101640,30492,5544,462 lpb $0 add $1,1 sub $0,$1 mov $2,$1 add $1,1 lpe bin $1,$0 mov $0,2 div $2,2 add $2,1 mul $0,$2 bin $0,$2 mul $1,16 mul $1,$0 mov $0,$1 div $0,32
22.571429
220
0.635021
a821befbffa6f3fa8714c73ba76f7e84b3870770
3,501
asm
Assembly
_maps/Flamethrower.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
9
2021-01-15T13:47:53.000Z
2022-01-17T15:33:55.000Z
_maps/Flamethrower.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
7
2021-01-14T02:18:48.000Z
2021-03-24T15:44:30.000Z
_maps/Flamethrower.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
2
2021-01-14T13:14:26.000Z
2021-01-29T17:46:04.000Z
; --------------------------------------------------------------------------- ; Sprite mappings - flame thrower (SBZ) ; --------------------------------------------------------------------------- Map_Flame_internal: dc.w @pipe1-Map_Flame_internal dc.w @pipe2-Map_Flame_internal dc.w @pipe3-Map_Flame_internal dc.w @pipe4-Map_Flame_internal dc.w @pipe5-Map_Flame_internal dc.w @pipe6-Map_Flame_internal dc.w @pipe7-Map_Flame_internal dc.w @pipe8-Map_Flame_internal dc.w @pipe9-Map_Flame_internal dc.w @pipe10-Map_Flame_internal dc.w @pipe11-Map_Flame_internal dc.w @valve1-Map_Flame_internal dc.w @valve2-Map_Flame_internal dc.w @valve3-Map_Flame_internal dc.w @valve4-Map_Flame_internal dc.w @valve5-Map_Flame_internal dc.w @valve6-Map_Flame_internal dc.w @valve7-Map_Flame_internal dc.w @valve8-Map_Flame_internal dc.w @valve9-Map_Flame_internal dc.w @valve10-Map_Flame_internal dc.w @valve11-Map_Flame_internal @pipe1: dc.b 1 dc.b $28, 5, $40, $14, $FB ; broken pipe style flamethrower @pipe2: dc.b 2 dc.b $20, 1, 0, 0, $FD dc.b $28, 5, $40, $14, $FB @pipe3: dc.b 2 dc.b $20, 1, 8, 0, $FC dc.b $28, 5, $40, $14, $FB @pipe4: dc.b 3 dc.b $10, 6, 0, 2, $F8 dc.b $20, 1, 0, 0, $FD dc.b $28, 5, $40, $14, $FB @pipe5: dc.b 3 dc.b $10, 6, 8, 2, $F8 dc.b $20, 1, 8, 0, $FC dc.b $28, 5, $40, $14, $FB @pipe6: dc.b 4 dc.b 8, 6, 0, 2, $F8 dc.b $10, 6, 0, 2, $F8 dc.b $20, 1, 0, 0, $FD dc.b $28, 5, $40, $14, $FB @pipe7: dc.b 4 dc.b 8, 6, 8, 2, $F8 dc.b $10, 6, 8, 2, $F8 dc.b $20, 1, 8, 0, $FC dc.b $28, 5, $40, $14, $FB @pipe8: dc.b 5 dc.b $F8, $B, 0, 8, $F4 dc.b 8, 6, 0, 2, $F8 dc.b $10, 6, 0, 2, $F8 dc.b $20, 1, 0, 0, $FD dc.b $28, 5, $40, $14, $FB @pipe9: dc.b 5 dc.b $F8, $B, 8, 8, $F4 dc.b 8, 6, 8, 2, $F8 dc.b $10, 6, 8, 2, $F8 dc.b $20, 1, 8, 0, $FC dc.b $28, 5, $40, $14, $FB @pipe10: dc.b 6 dc.b $E8, $B, 0, 8, $F4 dc.b $F7, $B, 0, 8, $F4 dc.b 8, 6, 0, 2, $F8 dc.b $F, 6, 0, 2, $F8 dc.b $20, 1, 0, 0, $FD dc.b $28, 5, $40, $14, $FB @pipe11: dc.b 6 dc.b $E7, $B, 8, 8, $F4 dc.b $F8, $B, 8, 8, $F4 dc.b 7, 6, 8, 2, $F8 dc.b $10, 6, 8, 2, $F8 dc.b $20, 1, 8, 0, $FC dc.b $28, 5, $40, $14, $FB @valve1: dc.b 1 dc.b $28, 5, $40, $18, $F9 ; valve style flamethrower @valve2: dc.b 2 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 0, 0, $FD @valve3: dc.b 2 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 8, 0, $FC @valve4: dc.b 3 dc.b $10, 6, 0, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 0, 0, $FD @valve5: dc.b 3 dc.b $10, 6, 8, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 8, 0, $FC @valve6: dc.b 4 dc.b 8, 6, 0, 2, $F8 dc.b $10, 6, 0, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 0, 0, $FD @valve7: dc.b 4 dc.b 8, 6, 8, 2, $F8 dc.b $10, 6, 8, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 8, 0, $FC @valve8: dc.b 5 dc.b $F8, $B, 0, 8, $F4 dc.b 8, 6, 0, 2, $F8 dc.b $10, 6, 0, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 0, 0, $FD @valve9: dc.b 5 dc.b $F8, $B, 8, 8, $F4 dc.b 8, 6, 8, 2, $F8 dc.b $10, 6, 8, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 8, 0, $FC @valve10: dc.b 6 dc.b $E8, $B, 0, 8, $F4 dc.b $F7, $B, 0, 8, $F4 dc.b 8, 6, 0, 2, $F8 dc.b $F, 6, 0, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 0, 0, $FD @valve11: dc.b 6 dc.b $E7, $B, 8, 8, $F4 dc.b $F8, $B, 8, 8, $F4 dc.b 7, 6, 8, 2, $F8 dc.b $10, 6, 8, 2, $F8 dc.b $28, 5, $40, $18, $F9 dc.b $20, 1, 8, 0, $FC even
26.725191
77
0.499857
ebcda554416f673658e3134cc26759cf487e04bf
1,830
asm
Assembly
bootsector/08-32bit/gdt.asm
wpmed92/os-adventures
dd0ad399ab0cb914560ae7562a71dcfd2d893e67
[ "MIT" ]
1
2022-03-21T19:10:33.000Z
2022-03-21T19:10:33.000Z
bootsector/08-32bit/gdt.asm
wpmed92/os-adventures
dd0ad399ab0cb914560ae7562a71dcfd2d893e67
[ "MIT" ]
null
null
null
bootsector/08-32bit/gdt.asm
wpmed92/os-adventures
dd0ad399ab0cb914560ae7562a71dcfd2d893e67
[ "MIT" ]
null
null
null
;Setting up the Global Descriptor Table (GDT) to enable segmentation in 32-bit mode ;Instead of the 16-bit style segmentation, where the segment register is shifted left 4 and then the address is added to that, ;we will load an index to this GDT into the segment register, and the segment selector will load the proper ;base address, and calculate the absolute address based on that ;each segment descriptor is 8 bytes long ;the first one is set to all zero gdt_start: ;8 null bytes as starting point of GDT dd 0 dd 0 ;Setting up code segment ;Very useful link is https://wiki.osdev.org/Global_Descriptor_Table ;In our bootsector both the data segment and code segment will span the same address space gdt_data: dw 0xffff ;first part of limit = how long is our segment dw 0 ;*base address, 16-31 bit, let's set it to 0x00000000 db 0 ;*base address, 32-39 bit ;Access Byte ;7 6 5 4 3 2 1 0 ;P DPL S E DC RW A db 10010010b;access byte -> ring 0, non-system segment, not executable, segment grows up, writeable, accessed bit zero ;Flags ;3 2 1 0 ;G DB L Reserved db 11001111b;flags -> byte granularity (segment is in one-byte blocks), 32-bit protected mode segment, 32-bit long segment, 1111 at end are limit bits db 0 ;*base address, 56-63 bit ;code segment, copy of gdt_data, difference is in access byte gdt_code: dw 0xffff dw 0 db 0 ;Access Byte ;7 6 5 4 3 2 1 0 ;P DPL S E DC RW A db 10011010b ;access byte -> ring 0, non-system segment, !executable! (code), segment grows up, readable, accessed bit zero db 11001111b ;flags db 0 ;*base address, 56-63 bit gdt_end: gdt_meta_descriptor: dw gdt_end - gdt_start - 1 ;16bit size of gdt dd gdt_start ;32bit address of gdt entry point CODE_SEG equ gdt_code - gdt_start DATA_SEG equ gdt_data - gdt_start
34.528302
152
0.730601
705a7e56552468742fd0bad34cdbeffba03fe765
705
asm
Assembly
programs/oeis/158/A158742.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/158/A158742.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/158/A158742.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A158742: a(n) = 74*n^2 + 1. ; 1,75,297,667,1185,1851,2665,3627,4737,5995,7401,8955,10657,12507,14505,16651,18945,21387,23977,26715,29601,32635,35817,39147,42625,46251,50025,53947,58017,62235,66601,71115,75777,80587,85545,90651,95905,101307,106857,112555,118401,124395,130537,136827,143265,149851,156585,163467,170497,177675,185001,192475,200097,207867,215785,223851,232065,240427,248937,257595,266401,275355,284457,293707,303105,312651,322345,332187,342177,352315,362601,373035,383617,394347,405225,416251,427425,438747,450217,461835,473601,485515,497577,509787,522145,534651,547305,560107,573057,586155,599401,612795,626337,640027,653865,667851,681985,696267,710697,725275 pow $0,2 mul $0,74 add $0,1
100.714286
645
0.814184
80b1840e75825910b8b6b89b8cca0181de5dd845
3,655
asm
Assembly
source/projx32VS2008.asm
lyubov888L/RecView
fcb1f8f715f9ddbe917b51b9a0c114405303645c
[ "BSD-2-Clause" ]
8
2018-01-01T02:59:54.000Z
2021-09-28T16:19:55.000Z
source/projx32VS2008.asm
lyubov888L/RecView
fcb1f8f715f9ddbe917b51b9a0c114405303645c
[ "BSD-2-Clause" ]
null
null
null
source/projx32VS2008.asm
lyubov888L/RecView
fcb1f8f715f9ddbe917b51b9a0c114405303645c
[ "BSD-2-Clause" ]
3
2018-10-11T02:37:23.000Z
2021-09-28T14:57:06.000Z
.686 .xmm .model flat, c DATA segment align(32) F76543210 real4 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 F88888888 real4 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0 F00000000 real4 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 F3210 real4 0.0, 1.0, 2.0, 3.0 DATA ends .code projx32 PROC param:dword ; for (int iy=iy0; iy<iy1; iy++) { ; const int ifpidx = iy * ixdimp; ; const float fyoff = iy * fsin + foffset; ; for (int ix=0; ix<ixdimp; ix++) { ; int ix0 = (int)(ix * fcos + fyoff); ; if (ix0 < 0) continue; ; if (ix0 >= ixdimpg) continue; ; ifp[ifpidx + ix] += ipgp[ix0]; ; } ; } ;local valiables local ixdimp :dword local ixdimp4 :dword local iy0 :dword local iy1 :dword ; local pmxcsr :dword ; local smxcsr :dword ;store registers push esi push edi push ebx push ebp ; stmxcsr smxcsr ;get pointer to args mov esi, param ;arg #1 ;load valiables and constants ; mov ixdimpg, [esi + 12] mov eax, [esi + 16] mov ixdimp, eax ; mov eax, ixdimp shl eax, 2 mov ixdimp4, eax ; mov ifp, [esi + 20] ; mov igp, [esi + 24] mov eax, [esi + 32] ;iy0 mov iy0, eax mov eax, [esi + 36] ;iy1 mov iy1, eax ;sse rounding mode RC=00B (MXCSR[14:13]) ; stmxcsr pmxcsr ; and pmxcsr, 0FFFF9FFFh ; or pmxcsr, 000000000h ; ldmxcsr pmxcsr ;jump to AVX routine ; mov eax, [esi + 28] ; AVX flag ; and eax, 000000001h ; jnz USEAVX ;SSE mov eax, [esi] ; &fcos movss xmm0, real4 ptr [eax] shufps xmm0, xmm0, 0 mov eax, [esi + 4]; &fsin movss xmm1, real4 ptr [eax] shufps xmm1, xmm1, 0 mov eax, [esi + 8]; &foffset movss xmm7, real4 ptr [eax] shufps xmm7, xmm7, 0 movaps xmm6, F3210 mov eax, iy1 ; iy1 dec eax mov ecx, ixdimp imul ecx shl eax, 2 ; ixy = ixdimp * (iy1 - 1) * 4 add eax, [esi + 20]; ixy += ifp mov edi, eax mov ecx, [esi + 12]; ixdimpg mov esi, [esi + 24]; igp mov edx, iy1; iy<==iy1 dec edx mov eax, 0 LOOPY: mov ebx, ixdimp ; ix<==ixdimp dec ebx cvtsi2ss xmm3, edx ; xmm3<==iy shufps xmm3, xmm3, 0 ; xmm3<==iy, iy, iy, iy movaps xmm5, xmm1 ; xmm5<==fsin, fsin, fsin, fsin mulps xmm5, xmm3 ; iy * fsin for each float addps xmm5, xmm7 ; + foffset for each float LOOPX: cvtsi2ss xmm2, ebx ; xmm2<==ix shufps xmm2, xmm2, 0 ; xmm2<==ix, ix, ix, ix subps xmm2, xmm6 ; xmm2<==ix-3, ix-2, ix-2, ix movaps xmm4, xmm0 ; xmm4<==fcos, fcos, fcos, fcos mulps xmm4, xmm2 ; (ix-n) * fcos addps xmm4, xmm5 ; (ix-n) * fcos + foffset cvttps2dq xmm4, xmm4 ; xmm4 float*4 to integer32*4 movd eax, xmm4 ; lower 4 bytes to eax ; pextrd eax, xmm4, 0 ; SSE4.1 cmp eax, ecx ; ix<=>ixdimpg jae LOOPXSKIP1 ; ix0 >= ixdimp * DBPT_GINTP or ix0 < 0 mov eax, [esi + eax * 4] ; eax<==igp[ix * DBPT_GINTP] add [edi + ebx * 4], eax ; ifp[ix] += eax LOOPXSKIP1: dec ebx ; ix-- jl LOOPYEND ; ix < 0 psrldq xmm4, 4 ; shift right by 4 bytes (integer32) movd eax, xmm4 ; pextrd eax, xmm4, 1 ; SSE4.1 cmp eax, ecx; ixdimpg jae LOOPXSKIP2 ; ix0 >= ixdimp * DBPT_GINTP or ix0 < 0 mov eax, [esi + eax * 4] add [edi + ebx * 4], eax LOOPXSKIP2: dec ebx ; ix-- jl LOOPYEND ; ix < 0 psrldq xmm4, 4 movd eax, xmm4 ; pextrd eax, xmm4, 2 ; SSE4.1 cmp eax, ecx; ixdimpg jae LOOPXSKIP3 ; ix0 >= ixdimp * DBPT_GINTP or ix0 < 0 mov eax, [esi + eax * 4] add [edi + ebx * 4], eax LOOPXSKIP3: dec ebx ; ix-- jl LOOPYEND ; ix < 0 psrldq xmm4, 4 movd eax, xmm4 ; pextrd eax, xmm4, 3 ; SSE4.1 cmp eax, ecx; ixdimpg jae LOOPXEND ; ix0 >= ixdimp * DBPT_GINTP or ix0 < 0 mov eax, [esi + eax * 4] add [edi + ebx * 4], eax LOOPXEND: dec ebx jge LOOPX ; ix >= 0 LOOPYEND: sub edi, ixdimp4 dec edx cmp edx, iy0 jge LOOPY ; iy >= iy0 ; ldmxcsr smxcsr pop ebp pop ebx pop edi pop esi ret projx32 ENDP end
21.627219
55
0.626265
e34205e0f533282ba5ba71d7ce37a9eb7ce3e627
573
asm
Assembly
delay.asm
sperly/rc2014_20x4_lcd
21000862c95558041464611204cf39554d739c3f
[ "MIT" ]
1
2021-09-30T08:45:00.000Z
2021-09-30T08:45:00.000Z
delay.asm
sperly/rc2014_20x4_lcd
21000862c95558041464611204cf39554d739c3f
[ "MIT" ]
null
null
null
delay.asm
sperly/rc2014_20x4_lcd
21000862c95558041464611204cf39554d739c3f
[ "MIT" ]
null
null
null
;X ms wait; B is number of ms milli_delay: PUSH AF PUSH BC CALL m_delay POP BC POP AF DJNZ long_wait RET ;Delay routine m_delay: LD BC, 27 ;10 outer: LD DE, 27 ;10 inner: DEC DE ;6 LD A,D ;4/9 OR E ;4/7 JP NZ, inner ;10 DEC BC ;6 LD A,B ;4/9 OR C ;4/7 JP NZ, outer ;10 RET ;10 ;X µs wait; B is number of µs micro_delay: NOP NOP DJNZ micro_delay RET
17.90625
31
0.420593
2b8f53ebcdda31feae02c74e2ee40f1ef90c6b27
668
asm
Assembly
oeis/047/A047924.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/047/A047924.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/047/A047924.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A047924: a(n) = B_{A_n+1}+1, where A_n = floor(n*phi) = A000201(n), B_n = floor(n*phi^2) = A001950(n) and phi is the golden ratio. ; Submitted by Jon Maiga ; 3,6,11,14,19,24,27,32,35,40,45,48,53,58,61,66,69,74,79,82,87,90,95,100,103,108,113,116,121,124,129,134,137,142,147,150,155,158,163,168,171,176,179,184,189,192,197,202,205,210,213,218,223,226,231,234,239,244,247,252,257,260,265,268,273,278,281,286,291,294,299,302,307,312,315,320,323,328,333,336,341,346,349,354,357,362,367,370,375,380,383,388,391,396,401,404,409,412,417,422 mov $1,$0 trn $0,1 seq $0,19446 ; a(n) = ceiling(n/tau), where tau = (1+sqrt(5))/2. mul $1,3 add $1,$0 add $1,$0 mov $0,$1 add $0,1
51.384615
376
0.673653
a186c3a4a0fd334e6f26a97bf6b798f0457a9dd5
312
asm
Assembly
oeis/127/A127954.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/127/A127954.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/127/A127954.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A127954: Triangle, A097805 * A127648. ; Submitted by Christian Krause ; 1,0,2,0,2,3,0,2,6,4,0,2,9,12,5,0,2,12,24,20,6,0,2,15,40,50,30,7,0,2,18,60,100,90,42,8,0,2,21,84,175,210,147,56,9,0,2,24,112,280,420,392,224,72,10 lpb $0 add $1,1 sub $0,$1 lpe sub $0,1 sub $1,1 bin $1,$0 add $0,2 mul $1,$0 mov $0,$1
20.8
147
0.61859
9970029c2305780fb85524a7897c4aa4dddc6128
941
asm
Assembly
Kernel/asm/scheduler.asm
salCas276/OS-pure64
e7ccb8ba1fc4fa5c93e580cdeeb4bb0d9dca9b0c
[ "BSD-3-Clause" ]
null
null
null
Kernel/asm/scheduler.asm
salCas276/OS-pure64
e7ccb8ba1fc4fa5c93e580cdeeb4bb0d9dca9b0c
[ "BSD-3-Clause" ]
null
null
null
Kernel/asm/scheduler.asm
salCas276/OS-pure64
e7ccb8ba1fc4fa5c93e580cdeeb4bb0d9dca9b0c
[ "BSD-3-Clause" ]
null
null
null
GLOBAL _buildContext , InitFirstProcess EXTERN irqDispatcher , getCurrentRSP %macro pushState 0 push rax push rbx push rcx push rdx push rbp push rdi push rsi push r8 push r9 push r10 push r11 push r12 push r13 push r14 push r15 %endmacro %macro popState 0 pop r15 pop r14 pop r13 pop r12 pop r11 pop r10 pop r9 pop r8 pop rsi pop rdi pop rbp pop rdx pop rcx pop rbx pop rax %endmacro ; uint64_t _buildContext(uint64_t baseRSP, uint64_t functionAddress); _buildContext: push rbp mov rbp, rsp mov rsp, rdi push 0x0 ; SS push rdi ; RSP push 0x206 ; RFLAGS push 0x8 ; CS push rsi ; RIP mov rdi , rdx mov rsi , rcx pushState mov rax, rsp mov rsp, rbp pop rbp ret InitFirstProcess: ;mov rdi, 0 ; pasaje de parametro ;call irqDispatcher call getCurrentRSP; mov rsp , rax ;; cambio de contexto. popState sti ;;set interrupts iretq
12.546667
69
0.674814
f6abe3744a6fee639d1d66d017f9612fca7e1a16
2,203
asm
Assembly
lib/tgbl_common.asm
trexxet/tgbl
75d5cfb8a6ffcff527e3edfbb7ab180edf9118f6
[ "MIT" ]
14
2017-05-08T16:26:19.000Z
2020-11-02T14:10:06.000Z
lib/tgbl_common.asm
trexxet/tgbl
75d5cfb8a6ffcff527e3edfbb7ab180edf9118f6
[ "MIT" ]
1
2017-05-08T16:25:29.000Z
2017-05-08T16:33:57.000Z
lib/tgbl_common.asm
trexxet/tgbl
75d5cfb8a6ffcff527e3edfbb7ab180edf9118f6
[ "MIT" ]
3
2017-03-24T20:28:09.000Z
2020-11-02T14:11:10.000Z
; TGBL common functions and macros ; Width and height of screen scrHeight equ 25 scrWidth equ 80 scrHMid equ 12 scrWMid equ 40 vramWidth equ 160 ; Background colors BG_BLACK equ 0x00 BG_BLUE equ 0x10 BG_GREEN equ 0x20 BG_CYAN equ 0x30 BG_RED equ 0x40 BG_MAGENTA equ 0x50 BG_BROWN equ 0x60 BG_LGRAY equ 0x70 BG_BLINK equ 0x80 ; Foreground colors FG_BLACK equ 0x00 FG_BLUE equ 0x01 FG_GREEN equ 0x02 FG_CYAN equ 0x03 FG_RED equ 0x04 FG_MAGENTA equ 0x05 FG_BROWN equ 0x06 FG_LGRAY equ 0x07 FG_DGRAY equ 0x08 FG_LBLUE equ 0x09 FG_LGREEN equ 0x0A FG_LCYAN equ 0x0B FG_LRED equ 0x0C FG_LMAGENTA equ 0x0D FG_YELLOW equ 0x0E FG_WHITE equ 0x0F ; Setting VGA 80x25 text mode ; Spoils AX tgbl_initVGA: mov ax, 0x0003 int 10h ; VRAM access mov ax, 0xb800 mov es, ax ret ; Fill screen with char ; Args: char, color ; Spoils: AX, DI %macro tgblm_fillScreen 2 mov al, %1 mov ah, %2 xor di, di %%fillLoop: stosw cmp di, vramWidth * scrHeight jne %%fillLoop %endmacro ; Clear screen ; Spoils: AX, DI %macro tgblm_clearScreen 0 tgblm_fillScreen 0, 0 %endmacro ; Fill screen area with char ; Args: char, color, upper row, left column, height, width ; Spoils: AX, BX, CX, DX, DI %macro tgblm_fillScreenArea 6 mov al, %1 mov ah, %2 mov di, ((%3) * vramWidth) + ((%4) * 2) mov dh, %5 mov dl, %6 call tgbl_fillScreenArea %endmacro tgbl_fillScreenArea: xor cx, cx ; CX - counter (CH - column, CL - row) .fillLoop: stosw inc cl cmp cl, dl jb .fillLoop ; Next line: add di, vramWidth movzx bx, dl ; shl bx, 1 ; DI -= DL * 2 sub di, bx ; xor cl, cl inc ch cmp ch, dh jb .fillLoop ret ; Clear screen area ; Args: upper row, left column, height, width ; Spoils: AX, CX, DX, DI %macro tgblm_clearScreenArea 4 tgblm_fillScreenArea 0, 0, (%1), (%2), (%3), (%4) %endmacro ; Hide cursor ; Spoils: AH, CH %macro tgblm_hideCursor 0 mov ah, 01h mov ch, 0x20 int 10h %endmacro ; Shutdown tgbl_shutdown: mov ax, 0x5301 xor bx, bx int 15h mov ax, 0x5307 mov bx, 0x0001 mov cx, 0x0003 int 15h ; This will never return... ; Soft reboot %define tgblm_softReboot jmp 0FFFFh:0
17.484127
58
0.682705
c07779bc26661e793592d0ce8ded4b47f329f648
168
nasm
Assembly
Chapter03/stack.nasm
firebitsbr/Penetration-Testing-with-Shellcode
2d756bccace6b727e050b2010ebf23e08d221fdc
[ "MIT" ]
30
2018-05-15T21:45:09.000Z
2022-03-23T20:04:25.000Z
Chapter03/stack.nasm
naveenselvan/Penetration-Testing-with-Shellcode
2d756bccace6b727e050b2010ebf23e08d221fdc
[ "MIT" ]
1
2020-10-19T13:03:32.000Z
2020-11-24T05:50:17.000Z
Chapter03/stack.nasm
naveenselvan/Penetration-Testing-with-Shellcode
2d756bccace6b727e050b2010ebf23e08d221fdc
[ "MIT" ]
18
2018-02-20T21:21:23.000Z
2022-01-26T04:19:28.000Z
global _start section .text _start: mov rdx,0x1234 push rdx push 0x5678 pop rdi pop rsi mov rax, 60 mov rdi, 0 syscall section .data
10.5
18
0.613095
be49c3e68ab3aec390dcaf6a0e605b45434691fe
1,347
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_1_1811.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_1_1811.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_1_1811.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r14 push %rax push %rbx push %rsi lea addresses_A_ht+0x1cf5f, %r14 nop nop xor %rax, %rax mov (%r14), %rsi nop nop nop nop nop and $44025, %rbx pop %rsi pop %rbx pop %rax pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %rbp push %rcx push %rdi push %rdx // Store lea addresses_normal+0x44bf, %rcx clflush (%rcx) nop nop nop nop nop inc %rbp movl $0x51525354, (%rcx) cmp %rdi, %rdi // Faulty Load lea addresses_PSE+0xecbf, %r14 clflush (%r14) nop and %r13, %r13 vmovups (%r14), %ymm4 vextracti128 $1, %ymm4, %xmm4 vpextrq $0, %xmm4, %rdx lea oracles, %r10 and $0xff, %rdx shlq $12, %rdx mov (%r10,%rdx,1), %rdx pop %rdx pop %rdi pop %rcx pop %rbp pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_normal'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'33': 1} 33 */
17.050633
126
0.649592
8108a71ba254885c286847b35244824faee24339
607
asm
Assembly
tests/deref.asm
notaz/ia32rtools
75b4a70dafd7faf3c27b963fa8e67462538f91d4
[ "BSD-3-Clause" ]
55
2015-01-27T01:10:27.000Z
2022-03-27T05:35:08.000Z
tests/deref.asm
notaz/ia32rtools
75b4a70dafd7faf3c27b963fa8e67462538f91d4
[ "BSD-3-Clause" ]
null
null
null
tests/deref.asm
notaz/ia32rtools
75b4a70dafd7faf3c27b963fa8e67462538f91d4
[ "BSD-3-Clause" ]
9
2015-08-16T03:27:24.000Z
2020-10-28T05:14:52.000Z
_text segment para public 'CODE' use32 sub_test proc near push ebp mov ebp, esp push esi mov esi, ptr_struct1 push 1 call dword ptr [esi] mov eax, [esi+4] push 2 call dword ptr [eax+4] pop esi pop ebp retn sub_test endp _text ends _rdata segment para public 'DATA' use32 ptr_struct1 dd 0 _rdata ends ; vim:expandtab
23.346154
48
0.400329
fa99c9c541b4b1ceefdae9fe8beb544c7d136af1
94
asm
Assembly
a/Asm2bf.asm
conorpreid/hello-world
10bc2b31f406c766bbb58b4bd2f5054c3124a4c5
[ "MIT" ]
8,076
2015-01-02T04:55:03.000Z
2022-03-31T16:09:18.000Z
a/Asm2bf.asm
conorpreid/hello-world
10bc2b31f406c766bbb58b4bd2f5054c3124a4c5
[ "MIT" ]
514
2015-01-08T21:48:21.000Z
2022-03-31T11:55:07.000Z
a/Asm2bf.asm
conorpreid/hello-world
10bc2b31f406c766bbb58b4bd2f5054c3124a4c5
[ "MIT" ]
1,978
2015-01-01T14:24:01.000Z
2022-03-31T11:38:08.000Z
STK 2 ORG 0 TXT "Hello World" DB_ 0 @LOOP RCL R2, R1 JZ_ R2, 0 OUT R2 INC R1 JMP %LOOPs
7.833333
17
0.638298
f86a76e5fa568afec0f9bde12d1ba26a33a306f4
671
asm
Assembly
programs/oeis/068/A068344.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/068/A068344.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/068/A068344.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A068344: Square array read by antidiagonals of T(n,k) = sign(n-k). ; 0,-1,1,-1,0,1,-1,-1,1,1,-1,-1,0,1,1,-1,-1,-1,1,1,1,-1,-1,-1,0,1,1,1,-1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,1,1,1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,0,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,0,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1 mov $2,$0 mov $4,$0 cmp $4,0 add $0,$4 div $2,$0 cal $0,279415 ; Triangle read by rows: T(n,k), n>=k>=1, is the number of right isosceles triangles with integral coordinates that have a bounding box of size n X k. sub $2,2 sub $0,$2 sub $0,$2 add $3,$0 sub $3,2 mov $1,$3 mul $1,4 sub $1,5 sub $2,1 gcd $2,0 add $2,2 add $1,$2 sub $1,7 div $1,8
27.958333
254
0.546945
c829f839e45e597c38e8ae9b9901df714656d535
2,335
asm
Assembly
src/test/ref/sizeof-types.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/test/ref/sizeof-types.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/test/ref/sizeof-types.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
// Tests the sizeof() operator on types // Commodore 64 PRG executable file .file [name="sizeof-types.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) .const SIZEOF_CHAR = 1 .const SIZEOF_SIGNED_CHAR = 1 .const SIZEOF_BOOL = 1 .const SIZEOF_UNSIGNED_INT = 2 .const SIZEOF_INT = 2 .const SIZEOF_POINTER = 2 .const SIZEOF_UNSIGNED_LONG = 4 .const SIZEOF_LONG = 4 .label SCREEN = $400 .segment Code main: { // SCREEN[idx++] = '0'+sizeof(void) lda #'0' sta SCREEN // SCREEN[idx++] = '0'+sizeof(byte) lda #'0'+SIZEOF_CHAR sta SCREEN+2 // SCREEN[idx++] = '0'+sizeof(signed byte) lda #'0'+SIZEOF_SIGNED_CHAR sta SCREEN+3 // SCREEN[idx++] = '0'+sizeof(unsigned char) lda #'0'+SIZEOF_CHAR sta SCREEN+4 // SCREEN[idx++] = '0'+sizeof(signed char) lda #'0'+SIZEOF_SIGNED_CHAR sta SCREEN+5 // SCREEN[idx++] = '0'+sizeof(bool) lda #'0'+SIZEOF_BOOL sta SCREEN+6 // SCREEN[idx++] = '0'+sizeof(word) lda #'0'+SIZEOF_UNSIGNED_INT sta SCREEN+8 // SCREEN[idx++] = '0'+sizeof(signed word) lda #'0'+SIZEOF_INT sta SCREEN+9 // SCREEN[idx++] = '0'+sizeof(unsigned int) lda #'0'+SIZEOF_UNSIGNED_INT sta SCREEN+$a // SCREEN[idx++] = '0'+sizeof(signed int) lda #'0'+SIZEOF_INT sta SCREEN+$b // SCREEN[idx++] = '0'+sizeof(unsigned short) lda #'0'+SIZEOF_UNSIGNED_INT sta SCREEN+$c // SCREEN[idx++] = '0'+sizeof(signed short) lda #'0'+SIZEOF_INT sta SCREEN+$d // SCREEN[idx++] = '0'+sizeof(byte*) lda #'0'+SIZEOF_POINTER sta SCREEN+$f // SCREEN[idx++] = '0'+sizeof(word*) sta SCREEN+$10 // SCREEN[idx++] = '0'+sizeof(int**) sta SCREEN+$11 // SCREEN[idx++] = '0'+sizeof(int***) sta SCREEN+$12 // SCREEN[idx++] = '0'+sizeof(dword) lda #'0'+SIZEOF_UNSIGNED_LONG sta SCREEN+$14 // SCREEN[idx++] = '0'+sizeof(signed dword) lda #'0'+SIZEOF_LONG sta SCREEN+$15 // SCREEN[idx++] = '0'+sizeof(unsigned long) lda #'0'+SIZEOF_UNSIGNED_LONG sta SCREEN+$16 // SCREEN[idx++] = '0'+sizeof(signed long) lda #'0'+SIZEOF_LONG sta SCREEN+$17 // } rts }
28.82716
63
0.605996
df7b283368233c4e3bc2385f0807a1b67a675831
783
asm
Assembly
oeis/286/A286985.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/286/A286985.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/286/A286985.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A286985: Number of connected dominating sets in the n-prism graph. ; Submitted by Christian Krause ; 7,7,39,115,343,967,2663,7203,19239,50887,133543,348179,902775,2329607,5986535,15327555,39115847,99532423,252601127,639548595,1615746455,4073951559,10253517671,25763632995,64635943783,161928486727,405134009511,1012371656275,2526868715191,6300267023239,15692710027751,39050459547267,97088481325191,241181899071751,598656085419559,1484856158686451,3680296386294231,9115666987053767,22563994455460967,55818602143872675,138003455330059175,341004972223593415,842174575203303335,2078855932901916819 mov $1,$0 mov $5,$0 lpb $0 sub $0,1 add $1,$5 add $1,1 add $1,$2 add $1,2 sub $3,$4 mov $4,$2 add $2,$1 mov $1,$3 add $2,1 add $5,$4 lpe mov $0,$4 mul $0,4 add $0,7
34.043478
493
0.785441
428ec9037b3647edfaf0b1aee1723d26c93b9c88
232
asm
Assembly
oeis/085/A085904.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/085/A085904.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/085/A085904.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A085904: Numbers n such that n, n+1 and n+2 are highly composite numbers (2), i.e., all prime divisors <= 7 (A002473). ; 1,2,3,4,5,6,7,8,14,48 mov $2,$0 lpb $0 sub $2,1 bin $2,5 sub $2,$0 div $0,$2 lpe mov $0,$2 add $0,1
17.846154
120
0.590517
a315da7c53a6b5de355bc1a8edd11908d0ae75a6
528
asm
Assembly
programs/oeis/314/A314848.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/314/A314848.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/314/A314848.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A314848: Coordination sequence Gal.5.110.3 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; 1,5,9,14,18,24,28,33,37,42,47,51,56,60,66,70,75,79,84,89,93,98,102,108,112,117,121,126,131,135,140,144,150,154,159,163,168,173,177,182,186,192,196,201,205,210,215,219,224,228 mov $1,$0 mov $2,$0 mul $0,2 trn $0,4 add $1,4 lpb $0,1 trn $0,4 add $1,$0 trn $0,2 sub $1,$0 trn $0,3 add $1,1 lpe lpb $2,1 add $1,3 sub $2,1 lpe sub $1,3
24
177
0.664773
889e9b9e3377f80351f2dfee6474805d89aa7ad1
3,840
asm
Assembly
target/cos_117/disasm/iop_overlay1/MULTIPLY.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
49
2020-10-09T12:29:16.000Z
2022-03-12T02:33:35.000Z
target/cos_117/disasm/iop_overlay1/MULTIPLY.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
1
2021-12-29T15:59:25.000Z
2021-12-29T15:59:25.000Z
target/cos_117/disasm/iop_overlay1/MULTIPLY.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
6
2021-04-12T06:10:32.000Z
2022-02-08T23:11:19.000Z
0x0000 (0x000000) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0001 (0x000002) 0x291D- f:00024 d: 285 | OR[285] = A 0x0002 (0x000004) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0003 (0x000006) 0x291E- f:00024 d: 286 | OR[286] = A 0x0004 (0x000008) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0005 (0x00000A) 0x291C- f:00024 d: 284 | OR[284] = A 0x0006 (0x00000C) 0x2118- f:00020 d: 280 | A = OR[280] 0x0007 (0x00000E) 0x8416- f:00102 d: 22 | P = P + 22 (0x001D), A = 0 0x0008 (0x000010) 0x2118- f:00020 d: 280 | A = OR[280] 0x0009 (0x000012) 0x0C01- f:00006 d: 1 | A = A >> 1 (0x0001) 0x000A (0x000014) 0x2918- f:00024 d: 280 | OR[280] = A 0x000B (0x000016) 0x8202- f:00101 d: 2 | P = P + 2 (0x000D), C = 1 0x000C (0x000018) 0x7008- f:00070 d: 8 | P = P + 8 (0x0014) 0x000D (0x00001A) 0x211E- f:00020 d: 286 | A = OR[286] 0x000E (0x00001C) 0x2519- f:00022 d: 281 | A = A + OR[281] 0x000F (0x00001E) 0x291E- f:00024 d: 286 | OR[286] = A 0x0010 (0x000020) 0x0810- f:00004 d: 16 | A = A > 16 (0x0010) 0x0011 (0x000022) 0x251D- f:00022 d: 285 | A = A + OR[285] 0x0012 (0x000024) 0x251C- f:00022 d: 284 | A = A + OR[284] 0x0013 (0x000026) 0x291D- f:00024 d: 285 | OR[285] = A 0x0014 (0x000028) 0x211C- f:00020 d: 284 | A = OR[284] 0x0015 (0x00002A) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001) 0x0016 (0x00002C) 0x291C- f:00024 d: 284 | OR[284] = A 0x0017 (0x00002E) 0x2119- f:00020 d: 281 | A = OR[281] 0x0018 (0x000030) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001) 0x0019 (0x000032) 0x2919- f:00024 d: 281 | OR[281] = A 0x001A (0x000034) 0x8002- f:00100 d: 2 | P = P + 2 (0x001C), C = 0 0x001B (0x000036) 0x2D1C- f:00026 d: 284 | OR[284] = OR[284] + 1 0x001C (0x000038) 0x7216- f:00071 d: 22 | P = P - 22 (0x0006) 0x001D (0x00003A) 0x2005- f:00020 d: 5 | A = OR[5] 0x001E (0x00003C) 0x251A- f:00022 d: 282 | A = A + OR[282] 0x001F (0x00003E) 0x290D- f:00024 d: 269 | OR[269] = A 0x0020 (0x000040) 0x211D- f:00020 d: 285 | A = OR[285] 0x0021 (0x000042) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x0022 (0x000044) 0x2005- f:00020 d: 5 | A = OR[5] 0x0023 (0x000046) 0x251B- f:00022 d: 283 | A = A + OR[283] 0x0024 (0x000048) 0x290D- f:00024 d: 269 | OR[269] = A 0x0025 (0x00004A) 0x211E- f:00020 d: 286 | A = OR[286] 0x0026 (0x00004C) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x0027 (0x00004E) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x0028 (0x000050) 0x291F- f:00024 d: 287 | OR[287] = A 0x0029 (0x000052) 0x111F- f:00010 d: 287 | A = 287 (0x011F) 0x002A (0x000054) 0x5800- f:00054 d: 0 | B = A 0x002B (0x000056) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x002C (0x000058) 0x7C09- f:00076 d: 9 | R = OR[9] 0x002D (0x00005A) 0x0000- f:00000 d: 0 | PASS 0x002E (0x00005C) 0x0000- f:00000 d: 0 | PASS 0x002F (0x00005E) 0x0000- f:00000 d: 0 | PASS
78.367347
79
0.451823
e13c820f885c2ac9e9a3f014bc802d71881a77ba
672
asm
Assembly
programs/oeis/071/A071721.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/071/A071721.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/071/A071721.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A071721: Expansion of (1+x^2*C^2)*C^2, where C = (1-(1-4*x)^(1/2))/(2*x) is g.f. for Catalan numbers, A000108. ; 1,2,6,18,56,180,594,2002,6864,23868,83980,298452,1069776,3863080,14040810,51325650,188574240,695987820,2579248980,9593714460,35804293200,134032593240,503154100020,1893689067348,7144084508256,27010813341400,102332395687704,388428801668712,1476988529802016,5625488570881872 mov $4,2 mov $6,$0 lpb $4 mov $0,$6 sub $4,1 add $0,$4 sub $0,1 cal $0,128634 ; Number of parallel permutations of length n. sub $0,3 mov $2,$4 mod $3,2 add $3,4 mov $5,$0 add $5,$3 lpb $2 mov $1,$5 sub $2,1 lpe lpe lpb $6 sub $1,$5 mov $6,0 lpe
24.888889
273
0.68006
dde9e5dbd650f62db02971aad7947de4aceb5fcf
1,454
asm
Assembly
programs/oeis/053/A053650.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/053/A053650.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/053/A053650.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A053650: Cototient function of n^2. ; 0,2,3,8,5,24,7,32,27,60,11,96,13,112,105,128,17,216,19,240,189,264,23,384,125,364,243,448,29,660,31,512,429,612,385,864,37,760,585,960,41,1260,43,1056,945,1104,47,1536,343,1500,969,1456,53,1944,825,1792,1197,1740,59,2640,61,1984,1701,2048,1105,3036,67,2448,1725,3220,71,3456,73,2812,2625,3040,1309,4212,79,3840,2187,3444,83,5040,1785,3784,2697,4224,89,5940,1729,4416,3069,4512,2185,6144,97,5488,3861,6000,101,7140,103,5824,5985,5724,107,7776,109,7700,4329,7168,113,8892,3105,6960,5265,7080,2737,10560,1331,7564,5289,7936,3125,11340,127,8192,5805,10660,131,12144,3325,9112,8505,9792,137,12972,139,12880,6909,10224,3289,13824,4785,10804,9261,11248,149,16500,151,12160,8721,14476,5425,16848,157,12640,8745,15360,4669,17496,163,13776,14025,13944,167,20160,2197,18020,10773,15136,173,20532,9625,16896,10797,16020,179,23760,181,20020,11529,17664,7585,23436,5049,18048,15309,22420,191,24576,193,19012,19305,21952,197,27324,199,24000,13869,20604,7105,28560,9225,21424,15525,23296,6061,34020,211,22896,15549,23112,10105,31104,8029,23980,16425,30800,6409,33300,223,28672,23625,25764,227,35568,229,32660,25641,27840,233,37908,11985,28320,19197,33796,239,42240,241,31944,19683,30256,18865,40836,7657,31744,21165,37500 lpb $0 mov $2,$0 cal $2,10 ; Euler totient function phi(n): count numbers <= n and prime to n. mov $3,$0 sub $0,1 mul $3,2 sub $3,$0 sub $0,$0 trn $0,17 mov $1,$3 sub $1,$2 lpe mul $1,$3
85.529412
1,207
0.753783
6344e2e4eb040a4e469d2c2272751dd56cfc7793
444
asm
Assembly
programs/oeis/295/A295556.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/295/A295556.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/295/A295556.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A295556: a(n) = 0 for n <= 1; thereafter a(n) = a(floor(n/2)) + a(ceiling(n/2)) + floor(n/2) if n not congruent to 0 mod 4, a(n) = a(n/2-1) + a(n/2+1) + n/2 if n == 0 (mod 4). ; 0,0,1,2,4,5,7,9,11,13,15,17,20,22,25,27,30,32,35,37,40,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,112,115,119,122,126,129,133,136,140,143,147,150,154,157,161,164,168 trn $0,1 seq $0,130251 ; Partial sums of A130249. add $0,1 div $0,2
55.5
196
0.614865
0765e7b650d2a2d9d335a461e19943d0f6d7b6fb
604
asm
Assembly
oeis/078/A078430.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/078/A078430.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/078/A078430.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A078430: Sum of gcd(k^2,n) for 1 <= k <= n. ; Submitted by Christian Krause ; 1,3,5,10,9,15,13,28,33,27,21,50,25,39,45,88,33,99,37,90,65,63,45,140,145,75,153,130,57,135,61,240,105,99,117,330,73,111,125,252,81,195,85,210,297,135,93,440,385,435,165,250,105,459,189,364,185,171,117,450,121,183,429,736,225,315,133,330,225,351,141,924,145,219,725,370,273,375,157,792,945,243,165,650,297,255,285,588,177,891,325,450,305,279,333,1200,193,1155,693,1450 add $0,1 mov $2,$0 lpb $0 cmp $3,0 mov $4,$0 cmp $4,0 cmp $4,0 add $3,$4 mul $3,$0 sub $0,1 pow $3,2 gcd $3,$2 add $1,$3 lpe mov $0,$1
30.2
369
0.645695
3c36b95cf861f55ab21c19eb81ded3e5377b8279
411
asm
Assembly
tvm/test/data/simple.asm
psyomn/sprawl
c330e51efdaec3f4e73d3fb8d44fe88533b04f3b
[ "Apache-2.0" ]
null
null
null
tvm/test/data/simple.asm
psyomn/sprawl
c330e51efdaec3f4e73d3fb8d44fe88533b04f3b
[ "Apache-2.0" ]
null
null
null
tvm/test/data/simple.asm
psyomn/sprawl
c330e51efdaec3f4e73d3fb8d44fe88533b04f3b
[ "Apache-2.0" ]
null
null
null
; Example from book, Figure 7.1, page 179 ; Program to multiply an integer by the constant 6. ; Before execution, an integer must be stored in ; NUMBER. .ORIG x3050 LD R1, SIX LD R2, NUMBER AND R3, R3, #0 ;; clear R3; will contain product ;; Loop AGAIN ADD R3, R3, R2 ADD R1, R1, #-1 BRp AGAIN HALT NUMBER .BLKW 1 SIX .FILL x0006 .END
18.681818
56
0.576642
0b369f9ea0a708f64814bbf3440c4c30e56b429d
585
asm
Assembly
programs/oeis/298/A298011.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/298/A298011.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/298/A298011.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A298011: If n = Sum_{i=1..h} 2^b_i with 0 <= b_1 < ... < b_h, then a(n) = Sum_{i=1..h} i * 2^b_i. ; 0,1,2,5,4,9,10,17,8,17,18,29,20,33,34,49,16,33,34,53,36,57,58,81,40,65,66,93,68,97,98,129,32,65,66,101,68,105,106,145,72,113,114,157,116,161,162,209,80,129,130,181,132,185,186,241,136,193,194,253,196,257,258,321,64,129,130,197,132,201,202,273,136,209,210,285,212,289,290,369,144,225,226,309,228,313,314,401,232,321,322,413,324,417,418,513,160,257,258,357 mul $0,2 lpb $0 add $1,$0 mov $2,$0 mov $3,1 lpb $2 dif $2,2 mul $3,2 lpe sub $0,$3 lpe div $1,2 mov $0,$1
34.411765
356
0.622222
066d1ff2a4153c62c6a95cc28b1a50d393a031ba
171
asm
Assembly
libsrc/target/smc777/graphics/w_xorpixl_MODE4.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/target/smc777/graphics/w_xorpixl_MODE4.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/target/smc777/graphics/w_xorpixl_MODE4.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ; XorPlot pixel at (x,y) coordinate. SECTION code_clib PUBLIC w_xorpixel_MODE4 defc NEEDxor = 1 .w_xorpixel_MODE4 INCLUDE "pixel_MODE4.inc"
11.4
38
0.660819
43755a2fd91387da6e3acfaf88b84e04ff7ff916
6,023
asm
Assembly
Esercizio 3/esercizio3.asm
eliamercatanti/Progetto-MIPS
244df26f80a3f734bdeceff4461afc1ddd6c9b58
[ "MIT" ]
1
2019-11-21T01:18:17.000Z
2019-11-21T01:18:17.000Z
Esercizio 3/esercizio3.asm
eliamercatanti/Progetto-MIPS
244df26f80a3f734bdeceff4461afc1ddd6c9b58
[ "MIT" ]
null
null
null
Esercizio 3/esercizio3.asm
eliamercatanti/Progetto-MIPS
244df26f80a3f734bdeceff4461afc1ddd6c9b58
[ "MIT" ]
null
null
null
# Title: Esercizio 3 - Conversione da Binario a Naturale # Authors: Bucciero Samuele, Mercatanti Elia, Pinto Andrea # E-mails: samuele.bucciero@gmail.com, eliamercatanti@yahoo.it, andrea.pinto1@stud.unifi.it # Date: 31/08/2014 ################################## Data segment ##################################################################################################################### .data head: .asciiz "Esercizio 3 - Convertitore di Stringhe da Binario in Decimale.\n" insert: .asciiz "\nInserire il carattere: " err: .asciiz "\n\nIl carattere inserito e' errato, si prega di inserirne un altro." maxLimitReach: .asciiz "\n\nHai inserito il numero massimo di elementi, procedo con il convertire il numero in decimale" binary: .asciiz "\n\nBinario puro: [" closeQ: .asciiz "]" decimal: .asciiz "\nNumero decimale: " arrayB: .byte 0:10 ################################## Code segment ##################################################################################################################### .text .globl main main: li $s0, -1 # s0 contiene il numero massimo di elementi meno uno li $s1, 0 # s1 viene utilizzato per caricare il risultato della conversione li $s2, 0 # s2 viene utilizzato per scorrere il vettore li $a1, 0 # a1 viene utilizzato per scorrere il vettore la $a0, head li $v0, 4 syscall input: beq $s0, 9, maxLimit # controlla se è possibile inserire ulteriori caratteri, nel caso passa all'etichetta "maxLimit" la $a0, insert # stampa la stringa "insert" li $v0, 4 syscall li $v0, 12 # legge il carattere in input syscall jal inputController # controlla se il carattere inserito è accettabile addi $v0, $v0, -48 # essendo $v0 è un carattere, al suo interno è memorizzato il codice ascii di '0' e '1'. Sottraendo 48 si ottiene, appunto, '0' o '1' addi $s0, $s0, 1 # incremento il numero di elementi inseriti sb $v0, arrayB($s2) # memorizzo il carattere all'interno di un vettore addi $s2, $s2, 1 # incremento l'indirizzo di base del vettore j input # ripeto il ciclo input inputController: # funzione per controllare che il contenuto di $v0 puo' essere accettato o meno beq $v0, 48, inputOk # se il contenuto di $v0 è uguale a 48 (=0) l'inserimento è corretto beq $v0, 49, inputOk # se il contenuto di $v0 è uguale a 49 (=1) l'inserimento è corretto beq $v0, 120, inputEnd # se il contenuto di $v0 è uguale a 120 (=x) l'inserimento è corretto e l'input viene interrotto inputErr: la $a0, err # stampa la stringa "err" li $v0, 4 syscall j input # ritorna ad 'input' inputOk: #se l'inserimento e' OK, non ci sono problemi e si ritorna all'etichetta input jr $ra maxLimit: la $a0, maxLimitReach #stampa la stringa "maxLimitReach" li $v0, 4 syscall inputEnd: jal conversion # viene chiamata la funzione conversion j printBinary # salto all'etichetta printBinary conversion: #funzione necessaria per convertire il numero da binario a decimale addi $sp, $sp, -4 # push sullo stack per salvare le variabili sw $ra, 0($sp) # salvo $ra per il ritorno lb $a3, arrayB($a1) # salvo il contenuto di v[k] in $a3 beq $a1, $s0, prereturn # controllo se siamo arrivati all'ultimo elemento del vettore, nel caso passa all'etichetta "prereturn" sub $a2, $s0 , $a1 # calcolo a2 sottraendo l'elemento corrente al numero massimo di elementi (m-k) addi $a1, $a1, 1 # incremento k jal mul2 # chiamo la funzione mul2 add $s1, $s1, $v1 # sommo al risultato il valore di ritorno della funzione mul2 jal conversion # chiamo la funzione conversion j return2 # salto a return2 prereturn: add $s1, $s1, $a3 # aggiungo v[k] al totale return2: lw $ra, 0($sp) # riprendo il ritorno addi $sp, $sp, 4 # pop sullo stack per liberare le variabili jr $ra mul2: #funzione necessaria per calcolare il corretto valore in decimale di v[k] addi $sp, $sp, -4 # push sullo stack per salvare le variabili sw $ra, 0($sp) # salvo $ra per il ritorno beq $a3, $zero, mul2base1 # controllo se il valore di v[k] è uguale a zero, nel caso passa all'etichetta "mul2base1" li $t0, 1 beq $a2, $t0, mul2base2 # controllo se il valore di 'm-k' è uguale a uno, nel caso passa all'etichetta "mul2base2" add $a3, $a3, $a3 # calcolo il nuovo v[k] come 2*v[k] addi $a2, $a2, -1 # decremento il valore di 'm-k' di uno jal mul2 # chiamo la funzione mul2 j mul2End # salto all'etichetta mul2End mul2base1: #primo caso base, ci entra solo se v[k] = 0 li $v1, 0 # setta $v1 (il valore di ritorno) uguale a zero j mul2End # salta all'etichetta mul2End mul2base2: #secondo caso base, ci entra solo se $a2 = 1 add $v1, $a3, $a3 # calcolo $v1 (il valore di ritorno) come 2*v[k] mul2End: #funzione necessaria per il ritorno lw $ra, 0($sp) # riprendo il ritorno addi $sp, $sp, 4 # pop sullo stack per liberare le variabili jr $ra # salto al valorelore del registro $ra loopBinary: #funzione necessaria per visualizzare i singoli elementi del vettore addi $s2, $s2, 1 # incrementa l'indirizzo di base del vettore lb $a0, arrayB($s2) # stampa il contenuto di v[k] li $v0, 1 syscall bne $s2, $s0, loopBinary # controllare se siamo arrivati all'ultimo elemento del vettore, nel caso contrario richiama se stessa jr $ra # salto al velore del registro $ra printBinary: #funzione necessaria per la stampa del numero in binario puro la $a0, binary # stampa la stringa "binary" li $v0, 4 syscall li $s2, -1 # setta il contenuto di $s2 a -1 jal loopBinary # chiama la funzione loopBinary la $a0, closeQ # stampa la stringa "closeQ" li $v0, 4 syscall printConv: #funzione necessaria per la stampa del numero naturale corrispondente al binario puro la $a0, decimal # stampa la stringa "decimal" li $v0, 4 syscall move $a0, $s1 # stampa il contenuto di $s1, ovvero il risultato dell'etichetta "conversion" li $v0, 1 syscall exit: li $v0, 10 #uscita dal programma syscall
41.826389
165
0.663623
4e766cbae65055a97b85e51c36ab80ea25b080ff
91
asm
Assembly
tests/symbol_label_nested/14.asm
NullMember/customasm
6e34d6432583a41278e6b3596f1817ae82149531
[ "Apache-2.0" ]
414
2016-10-14T22:39:20.000Z
2022-03-30T07:52:44.000Z
tests/symbol_label_nested/14.asm
NullMember/customasm
6e34d6432583a41278e6b3596f1817ae82149531
[ "Apache-2.0" ]
100
2018-03-22T16:12:24.000Z
2022-03-26T09:19:23.000Z
tests/symbol_label_nested/14.asm
NullMember/customasm
6e34d6432583a41278e6b3596f1817ae82149531
[ "Apache-2.0" ]
47
2017-06-29T15:12:13.000Z
2022-03-10T04:50:51.000Z
#ruledef test { ld {x} => 0x55 @ x`8 } .local1: ; error: nesting level ld .local1
11.375
31
0.56044
8246176402c4ca7da9583cad31ef89f229710f74
263
asm
Assembly
base/boot/lib/i386/lnkconst.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
base/boot/lib/i386/lnkconst.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
base/boot/lib/i386/lnkconst.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
.386p _DATA segment dword use32 public 'DATA' extrn osloader_EXPORTS:DWORD extrn header:DWORD public _osloader_EXPORTS public _header _osloader_EXPORTS DD osloader_EXPORTS _header DD header _DATA ends end
13.842105
40
0.669202
e7ef9ea7d247d3577a4108bf22c4ce1bcdb0efb2
8,103
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_556.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_556.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_556.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x11e84, %r13 nop add $61056, %rbx movl $0x61626364, (%r13) nop nop nop nop sub %rbp, %rbp lea addresses_A_ht+0x17b04, %rsi lea addresses_normal_ht+0xa324, %rdi nop nop nop xor %r11, %r11 mov $34, %rcx rep movsb nop sub $43791, %r8 lea addresses_normal_ht+0x13abc, %rbp nop cmp %rdi, %rdi movups (%rbp), %xmm7 vpextrq $0, %xmm7, %r11 cmp $60079, %r13 lea addresses_A_ht+0x14104, %rsi lea addresses_normal_ht+0x1eccd, %rdi clflush (%rdi) xor %r8, %r8 mov $71, %rcx rep movsl nop sub %rcx, %rcx lea addresses_WC_ht+0x9d3e, %rsi lea addresses_WC_ht+0x7f4, %rdi nop nop nop nop sub $1552, %rbx mov $123, %rcx rep movsl nop nop xor $61681, %rcx lea addresses_UC_ht+0x1488c, %rbx nop nop nop nop nop sub %rbp, %rbp mov $0x6162636465666768, %r8 movq %r8, %xmm0 movups %xmm0, (%rbx) nop nop nop nop cmp $4151, %rcx lea addresses_WT_ht+0xce84, %rbp nop xor $15402, %r8 movb (%rbp), %r11b nop nop and %rcx, %rcx lea addresses_WC_ht+0x15274, %rdi nop nop nop nop nop and $15579, %r8 mov (%rdi), %ecx nop nop nop nop dec %rcx lea addresses_WT_ht+0x1b904, %rsi nop nop and %r13, %r13 mov (%rsi), %edi nop nop sub $15627, %r13 lea addresses_UC_ht+0x584, %rsi nop nop nop nop xor %rbx, %rbx mov $0x6162636465666768, %rcx movq %rcx, (%rsi) nop nop nop nop nop inc %rcx lea addresses_WC_ht+0x422c, %r11 nop nop nop and %rdi, %rdi and $0xffffffffffffffc0, %r11 vmovaps (%r11), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %rbx nop nop nop nop nop sub %rdi, %rdi lea addresses_WC_ht+0x10304, %rsi lea addresses_WC_ht+0x1d84, %rdi nop nop nop add $20763, %rbp mov $52, %rcx rep movsq nop inc %rcx lea addresses_UC_ht+0x1a344, %rsi lea addresses_WC_ht+0x1d04, %rdi nop nop nop nop inc %rbx mov $41, %rcx rep movsw nop nop nop nop nop dec %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r8 push %r9 push %rax push %rbp push %rbx push %rcx // Store lea addresses_A+0x1d044, %rbx nop nop nop sub $20070, %r8 movw $0x5152, (%rbx) nop nop nop add %r9, %r9 // Store mov $0x15dc940000000114, %rbp nop nop nop nop dec %rcx mov $0x5152535455565758, %r9 movq %r9, %xmm0 vmovups %ymm0, (%rbp) xor %r8, %r8 // Store lea addresses_D+0x6668, %rax sub %r9, %r9 movw $0x5152, (%rax) nop nop and $13499, %rax // Faulty Load mov $0x38477d0000000f04, %r8 nop nop nop nop nop xor $41650, %rax mov (%r8), %r11 lea oracles, %rbp and $0xff, %r11 shlq $12, %r11 mov (%rbp,%r11,1), %r11 pop %rcx pop %rbx pop %rbp pop %rax pop %r9 pop %r8 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': True, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 7, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 7, 'size': 8, 'same': False, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 2, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
32.027668
2,999
0.65667
0b8e32c31f4d07c98134984c0d055fd32a27998f
417
asm
Assembly
programs/oeis/267/A267691.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/267/A267691.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/267/A267691.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A267691: a(n) = (n + 1)*(6*n^4 - 21*n^3 + 31*n^2 - 31*n + 30)/30. ; 1,1,2,18,99,355,980,2276,4677,8773,15334,25334,39975,60711,89272,127688,178313,243849,327370,432346,562667,722667,917148,1151404,1431245,1763021,2153646,2610622,3142063,3756719,4464000,5274000,6197521,7246097,8432018,9768354 mov $2,$0 mov $4,$0 add $4,1 lpb $4 mov $0,$2 sub $4,1 sub $0,$4 mov $3,$0 sub $3,1 pow $3,4 add $1,$3 lpe
26.0625
226
0.659472
2cec7941c4f4c56170cded0c5c6fe7384da4a830
32,770
asm
Assembly
p2/xv6/ln.asm
szhu0513/-xv6-New-System-Call---Screenshot
f04654f9bba36da1e9ba14b4f740588689d81cb0
[ "Xnet", "Linux-OpenIB", "X11" ]
null
null
null
p2/xv6/ln.asm
szhu0513/-xv6-New-System-Call---Screenshot
f04654f9bba36da1e9ba14b4f740588689d81cb0
[ "Xnet", "Linux-OpenIB", "X11" ]
null
null
null
p2/xv6/ln.asm
szhu0513/-xv6-New-System-Call---Screenshot
f04654f9bba36da1e9ba14b4f740588689d81cb0
[ "Xnet", "Linux-OpenIB", "X11" ]
null
null
null
_ln: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "stat.h" #include "user.h" int main(int argc, char *argv[]) { 0: 8d 4c 24 04 lea 0x4(%esp),%ecx 4: 83 e4 f0 and $0xfffffff0,%esp 7: ff 71 fc pushl -0x4(%ecx) a: 55 push %ebp b: 89 e5 mov %esp,%ebp d: 53 push %ebx e: 51 push %ecx f: 8b 59 04 mov 0x4(%ecx),%ebx if(argc != 3){ 12: 83 39 03 cmpl $0x3,(%ecx) 15: 74 14 je 2b <main+0x2b> printf(2, "Usage: ln old new\n"); 17: 83 ec 08 sub $0x8,%esp 1a: 68 ec 05 00 00 push $0x5ec 1f: 6a 02 push $0x2 21: e8 0d 03 00 00 call 333 <printf> exit(); 26: e8 be 01 00 00 call 1e9 <exit> } if(link(argv[1], argv[2]) < 0) 2b: 83 ec 08 sub $0x8,%esp 2e: ff 73 08 pushl 0x8(%ebx) 31: ff 73 04 pushl 0x4(%ebx) 34: e8 10 02 00 00 call 249 <link> 39: 83 c4 10 add $0x10,%esp 3c: 85 c0 test %eax,%eax 3e: 78 05 js 45 <main+0x45> printf(2, "link %s %s: failed\n", argv[1], argv[2]); exit(); 40: e8 a4 01 00 00 call 1e9 <exit> printf(2, "link %s %s: failed\n", argv[1], argv[2]); 45: ff 73 08 pushl 0x8(%ebx) 48: ff 73 04 pushl 0x4(%ebx) 4b: 68 ff 05 00 00 push $0x5ff 50: 6a 02 push $0x2 52: e8 dc 02 00 00 call 333 <printf> 57: 83 c4 10 add $0x10,%esp 5a: eb e4 jmp 40 <main+0x40> 0000005c <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 5c: 55 push %ebp 5d: 89 e5 mov %esp,%ebp 5f: 53 push %ebx 60: 8b 45 08 mov 0x8(%ebp),%eax 63: 8b 4d 0c mov 0xc(%ebp),%ecx char *os; os = s; while((*s++ = *t++) != 0) 66: 89 c2 mov %eax,%edx 68: 0f b6 19 movzbl (%ecx),%ebx 6b: 88 1a mov %bl,(%edx) 6d: 8d 52 01 lea 0x1(%edx),%edx 70: 8d 49 01 lea 0x1(%ecx),%ecx 73: 84 db test %bl,%bl 75: 75 f1 jne 68 <strcpy+0xc> ; return os; } 77: 5b pop %ebx 78: 5d pop %ebp 79: c3 ret 0000007a <strcmp>: int strcmp(const char *p, const char *q) { 7a: 55 push %ebp 7b: 89 e5 mov %esp,%ebp 7d: 8b 4d 08 mov 0x8(%ebp),%ecx 80: 8b 55 0c mov 0xc(%ebp),%edx while(*p && *p == *q) 83: eb 06 jmp 8b <strcmp+0x11> p++, q++; 85: 83 c1 01 add $0x1,%ecx 88: 83 c2 01 add $0x1,%edx while(*p && *p == *q) 8b: 0f b6 01 movzbl (%ecx),%eax 8e: 84 c0 test %al,%al 90: 74 04 je 96 <strcmp+0x1c> 92: 3a 02 cmp (%edx),%al 94: 74 ef je 85 <strcmp+0xb> return (uchar)*p - (uchar)*q; 96: 0f b6 c0 movzbl %al,%eax 99: 0f b6 12 movzbl (%edx),%edx 9c: 29 d0 sub %edx,%eax } 9e: 5d pop %ebp 9f: c3 ret 000000a0 <strlen>: uint strlen(const char *s) { a0: 55 push %ebp a1: 89 e5 mov %esp,%ebp a3: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) a6: ba 00 00 00 00 mov $0x0,%edx ab: eb 03 jmp b0 <strlen+0x10> ad: 83 c2 01 add $0x1,%edx b0: 89 d0 mov %edx,%eax b2: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) b6: 75 f5 jne ad <strlen+0xd> ; return n; } b8: 5d pop %ebp b9: c3 ret 000000ba <memset>: void* memset(void *dst, int c, uint n) { ba: 55 push %ebp bb: 89 e5 mov %esp,%ebp bd: 57 push %edi be: 8b 55 08 mov 0x8(%ebp),%edx } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : c1: 89 d7 mov %edx,%edi c3: 8b 4d 10 mov 0x10(%ebp),%ecx c6: 8b 45 0c mov 0xc(%ebp),%eax c9: fc cld ca: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } cc: 89 d0 mov %edx,%eax ce: 5f pop %edi cf: 5d pop %ebp d0: c3 ret 000000d1 <strchr>: char* strchr(const char *s, char c) { d1: 55 push %ebp d2: 89 e5 mov %esp,%ebp d4: 8b 45 08 mov 0x8(%ebp),%eax d7: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx for(; *s; s++) db: 0f b6 10 movzbl (%eax),%edx de: 84 d2 test %dl,%dl e0: 74 09 je eb <strchr+0x1a> if(*s == c) e2: 38 ca cmp %cl,%dl e4: 74 0a je f0 <strchr+0x1f> for(; *s; s++) e6: 83 c0 01 add $0x1,%eax e9: eb f0 jmp db <strchr+0xa> return (char*)s; return 0; eb: b8 00 00 00 00 mov $0x0,%eax } f0: 5d pop %ebp f1: c3 ret 000000f2 <gets>: char* gets(char *buf, int max) { f2: 55 push %ebp f3: 89 e5 mov %esp,%ebp f5: 57 push %edi f6: 56 push %esi f7: 53 push %ebx f8: 83 ec 1c sub $0x1c,%esp fb: 8b 7d 08 mov 0x8(%ebp),%edi int i, cc; char c; for(i=0; i+1 < max; ){ fe: bb 00 00 00 00 mov $0x0,%ebx 103: 8d 73 01 lea 0x1(%ebx),%esi 106: 3b 75 0c cmp 0xc(%ebp),%esi 109: 7d 2e jge 139 <gets+0x47> cc = read(0, &c, 1); 10b: 83 ec 04 sub $0x4,%esp 10e: 6a 01 push $0x1 110: 8d 45 e7 lea -0x19(%ebp),%eax 113: 50 push %eax 114: 6a 00 push $0x0 116: e8 e6 00 00 00 call 201 <read> if(cc < 1) 11b: 83 c4 10 add $0x10,%esp 11e: 85 c0 test %eax,%eax 120: 7e 17 jle 139 <gets+0x47> break; buf[i++] = c; 122: 0f b6 45 e7 movzbl -0x19(%ebp),%eax 126: 88 04 1f mov %al,(%edi,%ebx,1) if(c == '\n' || c == '\r') 129: 3c 0a cmp $0xa,%al 12b: 0f 94 c2 sete %dl 12e: 3c 0d cmp $0xd,%al 130: 0f 94 c0 sete %al buf[i++] = c; 133: 89 f3 mov %esi,%ebx if(c == '\n' || c == '\r') 135: 08 c2 or %al,%dl 137: 74 ca je 103 <gets+0x11> break; } buf[i] = '\0'; 139: c6 04 1f 00 movb $0x0,(%edi,%ebx,1) return buf; } 13d: 89 f8 mov %edi,%eax 13f: 8d 65 f4 lea -0xc(%ebp),%esp 142: 5b pop %ebx 143: 5e pop %esi 144: 5f pop %edi 145: 5d pop %ebp 146: c3 ret 00000147 <stat>: int stat(const char *n, struct stat *st) { 147: 55 push %ebp 148: 89 e5 mov %esp,%ebp 14a: 56 push %esi 14b: 53 push %ebx int fd; int r; fd = open(n, O_RDONLY); 14c: 83 ec 08 sub $0x8,%esp 14f: 6a 00 push $0x0 151: ff 75 08 pushl 0x8(%ebp) 154: e8 d0 00 00 00 call 229 <open> if(fd < 0) 159: 83 c4 10 add $0x10,%esp 15c: 85 c0 test %eax,%eax 15e: 78 24 js 184 <stat+0x3d> 160: 89 c3 mov %eax,%ebx return -1; r = fstat(fd, st); 162: 83 ec 08 sub $0x8,%esp 165: ff 75 0c pushl 0xc(%ebp) 168: 50 push %eax 169: e8 d3 00 00 00 call 241 <fstat> 16e: 89 c6 mov %eax,%esi close(fd); 170: 89 1c 24 mov %ebx,(%esp) 173: e8 99 00 00 00 call 211 <close> return r; 178: 83 c4 10 add $0x10,%esp } 17b: 89 f0 mov %esi,%eax 17d: 8d 65 f8 lea -0x8(%ebp),%esp 180: 5b pop %ebx 181: 5e pop %esi 182: 5d pop %ebp 183: c3 ret return -1; 184: be ff ff ff ff mov $0xffffffff,%esi 189: eb f0 jmp 17b <stat+0x34> 0000018b <atoi>: int atoi(const char *s) { 18b: 55 push %ebp 18c: 89 e5 mov %esp,%ebp 18e: 53 push %ebx 18f: 8b 4d 08 mov 0x8(%ebp),%ecx int n; n = 0; 192: b8 00 00 00 00 mov $0x0,%eax while('0' <= *s && *s <= '9') 197: eb 10 jmp 1a9 <atoi+0x1e> n = n*10 + *s++ - '0'; 199: 8d 1c 80 lea (%eax,%eax,4),%ebx 19c: 8d 04 1b lea (%ebx,%ebx,1),%eax 19f: 83 c1 01 add $0x1,%ecx 1a2: 0f be d2 movsbl %dl,%edx 1a5: 8d 44 02 d0 lea -0x30(%edx,%eax,1),%eax while('0' <= *s && *s <= '9') 1a9: 0f b6 11 movzbl (%ecx),%edx 1ac: 8d 5a d0 lea -0x30(%edx),%ebx 1af: 80 fb 09 cmp $0x9,%bl 1b2: 76 e5 jbe 199 <atoi+0xe> return n; } 1b4: 5b pop %ebx 1b5: 5d pop %ebp 1b6: c3 ret 000001b7 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 1b7: 55 push %ebp 1b8: 89 e5 mov %esp,%ebp 1ba: 56 push %esi 1bb: 53 push %ebx 1bc: 8b 45 08 mov 0x8(%ebp),%eax 1bf: 8b 5d 0c mov 0xc(%ebp),%ebx 1c2: 8b 55 10 mov 0x10(%ebp),%edx char *dst; const char *src; dst = vdst; 1c5: 89 c1 mov %eax,%ecx src = vsrc; while(n-- > 0) 1c7: eb 0d jmp 1d6 <memmove+0x1f> *dst++ = *src++; 1c9: 0f b6 13 movzbl (%ebx),%edx 1cc: 88 11 mov %dl,(%ecx) 1ce: 8d 5b 01 lea 0x1(%ebx),%ebx 1d1: 8d 49 01 lea 0x1(%ecx),%ecx while(n-- > 0) 1d4: 89 f2 mov %esi,%edx 1d6: 8d 72 ff lea -0x1(%edx),%esi 1d9: 85 d2 test %edx,%edx 1db: 7f ec jg 1c9 <memmove+0x12> return vdst; } 1dd: 5b pop %ebx 1de: 5e pop %esi 1df: 5d pop %ebp 1e0: c3 ret 000001e1 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 1e1: b8 01 00 00 00 mov $0x1,%eax 1e6: cd 40 int $0x40 1e8: c3 ret 000001e9 <exit>: SYSCALL(exit) 1e9: b8 02 00 00 00 mov $0x2,%eax 1ee: cd 40 int $0x40 1f0: c3 ret 000001f1 <wait>: SYSCALL(wait) 1f1: b8 03 00 00 00 mov $0x3,%eax 1f6: cd 40 int $0x40 1f8: c3 ret 000001f9 <pipe>: SYSCALL(pipe) 1f9: b8 04 00 00 00 mov $0x4,%eax 1fe: cd 40 int $0x40 200: c3 ret 00000201 <read>: SYSCALL(read) 201: b8 05 00 00 00 mov $0x5,%eax 206: cd 40 int $0x40 208: c3 ret 00000209 <write>: SYSCALL(write) 209: b8 10 00 00 00 mov $0x10,%eax 20e: cd 40 int $0x40 210: c3 ret 00000211 <close>: SYSCALL(close) 211: b8 15 00 00 00 mov $0x15,%eax 216: cd 40 int $0x40 218: c3 ret 00000219 <kill>: SYSCALL(kill) 219: b8 06 00 00 00 mov $0x6,%eax 21e: cd 40 int $0x40 220: c3 ret 00000221 <exec>: SYSCALL(exec) 221: b8 07 00 00 00 mov $0x7,%eax 226: cd 40 int $0x40 228: c3 ret 00000229 <open>: SYSCALL(open) 229: b8 0f 00 00 00 mov $0xf,%eax 22e: cd 40 int $0x40 230: c3 ret 00000231 <mknod>: SYSCALL(mknod) 231: b8 11 00 00 00 mov $0x11,%eax 236: cd 40 int $0x40 238: c3 ret 00000239 <unlink>: SYSCALL(unlink) 239: b8 12 00 00 00 mov $0x12,%eax 23e: cd 40 int $0x40 240: c3 ret 00000241 <fstat>: SYSCALL(fstat) 241: b8 08 00 00 00 mov $0x8,%eax 246: cd 40 int $0x40 248: c3 ret 00000249 <link>: SYSCALL(link) 249: b8 13 00 00 00 mov $0x13,%eax 24e: cd 40 int $0x40 250: c3 ret 00000251 <mkdir>: SYSCALL(mkdir) 251: b8 14 00 00 00 mov $0x14,%eax 256: cd 40 int $0x40 258: c3 ret 00000259 <chdir>: SYSCALL(chdir) 259: b8 09 00 00 00 mov $0x9,%eax 25e: cd 40 int $0x40 260: c3 ret 00000261 <dup>: SYSCALL(dup) 261: b8 0a 00 00 00 mov $0xa,%eax 266: cd 40 int $0x40 268: c3 ret 00000269 <getpid>: SYSCALL(getpid) 269: b8 0b 00 00 00 mov $0xb,%eax 26e: cd 40 int $0x40 270: c3 ret 00000271 <sbrk>: SYSCALL(sbrk) 271: b8 0c 00 00 00 mov $0xc,%eax 276: cd 40 int $0x40 278: c3 ret 00000279 <sleep>: SYSCALL(sleep) 279: b8 0d 00 00 00 mov $0xd,%eax 27e: cd 40 int $0x40 280: c3 ret 00000281 <uptime>: SYSCALL(uptime) 281: b8 0e 00 00 00 mov $0xe,%eax 286: cd 40 int $0x40 288: c3 ret 00000289 <getofilecnt>: SYSCALL(getofilecnt) 289: b8 16 00 00 00 mov $0x16,%eax 28e: cd 40 int $0x40 290: c3 ret 00000291 <getofilenext>: SYSCALL(getofilenext) 291: b8 17 00 00 00 mov $0x17,%eax 296: cd 40 int $0x40 298: c3 ret 00000299 <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 299: 55 push %ebp 29a: 89 e5 mov %esp,%ebp 29c: 83 ec 1c sub $0x1c,%esp 29f: 88 55 f4 mov %dl,-0xc(%ebp) write(fd, &c, 1); 2a2: 6a 01 push $0x1 2a4: 8d 55 f4 lea -0xc(%ebp),%edx 2a7: 52 push %edx 2a8: 50 push %eax 2a9: e8 5b ff ff ff call 209 <write> } 2ae: 83 c4 10 add $0x10,%esp 2b1: c9 leave 2b2: c3 ret 000002b3 <printint>: static void printint(int fd, int xx, int base, int sgn) { 2b3: 55 push %ebp 2b4: 89 e5 mov %esp,%ebp 2b6: 57 push %edi 2b7: 56 push %esi 2b8: 53 push %ebx 2b9: 83 ec 2c sub $0x2c,%esp 2bc: 89 c7 mov %eax,%edi char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 2be: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 2c2: 0f 95 c3 setne %bl 2c5: 89 d0 mov %edx,%eax 2c7: c1 e8 1f shr $0x1f,%eax 2ca: 84 c3 test %al,%bl 2cc: 74 10 je 2de <printint+0x2b> neg = 1; x = -xx; 2ce: f7 da neg %edx neg = 1; 2d0: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp) } else { x = xx; } i = 0; 2d7: be 00 00 00 00 mov $0x0,%esi 2dc: eb 0b jmp 2e9 <printint+0x36> neg = 0; 2de: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) 2e5: eb f0 jmp 2d7 <printint+0x24> do{ buf[i++] = digits[x % base]; 2e7: 89 c6 mov %eax,%esi 2e9: 89 d0 mov %edx,%eax 2eb: ba 00 00 00 00 mov $0x0,%edx 2f0: f7 f1 div %ecx 2f2: 89 c3 mov %eax,%ebx 2f4: 8d 46 01 lea 0x1(%esi),%eax 2f7: 0f b6 92 1c 06 00 00 movzbl 0x61c(%edx),%edx 2fe: 88 54 35 d8 mov %dl,-0x28(%ebp,%esi,1) }while((x /= base) != 0); 302: 89 da mov %ebx,%edx 304: 85 db test %ebx,%ebx 306: 75 df jne 2e7 <printint+0x34> 308: 89 c3 mov %eax,%ebx if(neg) 30a: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 30e: 74 16 je 326 <printint+0x73> buf[i++] = '-'; 310: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1) 315: 8d 5e 02 lea 0x2(%esi),%ebx 318: eb 0c jmp 326 <printint+0x73> while(--i >= 0) putc(fd, buf[i]); 31a: 0f be 54 1d d8 movsbl -0x28(%ebp,%ebx,1),%edx 31f: 89 f8 mov %edi,%eax 321: e8 73 ff ff ff call 299 <putc> while(--i >= 0) 326: 83 eb 01 sub $0x1,%ebx 329: 79 ef jns 31a <printint+0x67> } 32b: 83 c4 2c add $0x2c,%esp 32e: 5b pop %ebx 32f: 5e pop %esi 330: 5f pop %edi 331: 5d pop %ebp 332: c3 ret 00000333 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, const char *fmt, ...) { 333: 55 push %ebp 334: 89 e5 mov %esp,%ebp 336: 57 push %edi 337: 56 push %esi 338: 53 push %ebx 339: 83 ec 1c sub $0x1c,%esp char *s; int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; 33c: 8d 45 10 lea 0x10(%ebp),%eax 33f: 89 45 e4 mov %eax,-0x1c(%ebp) state = 0; 342: be 00 00 00 00 mov $0x0,%esi for(i = 0; fmt[i]; i++){ 347: bb 00 00 00 00 mov $0x0,%ebx 34c: eb 14 jmp 362 <printf+0x2f> c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ state = '%'; } else { putc(fd, c); 34e: 89 fa mov %edi,%edx 350: 8b 45 08 mov 0x8(%ebp),%eax 353: e8 41 ff ff ff call 299 <putc> 358: eb 05 jmp 35f <printf+0x2c> } } else if(state == '%'){ 35a: 83 fe 25 cmp $0x25,%esi 35d: 74 25 je 384 <printf+0x51> for(i = 0; fmt[i]; i++){ 35f: 83 c3 01 add $0x1,%ebx 362: 8b 45 0c mov 0xc(%ebp),%eax 365: 0f b6 04 18 movzbl (%eax,%ebx,1),%eax 369: 84 c0 test %al,%al 36b: 0f 84 23 01 00 00 je 494 <printf+0x161> c = fmt[i] & 0xff; 371: 0f be f8 movsbl %al,%edi 374: 0f b6 c0 movzbl %al,%eax if(state == 0){ 377: 85 f6 test %esi,%esi 379: 75 df jne 35a <printf+0x27> if(c == '%'){ 37b: 83 f8 25 cmp $0x25,%eax 37e: 75 ce jne 34e <printf+0x1b> state = '%'; 380: 89 c6 mov %eax,%esi 382: eb db jmp 35f <printf+0x2c> if(c == 'd'){ 384: 83 f8 64 cmp $0x64,%eax 387: 74 49 je 3d2 <printf+0x9f> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ 389: 83 f8 78 cmp $0x78,%eax 38c: 0f 94 c1 sete %cl 38f: 83 f8 70 cmp $0x70,%eax 392: 0f 94 c2 sete %dl 395: 08 d1 or %dl,%cl 397: 75 63 jne 3fc <printf+0xc9> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 399: 83 f8 73 cmp $0x73,%eax 39c: 0f 84 84 00 00 00 je 426 <printf+0xf3> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 3a2: 83 f8 63 cmp $0x63,%eax 3a5: 0f 84 b7 00 00 00 je 462 <printf+0x12f> putc(fd, *ap); ap++; } else if(c == '%'){ 3ab: 83 f8 25 cmp $0x25,%eax 3ae: 0f 84 cc 00 00 00 je 480 <printf+0x14d> putc(fd, c); } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 3b4: ba 25 00 00 00 mov $0x25,%edx 3b9: 8b 45 08 mov 0x8(%ebp),%eax 3bc: e8 d8 fe ff ff call 299 <putc> putc(fd, c); 3c1: 89 fa mov %edi,%edx 3c3: 8b 45 08 mov 0x8(%ebp),%eax 3c6: e8 ce fe ff ff call 299 <putc> } state = 0; 3cb: be 00 00 00 00 mov $0x0,%esi 3d0: eb 8d jmp 35f <printf+0x2c> printint(fd, *ap, 10, 1); 3d2: 8b 7d e4 mov -0x1c(%ebp),%edi 3d5: 8b 17 mov (%edi),%edx 3d7: 83 ec 0c sub $0xc,%esp 3da: 6a 01 push $0x1 3dc: b9 0a 00 00 00 mov $0xa,%ecx 3e1: 8b 45 08 mov 0x8(%ebp),%eax 3e4: e8 ca fe ff ff call 2b3 <printint> ap++; 3e9: 83 c7 04 add $0x4,%edi 3ec: 89 7d e4 mov %edi,-0x1c(%ebp) 3ef: 83 c4 10 add $0x10,%esp state = 0; 3f2: be 00 00 00 00 mov $0x0,%esi 3f7: e9 63 ff ff ff jmp 35f <printf+0x2c> printint(fd, *ap, 16, 0); 3fc: 8b 7d e4 mov -0x1c(%ebp),%edi 3ff: 8b 17 mov (%edi),%edx 401: 83 ec 0c sub $0xc,%esp 404: 6a 00 push $0x0 406: b9 10 00 00 00 mov $0x10,%ecx 40b: 8b 45 08 mov 0x8(%ebp),%eax 40e: e8 a0 fe ff ff call 2b3 <printint> ap++; 413: 83 c7 04 add $0x4,%edi 416: 89 7d e4 mov %edi,-0x1c(%ebp) 419: 83 c4 10 add $0x10,%esp state = 0; 41c: be 00 00 00 00 mov $0x0,%esi 421: e9 39 ff ff ff jmp 35f <printf+0x2c> s = (char*)*ap; 426: 8b 45 e4 mov -0x1c(%ebp),%eax 429: 8b 30 mov (%eax),%esi ap++; 42b: 83 c0 04 add $0x4,%eax 42e: 89 45 e4 mov %eax,-0x1c(%ebp) if(s == 0) 431: 85 f6 test %esi,%esi 433: 75 28 jne 45d <printf+0x12a> s = "(null)"; 435: be 13 06 00 00 mov $0x613,%esi 43a: 8b 7d 08 mov 0x8(%ebp),%edi 43d: eb 0d jmp 44c <printf+0x119> putc(fd, *s); 43f: 0f be d2 movsbl %dl,%edx 442: 89 f8 mov %edi,%eax 444: e8 50 fe ff ff call 299 <putc> s++; 449: 83 c6 01 add $0x1,%esi while(*s != 0){ 44c: 0f b6 16 movzbl (%esi),%edx 44f: 84 d2 test %dl,%dl 451: 75 ec jne 43f <printf+0x10c> state = 0; 453: be 00 00 00 00 mov $0x0,%esi 458: e9 02 ff ff ff jmp 35f <printf+0x2c> 45d: 8b 7d 08 mov 0x8(%ebp),%edi 460: eb ea jmp 44c <printf+0x119> putc(fd, *ap); 462: 8b 7d e4 mov -0x1c(%ebp),%edi 465: 0f be 17 movsbl (%edi),%edx 468: 8b 45 08 mov 0x8(%ebp),%eax 46b: e8 29 fe ff ff call 299 <putc> ap++; 470: 83 c7 04 add $0x4,%edi 473: 89 7d e4 mov %edi,-0x1c(%ebp) state = 0; 476: be 00 00 00 00 mov $0x0,%esi 47b: e9 df fe ff ff jmp 35f <printf+0x2c> putc(fd, c); 480: 89 fa mov %edi,%edx 482: 8b 45 08 mov 0x8(%ebp),%eax 485: e8 0f fe ff ff call 299 <putc> state = 0; 48a: be 00 00 00 00 mov $0x0,%esi 48f: e9 cb fe ff ff jmp 35f <printf+0x2c> } } } 494: 8d 65 f4 lea -0xc(%ebp),%esp 497: 5b pop %ebx 498: 5e pop %esi 499: 5f pop %edi 49a: 5d pop %ebp 49b: c3 ret 0000049c <free>: static Header base; static Header *freep; void free(void *ap) { 49c: 55 push %ebp 49d: 89 e5 mov %esp,%ebp 49f: 57 push %edi 4a0: 56 push %esi 4a1: 53 push %ebx 4a2: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; 4a5: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 4a8: a1 b8 08 00 00 mov 0x8b8,%eax 4ad: eb 02 jmp 4b1 <free+0x15> 4af: 89 d0 mov %edx,%eax 4b1: 39 c8 cmp %ecx,%eax 4b3: 73 04 jae 4b9 <free+0x1d> 4b5: 39 08 cmp %ecx,(%eax) 4b7: 77 12 ja 4cb <free+0x2f> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 4b9: 8b 10 mov (%eax),%edx 4bb: 39 c2 cmp %eax,%edx 4bd: 77 f0 ja 4af <free+0x13> 4bf: 39 c8 cmp %ecx,%eax 4c1: 72 08 jb 4cb <free+0x2f> 4c3: 39 ca cmp %ecx,%edx 4c5: 77 04 ja 4cb <free+0x2f> 4c7: 89 d0 mov %edx,%eax 4c9: eb e6 jmp 4b1 <free+0x15> break; if(bp + bp->s.size == p->s.ptr){ 4cb: 8b 73 fc mov -0x4(%ebx),%esi 4ce: 8d 3c f1 lea (%ecx,%esi,8),%edi 4d1: 8b 10 mov (%eax),%edx 4d3: 39 d7 cmp %edx,%edi 4d5: 74 19 je 4f0 <free+0x54> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 4d7: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 4da: 8b 50 04 mov 0x4(%eax),%edx 4dd: 8d 34 d0 lea (%eax,%edx,8),%esi 4e0: 39 ce cmp %ecx,%esi 4e2: 74 1b je 4ff <free+0x63> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 4e4: 89 08 mov %ecx,(%eax) freep = p; 4e6: a3 b8 08 00 00 mov %eax,0x8b8 } 4eb: 5b pop %ebx 4ec: 5e pop %esi 4ed: 5f pop %edi 4ee: 5d pop %ebp 4ef: c3 ret bp->s.size += p->s.ptr->s.size; 4f0: 03 72 04 add 0x4(%edx),%esi 4f3: 89 73 fc mov %esi,-0x4(%ebx) bp->s.ptr = p->s.ptr->s.ptr; 4f6: 8b 10 mov (%eax),%edx 4f8: 8b 12 mov (%edx),%edx 4fa: 89 53 f8 mov %edx,-0x8(%ebx) 4fd: eb db jmp 4da <free+0x3e> p->s.size += bp->s.size; 4ff: 03 53 fc add -0x4(%ebx),%edx 502: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 505: 8b 53 f8 mov -0x8(%ebx),%edx 508: 89 10 mov %edx,(%eax) 50a: eb da jmp 4e6 <free+0x4a> 0000050c <morecore>: static Header* morecore(uint nu) { 50c: 55 push %ebp 50d: 89 e5 mov %esp,%ebp 50f: 53 push %ebx 510: 83 ec 04 sub $0x4,%esp 513: 89 c3 mov %eax,%ebx char *p; Header *hp; if(nu < 4096) 515: 3d ff 0f 00 00 cmp $0xfff,%eax 51a: 77 05 ja 521 <morecore+0x15> nu = 4096; 51c: bb 00 10 00 00 mov $0x1000,%ebx p = sbrk(nu * sizeof(Header)); 521: 8d 04 dd 00 00 00 00 lea 0x0(,%ebx,8),%eax 528: 83 ec 0c sub $0xc,%esp 52b: 50 push %eax 52c: e8 40 fd ff ff call 271 <sbrk> if(p == (char*)-1) 531: 83 c4 10 add $0x10,%esp 534: 83 f8 ff cmp $0xffffffff,%eax 537: 74 1c je 555 <morecore+0x49> return 0; hp = (Header*)p; hp->s.size = nu; 539: 89 58 04 mov %ebx,0x4(%eax) free((void*)(hp + 1)); 53c: 83 c0 08 add $0x8,%eax 53f: 83 ec 0c sub $0xc,%esp 542: 50 push %eax 543: e8 54 ff ff ff call 49c <free> return freep; 548: a1 b8 08 00 00 mov 0x8b8,%eax 54d: 83 c4 10 add $0x10,%esp } 550: 8b 5d fc mov -0x4(%ebp),%ebx 553: c9 leave 554: c3 ret return 0; 555: b8 00 00 00 00 mov $0x0,%eax 55a: eb f4 jmp 550 <morecore+0x44> 0000055c <malloc>: void* malloc(uint nbytes) { 55c: 55 push %ebp 55d: 89 e5 mov %esp,%ebp 55f: 53 push %ebx 560: 83 ec 04 sub $0x4,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 563: 8b 45 08 mov 0x8(%ebp),%eax 566: 8d 58 07 lea 0x7(%eax),%ebx 569: c1 eb 03 shr $0x3,%ebx 56c: 83 c3 01 add $0x1,%ebx if((prevp = freep) == 0){ 56f: 8b 0d b8 08 00 00 mov 0x8b8,%ecx 575: 85 c9 test %ecx,%ecx 577: 74 04 je 57d <malloc+0x21> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 579: 8b 01 mov (%ecx),%eax 57b: eb 4d jmp 5ca <malloc+0x6e> base.s.ptr = freep = prevp = &base; 57d: c7 05 b8 08 00 00 bc movl $0x8bc,0x8b8 584: 08 00 00 587: c7 05 bc 08 00 00 bc movl $0x8bc,0x8bc 58e: 08 00 00 base.s.size = 0; 591: c7 05 c0 08 00 00 00 movl $0x0,0x8c0 598: 00 00 00 base.s.ptr = freep = prevp = &base; 59b: b9 bc 08 00 00 mov $0x8bc,%ecx 5a0: eb d7 jmp 579 <malloc+0x1d> if(p->s.size >= nunits){ if(p->s.size == nunits) 5a2: 39 da cmp %ebx,%edx 5a4: 74 1a je 5c0 <malloc+0x64> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 5a6: 29 da sub %ebx,%edx 5a8: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 5ab: 8d 04 d0 lea (%eax,%edx,8),%eax p->s.size = nunits; 5ae: 89 58 04 mov %ebx,0x4(%eax) } freep = prevp; 5b1: 89 0d b8 08 00 00 mov %ecx,0x8b8 return (void*)(p + 1); 5b7: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 5ba: 83 c4 04 add $0x4,%esp 5bd: 5b pop %ebx 5be: 5d pop %ebp 5bf: c3 ret prevp->s.ptr = p->s.ptr; 5c0: 8b 10 mov (%eax),%edx 5c2: 89 11 mov %edx,(%ecx) 5c4: eb eb jmp 5b1 <malloc+0x55> for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 5c6: 89 c1 mov %eax,%ecx 5c8: 8b 00 mov (%eax),%eax if(p->s.size >= nunits){ 5ca: 8b 50 04 mov 0x4(%eax),%edx 5cd: 39 da cmp %ebx,%edx 5cf: 73 d1 jae 5a2 <malloc+0x46> if(p == freep) 5d1: 39 05 b8 08 00 00 cmp %eax,0x8b8 5d7: 75 ed jne 5c6 <malloc+0x6a> if((p = morecore(nunits)) == 0) 5d9: 89 d8 mov %ebx,%eax 5db: e8 2c ff ff ff call 50c <morecore> 5e0: 85 c0 test %eax,%eax 5e2: 75 e2 jne 5c6 <malloc+0x6a> return 0; 5e4: b8 00 00 00 00 mov $0x0,%eax 5e9: eb cf jmp 5ba <malloc+0x5e>
32.509921
60
0.412847
7d36baeeed8e3dbb648ddea097b6b5fa8587ec2c
1,058
asm
Assembly
library/common/string.asm
paulscottrobson/rpl-32
7bd0c6dc9edc7f5ca4e9e9dac24a75cb32a29acc
[ "MIT" ]
null
null
null
library/common/string.asm
paulscottrobson/rpl-32
7bd0c6dc9edc7f5ca4e9e9dac24a75cb32a29acc
[ "MIT" ]
null
null
null
library/common/string.asm
paulscottrobson/rpl-32
7bd0c6dc9edc7f5ca4e9e9dac24a75cb32a29acc
[ "MIT" ]
null
null
null
; ****************************************************************************** ; ****************************************************************************** ; ; Name : string.asm ; Purpose : String Library ; Author : Paul Robson (paul@robsons.org.uk) ; Created : 9th October 2019 ; ; ****************************************************************************** ; ****************************************************************************** ; ****************************************************************************** ; ; Length of string on TOS ; ; ****************************************************************************** String_Len: ;; [str.len] lda stack0,x ; copy string address sta zTemp0 lda stack1,x sta zTemp0+1 ; phy ldy #255 ; find string length _SLLoop:iny cpy #255 ; cant find EOS. beq _SLFail lda (zTemp0),y bne _SLLoop tya ply ; sta stack0,x ; return string stz stack1,x stz stack2,x stz stack3,x rts _SLFail:rerror "NOT STRING"
24.604651
80
0.323251
60935c5c6c27eb598322621b2908584525e6eaf6
4,858
asm
Assembly
BIOS/kernel/interrupt.asm
zadewg/MalOS
61ddaa6611349bb8ce7ecff16fb8fa2c8b9a96a8
[ "MIT" ]
3
2021-03-03T17:53:16.000Z
2021-09-09T17:16:04.000Z
BIOS/kernel/interrupt.asm
zadewg/MalOS
61ddaa6611349bb8ce7ecff16fb8fa2c8b9a96a8
[ "MIT" ]
1
2021-03-03T01:28:21.000Z
2021-03-04T16:53:05.000Z
BIOS/kernel/interrupt.asm
zadewg/MalOS
61ddaa6611349bb8ce7ecff16fb8fa2c8b9a96a8
[ "MIT" ]
null
null
null
[extern isr_handler] ; isr.c [EXTERN irq_handler] ; isr.c (make an irq.c for this one) ; Common ISR, IRQ stubs. Saves processor state, sets ; up for kernel mode segments, calls C-level fault handler, ; and restores the stack frame. ; ; Note that this context segment switching will only be relevant ; when different privileges (user mode per say) are implemented. ; At the moment only kernel runs. isr_common_stub: pusha ; Pushes edi,esi,ebp,esp,ebx,edx,ecx,eax mov ax, ds ; Lower 16-bits of eax = ds. push eax ; save the data segment descriptor mov ax, 0x10 ; load the kernel data segment descriptor; try extern DATA_SEG mov ds, ax mov es, ax mov fs, ax mov gs, ax push esp ; registers_t *r cld ; C code following the sysV ABI requires DF ; to be clear on function entry call isr_handler pop eax pop eax ; reload the original data segment descriptor mov ds, ax mov es, ax mov fs, ax mov gs, ax popa ; Pops edi,esi,ebp... add esp, 8 ; Cleans up the pushed error code and pushed ISR number sti ; redundant iret ; pops 5 things at once: CS, EIP, EFLAGS, SS, and ESP irq_common_stub: pusha ; Pushes edi,esi,ebp,esp,ebx,edx,ecx,eax mov ax, ds ; Lower 16-bits of eax = ds. push eax ; save the data segment descriptor mov ax, 0x10 ; load the kernel data segment descriptor; try extern DATA_SEG mov ds, ax mov es, ax mov fs, ax mov gs, ax push esp cld call irq_handler pop ebx ; reload the original data segment descriptor pop ebx mov ds, bx mov es, bx mov fs, bx mov gs, bx popa ; Pops edi,esi,ebp... add esp, 8 ; Cleans up the pushed error code and pushed ISR number sti ; redundant iret ; pops 5 things at once: CS, EIP, EFLAGS, SS, and ESP ; NASM macros (these expand a few hundred lines) , %1 accesses the first param %macro ISR_ERRCODE 1 [GLOBAL isr%1] isr%1: cli push byte %1 jmp isr_common_stub %endmacro ; can not common handler function without common stack frame, so push dummy err %macro ISR_NOERRCODE 1 [GLOBAL isr%1] isr%1: cli push byte 0 push byte %1 jmp isr_common_stub %endmacro ; %1 -> IRQ number, %2 ISR number it is mapped to %macro IRQ 2 global irq%1 irq%1: cli push byte 0 push byte %2 jmp irq_common_stub %endmacro ; IRQs (Standard ISA) IRQ 0, 32 ; PIT Interrupt IRQ 1, 33 ; Keyboard Interrupt IRQ 2, 34 ; Cascade (used internally by the two PICs, never raised) IRQ 3, 35 ; COM2 (if enabled) IRQ 4, 36 ; COM1 (if enabled) IRQ 5, 37 ; LPT2 (if enabled) IRQ 6, 38 ; Floppy Disk IRQ 7, 39 ; LPT1 / unreliable "supurious" interrupt (google race conditions on PIC) IRQ 8, 40 ; CMOS RTC (if enabled) IRQ 9, 41 ; Free for periphereals / legacy SCSI / NIC IRQ 10, 42 ; Free for periphereals / SCSI / NIC IRQ 11, 43 ; Free for periphereals / SCSI / NIC IRQ 12, 44 ; PS2 mouse IRQ 13, 45 ; FPU / Coprocessor / Inter-processor IRQ 14, 46 ; Primary ATA Hard Disk IRQ 15, 47 ; Secondary ATA Hard Disk ; interrupts 8, [10, 14] , 17, 30 push error codes. ISR_ERRCODE 8 ; Double Fault Exception ISR_ERRCODE 10 ; Bad TSS Exception ISR_ERRCODE 11 ; Segment Not Present Exception ISR_ERRCODE 12 ; Stack-Segment Fault Exception ISR_ERRCODE 13 ; General Protection Fault Exception ISR_ERRCODE 14 ; Page Fault Exception ISR_ERRCODE 17 ; Alignment Check Exception ISR_ERRCODE 30 ; Security Exception ISR_NOERRCODE 0 ; Divide By Zero Exception ISR_NOERRCODE 1 ; Debug Exception ISR_NOERRCODE 2 ; NMI Exception ISR_NOERRCODE 3 ; INT3 Breakpoint Exception ISR_NOERRCODE 4 ; INT0 Exception ISR_NOERRCODE 5 ; Out Of Bounds Exception ISR_NOERRCODE 6 ; Invalid Opcode Exception ISR_NOERRCODE 7 ; Coprocessor Not Avaliable Exception ISR_NOERRCODE 9 ; Coprocessor Segment Overrun Exception ISR_NOERRCODE 15 ; Reserved ISR_NOERRCODE 16 ; Floating Point Exception ISR_NOERRCODE 18 ; Machine Check Exception ISR_NOERRCODE 19 ; Reserved ISR_NOERRCODE 20 ; Reserved ISR_NOERRCODE 21 ; Reserved ISR_NOERRCODE 22 ; Reserved ISR_NOERRCODE 23 ; Reserved ISR_NOERRCODE 24 ; Reserved ISR_NOERRCODE 25 ; Reserved ISR_NOERRCODE 26 ; Reserved ISR_NOERRCODE 27 ; Reserved ISR_NOERRCODE 28 ; Reserved ISR_NOERRCODE 29 ; Reserved ISR_NOERRCODE 31 ; Reserved
30.553459
90
0.629477
f5dbfb546ff32cb9dfb0d96eef2da51e4d702953
374
asm
Assembly
libsrc/graphics/attache/w_undraw.asm
Toysoft/z88dk
f930bef9ac4feeec91a07303b79ddd9071131a24
[ "ClArtistic" ]
null
null
null
libsrc/graphics/attache/w_undraw.asm
Toysoft/z88dk
f930bef9ac4feeec91a07303b79ddd9071131a24
[ "ClArtistic" ]
null
null
null
libsrc/graphics/attache/w_undraw.asm
Toysoft/z88dk
f930bef9ac4feeec91a07303b79ddd9071131a24
[ "ClArtistic" ]
1
2019-12-03T23:28:20.000Z
2019-12-03T23:28:20.000Z
; ; Otrona Attachè graphics routines ; console driven video HW access ; ; Stefano Bodrato 2018 ; ; ; ; $Id: w_undraw.asm $ ; INCLUDE "graphics/grafix.inc" SECTION code_clib PUBLIC undraw PUBLIC _undraw EXTERN draw EXTERN setres .undraw ._undraw CALL setres jp draw
13.357143
40
0.540107
3d2aac8f80fb3463b3f7e8ef764470f273554c69
252
asm
Assembly
Looper/Looper.asm
HSU-S21-CS243/CH4-examples
aff78d964f87bb0c119483539b32a4cbd38c8c08
[ "Apache-2.0" ]
null
null
null
Looper/Looper.asm
HSU-S21-CS243/CH4-examples
aff78d964f87bb0c119483539b32a4cbd38c8c08
[ "Apache-2.0" ]
null
null
null
Looper/Looper.asm
HSU-S21-CS243/CH4-examples
aff78d964f87bb0c119483539b32a4cbd38c8c08
[ "Apache-2.0" ]
null
null
null
//Loop R0 times @R0 D=M //store current loop value in variable @loop_counter M=D //only loop when loop counter is positive @:loop_end D;JLT (:loop_start) @loop_counter MD=M-1 //sub 1 from loop counter @:loop_start D;JGT (:loop_end) @:loop_end 0;JMP
12
41
0.730159
3c672922f1a663c1c692b9302e91d10ac305dc9e
573
asm
Assembly
programs/oeis/124/A124797.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/124/A124797.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/124/A124797.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A124797: Sum of cyclic permutations of 123...n seen as number written in base n+1: ((n+1)^n-1)*(n+1)/2. ; 1,12,126,1560,23325,411768,8388604,193710240,4999999995,142655835300,4458050224122,151437553296120,5556003412779001,218946945190429680,9223372036854775800,413620130943168382080,19673204037648268787703,989209827830156794561980,52428799999999999999999990,2921293509192991260690562200,170713938682109778698323361781,10440233999923956017177516455272,666867888425142062224540736421876,44408920985006261616945266723632800 add $0,2 mov $2,$0 pow $0,$0 sub $0,$2 div $0,2
63.666667
417
0.849913