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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfb07cbf1944a1a38a6edbd5bdefc33f3e7e4e4b | 170 | asm | Assembly | 29-Biometric-Access.speed.size.asm | blueset/7bh-solutions | 988afddf87411bec06ec9e90179b55fb55345a5d | [
"MIT"
] | null | null | null | 29-Biometric-Access.speed.size.asm | blueset/7bh-solutions | 988afddf87411bec06ec9e90179b55fb55345a5d | [
"MIT"
] | null | null | null | 29-Biometric-Access.speed.size.asm | blueset/7bh-solutions | 988afddf87411bec06ec9e90179b55fb55345a5d | [
"MIT"
] | null | null | null | -- 7 Billion Humans --
-- 29: Biometric Access --
-- Size: 5/5 --
-- Speed: 59/62 --
mem1 = nearest shredder
a:
mem2 = nearest datacube
pickup mem2
giveto mem1
jump a
| 12.142857 | 26 | 0.647059 |
8859973e4b1a127830b7c6f934e74b31372e4c30 | 11,674 | asm | Assembly | 2000-spring/mp2/mp2.asm | ece291/machine-problems | 5f91f9f2ddceb7cda1e14c2973d83023a42d9929 | [
"RSA-MD"
] | 3 | 2016-07-16T04:33:49.000Z | 2021-07-13T16:18:17.000Z | 2000-spring/mp2/mp2.asm | ece291/machine-problems | 5f91f9f2ddceb7cda1e14c2973d83023a42d9929 | [
"RSA-MD"
] | null | null | null | 2000-spring/mp2/mp2.asm | ece291/machine-problems | 5f91f9f2ddceb7cda1e14c2973d83023a42d9929 | [
"RSA-MD"
] | null | null | null | PAGE 70, 140
TITLE MP2 - [Sorting Efficiency] Your Name Today's Date
COMMENT *
In this MP, you will write a program which
will take input from the keyboard and sort
it using two different algorithms
ECE291 - Machine Problem 2
Professor Polychronopoulos
Guest Authors - Karan Mehra, Michael Urman
Univeristy of Illinois Urbana Champaign
Dept. of Electrical & Computer Engineering
Spring 2000
Ver 1.0
*
;--------------------------------------------------------------
;-- Defining Constants --
;--------------------------------------------------------------
BELL EQU 007h
BS EQU 008h
TAB EQU 009h
LF EQU 00Ah
CR EQU 00Dh
SPACE EQU 020h
ESCKEY EQU 01Bh
INPUT_SIZE EQU 0078
public BELL, BS, TAB, LF, CR
public SPACE, ESCKEY, INPUT_SIZE
;--------------------------------------------------------------
;-- Declaring External Procedures --
;--------------------------------------------------------------
; Functions in LIB291.LIB These functions are free to
; be used by you. Complete descriptions of the LIB291
; functions can be found in your lab manuals. Use these
; functions for displaying output on the screen.
extrn dspmsg:near, dspout:near, kbdin:near
extrn rrest:near, rsave:near, binasc:near
; Functions in LIBMP2.LIB
; You will need to write these functions for this program.
extrn libSortHeap:near, libPercolate:near, libQuickSort:near
extrn libTakeInput:near, libGetArray:near, libPrintList:near
; This function terminates the program.
extrn mp2xit:near
;--------------------------------------------------------------
;-- Defining the Stack Segment --
;--------------------------------------------------------------
stkseg SEGMENT stack
db 64 dup ('STACK ')
stkseg ENDS
;--------------------------------------------------------------
;-- Defining the Code Segment --
;--------------------------------------------------------------
cseg SEGMENT PUBLIC 'CODE'
assume cs:cseg, ds:cseg, ss:stkseg, es:nothing
;--------------------------------------------------------------
;-- Declaring variables for Lib Procedures --
;--------------------------------------------------------------
enterK db CR,LF,'$' ; Helps in formating the output
input db 80 dup(0) ; Our Input Buffer
list db 80 dup(0) ; Unsorted Array of characters
list_size db 0 ; Number of characters in the list
dbug dw 0 ; Debug Level -
; 0 is result ONLY
; 1 is debug without step
; 2 is debug with step
swapMsg db ' Swapping ','$'
cmpMsg db ' Comparing ','$'
cmpCtr dw 0 ; Counter for number of comparisions
swpCtr dw 0 ; Counter for number of swaps
public input, list, list_size, dbug, enterK
public swapMsg, cmpMsg, cmpCtr, swpCtr
public Percolate, QuickSort, PrintList
;--------------------------------------------------------------
;-- Declaring variables for Main Procedure --
;--------------------------------------------------------------
menu db CR,LF,0C9h,28 dup (0CDh), 0B5h,'SORTING EFFICIENCY',0C6h,28 dup (0CDh),0BBh,CR,LF
db 0BAh,' ',0BAh,CR,LF
db 0BAh,' H E A P S O R T ',0BAh,CR,LF
db 0BAh,' ',0BAh,CR,LF
db 0BAh,' HR : Displays final result only ',0BAh,CR,LF
db 0BAh,' HD : Shows debugging information ',0BAh,CR,LF
db 0BAh,' HS : Steps through the action ',0BAh,CR,LF
db 0BAh,' ',0BAh,CR,LF
db 0BAh,' Q U I C K S O R T ',0BAh,CR,LF
db 0BAh,' ',0BAh,CR,LF
db 0BAh,' QR : Displays final result only ',0BAh,CR,LF
db 0BAh,' QD : Shows debugging information ',0BAh,CR,LF
db 0BAh,' QS : Steps through the action ',0BAh,CR,LF
db 0BAh,' ',0BAh,CR,LF
db 0BAh,' M : MP2 MENU ',0BAh,CR,LF
db 0BAh,' ESC : EXIT MP2 ',0BAh,CR,LF
db 0BAh,' ',0BAh,CR,LF
db 0C8h, 68 dup(0CDh),0B5h,0E4h,9Bh,0EEh,' 291',0C6h,0BCh,CR,LF
db CR,LF,'$'
prompt db ':','$'
buf db 7 dup(0) ; Needed to convert Binary to Ascii [binasc]
sortM db 'HhQqMm'
sortT db 'RrDdSs'
qMsg db 'Initiating QuickSort',CR,LF,'$'
hMsg db 'Initiating HeapSort',CR,LF,'$'
cMsg db 'Number of comparisions: ','$'
sMsg db 'Number of swaps: ','$'
doneMsg db 'Sorted Array is ','$'
errMsg db CR,LF,'Invalid Option!',CR,LF,'$'
;--------------------------------------------------------------
;-- Main Procedure --
;--------------------------------------------------------------
MAIN PROC FAR
mov ax, cseg
mov ds, ax ; Initialize ds => cs
drawMain:
mov dx, offset menu ; display our menu
call dspmsg
getInput:
mov dx, offset prompt
call dspmsg
call TakeInput ; obtain one line of input
jc exitMain
xor si, si
mov cx, 6
validate1: ; parce the sorting technique
mov dl, sortM[si]
inc si
cmp input[0], dl
je checkType
loop validate1
invalidChoice: ; trap for invalid options
mov dx, offset errMsg
call dspmsg
jmp getInput
checkType:
dec si
shr si, 1
mov ax, si ; save the sorting technique in AX
cmp ax, 2
je drawMain
mov si, 0
mov cx, 6
validate2: ; parce the level of debug required
mov dl, sortT[si]
inc si
cmp input[1], dl
je validated
loop validate2
jmp invalidChoice
validated:
dec si
shr si, 1
mov dbug, si
mov bx, 2
cmp input[bx], SPACE ; third character should be a SPACE
jne invalidChoice
ignoreSpaces: ; move BX to the first valid character
inc bx
cmp input[bx], SPACE
je ignoreSpaces
cmp input[bx], '$'
je invalidChoice
mov dx, offset enterK
call dspmsg
call GetArray ; fill in the list array with our characters
cmp ax, 0 ; is it heap?
je doHeap
doQuick:
mov dx, offset qMsg
call dspmsg
mov cl, list_size ; right
push cx
mov cx, 1 ; left
push cx
call Quicksort
pop cx
pop cx
jmp doneSort
doHeap:
mov dx, offset hMsg
call dspmsg
call SortHeap
doneSort:
mov dx, offset doneMsg
call dspmsg
mov dbug, 1 ; set debug level so that we
call PrintList ; can display the final result
mov dx, offset cMsg
call dspmsg
mov bx, offset buf
mov ax, cmpCtr
call binasc
mov dx, bx
call dspmsg
mov dx, offset enterK
call dspmsg
mov dx, offset sMsg
call dspmsg
mov bx, offset buf
mov ax, swpCtr
call binasc
mov dx, bx
call dspmsg
mov dx, offset enterK
call dspmsg
jmp getInput
exitMain:
call mp2xit
MAIN ENDP
;--------------------------------------------------------------
;-- Replace Library Calls with your Code! --
;-- [Save all reg values that you modify] --
;-- Do not forget to add Function Headers --
;--------------------------------------------------------------
;--------------------------------------------------------------
;-- SortHeap() --
;--------------------------------------------------------------
SortHeap PROC NEAR
call libSortHeap
ret
SortHeap ENDP
;--------------------------------------------------------------
;-- Percolate() --
;--------------------------------------------------------------
Percolate PROC NEAR
call libPercolate
ret
Percolate ENDP
;--------------------------------------------------------------
;-- QuickSort() --
;--------------------------------------------------------------
QuickSort PROC NEAR
call libQuickSort
ret
QuickSort ENDP
;--------------------------------------------------------------
;-- TakeInput() --
;--------------------------------------------------------------
TakeInput PROC NEAR
call libTakeInput
ret
TakeInput ENDP
;--------------------------------------------------------------
;-- GetArray() --
;--------------------------------------------------------------
GetArray PROC NEAR
call libGetArray
ret
GetArray ENDP
;--------------------------------------------------------------
;-- PrintList() --
;--------------------------------------------------------------
PrintList PROC NEAR
call libPrintList
ret
PrintList ENDP
CSEG ENDS
END MAIN
| 35.057057 | 112 | 0.35078 |
fd8c851fafe8a283cf740357ceda7d58318fdd1b | 216 | asm | Assembly | libsrc/_DEVELOPMENT/time/c/sccz80/compare_dostm_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | libsrc/_DEVELOPMENT/time/c/sccz80/compare_dostm_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | libsrc/_DEVELOPMENT/time/c/sccz80/compare_dostm_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | ; int compare_dostm(struct dos_tm *a, struct dos_tm *b)
SECTION code_time
PUBLIC compare_dostm_callee
EXTERN asm_compare_dostm
compare_dostm_callee:
pop hl
pop bc
ex (sp),hl
jp asm_compare_dostm
| 13.5 | 55 | 0.75 |
f341f49d115b67eced8fe8d80dffb25fc37deefa | 697 | asm | Assembly | EEL7030/Rep CAEE/Mic 8051/Lab02/exercicio1/exercicio1.asm | GSimas/MicroC | ac9ef54bbeed027db532885407cc3e783fcb28eb | [
"MIT"
] | null | null | null | EEL7030/Rep CAEE/Mic 8051/Lab02/exercicio1/exercicio1.asm | GSimas/MicroC | ac9ef54bbeed027db532885407cc3e783fcb28eb | [
"MIT"
] | null | null | null | EEL7030/Rep CAEE/Mic 8051/Lab02/exercicio1/exercicio1.asm | GSimas/MicroC | ac9ef54bbeed027db532885407cc3e783fcb28eb | [
"MIT"
] | null | null | null | ;MATHEUS FIGUEIREDO
RESET EQU 0H
VETOR EQU 60H
ORG RESET ; PC = 0000H ao se resetar o 8051
MOV DPTR,#NRO ; endereco nro parcelas a ser somado
MOV A,#0
MOVC A,@ A+DPTR
MOV R1,A ; R1 = nro parcelas a ser somado
MOV DPTR,#DADOS ; end. vetor de dados a ser somado
MOV R2,#0 ; guarda resultado das somas realizadas
MOV R0,#0 ; especifica parcela a ser lida do vetor de dados
VOLTA: MOV A,R0
MOVC A,@A+DPTR ; le parcela
ADD A,R2
MOV R2,A
;MOV DPTR,#01
;MOVX @DPTR,A
;MOV DPTR,#DADOS
INC R0
DJNZ R1,VOLTA
FIM: JMP FIM
ORG VETOR
NRO: DB 3H
DADOS: DB 01H,03H,05H,06H,0AH,0E2H
END
| 21.121212 | 66 | 0.593974 |
2cad53f49e33061531af352a6df8f02c5877bcd2 | 5,757 | asm | Assembly | libsrc/_DEVELOPMENT/drivers/terminal/console_01/input/console_01_input_terminal.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 8 | 2017-01-18T12:02:17.000Z | 2021-06-12T09:40:28.000Z | libsrc/_DEVELOPMENT/drivers/terminal/console_01/input/console_01_input_terminal.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 1 | 2017-03-06T07:41:56.000Z | 2017-03-06T07:41:56.000Z | libsrc/_DEVELOPMENT/drivers/terminal/console_01/input/console_01_input_terminal.asm | teknoplop/z88dk | bb03fbfd6b2ab0f397a1358559089f9cd3706485 | [
"ClArtistic"
] | 3 | 2017-03-07T03:19:40.000Z | 2021-09-15T17:59:19.000Z |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CONSOLE_01_INPUT_TERMINAL
; library driver for input terminals
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Library input console driver that implements the
; CONSOLE_01_INPUT input terminal features.
;
; ;;;;;;;;;;;;;;;;;;;;
; DRIVER CLASS DIAGRAM
; ;;;;;;;;;;;;;;;;;;;;
;
; CONSOLE_01_INPUT_TERMINAL (root, abstract)
;
; The deriving driver must implement one message generated
; by this driver to complete an input terminal.
;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MESSAGES CONSUMED FROM STDIO
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; * STDIO_MSG_GETC
; * STDIO_MSG_EATC
; * STDIO_MSG_READ
; * STDIO_MSG_SEEK
; * STDIO_MSG_FLSH
; * STDIO_MSG_ICTL
; * STDIO_MSG_CLOS
;
; Others result in enotsup_zc.
;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MESSAGES GENERATED FOR DERIVED DRIVERS
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; * ITERM_MSG_GETC
;
; Read the keyboard device and return the char read.
;
; enter: ix = & FDSTRUCT.JP
; exit: a = char after character set translation
; carry set on error with hl=0 (err) or -1 (eof)
; can use: af, bc, de, hl
;
; If this message is implemented, the driver is complete.
;
; * ITERM_MSG_INTERRUPT
;
; Indicate whether character should interrupt line editing.
;
; enter: c = ascii code
; exit: carry reset indicates line editing should terminate
; can use: af, bc, de, hl
;
; Default is to return with carry set.
;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MESSAGES GENERATED FOR CONSOLE_01_OUTPUT_TERMINAL
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; * ITERM_MSG_PUTC
;
; Input terminal is generating a char to print that
; should not be subject to tty emulation.
;
; enter : c = ascii code
; can use: af, bc, de, hl, ix
;
; * ITERM_MSG_PRINT_CURSOR
;
; Input terminal is printing the cursor.
;
; enter : c = cursor ascii code (CHAR_CURSOR_UC or CHAR_CURSOR_LC)
; can use: af, bc, de, hl, ix
;
; * ITERM_MSG_ERASE_CURSOR
;
; Input terminal is backspacing to erase the cursor.
;
; enter : de = char *edit_buffer
; bc = int edit_buffer_len >= 0
; can use: af, bc, de, hl, ix
;
; Note: The cursor char is not stored in the buffer.
;
; * ITERM_MSG_ERASE_CURSOR_PWD
;
; Input terminal is backspacing to erase the cursor in password mode.
;
; enter : e = CHAR_PASSWORD
; bc = int edit_buffer_len >= 0
; can use: af, bc, de, hl, ix
;
; Note: The cursor char is not stored in the buffer.
;
; * ITERM_MSG_BS
;
; Backspace: erase the last char of the edit buffer.
;
; enter : de = char *edit_buffer
; bc = int edit_buffer_len > 0
; can use: af, bc, de, hl, ix
;
; * ITERM_MSG_BS_PWD
;
; Backspace: erase the last char. The input terminal
; is in password mode so all characters are printed
; to screen as CHAR_PASSWORD.
;
; enter : e = CHAR_PASSWORD
; bc = int edit_buffer_len > 0
; can use: af, bc, de, hl, ix
;
; * ITERM_MSG_READLINE_BEGIN
;
; Notification: The input terminal is starting
; a new edit line.
;
; can use: af, bc, de, hl, ix
;
; * ITERM_MSG_READLINE_END
;
; Notification: The input terminal has finished
; the edit line.
;
; can use: af, bc, de, hl, ix
;
; * ITERM_MSG_BELL
;
; Sound bell to indicate edit buffer limit reached.
;
; can use: af, bc, de, hl, ix
;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; IOCTLs UNDERSTOOD BY THIS DRIVER
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; * IOCTL_RESET
;
; * IOCTL_ITERM_TIE
; Attach input device to a different output terminal (0 to disconnect)
;
; * IOCTL_ITERM_GET_EDITBUF
; Copies edit buffer details to user program
;
; * IOCTL_ITERM_SET_EDITBUF
; Writes edit buffer details into driver
;
; * IOCTL_ITERM_ECHO
; enable / disable echo mode
;
; * IOCTL_ITERM_PASS
; enable / disable password mode
;
; * IOCTL_ITERM_LINE
; enable / disable line editing mode
;
; * IOCTL_ITERM_COOK
; enable / disable cook mode
;
; * IOCTL_ITERM_CAPS
; set / reset caps lock
;
; * IOCTL_ITERM_CRLF
; enable / disable crlf processing
;
; * IOCTL_ITERM_CURS
; enable / disable cursor in line mode
;
; ;;;;;;;;;;;;;;;;;;;;;;;;;;
; BYTES RESERVED IN FDSTRUCT
; ;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; offset (wrt FDSTRUCT.JP) description
;
; 8..13 mutex
; 14..15 FDSTRUCT *oterm (connected output terminal, 0 if none)
; 16 pending_char
; 17..18 read_index (index of next char to read from edit buffer)
; 19..24 b_array (manages edit buffer)
SECTION code_driver
SECTION code_driver_terminal_input
PUBLIC console_01_input_terminal
EXTERN STDIO_MSG_GETC, STDIO_MSG_EATC, STDIO_MSG_READ
EXTERN STDIO_MSG_SEEK, STDIO_MSG_FLSH, STDIO_MSG_ICTL
EXTERN STDIO_MSG_CLOS, ITERM_MSG_INTERRUPT
EXTERN console_01_input_stdio_msg_getc, console_01_input_stdio_msg_eatc
EXTERN console_01_input_stdio_msg_read, console_01_input_stdio_msg_seek
EXTERN console_01_input_stdio_msg_flsh, console_01_input_stdio_msg_ictl
EXTERN error_zc, error_znc, error_enotsup_zc
console_01_input_terminal:
cp STDIO_MSG_GETC
jp z, console_01_input_stdio_msg_getc
cp ITERM_MSG_INTERRUPT
jp z, error_zc ; line editing is not interrupted
cp STDIO_MSG_EATC
jp z, console_01_input_stdio_msg_eatc
cp STDIO_MSG_READ
jp z, console_01_input_stdio_msg_read
cp STDIO_MSG_SEEK
jp z, console_01_input_stdio_msg_seek
cp STDIO_MSG_FLSH
jp z, console_01_input_stdio_msg_flsh
cp STDIO_MSG_ICTL
jp z, console_01_input_stdio_msg_ictl
cp STDIO_MSG_CLOS
jp z, error_znc ; do nothing and report no error
jp error_enotsup_zc ; hl = 0 puts FILE stream in error state
| 25.700893 | 84 | 0.6321 |
664d334a42113882795482f0fca6c09acc88c01e | 767 | asm | Assembly | Kernel/src/arch/x86_64/tss.asm | borrrden/borrrdex | 647223094f3778cc028c8e56d91299168a17d939 | [
"BSD-2-Clause"
] | 9 | 2021-03-09T22:57:40.000Z | 2022-03-12T14:38:03.000Z | Kernel/src/arch/x86_64/tss.asm | borrrden/borrrdex | 647223094f3778cc028c8e56d91299168a17d939 | [
"BSD-2-Clause"
] | 2 | 2021-05-22T14:56:53.000Z | 2021-05-30T01:52:13.000Z | Kernel/src/arch/x86_64/tss.asm | borrrden/borrrdex | 647223094f3778cc028c8e56d91299168a17d939 | [
"BSD-2-Clause"
] | 3 | 2021-03-24T12:37:24.000Z | 2021-12-07T07:36:22.000Z | BITS 64
global load_tss
load_tss: ; RDI - address, RSI - GDT, RDX - selector
push rbx
; Populate the TSS components (limit and addr)
; uint16_t limit_0
; uint16_t addr_0
; uint8_t addr_1
; uint8_t type_0
; uint8_t limit_1
; uint8_t addr_2
; uint32_t addr_3
; uint32_t reserved
lea rbx, [rsi + rdx] ; limit_0
mov word [rbx], 108
mov eax, edi
lea rbx, [rsi + rdx + 2] ; addr_0
mov word [rbx], ax
mov eax, edi
shr eax, 16
lea rbx, [rsi + rdx + 4] ; addr_1
mov byte [rbx], al
mov eax, edi
shr eax, 24
lea rbx, [rsi + rdx + 7] ; addr_2
mov byte [rbx], al
mov rax, rdi
shr rax, 32
lea rbx, [rsi + rdx + 8] ; addr_3
mov dword [rbx], eax
pop rbx
ret | 18.707317 | 53 | 0.569752 |
96228dba4d693ce3e6af1d3d2a20b8dcb6e84650 | 141 | asm | Assembly | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sf2/bank6.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sf2/bank6.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sf2/bank6.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | Name: bank6.asm
Type: file
Size: 641
Last-Modified: '1993-01-07T04:42:26Z'
SHA-1: 49123E92C883AAFEE9001B316B0EFAAB68CA4812
Description: null
| 20.142857 | 47 | 0.808511 |
8be97d6f915baeef9610e3a7de98e4dc29aeaff1 | 488 | asm | Assembly | programs/oeis/015/A015445.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/015/A015445.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/015/A015445.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A015445: Generalized Fibonacci numbers: a(n) = a(n-1) + 9*a(n-2).
; 1,1,10,19,109,280,1261,3781,15130,49159,185329,627760,2295721,7945561,28607050,100117099,357580549,1258634440,4476859381,15804569341,56096303770,198337427839,703204161769,2488241012320,8817078468241,31211247579121,110564953793290,391466182005379,1386550766144989,4909746404193400
add $0,1
mov $3,2
lpb $0
sub $0,1
trn $1,1
mov $2,$1
mov $1,$3
mov $3,$2
mul $3,9
add $3,$1
lpe
div $1,9
mul $1,9
add $1,1
| 27.111111 | 281 | 0.737705 |
31b62e5cd048e4de6936aea9f860dc9df2f05987 | 124 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/scalbln.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/scalbln.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/scalbln.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_fp_math48
PUBLIC _scalbln
EXTERN cm48_sdcciy_scalbln
defc _scalbln = cm48_sdcciy_scalbln
| 12.4 | 35 | 0.862903 |
c3629cc5f6aeb2de0c227609d2a44bfebf28e00f | 369 | asm | Assembly | programs/oeis/052/A052913.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/052/A052913.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/052/A052913.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A052913: a(n+2) = 5*a(n+1) - 2*a(n), with a(0) = 1, a(1) = 4.
; 1,4,18,82,374,1706,7782,35498,161926,738634,3369318,15369322,70107974,319801226,1458790182,6654348458,30354161926,138462112714,631602239718,2881086973162,13142230386374,59948977985546,273460429154982,1247404189803818,5690100090709126
mov $1,1
lpb $0,1
sub $0,1
add $2,$1
add $1,$2
mul $1,2
lpe
| 33.545455 | 235 | 0.728997 |
9f856e736563a40d62c679cee2459c6b648373d8 | 228 | asm | Assembly | programs/oeis/010/A010717.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/010/A010717.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/010/A010717.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A010717: Period 2: repeat (5,6).
; 5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5
mod $0,2
mov $1,$0
add $1,5
| 32.571429 | 163 | 0.517544 |
4c03a53554882e2d7a3b8c8d7c684d1d0a4f1fc3 | 476 | asm | Assembly | programs/oeis/284/A284794.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/284/A284794.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/284/A284794.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A284794: Positions of -1 in A284793.
; 2,6,8,10,14,18,20,24,26,30,32,34,38,42,44,46,50,54,56,60,62,64,68,72,74,78,80,82,86,90,92,96,98,102,104,106,110,114,116,118,122,126,128,132,134,138,140,142,146,150,152,154,158,162,164,168,170,172,176,180,182,186,188,192,194,196,200,204,206,208,212,216,218,222,224,226,230,234,236,240,242,246,248,250,254,258,260,262,266,270,272,276,278,280,284,288,290,294,296,298
add $0,1
seq $0,284818 ; Positions of 0 in A284817.
sub $0,1
mul $0,2
| 59.5 | 365 | 0.710084 |
d85b18d42fe557ff80dbb43aa1cb7cd4968b05ce | 678 | asm | Assembly | oeis/259/A259320.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/259/A259320.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/259/A259320.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A259320: a(n) = 2*n*A259319(n) - A259110(n)^2.
; Submitted by Jamie Morken(s2)
; 0,256,3584,21504,84480,256256,652288,1462272,2976768,5617920,9974272,16839680,27256320,42561792,64440320,94978048,136722432,192745728,266712576,362951680,486531584,643340544,840170496,1084805120,1386112000,1754138880,2200214016,2737050624,3378855424,4141441280,5042343936,6100942848,7338586112,8778719488,10447019520,12371530752,14582807040,17114056960,20001293312,23283486720,27002723328,31204366592,35937223168,41253712896,47210042880,53866385664,61287061504,69540724736,78700554240,88844448000
mul $0,2
add $0,4
mov $1,$0
bin $0,5
sub $1,2
mov $2,$1
mul $2,$0
mov $0,$2
div $0,24
mul $0,256
| 45.2 | 498 | 0.814159 |
0d56e22fabbe563932553c1fc1151669dfb67238 | 4,475 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_1283.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_1283.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_1283.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 %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_WT+0x8ef, %rax
nop
nop
nop
and $32523, %rsi
movw $0x5152, (%rax)
nop
nop
nop
sub %rdi, %rdi
// Store
lea addresses_PSE+0x1f41f, %rbp
nop
nop
nop
cmp $34043, %rdx
movl $0x51525354, (%rbp)
nop
nop
nop
cmp $10407, %rdx
// Store
mov $0xf1f, %rbp
nop
sub $16052, %rax
movb $0x51, (%rbp)
nop
nop
nop
sub %rcx, %rcx
// Faulty Load
lea addresses_PSE+0x1f41f, %rdi
nop
nop
nop
add %rbp, %rbp
vmovups (%rdi), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rsi
lea oracles, %rdx
and $0xff, %rsi
shlq $12, %rsi
mov (%rdx,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 8}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'54': 21829}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
| 53.27381 | 2,999 | 0.656983 |
2702faa0e816d7256d6b757e773bbaec1fe665fc | 868 | asm | Assembly | boot/16bit-print_hex.asm | Soptq/sim-osv2 | 09641c9844d3bbc06c851996fab0569e4698083a | [
"MIT"
] | null | null | null | boot/16bit-print_hex.asm | Soptq/sim-osv2 | 09641c9844d3bbc06c851996fab0569e4698083a | [
"MIT"
] | null | null | null | boot/16bit-print_hex.asm | Soptq/sim-osv2 | 09641c9844d3bbc06c851996fab0569e4698083a | [
"MIT"
] | null | null | null | print_hex:
pusha
mov cx, 0
; to print hex 0x1234, we need to convert it to string 0x1234 and then call print function
; for 0-9, we will just add 0x30 to them so that 0x0 could be 0x30
; for A-F, we will add to them so that 0xA could be 0x41
hex_loop:
cmp cx, 4 ; iterate 4 times as each register currently has 16 bits / 4 bytes
je end
mov ax, dx;
and ax, 0x000f ; mask every byte except the last one
add al, 0x30
cmp al, 0x39
jle step2 ; if alphabet is 0-9, continue
add al, 7 ; after adding 0x30, A becomes 0x3A. In order to make it 0x41, we add another 7 to it.
step2:
mov bx, HEX_OUT + 5
sub bx, cx
mov [bx], al
ror dx, 4 ; circle right shift 4 bits / 1 byte
add cx, 1
jmp hex_loop
end:
mov bx, HEX_OUT
call print
popa
ret
HEX_OUT:
db '0x0000', 0
| 22.842105 | 106 | 0.623272 |
caae53ed40e0034d14911a6e4dbb9f0eadecc9d5 | 22 | asm | Assembly | gfx/pokemon/gligar/anim_idle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | gfx/pokemon/gligar/anim_idle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | gfx/pokemon/gligar/anim_idle.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | frame 1, 35
endanim
| 7.333333 | 12 | 0.681818 |
a309c65c8405dc795d40083b6c9510d81c5a0da7 | 629 | asm | Assembly | oeis/274/A274757.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/274/A274757.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/274/A274757.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A274757: Numbers k such that 6*k+1 is a triangular number (A000217).
; 0,9,15,42,54,99,117,180,204,285,315,414,450,567,609,744,792,945,999,1170,1230,1419,1485,1692,1764,1989,2067,2310,2394,2655,2745,3024,3120,3417,3519,3834,3942,4275,4389,4740,4860,5229,5355,5742,5874,6279,6417,6840,6984,7425,7575,8034,8190,8667,8829,9324,9492,10005,10179,10710,10890,11439,11625,12192,12384,12969,13167,13770,13974,14595,14805,15444,15660,16317,16539,17214,17442,18135,18369,19080,19320,20049,20295,21042,21294,22059,22317,23100,23364,24165,24435,25254,25530,26367,26649,27504,27792
mov $1,$0
add $0,1
add $1,$0
div $0,2
mul $0,$1
mul $0,3
| 62.9 | 499 | 0.767886 |
7780e06837c598f35f51bdf13c412d9618fa2977 | 6,905 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_ht_zr_/i3-7100_9_0x84_notsx.log_21829_2856.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_ht_zr_/i3-7100_9_0x84_notsx.log_21829_2856.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_ht_zr_/i3-7100_9_0x84_notsx.log_21829_2856.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 %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x108aa, %rsi
nop
nop
and %rbp, %rbp
mov $0x6162636465666768, %r8
movq %r8, %xmm4
movups %xmm4, (%rsi)
nop
nop
nop
nop
nop
cmp $22669, %r8
lea addresses_normal_ht+0x945, %rsi
lea addresses_normal_ht+0x13419, %rdi
sub %r15, %r15
mov $50, %rcx
rep movsw
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_D_ht+0x16fa5, %r8
xor %r9, %r9
mov $0x6162636465666768, %rsi
movq %rsi, %xmm5
movups %xmm5, (%r8)
nop
add %r9, %r9
lea addresses_WT_ht+0x109c5, %rsi
lea addresses_D_ht+0x14a7d, %rdi
nop
nop
cmp %rbp, %rbp
mov $75, %rcx
rep movsl
nop
add %rdi, %rdi
lea addresses_UC_ht+0x3a85, %rbp
nop
nop
nop
nop
and $2199, %r15
mov $0x6162636465666768, %r8
movq %r8, %xmm3
vmovups %ymm3, (%rbp)
nop
and %rsi, %rsi
lea addresses_A_ht+0x1235, %r9
nop
sub %rdi, %rdi
mov $0x6162636465666768, %rsi
movq %rsi, (%r9)
nop
and %rbp, %rbp
lea addresses_D_ht+0x7985, %rsi
lea addresses_D_ht+0x4a25, %rdi
nop
xor $20029, %r10
mov $26, %rcx
rep movsw
nop
nop
nop
cmp %rdi, %rdi
lea addresses_UC_ht+0x7485, %r10
clflush (%r10)
nop
nop
nop
nop
nop
sub $41741, %r9
mov (%r10), %r8w
nop
nop
nop
nop
cmp $21504, %r9
lea addresses_D_ht+0x185, %r9
clflush (%r9)
nop
nop
nop
and $19098, %r15
mov $0x6162636465666768, %r10
movq %r10, (%r9)
and $60786, %r15
lea addresses_normal_ht+0x1aae5, %rsi
lea addresses_D_ht+0x1ddd4, %rdi
clflush (%rsi)
clflush (%rdi)
and %rbp, %rbp
mov $33, %rcx
rep movsq
nop
add $47899, %r9
lea addresses_normal_ht+0x10905, %rsi
nop
nop
dec %rcx
mov (%rsi), %rdi
nop
nop
nop
nop
sub $25213, %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
// Faulty Load
mov $0x685, %rdi
nop
nop
nop
nop
sub $2566, %rax
vmovaps (%rdi), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %rdx
lea oracles, %rax
and $0xff, %rdx
shlq $12, %rdx
mov (%rax,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_P', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_P', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'49': 5523, '00': 304, '46': 11, '44': 15991}
49 44 44 44 49 44 44 44 44 44 44 44 49 49 44 44 49 44 44 44 46 44 44 44 44 44 49 44 49 49 49 44 44 49 44 44 44 49 44 44 49 44 49 49 44 44 44 49 44 49 44 49 49 44 44 44 44 44 44 49 49 44 49 49 44 44 49 49 44 49 44 49 49 49 49 44 44 44 49 49 49 44 49 44 49 44 00 44 44 49 49 49 44 44 49 44 44 44 49 44 44 44 44 44 44 44 44 44 44 49 49 44 49 44 44 44 44 44 44 44 44 44 44 44 49 49 44 49 00 44 44 44 44 49 44 49 49 44 44 44 44 44 44 44 44 44 44 44 44 44 49 44 49 49 44 44 44 49 44 44 44 49 49 44 49 44 44 49 44 44 44 44 44 49 44 49 44 44 44 49 44 49 44 44 49 44 44 44 49 44 44 49 49 44 49 44 44 44 44 44 44 44 44 44 49 44 44 49 44 44 44 44 44 44 44 49 49 44 44 49 49 44 44 44 44 49 49 44 49 44 44 44 49 44 44 44 44 44 49 44 44 49 49 44 49 49 44 49 44 49 44 44 44 44 44 44 00 49 44 49 44 44 44 44 44 44 00 49 44 49 44 49 44 44 49 44 49 44 44 49 44 49 49 49 44 49 49 44 44 44 44 44 44 49 44 44 49 44 44 44 44 44 49 44 44 44 44 49 44 44 49 44 49 44 44 44 49 44 49 44 49 44 44 44 44 49 44 49 44 44 49 44 44 44 44 44 49 00 44 44 44 44 44 44 44 44 44 49 49 49 44 49 49 44 44 44 44 44 44 44 44 44 44 49 44 49 49 44 44 49 44 44 44 49 44 44 44 44 44 44 44 44 44 49 44 44 49 44 49 44 44 44 44 44 44 44 44 49 44 44 44 44 44 44 49 44 44 44 44 49 44 44 44 44 44 44 44 49 44 44 44 44 44 49 44 49 44 49 44 44 49 00 44 44 49 44 49 49 44 44 44 44 44 44 44 49 44 49 44 44 44 44 44 44 44 49 44 44 49 44 44 44 44 44 44 44 44 44 44 44 44 49 44 00 44 44 44 44 44 44 44 44 49 44 44 44 44 49 44 44 44 49 44 44 44 49 44 44 49 44 44 44 44 49 49 44 44 44 49 44 44 49 44 44 44 44 44 49 44 44 44 44 44 44 44 49 49 44 49 44 44 44 44 44 44 49 44 44 49 44 44 44 44 44 49 44 49 49 44 44 49 44 49 49 44 44 44 44 44 49 49 44 49 44 44 44 49 44 44 44 00 44 44 44 44 44 00 49 44 44 00 49 44 44 44 44 44 44 44 49 44 44 49 44 44 44 44 44 44 49 44 44 49 44 44 44 44 49 49 44 44 44 44 44 44 44 44 44 44 44 44 44 49 44 44 44 44 44 44 44 49 49 44 49 44 49 49 44 44 44 44 49 44 49 44 49 49 49 44 44 44 44 44 44 44 44 44 49 44 44 44 44 44 44 44 49 49 49 44 44 44 49 44 44 44 44 49 49 44 44 44 44 44 44 44 44 44 44 44 44 44 44 49 44 44 44 44 44 44 49 44 44 44 49 44 44 44 44 49 44 44 49 44 44 44 44 49 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 49 44 44 44 44 44 49 44 44 49 44 44 49 44 49 44 44 44 44 44 44 44 44 49 44 44 49 44 49 49 44 44 44 49 44 44 44 49 49 49 44 44 44 44 44 44 49 00 49 44 49 44 44 49 44 44 44 49 44 49 49 44 44 44 44 44 44 44 44 44 44 44 44 44 49 44 44 49 44 44 49 44 49 49 00 49 44 44 44 44 49 44 44 44 44 44 49 44 44 44 44 44 49 44 49 44 44 49 44 44 44 44 44 44 44 49 44 44 44 44 44 44 44 44 49 44 44 49 44 49 49 49 44 44 44 44 44 44 49 49 44 44 44 44 49 49 44 44 44 49 49 44 49 49 44 44 49 44 44 44 44 44 44 49 44 44 44 49 44 44 49 44 44 44 44 44 44 44 49 44 44 44 44 44 44 44 44 49 44 44 44 49 44 49 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 49 44 49 49 00 44 44 44 44 49 49 44 49 44 49 44 49 44 44 44 00 49 49 44 44 44 44 49 44 44 44 44 44 44 44 44 44 49 44 44 44 49 44 49 44 44 44 44 44 44 44 44 44 44 44 44 44 49 44
*/
| 38.149171 | 2,999 | 0.658508 |
41bfd519c369b1f7f8bd0eca36495b5d86014e8c | 90,005 | asm | Assembly | Library/SpecUI/CommonUI/CWin/cwinPtr.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/SpecUI/CommonUI/CWin/cwinPtr.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/SpecUI/CommonUI/CWin/cwinPtr.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: CommonUI/CWin (common code for several specific ui's)
FILE: cwinPtr.asm
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 8/89 Initial version
DESCRIPTION:
$Id: cwinPtr.asm,v 1.2 98/03/11 06:08:23 joon Exp $
-------------------------------------------------------------------------------@
WinOther segment resource
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinStartButton
DESCRIPTION: To implement the SelectMyControlsOnly mechanism, we send
MSG_STARTUP_GRAB to self, then send the method on to our
children.
PASS: *ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN: Nothing
DESTROYED: bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
Eric 8/89 More doc.
------------------------------------------------------------------------------@
OpenWinStartButton proc far
class OLWinClass
;if we had begun the process of toggling menu navigation (i.e. ALT
;had been pressed), we want to nuke it.
;
; We must go up to an OLBaseWin in case we aren't an OLBaseWin, where
; menu navigation is allowed
call WinOther_DerefVisSpec_DI
ANDNF ds:[di].OLWI_menuState, not mask OLWMS_TOGGLE_MENU_NAV_PENDING
call OpenClearToggleMenuNavPending
;the user is beginning to interact with this window or its contents.
;Initiate the SelectMyControlsOnly mechanism.
push ax, cx, dx, bp
mov ax, MSG_OL_WIN_STARTUP_GRAB
call WinOther_ObjCallInstanceNoLock
pop ax, cx, dx, bp
;now send to the correct children
GOTO WinOther_ObjCallSuperNoLock_OLWinClass_Far
OpenWinStartButton endp
WinOther ends
;----------------------
WinMethods segment resource
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinStartupGrab -- MSG_OL_WIN_STARTUP_GRAB
USED TO IMPLEMENT: SelectMyControlsOnly mechanism (see top of file)
DESCRIPTION: This procedure is called when:
1) the mouse button has been pressed within the
Visible window, we received the event through
the implied grab. The user might be starting to
use a gadget, such as a button. (The event has not
yet been sent on to the child.)
2) (menu windows) the mouse button was just pressed on
the menu button for this menu window. This menu window
was Opened, and now we expect the user to drag the
mouse onto the window.
Grab window & installed passive grab, so that we can tell when
the mouse button(s) have been released. When that future event
happens, we will remove our passive grab, and (if not a
menu window in stay-up mode), will remove our window grab.
PASS: *ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx, bp - ?
RETURN: Nothing
DESTROYED: bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 5/89 Initial version
Eric 8/89 Documented, changes for menu windows.
------------------------------------------------------------------------------@
OpenWinStartupGrab method dynamic OLWinClass, MSG_OL_WIN_STARTUP_GRAB
;for SelectMyControlsOnly mechanism:
;if we haven't already
test ds:[di].OLWI_specState, mask OLWSS_GRABBED
jnz OWSG_50
;mark as grabbed
or ds:[di].OLWI_specState, mask OLWSS_GRABBED
mov di, ds:[di].VCI_window ;fetch window handle
call VisAddButtonPostPassive ;Startup passive grab, so we
;can tell when all buttons have
;been released.
OWSG_50:
ret
OpenWinStartupGrab endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OpenWinCheckIfInteractableObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks to see if that is an interactable object
CALLED BY: GLOBAL
PASS: cx:dx - object
RETURN: carry set if child
DESTROYED: nada
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
atw 1/27/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
OpenWinCheckIfInteractableObject method OLWinClass,
MSG_META_CHECK_IF_INTERACTABLE_OBJECT
.enter
cmp cx, ds:[di].OLWI_sysMenu
stc
je exit
clc
exit:
.leave
ret
OpenWinCheckIfInteractableObject endp
WinMethods ends
;----------------------
WinOther segment resource
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinPrePassiveButton -- MSG_META_PRE_PASSIVE_BUTTON
DESCRIPTION: Handler for Passive Button events (see CTTFM description,
top of cwinClass.asm file.)
(We know that REFM mechanism does not rely on this procedure, because
REFM does not request a pre-passive grab.)
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
------------------------------------------------------------------------------@
OpenWinPrePassiveButton method dynamic OLWinClass, MSG_META_PRE_PASSIVE_BUTTON
; Check to see if mouse is allowed to interact with this window or not.
; Since we set up a pre-passive grab whenever the mouse is over us,
; regardless of mouse grabs or modal status, we have to do this check
; to make sure user presses can actually affect this window.
;
call CheckIfInteractable
jnc exit ;If not allowed in window, exit
;
; Code added 10/22/90 to hopefully cover all cases where the user
; clicks somewhere in or out of the window when we're in menu navigation
; so that it will be turned off.
;
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_focusExcl.FTVMC_flags, mask MAEF_OD_IS_MENU_RELATED
jz noMenuFocus ;menu does not have focus branch
test ds:[di].OLWI_focusExcl.FTVMC_flags, mask HGF_APP_EXCL
jz noMenuFocus ;window is not focus win, branch
push cx, dx, bp
mov ax, MSG_VIS_VUP_RELEASE_MENU_FOCUS
call WinOther_ObjCallInstanceNoLock ;if menu has focus, release it
pop cx, dx, bp
; ;fall thru to do anything else
; ; necessary (cbh 10/25/90)
noMenuFocus:
;translate method into MSG_META_PRE_PASSIVE_START_SELECT etc. and
;send to self. (See OpenWinPrePassStartSelect)
mov ax, MSG_META_PRE_PASSIVE_BUTTON
call OpenDispatchPassiveButton
exit:
ret
OpenWinPrePassiveButton endp
COMMENT @----------------------------------------------------------------------
FUNCTION: CheckIfInteractable
DESCRIPTION: Utility routine to check & see if this object is allowed to
interact with the mouse at this time. Uses new boffo
MSG_META_TEST_WIN_INTERACTIBILITY which takes into
account grabs, modality, etc.
CALLED BY: INTERNAL
OpeWinPrePassiveButton
OLDisplayControlPrePassiveButton
OpenWinEnsureMouseNotActivelyTrespassing
PASS: *ds:si - windowed object
RETURN: carry - set if interactable, clear if not
ax - MRF_PROCESSED
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 3/92 Initial version
------------------------------------------------------------------------------@
CheckIfInteractable proc far uses cx, dx, bp, di
class VisCompClass
.enter
mov di, ds:[si]
add di, ds:[di].Vis_offset
mov bp, ds:[di].VCI_window
;
; New code to exit not-interactable if we don't find the silly window.
; -cbh 11/ 6/92
;
tst_clc bp
jz exit
mov cx, ds:[LMBH_handle]
mov dx, si
mov ax, MSG_META_TEST_WIN_INTERACTIBILITY
call GenCallApplication
exit:
mov ax, mask MRF_PROCESSED ; in case exiting
.leave
ret
CheckIfInteractable endp
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinPostPassiveButton -- MSG_META_POST_PASSIVE_BUTTON
DESCRIPTION: Handler for Passive Button events
;SMCO: button release comes through here, indicating
;that user finished pressing on child gadget. If
;not a menu in stay-up mode, we _END_GRAB.
(This is subclassed by the OLMenuButton object,
so that it can decide whether to drop its menu which
is exiting stay-up mode.)
;mechanisms: SMCO
;SMCO: button release comes through here, indicating
;that user finished pressing on child gadget. If
;not a menu in stay-up mode, we _END_GRAB.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
------------------------------------------------------------------------------@
OpenWinPostPassiveButton method dynamic OLWinClass,
MSG_META_POST_PASSIVE_BUTTON
;are any buttons pressed?
test bp, mask BI_B3_DOWN or mask BI_B2_DOWN or \
mask BI_B1_DOWN or mask BI_B0_DOWN
jnz OWPPB_90 ;skip if so...
;all released: end window grab & monitoring.
push cx, dx, bp
clr cx ;do not force release
mov ax, MSG_OL_WIN_END_GRAB
call WinOther_ObjCallInstanceNoLock
pop cx, dx, bp
OWPPB_90:
mov ax, MSG_META_POST_PASSIVE_BUTTON
call OpenDispatchPassiveButton
ret
OpenWinPostPassiveButton endp
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinEnsureMouseNotActivelyTrespassing
DESCRIPTION: Makes sure that this window doesn't have the window or
mouse grabbed if it shouldn't.
PASS:
*ds:si - instance data
es - segment of OLWinClass
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 5/89 Initial version
------------------------------------------------------------------------------@
OpenWinEnsureMouseNotActivelyTrespassing method OLWinClass, \
MSG_META_ENSURE_MOUSE_NOT_ACTIVELY_TRESPASSING
call CheckIfInteractable ; Check to see if mouse can interact
; with this window
jc done ; if allowed to be in, done
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_MENU
jz justEndGrab ; skip if not a menu...
.warn -private
test ds:[di].OLMWI_specState, mask OMWSS_IN_STAY_UP_MODE
.warn @private
jz justEndGrab ; if not in stay-up mode, just end the
; grab that it has.
; If it IS in stay-up mode, then
; force the darn thing down -- it
; just doesn't make sense while a
; modal window is up
mov cx, IC_DISMISS
mov ax, MSG_GEN_GUP_INTERACTION_COMMAND
jmp short sendMethod
justEndGrab:
; OTHERWISE, force a release of any window grab we have, & force
; any gadget within us to release the mouse -- it is not our
; right to have it anymore (Some modal window has just popped up)
;
mov ax, MSG_OL_WIN_END_GRAB
mov cx, TRUE ;force release of exclusives
sendMethod:
call WinOther_ObjCallInstanceNoLock
done:
clr ax ; Return "MouseFlags" null
ret
OpenWinEnsureMouseNotActivelyTrespassing endm
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinAllowGlobalTransfer
DESCRIPTION: Release window grab for global quick-transfer.
PASS:
*ds:si - instance data
es - segment of OLWinClass
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 5/89 Initial version for 2.0 quick-transfer
------------------------------------------------------------------------------@
OpenWinAllowGlobalTransfer method OLWinClass, \
MSG_VIS_VUP_ALLOW_GLOBAL_TRANSFER
;
; clear toggle menu naviagion pending flag here (in case we are a
; OLBaseWin) and up to a OLBaseWin (in case we are not)
;
call WinOther_DerefVisSpec_DI
andnf ds:[di].OLWI_menuState, not mask OLWMS_TOGGLE_MENU_NAV_PENDING
call OpenClearToggleMenuNavPending
mov cx, FALSE
mov ax, MSG_OL_WIN_END_GRAB
call WinOther_ObjCallInstanceNoLock
mov ax, MSG_FLOW_ALLOW_GLOBAL_TRANSFER
clr di
GOTO UserCallFlow
OpenWinAllowGlobalTransfer endm
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinEndGrab -- MSG_OL_WIN_END_GRAB
DESCRIPTION: Ungrab window, uninstall post-passive grab. Set active
exclusive to 0, so that any previous owner is notified.
This method should be called only in two cases:
1) When all buttons have been released
2) When the window is being closed.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx = TRUE to force release of all grabs (used by OpenWinVisClose)
cx, dx - ?
bp - ?
RETURN:
Nothing
NOTE: may result in install of pre-passive mouse grab if mouse is
over window.
DESTROYED:
bx, si, di, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 5/89 Initial version
------------------------------------------------------------------------------@
OpenWinEndGrab method dynamic OLWinClass, MSG_OL_WIN_END_GRAB
class OLWinClass
EC < call VisCheckVisAssumption ; Make sure vis data exists >
EC < cmp cx, FALSE >
EC < je 5$ >
EC < cmp cx, TRUE >
EC < ERROR_NE OL_ERROR >
EC <5$: >
; see if base window is grabbed
test ds:[di].OLWI_specState, mask OLWSS_GRABBED
jz done ; if not, done
tst cx ;force release?
jnz 10$ ;skip if so...
;This window has a current Window Grab. If this window
;is a menu in stay-up-mode, allow Window Grab to persist,
;so no other windows in the system get PTR events.
;(OK to look at OLMenuWinClass instance data)
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_MENU
jz 10$ ;skip if not a menu...
.warn -private
test ds:[di].OLMWI_specState, mask OMWSS_IN_STAY_UP_MODE
.warn @private
jnz done ;skip if is menu in stay up mode...
10$: ;Kill Window Grab for this window
ANDNF ds:[di].OLWI_specState, not (mask OLWSS_GRABBED)
;reset flag
push cx
call VisReleaseMouse ; if we happened to have had mouse,
; release it.
call VisReleaseKbd ; if we happened to have had kbd,
; release it.
call AbortMoveResize ; If moving/resizing window, abort out
; Release passive grab
call VisRemoveButtonPostPassive
pop cx
;Now we want to grab the gadget exclusive for this window group,
;so that any menus of other related gadgets visually below us
;will go away. We only do this if:
; cx = TRUE (we have been called from VisClose, and want to
; forcibly close all menus)
; - OR -
; OLWMS_HAS_MENU_IN_STAY_UP_MODE is FALSE. This means that
; we have not been notified that a child menu is in
; stay-up-mode, and so want to force the release of the
; gadget exclusive as the user releases the mouse.
;For cascading menus, we do not want to take the gadget exclusive away
;from the menus UNLESS it is requested to be taken by force. This
;allows the user to click-and-drag from the top menu button and
;release on a menu button within the menu without having the menu
;disappear (because none have actually been told to be in STAY_UP
;mode yet.) This is actually a problem with the standard Motif
;menus (which hasn't been fixed yet).
tst cx ;force release?
if _CASCADING_MENUS
jz 50$ ;no, move on..
else ;_CASCADING_MENUS is FALSE
jnz 40$ ;skip if so...
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_menuState, mask OLWMS_HAS_MENU_IN_STAY_UP_MODE
jnz 50$ ;skip if HAS menu in stay up mode...
endif ;_CASCADING_MENUS
40$: ;Take Gadget Exclusive: force release of any active element
clr cx ;grab active exclusive semaphore:
clr dx ;will notify menu and force it to
;close up toute suite.
mov ax, MSG_VIS_TAKE_GADGET_EXCL
call WinOther_ObjCallInstanceNoLock
50$:
call WinOther_DerefVisSpec_DI
mov di, ds:[di].VCI_window ; fetch window handle
EC < tst di >
EC < ERROR_Z OL_ERROR >
done:
ret
OpenWinEndGrab endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OpenWinAbortMoveResize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: abort move/resize
CALLED BY: MSG_OL_WIN_ABORT_MOVE_RESIZE
PASS: *ds:si = OLWinClass object
ds:di = OLWinClass instance data
es = segment of OLWinClass
ax = MSG_OL_WIN_ABORT_MOVE_RESIZE
RETURN: nothing
ALLOWED TO DESTROY:
ax, cx, dx, bp
bx, si, di, ds, es
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 6/4/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
OpenWinAbortMoveResize method dynamic OLWinClass, MSG_OL_WIN_ABORT_MOVE_RESIZE
call AbortMoveResize
ret
OpenWinAbortMoveResize endp
WinOther ends
WinCommon segment resource
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinPtr -- MSG_META_PTR
DESCRIPTION: Handler for PTR events
;mechanisms: CPORB
;CPORB: check is ptr over resize border, change image
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
Eric 8/89 Added CPORB mechanism - changes ptr image
when over resize border in CUA/Motif
------------------------------------------------------------------------------@
OpenWinPtr method dynamic OLWinClass, MSG_META_PTR
if _CUA_STYLE ;START of MOTIF specific code -------------------------
;are select or move/copy functions
;active?
test bp, (mask UIFA_SELECT or mask UIFA_MOVE_COPY) shl 8
jnz 10$ ;skip if so...
call OpenWinUpdatePtrImage ;change pointer image if necessary
;does not change ax, cx, dx, bp
call WinCommon_DerefVisSpec_DI
10$:
endif ;END of MOTIF specific code -----------------------------------
;if a keyboard resize is pending, start the resize in the direction
;of mouse movement
test ds:[di].OLWI_moveResizeState, mask OLWMRS_RESIZE_PENDING
jz notResizePending
mov di, ds:[di].VCI_window
tst di
jz OWP_QuitProcessed
push es
segmov es, dgroup, ax ; es = dgroup
mov ax, es:[olScreenStart.P_x] ; ax, bx = start position
mov bx, es:[olScreenStart.P_y]
pop es
call WinUntransform ; convert to win coords
sub cx, ax ; cx = X deflection
sub dx, bx ; dx = Y deflection
mov ax, cx
or ax, dx
tst ax
jz OWP_QuitProcessed ; no deflection
mov ax, cx
tst ax
jns haveLeftRight
neg ax
haveLeftRight:
mov bx, dx
tst bx
jns haveUpDown
neg bx
haveUpDown:
cmp ax, bx
jge resizeLeftRight
mov bl, mask OLWMRS_RESIZING_DOWN
cmp dx, 3
jge haveResizeDir
mov bl, mask OLWMRS_RESIZING_UP
cmp dx, -3
jle haveResizeDir
jmp short OWP_QuitProcessed
resizeLeftRight:
mov bl, mask OLWMRS_RESIZING_RIGHT
cmp cx, 3
jge haveResizeDir
mov bl, mask OLWMRS_RESIZING_LEFT
cmp cx, -3
jle haveResizeDir
jmp short OWP_QuitProcessed
haveResizeDir:
call OLWMRStartResize ; only handles one direction
jmp short OWP_QuitProcessed
notResizePending:
;very important: if in the middle of a move or resize operation,
;ignore this pointer event - we don't want menu buttons to get
;involved in this.
test ds:[di].OLWI_moveResizeState, OLWMRS_MOVING_OR_RESIZING_MASK
jnz OWP_QuitProcessed ; if so, quit out
if _OL_STYLE ;START of OPEN LOOK specific code ---------------------
test bp, (mask UIFA_SELECT or mask UIFA_MOVE_COPY or \
mask UIFA_FEATURES) shl 8
jz OWP_QuitProcessed ;skip if no button pressed
test ds:[di].OLWI_attrs, mask OWA_PINNABLE
jz OWP_90 ;skip if not...
test ds:[di].OLWI_specState, mask OLWSS_PINNED
jnz OWP_90 ;skip if pinned already
push ax
call CheckIfInMarkBounds ;if in bounds, returns carry
pop ax
jc pointerIsOnMark ;skip if in bounds...
pointerIsNotOnMark:
;Not on push pin: in menus, we want to restore pin image to "unpinned".
test ds:[di].OLWI_specState, mask OLWSS_DRAWN_PINNED
jz OWP_90 ;skip if not drawn as pinned...
ANDNF ds:[di].OLWI_specState, not (mask OLWSS_DRAWN_PINNED)
; test ds:[di].OLWI_specState, mask OLWSS_PINNED
; jnz OWP_90 ;If unpinned, do nothing...
;set state flag so that header is redrawn.
mov cl, mask OLWHS_HEADER_MARK_IMAGES_INVALID
call OpenWinHeaderMarkInvalid
jmp short OWP_QuitProcessed
pointerIsOnMark:
; Ptr on top of push pin
test ds:[di].OLWI_specState, mask OLWSS_DRAWN_PINNED
jnz OWP_90 ;skip if already drawn pinned...
ORNF ds:[di].OLWI_specState, mask OLWSS_DRAWN_PINNED
; test ds:[di].OLWI_specState, mask OLWSS_PINNED
; jnz OWP_90 ; If pinned, do nothing
; ; else draw it "pinned"
;set state flag so that header is redrawn.
push cx, dx
mov cl, mask OLWHS_HEADER_MARK_IMAGES_INVALID
call OpenWinHeaderMarkInvalid
pop cx, dx
jmp OWP_QuitProcessed
OWP_90:
endif ;END of OPEN LOOK specific code -------------------------------
; SEND PTR on down to children, but only if this window is grabbed,
; indicating user has pressed in the window & is trying to interact
; with it.
; In Motif we must send all pointer events to the children so that text
; objects can update their cursor
OLS < call WinCommon_DerefVisSpec_DI >
OLS < test ds:[di].OLWI_specState, mask OLWSS_GRABBED >
OLS < jz OWP_QuitProcessed ; if not grabbed, eat event here. >
; Else
call VisCallChildUnderPoint ; pass on to object under location
ret
OWP_QuitProcessed:
; show processed
mov ax, mask MRF_PROCESSED or mask MRF_CLEAR_POINTER_IMAGE
ret
OpenWinPtr endp
COMMENT @----------------------------------------------------------------------
PROCEDURE: OpenWinUpdatePtrImage
DESCRIPTION: This procedure changes the pointer image when it
is over the resize border.
CALLED BY: OpenWinPtr
OpenWinStartSelect
PASS: *ds:si - instance data
ds:di - offset to master part instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN: ax, cx, dx, si, ds, es = same
DESTROYED: bx, di
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 8/89 Initial version
------------------------------------------------------------------------------@
if _CUA_STYLE ;START of CUA/MOTIF/ISUI specific code ---------
OpenWinUpdatePtrImage proc far
push ax, cx, dx, bp ;save pointer position and data
mov bl, ds:[di].OLWI_moveResizeState
test bl, OLWMRS_MOVING_OR_RESIZING_MASK
jz normalUpdate
mov cl, OLPI_MOVE
test bl, mask OLWMRS_MOVING
LONG jnz OWUPI_30
andnf bl, OLWMRS_RESIZING_MASK
if _OL_STYLE
mov cl, OLPI_RESIZE_UP_DIAG
cmp bl, mask OLWMRS_RESIZING_UR
je OWUPI_30 ;skip if so...
cmp bl, mask OLWMRS_RESIZING_LL
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWN_DIAG
;save bytes
; cmp bl, mask OLWMRS_RESIZING_LR
; je OWUPI_30 ;skip if so...
; cmp bl, mask OLWMRS_RESIZING_UL
; je OWUPI_30 ;skip if so...
endif
if _CUA_STYLE
mov cl, OLPI_RESIZE_UPL_DIAG
cmp bl, mask OLWMRS_RESIZING_UP or mask OLWMRS_RESIZING_LEFT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_UPR_DIAG
cmp bl, mask OLWMRS_RESIZING_UP or mask OLWMRS_RESIZING_RIGHT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWNL_DIAG
cmp bl, mask OLWMRS_RESIZING_DOWN or mask OLWMRS_RESIZING_LEFT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWNR_DIAG
cmp bl, mask OLWMRS_RESIZING_DOWN or mask OLWMRS_RESIZING_RIGHT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_LEFT
test bl, mask OLWMRS_RESIZING_LEFT
jnz OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_RIGHT
test bl, mask OLWMRS_RESIZING_RIGHT
jnz OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_UP
test bl, mask OLWMRS_RESIZING_UP
jnz OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWN
;saving bytes...
; test bl, mask OLWMRS_RESIZING_DOWN
; jnz OWUPI_30 ;skip if so...
endif
jmp short OWUPI_30
normalUpdate:
;If RESIZABLE then allow pointer to change over boundaries
MO < push bp ; Save button information >
MO < call TestForMoveControl ;pass ds:di = specific instance >
MO < pop bp ; Recover button information >
MO < mov bx, cx ; Save mouse xpos >
MO < mov cl, OLPI_MOVE ; Assume using the move ptr >
MO < jnc 10$ >
MO < test bp, (mask UIFA_SELECT or mask UIFA_MOVE_COPY) shl 8 ;is mouse button pressed? >
MO < jnz OWUPI_30 ; Go chg ptr image, if moving >
MO <10$: >
MO < mov cx, bx ; Else restore mouse xpos >
ISU < push bp ; Save button information >
ISU < call TestForMoveControl ;pass ds:di = specific instance >
ISU < pop bp ; Recover button information >
ISU < mov bx, cx ; Save mouse xpos >
ISU < mov cl, OLPI_MOVE ; Assume using the move ptr >
ISU < jnc 10$ >
ISU < test bp, (mask UIFA_SELECT or mask UIFA_MOVE_COPY) shl 8 ;is mouse button pressed? >
ISU < jnz OWUPI_30 ; Go chg ptr image, if moving >
ISU <10$: >
ISU < mov cx, bx ; Else restore mouse xpos >
call TestForResizeControl ;Test window bounds to see if is
;in resize corner. Sets flags to
;indicate which one.
mov cl, OLPI_NONE ;default: not over border;
; no override image requested
jnc OWUPI_30 ;skip if not over border...
;find correct resize image:
if _MOTIF or _ISUI ;------------------------------------------------------
mov cl, OLPI_RESIZE_UPL_DIAG
cmp bx, mask XF_RESIZE_TOP or mask XF_RESIZE_LEFT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_UPR_DIAG
cmp bx, mask XF_RESIZE_TOP or mask XF_RESIZE_RIGHT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWNL_DIAG
cmp bx, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_LEFT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWNR_DIAG
cmp bx, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_RIGHT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_LEFT
test bx, mask XF_RESIZE_LEFT
jnz OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_RIGHT
test bx, mask XF_RESIZE_RIGHT
jnz OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_UP
test bx, mask XF_RESIZE_TOP
jnz OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWN
;saving bytes...
; test bx, mask XF_RESIZE_BOTTOM
; jnz OWUPI_30 ;skip if so...
else ;---------------------------------------------------------------
mov cl, OLPI_RESIZE_UP_DIAG
cmp bx, mask XF_RESIZE_TOP or mask XF_RESIZE_RIGHT
je OWUPI_30 ;skip if so...
cmp bx, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_LEFT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_DOWN_DIAG
cmp bx, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_RIGHT
je OWUPI_30 ;skip if so...
cmp bx, mask XF_RESIZE_TOP or mask XF_RESIZE_LEFT
je OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_HORIZ
test bx, mask XF_RESIZE_LEFT or mask XF_RESIZE_RIGHT
jnz OWUPI_30 ;skip if so...
mov cl, OLPI_RESIZE_VERT
;saving bytes...
; test bx, mask XF_RESIZE_TOP or mask XF_RESIZE_BOTTOM
; jnz OWUPI_30 ;skip if so...
endif ;---------------------------------------------------------------
OWUPI_30: ;tell the window sys which pointer image to use for the window
push di
mov ch, PIL_WINDOW ;indicate which level in the image
;hierarchy we are changing
mov di, ds:[di].VCI_window ;fetch window to set on
call OpenSetPtrImage ;change image!
pop di
pop ax, cx, dx, bp ;recall pointer position and data
ret
OpenWinUpdatePtrImage endp
endif ;END of CUA/MOTIF/ISUI specific code ---------------
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinStartSelect -- MSG_META_START_SELECT,
MSG_META_START_MOVE_COPY
DESCRIPTION: Handler for SELECT button pressed on base window.
Raise window to front, make focus, if using point & click.
IMPORTANT: if not starting a move or resize, don't grab
the mouse!
;First send method to kids, and if they don't handle
;event, we begin move/resize.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
------------------------------------------------------------------------------@
OpenWinStartSelect method dynamic OLWinClass, MSG_META_START_SELECT, \
MSG_META_START_MOVE_COPY
;First: update the mouse pointer image, in case we have not received
;a MSG_META_PTR event recently.
CUAS < call OpenWinUpdatePtrImage >
;Startup SMCO mechanism, and send event on to children
pushdw cxdx
call OpenWinStartButton
popdw bxbp
test ax, mask MRF_SET_POINTER_IMAGE
jnz 10$
movdw cxdx, bxbp ;restore cx and dx if not returning ptr
10$:
test ax, mask MRF_PROCESSED ;see if processed by child
jnz OWSS_90 ;child processed event. Exit here.
;Mouse press is in window background - no child took the event
;exit menu navigation, if in progress.
;(Releases of menu are now handled by the menu's pre-passive button
;handler, set up when menu navigation is started. -cbh 10/22/90)
;
; push cx, dx
; mov ax, MSG_VIS_VUP_RELEASE_MENU_FOCUS
; call WinCommon_ObjCallInstanceNoLock
; pop cx, dx
; ;If "SELECT_ALWAYS_RAISES" isn't set, then
; ;raise now, & set as focus if selectable & click-to-type model
; ; es holds class, which is in dgroup
; ; test global property
; call FlowGetUIButtonFlags
; test al, mask UIBF_SELECT_ALWAYS_RAISES
; jnz OWSS_70 ; If raise ALWAYS, we're done already
; Shouldn't need this, since pre-passive button should always catch this...
; push cx, dx
; mov ax, MSG_GEN_BRING_TO_TOP
; call WinCommon_ObjCallInstanceNoLock
; ; Raise to top, select, make active,
; ; all if window type allows
; pop cx, dx
;OWSS_70:
if DIALOGS_WITH_FOLDER_TABS
call WinCommon_DerefVisSpec_DI
cmp ds:[di].OLWI_type, MOWT_DISPLAY_WINDOW
jbe testMoveResize
mov ax, ds:[di].OLWI_titleBarBounds.R_bottom
sub ax, ds:[di].OLWI_titleBarBounds.R_top
cmp dx, ax
ja testMoveResize
mov ax, TEMP_OL_WIN_TAB_INFO
call ObjVarFindData
jnc testMoveResize
clr di
cmp cx, ds:[bx].OLWFTS_tabs[0].LS_end
jb gotTab
inc di
cmp cx, ds:[bx].OLWFTS_tabs[4].LS_end
jb gotTab
inc di
cmp cx, ds:[bx].OLWFTS_tabs[8].LS_end
ja testMoveResize
gotTab:
shl di, 1
tst ds:[bx].OLWFTS_tabPosition[di]
jz testMoveResize ;skip if already on top
push cx, dx
mov cx, di
shr cx, 1
mov ax, MSG_OL_DIALOG_WIN_RAISE_TAB
call ObjCallInstanceNoLock
pop cx, dx
testMoveResize:
endif
;See if the user is initiating a move or resize operation:
;check if the pointer is in the move/resize area. If is there,
;grab the mouse, and save some state flags so that when we get
;a DRAG event we can begin the move or resize. If we get an END_SELECT
;instead, we just release the mouse grab.
call WinCommon_DerefVisSpec_DI
call TestForResizeControl ;pass ds:di = specific instance
jc isMoveResize ;skip if is resizing window...
call TestForMoveControl ;pass ds:di = specific instance
jnc OWSS_80 ;skip if not moving window...
isMoveResize:
;we might be starting to move or resize this window: save state flags
;indicating which operation and direction, and grab mouse.
; al = mask of flags to set in OLWI_moveResizeState to
; indicate operation and direction
; bx = move/resize flags for IM
push es
push ax
segmov es, dgroup, ax ;es = dgroup
pop ax
or ds:[di].OLWI_moveResizeState, al
;set MOVING or RESIZING flags
mov es:[olXorFlags], bx ;Pass move/resize flags for IM
pop es
call VisGrabMouse ; if in window background, grab mouse >
;STORE away Click position, in case a drag ensues (Stored in
;screen start variable, temporarily, since not in use by anyone
;else right now-- we're storing actually in window coords, but
;we'll fix this in DRAG_SELECT)
push es
segmov es, dgroup, ax ;es = dgroup
mov es:[olScreenStart.P_x], cx
mov es:[olScreenStart.P_y], dx
pop es ;restore es
OWSS_80:
mov ax, mask MRF_PROCESSED ; show processed
OWSS_90:
ret
OpenWinStartSelect endp
WinCommon ends
WinOther segment resource
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinDragSelect -- MSG_META_DRAG_SELECT, MSG_META_DRAG_MOVE_COPY
DESCRIPTION: Handler for SELECT button being dragged on base window. If in
previous START_SELECT determined that a move or resize operation
would be valid, we start it now.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 11/89 Code moved here from START_SELECT handler
Eric 12/89 lots of rework
------------------------------------------------------------------------------@
OpenWinDragSelect method dynamic OLWinClass, MSG_META_DRAG_SELECT, \
MSG_META_DRAG_MOVE_COPY
;see if MSG_META_START_SELECT initiated the move or resize operations
;(i.e. grabbed mouse, but did not move or resize window yet)
test ds:[di].OLWI_moveResizeState, mask OLWMRS_MOVING
;test instruction clears carry
jnz isMovingOrResizing ;skip if moving (CY=0)...
test ds:[di].OLWI_moveResizeState, OLWMRS_RESIZING_MASK
stc ;flag: is resizing
LONG jz done ;skip if not resizing...
isMovingOrResizing:
;Get mouse position value which was saved at MSG_META_START_SELECT.
pushf ;save carry (move/resize) flag
ANDNF ds:[di].OLWI_moveResizeState,
not mask OLWMRS_MOVE_RESIZE_PENDING
;reset flag, so that END_SELECT does
;not void this move/resize
mov di, [di].VCI_window ; Get window handle
EC < push bx >
EC < mov bx, di >
EC < call ECCheckWindowHandle ;make sure we have a window >
EC < pop bx >
;now begin to PUSH ARGS for call to ImStartMoveResize:
popf
jnc calcPosition ;skip if is move operation...
;for resize operation, must pass min/max values
if 0 ; let's see if this is too slow - brianc 9/18/92
;PrintMessage <Calc window resize min/max values! (Get rid of dummy values!)>
mov ax, 100
push ax ; Pass the minWidth
mov ax, 50
push ax ; Pass the minHeight
else
mov ax, MSG_VIS_COMP_GET_MINIMUM_SIZE
call ObjCallInstanceNoLock ; cx = min width, dx = min height
push cx ; Pass the minWidth
push dx ; Pass the minHeight
endif
mov ax, 4000h
push ax ; Pass the maxWidth
mov ax, 4000h ;can SAVE BYTES here
push ax ; Pass the maxHeight
calcPosition: ;get pointer position in document coords
push es
segmov es, dgroup, ax ; es = dgroup
mov ax, es:[olScreenStart.P_x]
mov bx, es:[olScreenStart.P_y]
pop es
push ax ;Pass the x offset in doc coords
push bx ;Pass the y offset in doc coords
call WinTransform ;convert to screen coordinate
;store screen start position in global variable, until done.
push es, cx
segmov es, dgroup, cx
mov es:[olScreenStart.P_x], ax
mov es:[olScreenStart.P_y], bx
pop es, cx
call VisGetSize ;Get bounds in doc coords
clr ax
clr bx
if _OL_STYLE ;START of OPEN LOOK specific code ---------------------
;just a thin line
clr bp ; rectangle, not a region
push bp ; (pass 0 address)
push bp
endif ;END of OPEN LOOK specific code -------------------------------
if _CUA_STYLE ;START of MOTIF specific code -------------------------
if _ROUND_THICK_DIALOGS
mov bp, offset RoundedPrimaryResizeRegion ;assume rounded border
call OpenWinShouldHaveRoundBorderFar ;destroys nothing
jc OWDS_78
endif ;_ROUND_THICK_DIALOGS
mov bp, offset PrimaryResizeRegion
;assume is normal window
push di
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_WIN_ICON
jz OWDS_77 ;skip if is not window icon
mov bp, offset WinIconResizeRegion
OWDS_77:
pop di
if _ROUND_THICK_DIALOGS
OWDS_78:
endif ;_ROUND_THICK_DIALOGS
; Get segment that regions are in
mov si, handle PrimaryResizeRegion
push si ; ^hsi:bp = region definition, push
push bp
endif ;END of MOTIF specific code -----------------------------------
mov bp, 0 ; End on all buttons up
push es
segmov es, dgroup, si ; es = dgroup
mov si, es:[olXorFlags] ; Pass move/resize flags
pop es
call ImStartMoveResize ; Start the screen xor'ing
done:
mov ax, mask MRF_PROCESSED ; show processed
ret
OpenWinDragSelect endp
if _CUA_STYLE ;START of CUA/MOTIF specific code -----
RESIZE_WIDTH = 5
;resize region for GenPrimaries, etc...
FXIP<RegionResourceXIP segment resource >
PrimaryResizeRegion label Region
word PARAM_0, PARAM_1, PARAM_2-1, PARAM_3-1 ;bounds
word PARAM_1-1, EOREGREC
word PARAM_1+RESIZE_WIDTH-1, PARAM_0, PARAM_2-1, EOREGREC
word PARAM_3-RESIZE_WIDTH-1
word PARAM_0, PARAM_0+RESIZE_WIDTH-1
word PARAM_2-RESIZE_WIDTH, PARAM_2-1, EOREGREC
word PARAM_3-1, PARAM_0, PARAM_2-1, EOREGREC
word EOREGREC
if _ROUND_THICK_DIALOGS
; resize region for Primaries that have rounded windows
; This is drawn 5 pixels thick. It would be difficult to make the width
; variable with rounded corners.
RoundedPrimaryResizeRegion label Region
word PARAM_0, PARAM_1, PARAM_2-1, PARAM_3-1 ;bounds
word PARAM_1-1, EOREGREC
word PARAM_1,
PARAM_0+4, PARAM_2-5, EOREGREC
word PARAM_1+1,
PARAM_0+2, PARAM_2-3, EOREGREC
word PARAM_1+3,
PARAM_0+1, PARAM_2-2, EOREGREC
word PARAM_1+4,
PARAM_0, PARAM_2-1, EOREGREC
word PARAM_1+5,
PARAM_0, PARAM_0+5, PARAM_2-6, PARAM_2-1, EOREGREC
word PARAM_3-7,
PARAM_0, PARAM_0+4, PARAM_2-5, PARAM_2-1, EOREGREC
word PARAM_3-6,
PARAM_0, PARAM_0+5, PARAM_2-6, PARAM_2-1, EOREGREC
word PARAM_3-5,
PARAM_0, PARAM_2-1, EOREGREC
word PARAM_3-3,
PARAM_0+1, PARAM_2-2, EOREGREC
word PARAM_3-2,
PARAM_0+2, PARAM_2-3, EOREGREC
word PARAM_3-1,
PARAM_0+4, PARAM_2-5, EOREGREC
word EOREGREC
endif ;_ROUND_THICK_DIALOGS
;Resize region for window icons (is need for when icon is moved)
WinIconResizeRegion label Region
dw 0, 0, PARAM_2-1, PARAM_3-1 ;bounds
dw -1, EOREGREC
dw PARAM_3-1, 0, PARAM_2-1, EOREGREC
dw EOREGREC
FXIP<RegionResourceXIP ends >
endif ;END of CUA/MOTIF specific code ---------------
WinOther ends
WinCommon segment resource
COMMENT @----------------------------------------------------------------------
FUNCTION: TestForMoveControl
DESCRIPTION: This procedure tests the mouse pointer position to see if this
event is the beginning of a window move operation.
CALLED BY: OpenWinStartSelect, OpenWinUpdatePtrImage
PASS: ds:*si - object
ds:di - specific instance data
es - segment of OLWinClass
cx, dx - ptr position
RETURN: carry set if move operation
al = mask to OR with OLWI_moveResizeState to indicate
that we are moving
bx = 0 (to keep symmetry with TestForResizeControl)
cx, dx, ds, si, di = same
DESTROYED: ax, bx, bp
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 12/89 Initial version
------------------------------------------------------------------------------@
if _OL_STYLE ;--------------------------------------------------------------
TestForMoveControl proc near
test ds:[di].OLWI_attrs, mask OWA_MOVABLE
jz notMoving ;skip if not movable...
;If window is pinnable, see if mouse pointer is inside the mark icon
;boundary. If so, we are not moving. Otherwise, we are moving.
;OpenLook is so simple!
push di, cx, dx
call CheckIfInMarkBounds ;returns carry set if in bounds
pop di, cx, dx
jc notMoving ;skip if in bounds...
mov al, mask OLWMRS_MOVING or mask OLWMRS_MOVE_RESIZE_PENDING
clr bx
stc
ret
notMoving:
clc
ret
TestForMoveControl endp
endif ;--------------------------------------------------------------
if _CUA_STYLE ;--------------------------------------------------------------
TestForMoveControl proc near
class OLWinClass
test ds:[di].OLWI_attrs, mask OWA_MOVABLE
jz notMoving ;skip if not movable...
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_WIN_ICON
jnz isMoving ;skip if window icon (entire icon is
;move area)...
call MouseInTitleBounds? ;see if in bounds
jnc notMoving ;no, not moving
isMoving:
mov al, mask OLWMRS_MOVING or mask OLWMRS_MOVE_RESIZE_PENDING
clr bx
stc ;RETURN: inside title area
ret
notMoving:
clc ;RETURN: not inside resizing corner
ret
TestForMoveControl endp
endif ;--------------------------------------------------------------
COMMENT @----------------------------------------------------------------------
ROUTINE: MouseInTitleBounds?
SYNOPSIS: Sees if mouse pointer in header title.
CALLED BY: TestForMoveControl, OLBaseWinStartSelect
PASS: ds:di -- win SpecInstance
cx, dx -- pointer position
RETURN: carry set if in bounds
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Chris 7/16/90 Initial version
------------------------------------------------------------------------------@
MouseInTitleBounds? proc near uses si, bp, cx, dx, ax, bx, di
.enter
;
; If no title (OWA_HEADER is what'd you think we should use, but
; OWA_TITLED seems to be what is really used), can't be in title
; area
;
test ds:[di].OLWI_attrs, mask OWA_TITLED
jz notInTitle ;no title, not in title area
if _CUA_STYLE and (not _ISUI)
; No title bars in maximized displays
cmp ds:[di].OLWI_type, MOWT_DISPLAY_WINDOW
jne notADisplay
test ds:[di].OLWI_specState, mask OLWSS_MAXIMIZED
jnz notInTitle
notADisplay:
endif
mov bp, dx ;bp = Y coordinate
push cx ;save X coordinate
call OpenWinGetHeaderTitleBounds
;get coordinates of title area
;(header minus icons to left and right)
pop si ;si = X coordinate
;first check for vertical component: (bp = Y coordinate)
cmp bp, bx
jl notInTitle ;skip if too high...
cmp bp, dx
jge notInTitle ;skip if too low...
;now check for horizontal component: (si = X coordinate)
cmp si, ax
jl notInTitle ;skip if too far to the left...
cmp si, cx
jge notInTitle ;skip if too far to the right...
stc ;else we're in title area
jmp short exit
notInTitle:
clc ;not in title area
exit:
.leave
ret
MouseInTitleBounds? endp
COMMENT @----------------------------------------------------------------------
FUNCTION: TestForResizeControl
DESCRIPTION: This procedure tests the mouse pointer position to see if this
event is the beginning of a window resize operation.
CALLED BY: OpenWinStartSelect, OpenWinUpdatePtrImage
PASS: ds:*si - object
ds:di - specific instance data
es - segment of OLWinClass
cx, dx - ptr position
RETURN: carry set if resize operation
al = mask to OR with OLWI_moveResizeState to indicate that are resize
bx = mask to stuff into olXorFlags (used by IM to draw xor box)
cx, dx, ds, si, di = same
DESTROYED: ah, bp
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 12/89 Initial version
------------------------------------------------------------------------------@
if _CUA_STYLE ;--------------------------------------------------------------
TestForResizeControl proc near
class OLWinClass
push cx, dx ;save position of mouse,
;since caller must check for move start
test ds:[di].OLWI_attrs, mask OWA_RESIZABLE
LONG jz done ;skip if not resizable (cy=0)...
mov ax, cx ;(ax, bx) = position of mouse
mov bx, dx
call VisGetSize ;Get window edges in document coords
;FIRST SEE IF THE POINTER IS IN ONE OF THE FRAMES OF THE WINDOW:
push cx, dx, si, bp ;save size of total area
push ds
mov bp, segment idata ;get segment of core blk
mov ds, bp
mov si, ds:[resizeBarWidth]
mov bp, ds:[resizeBarHeight]
pop ds
;
; Calc inner right/bottom edges of the resize border
sub cx, si
sub dx, bp
or bx, bx
js notResizingPopCxDx ;skip if too high (is negative #)...
cmp bx, bp
jl CRS_10 ;skip if in top frame border...
cmp bx, dx
jge CRS_10 ;skip if in bottom frame border...
or ax, ax
js notResizingPopCxDx ;skip if too far left (is negative #)...
cmp ax, si
jl CRS_10 ;skip if in left frame border...
cmp ax, cx
jl notResizingPopCxDx ;skip if not in right frame border - not
;resize, MUST POP 2 ARGS)...
CRS_10: ;THE POINTER IS IN AT LEAST ONE OF THE FRAME BORDERS - see
;which resize directions are selected.
;First check for vertical component: (bx = Y coordinate)
pop cx, dx, si, bp ;get original size of area
cmp bx, CUAS_WIN_ICON_HEIGHT ;is pointer in the top resize area?
jge CRS_20 ;skip if not...
;pointer is in top resize area: set UP component = TRUE
mov dl, mask OLWMRS_RESIZING_UP or mask OLWMRS_MOVE_RESIZE_PENDING
mov bx, mask XF_RESIZE_TOP
jmp short CRS_50 ;skip to check horizontal component...
CRS_20: ;vertical component: in bottom resize area?
add bx, CUAS_WIN_ICON_HEIGHT ;add height of border for comparison
cmp bx, dx
jle CRS_45 ;skip if not...
;pointer is in bottom resize border: set DOWN component = TRUE
mov dl, mask OLWMRS_RESIZING_DOWN or mask OLWMRS_MOVE_RESIZE_PENDING
mov bx, mask XF_RESIZE_BOTTOM
jmp short CRS_50
CRS_45:
clr dl
clr bx
CRS_50: ;now check for horizontal component: (si = X coordinate)
cmp ax, CUAS_WIN_ICON_WIDTH ;is pointer in the left resize area?
jge CRS_60 ;skip if not...
;pointer is in left resize area: set LEFT component = TRUE
ORNF dl, mask OLWMRS_RESIZING_LEFT or mask OLWMRS_MOVE_RESIZE_PENDING
ORNF bx, mask XF_RESIZE_LEFT
jmp short CRS_70 ;skip to end...
CRS_60: ;horizontal component: in right resize area?
add ax, CUAS_WIN_ICON_WIDTH ;add width of border for comparison
cmp ax, cx
jle CRS_70 ;skip to end if not...
;pointer is in right resize area: set RIGHT component = TRUE
ORNF dl, mask OLWMRS_RESIZING_RIGHT or mask OLWMRS_MOVE_RESIZE_PENDING
ORNF bx, mask XF_RESIZE_RIGHT
CRS_70: ;if any of the above tests succeeded, return with carry set
mov al, dl ;al = OLWI_moveResizeState mask value
test al, OLWMRS_RESIZING_MASK ;test instruction clears carry flag
jz done ;skip if not resizing (CY=0)...
stc
done:
pop cx, dx ;(cx, dx) = mouse position
ret
notResizingPopCxDx:
pop cx, dx, si, bp ;clean up stack
pop cx, dx ;(cx, dx) = mouse position
clc
ret
TestForResizeControl endp
endif ;--------------------------------------------------------------
WinCommon ends
WinOther segment resource
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinStartMenu -- MSG_META_START_FEATURES
DESCRIPTION: OpenLook-specific handler for MENU button pressed
on base window - opens a free-standing POPUP menu.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 7/89 Initial version
------------------------------------------------------------------------------@
OpenWinStartMenu method dynamic OLWinClass, MSG_META_START_FEATURES
;do basic handling, sending to children
call OpenWinStartButton
if _OL_STYLE ;START of OPEN LOOK specific code -----------------------------
test ax, mask MRF_PROCESSED ;see if processed by child
jnz returnProcessed ;skip if so (was not in window bgrnd)...
;is window pinnable?
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_attrs, mask OWA_PINNABLE
jz checkForMenu ;skip if not...
;Is pinnable: don't do menu function over it.
call CheckIfInMarkBounds ;if pinnable & in bounds, returns carry
jc returnProcessed ;skip if so...
checkForMenu: ;Do we have a menu?
call WinOther_DerefVisSpec_DI
tst ds:[di].OLWI_menu
jnz openMenu ;skip if have menu...
push cx, dx ;preserve mouse position
call OpenWinEnsureMenu ;try to create menu
pop cx, dx
openMenu:
;NO LONGER NECESSARY: POPUP MENU WILL GRAB THE GADGET EXCL FOR ITSELF. eds 4/90
; ;first grab the gadget exclusive, so that other menus drop.
; ;If we had a menu button, it would do this work itself.
;
; push cx, dx
; mov cx, ds:[LMBH_handle]
; mov dx, si ;grab GADGET EXCLUSIVE
; mov ax, MSG_VIS_TAKE_GADGET_EXCL ;so other menus close up
; call ObjCallInstanceNoLock ;send to self
; pop cx, dx
call VisQueryWindow ;get window handle in di
mov bx, ds:[si]
add bx, ds:[bx].Vis_offset
push si
mov si, ds:[bx].OLWI_menu
tst si
jz OWSM_60 ; if no menu, just quit
mov ax, cx ; Translate mouse position to Screen
mov bx, dx
call WinTransform
mov cx, ax
mov dx, bx
mov ax, MSG_OL_POPUP_ACTIVATE
call WinOther_ObjCallInstanceNoLock ;open the menu
OWSM_60:
pop si
returnProcessed:
mov ax, mask MRF_PROCESSED ; show processed
endif ;END of OPEN LOOK specific code -------------------------------
ret
OpenWinStartMenu endp
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinEndSimpleButton
DESCRIPTION: Handler for mouse SELECT or MENU button released on base window.
(Note that gadget with active mouse grab may have already
handled event, then REPLAYed so we get it as MSG_META_BUTTON.)
;button release may have been handed by gadget which
;had (and released) active mouse grab, then event
;was replayed, so here we are.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
Nothing
DESTROYED:
bx, si, di, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
------------------------------------------------------------------------------@
OpenWinEndSimpleButton method dynamic OLWinClass, MSG_META_END_SELECT, \
MSG_META_END_MOVE_COPY,
MSG_META_END_FEATURES
CUAS < call OpenWinUpdatePtrImage ;restore pointer image to normal >
;does not trash cx, dx
call OpenWinHandleEndMoveResize
if _OL_STYLE ;START of OPEN LOOK specific code ---------------------
jc OWES_90 ; was move/resize, done
;WAS NOT MOVING OR RESIZING
call CheckIfInMarkBounds ; see if pin or window mark hit
jnc OWES_90 ; skip if miss
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_attrs, mask OWA_PINNABLE
jz OWES_80 ;skip if was window mark
;PUSHPIN has been released on: force menu into PINNED mode
ANDNF ds:[di].OLWI_specState, not (mask OLWSS_DRAWN_PINNED)
mov bp, TRUE ;pass flag: CLOSE if unpinning window.
mov ax, MSG_OL_POPUP_TOGGLE_PUSHPIN
call WinOther_ObjCallInstanceNoLock
jmp short OWES_90
OWES_80: ;CLOSE has been clicked
;NOTE: CLAYTON: see OpenWinEndSimple to handle select in OpenLook window mark
OWES_90:
endif ;END of OPEN LOOK specific code -------------------------------
call VisReleaseMouse ;if we had mouse grab, release it.
mov ax, mask MRF_PROCESSED ;show processed
ret
OpenWinEndSimpleButton endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OpenWinHandleEndMoveResize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: handle end of move/resize operation
CALLED BY: INTERNAL
OpenWinEndSimpleButton
OLWMRKeyStopMoveResize
PASS: *ds:si = OLWinClass object
cx, dx = ptr position
RETURN: carry set if move/resize operation stopped
(now stopped)
carry clear if move/resize wasn't in progress
(can re-use mouse event)
DESTROYED: if carry set
ax, bx, cx, dx, di, bp
if carry clear
ax, bx, di, bp
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 2/10/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
OpenWinHandleEndMoveResize proc far
call WinOther_DerefVisSpec_DI
; See if moving or resizing
test ds:[di].OLWI_moveResizeState, OLWMRS_MOVING_OR_RESIZING_MASK
jz done ;skip if not.. (carry clear)
;if a MSG_META_DRAG_SELECT has not yet arrived, void this operation
test ds:[di].OLWI_moveResizeState, mask OLWMRS_MOVE_RESIZE_PENDING
jz wasMovingOrResizing ;skip if it did arrive..
ANDNF ds:[di].OLWI_moveResizeState, not \
(OLWMRS_MOVING_OR_RESIZING_MASK \
or mask OLWMRS_MOVE_RESIZE_PENDING)
clc ;indicate move/resize wasn't in progress
jmp done
wasMovingOrResizing:
;END WINDOW MOVE/RESIZE OPERATION:
mov di, [di].VCI_window ; Get window handle
tst di
jz done ; if no window, can't click in it..
; (exit with carry clear)
push cx, dx
call ImStopMoveResize
pop ax, bx ;(ax, bx) = pointer position in
;document coordinates
call WinTransform ;convert to screen coordinates
;so can calculate movement distance
push es
segmov es, dgroup, di
sub ax, es:[olScreenStart.P_x]
sub bx, es:[olScreenStart.P_y]
pop es
call WinOther_DerefVisSpec_DI
ORNF ds:[di].OLWI_winPosSizeState, mask WPSS_HAS_MOVED_OR_RESIZED
;set flag for OpenWinSaveState, so will
;save new window position and size
;in case application is shut-down.
test ds:[di].OLWI_moveResizeState, mask OLWMRS_MOVING
jz wasResizing ;skip if not moving
;Clear moving flag
ANDNF ds:[di].OLWI_moveResizeState, not mask OLWMRS_MOVING
mov cx, ax ;See if moving any at all
or cx, bx
jz moveResizeStopped ;if not, skip work (exit w/carry set)
;Move window instance bounds by (ax, bx) distance
add ds:[di].VI_bounds.R_left, ax
add ds:[di].VI_bounds.R_top, bx
add ds:[di].VI_bounds.R_right, ax
add ds:[di].VI_bounds.R_bottom, bx
; Now move actual window
; Use std method for doing this.
; Some windows subclass this & do
; things like keep the window on
; screen.
mov ax, MSG_VIS_MOVE_RESIZE_WIN
call WinOther_ObjCallInstanceNoLock
jmp moveResizeStopped
wasResizing:
; ds:di = VisInstance
mov dl, ds:[di].OLWI_moveResizeState
;get resizing direction info
call DoResizeBounds ;Make changes to appr. window edges
;returns di, si = same
and ds:[di].OLWI_moveResizeState, not OLWMRS_RESIZING_MASK
;Added 11/30/92 cbh to hopefully improve the current problem with
;wrapping composites deep inside interactions. (Commented out
;to see if it's really needed, now that another bug is fixed. 11/30/92)
mov dl, VUM_MANUAL
mov ax, MSG_VIS_INVAL_ALL_GEOMETRY
call WinOther_ObjCallInstanceNoLock
; Now resize actual window, doing
; any geometry changes required
mov cl, mask VOF_GEOMETRY_INVALID or mask VOF_WINDOW_INVALID \
or mask VOF_IMAGE_INVALID
mov dl, VUM_NOW
mov ax, MSG_VIS_MARK_INVALID
call WinOther_ObjCallInstanceNoLock
moveResizeStopped:
stc
done:
ret
OpenWinHandleEndMoveResize endp
COMMENT @----------------------------------------------------------------------
FUNCTION: CheckIfInMarkBounds
DESCRIPTION: This procedure tests if the mouse pointer is inside the
OpenLook "mark" bounds. Examples of marks: Pushpin,
Close Mark.
PASS: *ds:si = instance data for object
cx, dx = position of mouse pointer in window coords.
RETURN: nothing
DESTROYED: ?
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
? Initial Version
Eric 1/90 general cleanup
Chris 4/91 Updated for new graphics, bounds conventions
------------------------------------------------------------------------------@
if _OL_STYLE ;START of OPEN LOOK specific code ---------------------
CheckIfInMarkBounds proc near
push cx, dx
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_WIN_ICON
jnz miss ;skip if is an OLWinIconClass object...
test ds:[di].OLWI_attrs, mask OWA_PINNABLE or mask OWA_CLOSABLE
jz miss ;skip if not pinnable or closable...
push cx, dx, bp
mov bp, di
call OpenWinGetHeaderBounds ;get bounds for header
add ax, OLS_WIN_HEADER_MARK_X_POSITION ;set ax, bx = top left coord
add bx, OLS_WIN_HEADER_MARK_Y_POSITION ;for first mark.
pop cx, dx, bp
sub cx, ax ;see if left of mark
jl miss ;skip if so...
sub dx, bx ;see if above mark
jl miss ;skip if so...
test ds:[di].OLWI_attrs, mask OWA_PINNABLE
jnz pushpin ;skip if looking for pin...
;we are testing for the Close mark
cmp cx, OLS_CLOSE_MARK_WIDTH
jg miss ;skip if not...
cmp dx, OLS_CLOSE_MARK_HEIGHT
jg miss ;skip if not...
hit:
stc
jmp done
pushpin:
cmp dx, OLS_PUSHPIN_HEIGHT
jg miss ;skip if not...
test ds:[di].OLWI_specState, mask OLWSS_PINNED
jnz isPinned
cmp cx, OLS_PUSHPIN_UNPINNED_WIDTH
jle hit
jmp short miss ;skip if not...
isPinned:
cmp cx, OLS_PUSHPIN_PINNED_WIDTH
jle hit ;skip if not...
miss:
clc ; Return miss
done:
pop cx, dx
ret
CheckIfInMarkBounds endp
endif ;END of OPEN LOOK specific code -------------------------------
if _OL_STYLE ;START of OPEN LOOK specific code ---------------------
;DoResizeBounds: Change the appropriate window edges & clear the resizing flag.
;NOTE: the Motif resize mechanism is more appropriate for specific ui's that
;can resize in eight directions. See Eric for details.
;Pass: ds:si = specific instance data for object (no kidding!)
; ds:di = visible instance data for object
; dl = OLWinMoveResizeFlags for object
DoResizeBounds proc near
test dl, mask OLWMRS_RESIZING_UL
jz DRB_20 ; skip if not
; Clear resizing flag
add ds:[di].VI_bounds.R_left, ax
add ds:[di].VI_bounds.R_top, bx
jmp short done
DRB_20:
test dl, mask OLWMRS_RESIZING_UR
jz DRB_30 ; skip if not
add ds:[di].VI_bounds.R_right, ax
add ds:[di].VI_bounds.R_top, bx
jmp short done
DRB_30:
test dl, mask OLWMRS_RESIZING_LL
jz DRB_40 ; skip if not
; Clear resizing flag
add ds:[di].VI_bounds.R_left, ax
add ds:[di].VI_bounds.R_bottom, bx
jmp done
DRB_40:
test dl, mask OLWMRS_RESIZING_LR
jz done ; skip if not
add ds:[di].VI_bounds.R_right, ax
add ds:[di].VI_bounds.R_bottom, bx
done:
;
; Some dumb error correction for negative sizing, which shouldn't
; happen when the input manager is sizing/constraining correctly
;
push cx
mov cx, ds:[di].VI_bounds.R_left
cmp cx, ds:[di].VI_bounds.R_right
jle 70$ ; reasonable bounds, branch
mov ds:[di].VI_bounds.R_right, cx
70$:
mov cx, ds:[di].VI_bounds.R_top
cmp cx, ds:[di].VI_bounds.R_bottom
jle 80$ ; reasonable bounds, branch
mov ds:[di].VI_bounds.R_bottom, cx
80$:
pop cx
ret
DoResizeBounds endp
endif ;END of OPEN LOOK specific code -------------------------------
if _CUA_STYLE ;START of CUA/MOTIF specific code ------------
;DoResizeBounds: Change the appropriate window edges & clear the resizing flag.
;Pass: ds:si = specific instance data for object (no kidding!)
; ds:di = visible instance data for object
; dl = OLWinMoveResizeFlags for object
DoResizeBounds proc near
class OLWinClass
;first test for an upward component in the resize
test dl, mask OLWMRS_RESIZING_UP
jz DRB_20 ; skip if not
add ds:[di].VI_bounds.R_top, bx
DRB_20: ;now test for a downward component in the resize
test dl, mask OLWMRS_RESIZING_DOWN
jz DRB_30 ; skip if not
add ds:[di].VI_bounds.R_bottom, bx
DRB_30: ;now test for a leftward component in the resize
test dl, mask OLWMRS_RESIZING_LEFT
jz DRB_40 ; skip if not
add ds:[di].VI_bounds.R_left, ax
DRB_40: ;now test for a rightward component in the resize
test dl, mask OLWMRS_RESIZING_RIGHT
jz DRB_60 ; skip if not
add ds:[di].VI_bounds.R_right, ax
DRB_60:
;
; Some dumb error correction for negative sizing, which shouldn't
; happen when the input manager is sizing/constraining correctly
;
push cx
mov cx, ds:[di].VI_bounds.R_left
cmp cx, ds:[di].VI_bounds.R_right
jle 70$ ; reasonable bounds, branch
mov ds:[di].VI_bounds.R_right, cx
70$:
mov cx, ds:[di].VI_bounds.R_top
cmp cx, ds:[di].VI_bounds.R_bottom
jle 80$ ; reasonable bounds, branch
mov ds:[di].VI_bounds.R_bottom, cx
80$:
pop cx
ret
DoResizeBounds endp
endif ;END of CUA/MOTIF specific code ---------------
COMMENT @----------------------------------------------------------------------
FUNCTION: AbortMoveResize
DESCRIPTION: If moving/resizing window, abort out.
CALLED BY: OpenWinEndGrab
PASS:
*ds:si - Openlook window
RETURN:
Nothing
DESTROYED:
ax, cx, dx, di
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 7/89 Initial version
------------------------------------------------------------------------------@
AbortMoveResize proc far
class OLWinClass
call WinOther_DerefVisSpec_DI
; See if moving or resizing
test ds:[di].OLWI_moveResizeState, OLWMRS_MOVING_OR_RESIZING_MASK or mask OLWMRS_RESIZE_PENDING
jz AMR_90 ; skip if not
push bx, bp
call FinishMoveResize
pop bx, bp
AMR_90:
ret
AbortMoveResize endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FinishMoveResize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: finish up after successful or aborted move/resize
CALLED BY: INTERNAL
AbortMoveResize
OLWMRKeyAbortMoveResize
PASS: *ds:si = OLWinClass object
RETURN: nothing
DESTROYED: ax, bx, cx, dx, bp, di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 3/12/93 Broke out for common usage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FinishMoveResize proc far
;
; clear flags
;
call WinOther_DerefVisSpec_DI
ANDNF ds:[di].OLWI_moveResizeState, not \
(OLWMRS_MOVING_OR_RESIZING_MASK \
or mask OLWMRS_MOVE_RESIZE_PENDING \
or mask OLWMRS_RESIZE_PENDING)
;
; stop XOR
;
call ImStopMoveResize
;
; restore ptr image
;
mov di, ds:[di].VCI_window
tst di
jz noWindow
mov cx, OLPI_NONE or (PIL_WINDOW shl 8)
call OpenSetPtrImage
noWindow:
;
; remove monitor
;
push ds
; segmov ds, es ;es is no longer dgroup
segmov ds, dgroup, ax ;ds = dgroup
PSem ds, olMoveResizeMonitorSem, TRASH_AX_BX
test ds:[olMoveResizeMonitorFlags], mask OLMRMF_ACTIVE
jz noMon ;monitor gone
mov bx, offset olMoveResizeAbortMonitor
mov al, mask MF_REMOVE_IMMEDIATE
call ImRemoveMonitor
mov ds:[olMoveResizeMonitorFlags], 0
;
; restore previous mouse position if PF_DISEMBODIED_PTR or
; PF_HIDE_PTR_IF_NOT_OF_ALWAYS_SHOW_TYPE were previously set
;
test ds:[olMoveResizeSavedPtrFlags], mask PF_DISEMBODIED_PTR or \
mask PF_HIDE_PTR_IF_NOT_OF_ALWAYS_SHOW_TYPE
jz noMouseRestore
clr di ;no window
call ImGetMousePos ;cx, dx = current mouse pos
movdw axbx, cxdx
mov cx, ds:[olMoveResizeSavedMousePos].P_x
mov dx, ds:[olMoveResizeSavedMousePos].P_y
sub cx, ax ;cx, dx = deflection
sub dx, bx
mov ax, MSG_VIS_VUP_BUMP_MOUSE
clr di
call UserCallFlow
noMouseRestore:
;
; restore previous PtrFlags
;
call ImGetPtrFlags ;al = current PtrFlags
mov ah, al ;clear them all
;set old PtrFlags
mov al, ds:[olMoveResizeSavedPtrFlags]
call ImSetPtrFlags
noMon:
VSem ds, olMoveResizeMonitorSem, TRASH_AX_BX
pop ds
;
; release grabs
;
call VisReleaseMouse ;if we had mouse grab, release it.
call VisReleaseKbd ;if we had kbd grab, release it.
mov ax, MSG_FLOW_RELEASE_MOUSE
mov di, mask MF_CALL or mask MF_FIXUP_DS
call UserCallFlow
call WinOther_DerefVisSpec_DI
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_MENU
jz done
;
; Menus should release focus and then ensure active f/t
; This is a fix for problem with moving/resizing pinned Express Menu.
;
mov ax, MSG_META_RELEASE_FOCUS_EXCL
call ObjCallInstanceNoLock
mov ax, MSG_META_ENSURE_ACTIVE_FT
GOTO UserCallApplication
done:
ret
FinishMoveResize endp
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinPrePassStartSelect
DESCRIPTION: Handler for SELECT button being pressed while we have a
passive mouse grab. See the CTTFM/REFM mechanisms documented
in the cwinClass.asm file.
;mechanisms: CTTFM
;CTTFM: we get this after it is translated and resent
;by the MSG_META_PRE_PASSIVE_BUTTON handler above.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
cx, dx - ptr position
bp - [ UIFunctionsActive | buttonInfo ]
RETURN:
carry - ?
ax, cx, dx, bp - ?
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
Eric 8/89 Updated according to Tony's new UI methods
------------------------------------------------------------------------------@
OpenWinPrePassStartMoveCopy method OLWinClass, \
MSG_META_PRE_PASSIVE_START_MOVE_COPY
;
; If we're a menu, don't bring to the front just because the move-copy
; button was pressed. Probably we're in the middle of menu
; navigation, possibly with a submenu up, and the user hit it by
; accident, in which case, just leave well alone. -cbh 2/16/93
;
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_MENU
jnz OpenWinFinishPrePassive
FALL_THRU OpenWinPrePassStartSelect
OpenWinPrePassStartMoveCopy endm
OpenWinPrePassStartSelect method OLWinClass, \
MSG_META_PRE_PASSIVE_START_SELECT
;
; Added to hopefully keep menus from moving to the front when
; menu navigation is in progress, could be a big mistake. See
; comment above as well. -cbh 2/16/93
;
test ds:[di].OLWI_specState, mask OLWSS_GRABBED
jnz OpenWinFinishPrePassive
;Click-To-Type Focus Model. (NOTE FALL THROUGH FROM ABOVE)
;Bring window to top in application layer, and make it the
;FOCUS window if it is not a pinned menu.
mov ax, MSG_GEN_BRING_TO_TOP
call WinOther_ObjCallInstanceNoLock
OpenWinFinishPrePassive label far
call VisRemoveButtonPrePassive ;turn off CTTFM mechanism
mov ax, mask MRF_PROCESSED ; show processed, no event destruction
ret
OpenWinPrePassStartSelect endp
WinOther ends
;----------------------
WinMethods segment resource
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinRawUnivEnter -- MSG_META_RAW_UNIV_ENTER
DESCRIPTION: Process RAW_UNIV_ENTER for OLWinClass object. See comments
at top of cwinClass.asm.
;mechanisms: CTTFM, REFM
;Received when ptr enters this window, or when covering
;window which contains ptr goes away.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
RETURN:
carry - ?
ax, cx, dx, bp - ?
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
Eric 8/89 Updated according to Tony's new UI methods
------------------------------------------------------------------------------@
OpenWinRawUnivEnter method dynamic OLWinClass, MSG_META_RAW_UNIV_ENTER
;mark in universe
;
; Check to see if we've already gotten a VIS_CLOSE. If so, do
; nothing. Ok'd by Doug. dl 6/9/94
;
tst ds:[di].VCI_window
jz done
ornf ds:[di].OLWI_specState, mask OLWSS_PTR_IN_RAW_UNIV
call VisAddButtonPrePassive ;startup CTTFM mechanisms.
done:
ret
OpenWinRawUnivEnter endp
COMMENT @----------------------------------------------------------------------
METHOD: OpenWinRawUnivLeave -- MSG_META_RAW_UNIV_LEAVE
DESCRIPTION: Process RAW_UNIV_LEAVE for OLWinClass object. See comments
at top of cwinClass.asm file.
;mechanisms: CTTFM, REFM
;Received when ptr leaves this window, or when covering
;window opens which contains ptr.
PASS:
*ds:si - instance data
es - segment of OLWinClass
ax - method
RETURN:
carry - ?
ax, cx, dx, bp - ?
DESTROYED:
bx, si, di, ds, es
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 4/89 Initial version
Eric 8/89 Updated according to Tony's new UI methods
------------------------------------------------------------------------------@
OpenWinRawUnivLeave method dynamic OLWinClass, MSG_META_RAW_UNIV_LEAVE
;mark NOT in universe
andnf ds:[di].OLWI_specState, not mask OLWSS_PTR_IN_RAW_UNIV
; Iin most all cases, we can now remove the pre-passive grab, which
; is used to detect when the mouse has been pressed INSIDE the window,
; so that it may be raised. If we're dealing with a menu in stay-up
; mode, however, we must leave the pre-passive intact, so that it
; will know that it has to decide to come down or pick up interaction
; again when the mouse is pressed.
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_MENU
jz continue ; skip if not a menu...
.warn -private
test ds:[di].OLMWI_specState, mask OMWSS_IN_STAY_UP_MODE
.warn @private
jnz afterPrePassive
continue:
;SPACE-SAVER: whether CTTFM or REFM, we want to remove pre-passive
;grab, so do it here. (If CTTFM and press-release already occurred,
;may have been removed already.)
call VisRemoveButtonPrePassive ;turn off mechanisms
afterPrePassive:
ret
OpenWinRawUnivLeave endp
WinMethods ends
;----------------------
WinCommon segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OpenWinQueryIfPressIsInk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks if clicks in this window should be ink or not.
CALLED BY: GLOBAL
PASS: nada
RETURN: nada
DESTROYED: nada
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
atw 12/ 5/91 Initial version
cbh 3/16/93 Title bar checking moved from OLMenuedWinClass
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
OpenWinQueryIfPressIsInk method dynamic OLWinClass,
MSG_META_QUERY_IF_PRESS_IS_INK
test ds:[di].OLWI_attrs, mask OWA_TITLED
jz doneWithTitle
call MouseInTitleBounds? ;click in title bounds, no ink
jc noInk
doneWithTitle:
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_MENU or mask OWFA_IS_WIN_ICON
jnz noInk
test ds:[di].OLWI_focusExcl.FTVMC_flags, mask HGF_APP_EXCL
jz noFocus ;No object has the focus, so no ink,
; dude.
inkAllowed:
call TestForResizeControl
jc noInk
call TestForMoveControl
jc noInk
mov ax, MSG_META_QUERY_IF_PRESS_IS_INK
mov di, offset OLWinClass
GOTO ObjCallSuperNoLock
noFocus:
mov ax, ATTR_GEN_WINDOW_ACCEPT_INK_EVEN_IF_NOT_FOCUSED
call ObjVarFindData
jc inkAllowed
noInk:
mov ax, IRV_NO_INK
ret
OpenWinQueryIfPressIsInk endp
WinCommon ends
;----------------------
WinMethods segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OpenWinVisQueryIfObjectHandlesInk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: GLOBAL
PASS: nada
RETURN: nada
DESTROYED: nada
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
atw 12/10/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
OpenWinVisQueryIfObjectHandlesInk method dynamic OLWinClass,
MSG_VIS_QUERY_IF_OBJECT_HANDLES_INK
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_MENU or mask OWFA_IS_WIN_ICON
jnz exit
test ds:[di].OLWI_focusExcl.FTVMC_flags, mask HGF_APP_EXCL
jz noFocus ;No object has the focus, so no ink,
; dude
inkAllowed:
mov ax, MSG_VIS_QUERY_IF_OBJECT_HANDLES_INK
mov di, offset OLWinClass
GOTO ObjCallSuperNoLock
noFocus:
mov ax, ATTR_GEN_WINDOW_ACCEPT_INK_EVEN_IF_NOT_FOCUSED
call ObjVarFindData
jc inkAllowed
exit:
ret
OpenWinVisQueryIfObjectHandlesInk endp
WinMethods ends
KbdNavigation segment resource
COMMENT @----------------------------------------------------------------------
FUNCTION: OpenWinKbdChar - MSG_META_KBD_CHAR handler for OLWinClass
DESCRIPTION: handle keyboard move and resize of window
PASS: *ds:si = instance data for object
cx = character value
dl = CharFlags
dh = ShiftState (ModBits)
bp low = ToggleState
bp high = scan code
RETURN: nothing
DESTROYED: ?
PSEUDO CODE/STRATEGY:
Although there is spui-conditional code here, this only
works for CUA style spuis. Up, down, left, right keys
don't work well for diagonal resizing needed in OL style
spuis.
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 12/17/92 Initial version
------------------------------------------------------------------------------@
if _KBD_NAVIGATION ;------------------------------------------------------
OpenWinKbdChar method dynamic OLWinClass, MSG_META_KBD_CHAR
;if not moving or resizing, let super handle
test ds:[di].OLWI_moveResizeState, mask OLWMRS_RESIZE_PENDING or \
OLWMRS_MOVING_OR_RESIZING_MASK
jz notMoveResize
;Don't handle state keys (shift, ctrl, etc).
test dl, mask CF_STATE_KEY or mask CF_TEMP_ACCENT
jnz eatIt
test dl, mask CF_FIRST_PRESS or mask CF_REPEAT_PRESS
jz eatIt
push ax, ds, si, bp
segmov ds, cs
mov si, offset moveResizeKeysTable
mov ax, MOVE_RESIZE_KEYS_TABLE_SIZE
call FlowCheckKbdShortcut ; carry set if match
mov bx, si ; bx = table offset if match
pop ax, ds, si, bp
jc goodKey
eatIt:
ret ; <-- EXIT HERE ALSO
notMoveResize:
;
; incorporated here from cwinExcl.asm
;
mov bx, ds:[di].OLWI_focusExcl.FTVMC_OD.handle
tst bx
jz callSuper
mov si, ds:[di].OLWI_focusExcl.FTVMC_OD.chunk
clr di
GOTO ObjMessage
callSuper:
mov di, offset OLWinClass
GOTO ObjCallSuperNoLock
goodKey:
call cs:[bx].moveResizeKeysRoutineTable
ret
OpenWinKbdChar endm
if DBCS_PCGEOS
;p a c s c
;h l t h h
;y t r f a
;s l t r
;
moveResizeKeysTable KeyboardShortcut \
<0, 0, 0, 0, C_SYS_LEFT and mask KS_CHAR>, ;left
<0, 0, 0, 0, C_SYS_RIGHT and mask KS_CHAR>, ;right
<0, 0, 0, 0, C_SYS_UP and mask KS_CHAR>, ;up
<0, 0, 0, 0, C_SYS_DOWN and mask KS_CHAR>, ;down
<0, 0, 1, 0, C_SYS_LEFT and mask KS_CHAR>, ;ctrl-left
<0, 0, 1, 0, C_SYS_RIGHT and mask KS_CHAR>, ;ctrl-right
<0, 0, 1, 0, C_SYS_UP and mask KS_CHAR>, ;ctrl-up
<0, 0, 1, 0, C_SYS_DOWN and mask KS_CHAR>, ;ctrl-down
<0, 0, 0, 0, C_SYS_ENTER and mask KS_CHAR>, ;stop move, resize
<0, 0, 0, 0, C_SYS_ESCAPE and mask KS_CHAR> ;abort move, resize
else
;P C S C
;h A t h S h
;y l r f e a
;s t l t t r
moveResizeKeysTable KeyboardShortcut \
<0, 0, 0, 0, 0xf, VC_LEFT>, ;left
<0, 0, 0, 0, 0xf, VC_RIGHT>, ;right
<0, 0, 0, 0, 0xf, VC_UP>, ;up
<0, 0, 0, 0, 0xf, VC_DOWN>, ;down
<0, 0, 1, 0, 0xf, VC_LEFT>, ;ctrl-left
<0, 0, 1, 0, 0xf, VC_RIGHT>, ;ctrl-right
<0, 0, 1, 0, 0xf, VC_UP>, ;ctrl-up
<0, 0, 1, 0, 0xf, VC_DOWN>, ;ctrl-down
<0, 0, 0, 0, 0xf, VC_ENTER>, ;stop move, resize
<0, 0, 0, 0, 0xf, VC_ESCAPE> ;abort move, resize
endif
MOVE_RESIZE_KEYS_TABLE_SIZE = ($-moveResizeKeysTable)/(size KeyboardShortcut)
moveResizeKeysRoutineTable nptr.near \
OLWMRKeyLeft, ; VC_LEFT
OLWMRKeyRight, ; VC_RIGHT
OLWMRKeyUp, ; VC_UP
OLWMRKeyDown, ; VC_DOWN
OLWMRKeySmallLeft, ; Ctrl+VC_LEFT
OLWMRKeySmallRight, ; Ctrl+VC_RIGHT
OLWMRKeySmallUp, ; Ctrl+VC_UP
OLWMRKeySmallDown, ; Ctrl+VC_DOWN
OLWMRKeyStopMoveResize, ; VC_ENTER
OLWMRKeyAbortMoveResize ; VC_ESCAPE
MOVE_RESIZE_KEYS_ROUTINE_TABLE_SIZE = length moveResizeKeysRoutineTable
.assert (size KeyboardShortcut eq size word)
.assert (MOVE_RESIZE_KEYS_ROUTINE_TABLE_SIZE eq MOVE_RESIZE_KEYS_TABLE_SIZE)
;
; XXX: make the OLWMRS_RESIZE_<blah> flags spui-dependent
;
OLWMRKeyLeft proc near
mov cx, -10
OLWMRKeyLeftCommon label near
mov dx, 0
mov bl, mask OLWMRS_RESIZING_LEFT
mov bh, mask OLWMRS_RESIZING_UP or mask OLWMRS_RESIZING_DOWN
GOTO OLWMRKeyCommon
OLWMRKeyLeft endp
OLWMRKeyRight proc near
mov cx, 10
OLWMRKeyRightCommon label near
mov dx, 0
mov bl, mask OLWMRS_RESIZING_RIGHT
mov bh, mask OLWMRS_RESIZING_UP or mask OLWMRS_RESIZING_DOWN
GOTO OLWMRKeyCommon
OLWMRKeyRight endp
OLWMRKeyUp proc near
mov dx, -10
OLWMRKeyUpCommon label near
mov cx, 0
mov bl, mask OLWMRS_RESIZING_UP
mov bh, mask OLWMRS_RESIZING_LEFT or mask OLWMRS_RESIZING_RIGHT
GOTO OLWMRKeyCommon
OLWMRKeyUp endp
OLWMRKeyDown proc near
mov dx, 10
OLWMRKeyDownCommon label near
mov cx, 0
mov bl, mask OLWMRS_RESIZING_DOWN
mov bh, mask OLWMRS_RESIZING_LEFT or mask OLWMRS_RESIZING_RIGHT
GOTO OLWMRKeyCommon
OLWMRKeyDown endp
OLWMRKeySmallLeft proc near
mov cx, -1
GOTO OLWMRKeyLeftCommon
OLWMRKeySmallLeft endp
OLWMRKeySmallRight proc near
mov cx, 1
GOTO OLWMRKeyRightCommon
OLWMRKeySmallRight endp
OLWMRKeySmallUp proc near
mov dx, -1
GOTO OLWMRKeyUpCommon
OLWMRKeySmallUp endp
OLWMRKeySmallDown proc near
mov dx, 1
GOTO OLWMRKeyDownCommon
OLWMRKeySmallDown endp
OLWMRStartResize proc far
clr bh ; not needed on RESIZE_PENDING
clr cx
clr dx
call OLWMRKeyCommon
ret
OLWMRStartResize endp
;
; pass:
; *ds:si = OLWin class
; bl - OLWMRS_* for desired direction
; bh - OLWMRS_* for opposing directions
; cx, dx = mouse deflection
;
OLWMRKeyCommon proc near
curMousePos local Point
newMousePos local Point
newDirection local byte
incomingMRFlags local byte
newMRFlags local byte
dummy local byte
.enter
mov incomingMRFlags, bl
mov newDirection, 0 ; no new direction to consider
call KN_DerefVisSpec_DI
test ds:[di].OLWI_moveResizeState, mask OLWMRS_RESIZE_PENDING
LONG jz notResizePending
doNewResize:
;
; resize was pending, restart XOR with correct flags
; bl = new OLWMRS_RESIZE_<blah> flags
;
call ImStopMoveResize ; stop pending resize XOR
andnf ds:[di].OLWI_moveResizeState,
not (mask OLWMRS_RESIZE_PENDING or \
OLWMRS_RESIZING_MASK)
ornf bl, ds:[di].OLWI_moveResizeState
mov ds:[di].OLWI_moveResizeState, bl
mov newMRFlags, bl
mov di, [di].VCI_window ; Get window handle
EC < mov bx, di >
EC < call ECCheckWindowHandle ; make sure we have a window >
;
; now begin to PUSH ARGS for call to ImStartMoveResize:
;
;
; push minimum bounds
;
push bp ; save locals
mov ax, MSG_VIS_COMP_GET_MINIMUM_SIZE
call ObjCallInstanceNoLock ; cx = min width, dx = min height
pop bp ; restore locals
push bp ; save locals below ImStartMoveResize
; params on stack
push cx ; Pass the minWidth
push dx ; Pass the minHeight
mov ax, 4000h
push ax ; Pass the maxWidth
mov ax, 4000h ; can SAVE BYTES here
push ax ; Pass the maxHeight
;
; determine pointer X, Y position based on size of window and
; current mouse position (in case we are already resizing one
; side of the window)
;
call VisGetSize ; cx, dx = right, bottom
dec cx
dec dx
movdw axbx, cxdx
call ImGetMousePos ; cx, dx = position (doc)
mov curMousePos.P_x, cx
mov curMousePos.P_y, dx
; XXX: not relative to this thread?
test incomingMRFlags, mask OLWMRS_RESIZING_UP
jz notTop
mov dx, 1 ; resize top, move mouse to top
jmp short mousePosCommon
notTop:
test incomingMRFlags, mask OLWMRS_RESIZING_DOWN
jz notBottom
mov dx, bx ; resize bottom, move mouse to bottom
jmp short mousePosCommon
notBottom:
test incomingMRFlags, mask OLWMRS_RESIZING_LEFT
jz notLeft
mov cx, 1 ; resize left, move mouse to left
jmp short mousePosCommon
notLeft:
test incomingMRFlags, mask OLWMRS_RESIZING_RIGHT
jz notRight
mov cx, ax ; resize right, move mouse to right
jmp short mousePosCommon
notRight:
mousePosCommon:
mov newMousePos.P_x, cx ; cx, dx = desired mouse pos
mov newMousePos.P_y, dx
push cx ; pass the x offset in doc coords
push dx ; pass the y offset in doc coords
;
; save start position for end of move, resize so we can actually
; perform the operation
;
movdw axbx, cxdx ; ax, bx = desired mouse position
call WinTransform ; convert to screen coordinates
; store for end
test newDirection, mask OLWMRS_RESIZING_UP or \
mask OLWMRS_RESIZING_DOWN
jnz updateStartY
updateStartXY:
push es, bx
segmov es, dgroup, bx
mov es:[olScreenStart.P_x], ax
pop es, bx
test newDirection, mask OLWMRS_RESIZING_LEFT or \
mask OLWMRS_RESIZING_RIGHT
jnz afterUpdateStart
updateStartY:
push es, ax
segmov es, dgroup, ax ; es = dgroup
mov es:[olScreenStart.P_y], bx
pop es, ax
afterUpdateStart:
;
; move the mouse pointer itself to the new position
;
; cx, dx = desired mouse position (doc)
; ax, bx = current mouse position (doc)
sub cx, curMousePos.P_x
sub dx, curMousePos.P_y
push bp ; save locals
mov ax, MSG_OL_WIN_TURN_ON_AND_BUMP_MOUSE
call ObjCallInstanceNoLock ; move mouse to window edge
pop bp ; restore locals
;
; compute bottom and right bounds of XOR region
;
call VisGetSize ; bottom, right bounds in doc coords
; (cx, dx)
test newMRFlags, mask OLWMRS_RESIZING_RIGHT
jz rBoundOkay
mov cx, newMousePos.P_x ; use new mouse X instead
rBoundOkay:
test newMRFlags, mask OLWMRS_RESIZING_DOWN
jz bBoundOkay
mov dx, newMousePos.P_y ; use new mouse Y instead
bBoundOkay:
;
; pass XOR region specification
;
if _OL_STYLE ;START of OPEN LOOK specific code ---------------------
;just a thin line
clr ax ; rectangle, not a region
push ax ; (pass 0 address)
push ax
endif ;END of OPEN LOOK specific code -------------------------------
if _CUA_STYLE ;START of MOTIF specific code -------------------------
if _ROUND_THICK_DIALOGS
mov ax, offset RoundedPrimaryResizeRegion ;assume rounded border
call OpenWinShouldHaveRoundBorderFar ;destroys nothing
jc wasRounded
endif ;_ROUND_THICK_DIALOGS
mov ax, offset PrimaryResizeRegion
;assume is normal window
push di ; save window handle
call KN_DerefVisSpec_DI
test ds:[di].OLWI_fixedAttr, mask OWFA_IS_WIN_ICON
jz notIcon ;skip if is not window icon
mov ax, offset WinIconResizeRegion
notIcon:
pop di ; restore window handle
if _ROUND_THICK_DIALOGS
wasRounded:
endif ;_ROUND_THICK_DIALOGS
; Get resource that regions are in
mov bx, handle PrimaryResizeRegion
push bx ; ^hbx:ax = region definition, push
push ax
endif ;END of MOTIF specific code -----------------------------------
;
; setup and pass flags
;
push di ; save window handle
call KN_DerefVisSpec_DI
mov al, ds:[di].OLWI_moveResizeState
pop di ; restore window handle
; si = initial XorFlags
; mov si, mask XF_END_MATCH_ACTION
;no end on button action
mov si, mask XF_NO_END_MATCH_ACTION
test al, mask OLWMRS_RESIZING_LEFT
jz 71$
ornf si, mask XF_RESIZE_LEFT
71$:
test al, mask OLWMRS_RESIZING_RIGHT
jz 72$
ornf si, mask XF_RESIZE_RIGHT
72$:
test al, mask OLWMRS_RESIZING_UP
jz 73$
ornf si, mask XF_RESIZE_TOP
73$:
test al, mask OLWMRS_RESIZING_DOWN
jz 74$
ornf si, mask XF_RESIZE_BOTTOM
74$:
;
; compute top and left bounds of XOR region
;
clr ax ; top, left of bounds
test newMRFlags, mask OLWMRS_RESIZING_LEFT
jz lBoundOkay
mov ax, newMousePos.P_x ; use new mouse X instead
lBoundOkay:
clr bx
test newMRFlags, mask OLWMRS_RESIZING_UP
jz tBoundOkay
mov bx, newMousePos.P_y ; use new mosue Y instead
tBoundOkay:
;
; finally, call ImStartMoveResize
;
; mov bp, 0x0080 ; end on any press
;no end on button action
mov bp, 0
call ImStartMoveResize ; Start the screen xor'ing
pop bp ; restore locals
;
; set pointer image based on movement
; si = XorFlags
; di = window
;
andnf si, XOR_RESIZE_ALL
mov cl, OLPI_MOVE ; assume move
tst si
jz havePtr
if _MOTIF or _ISUI ;------------------------------------------------------
mov cl, OLPI_RESIZE_UPL_DIAG
cmp si, mask XF_RESIZE_TOP or mask XF_RESIZE_LEFT
je havePtr ;skip if so...
mov cl, OLPI_RESIZE_UPR_DIAG
cmp si, mask XF_RESIZE_TOP or mask XF_RESIZE_RIGHT
je havePtr ;skip if so...
mov cl, OLPI_RESIZE_DOWNL_DIAG
cmp si, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_LEFT
je havePtr ;skip if so...
mov cl, OLPI_RESIZE_DOWNR_DIAG
cmp si, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_RIGHT
je havePtr ;skip if so...
mov cl, OLPI_RESIZE_LEFT
test si, mask XF_RESIZE_LEFT
jnz havePtr ;skip if so...
mov cl, OLPI_RESIZE_RIGHT
test si, mask XF_RESIZE_RIGHT
jnz havePtr ;skip if so...
mov cl, OLPI_RESIZE_UP
test si, mask XF_RESIZE_TOP
jnz havePtr ;skip if so...
mov cl, OLPI_RESIZE_DOWN
;saving bytes...
; test si, mask XF_RESIZE_BOTTOM
; jnz havePtr ;skip if so...
else ;---------------------------------------------------------------
mov cl, OLPI_RESIZE_UP_DIAG
cmp si, mask XF_RESIZE_TOP or mask XF_RESIZE_RIGHT
je havePtr ;skip if so...
cmp si, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_LEFT
je havePtr ;skip if so...
mov cl, OLPI_RESIZE_DOWN_DIAG
cmp si, mask XF_RESIZE_BOTTOM or mask XF_RESIZE_RIGHT
je havePtr ;skip if so...
cmp si, mask XF_RESIZE_TOP or mask XF_RESIZE_LEFT
je havePtr ;skip if so...
mov cl, OLPI_RESIZE_HORIZ
test si, mask XF_RESIZE_LEFT or mask XF_RESIZE_RIGHT
jnz havePtr ;skip if so...
mov cl, OLPI_RESIZE_VERT
;saving bytes...
; test si, mask XF_RESIZE_TOP or mask XF_RESIZE_BOTTOM
; jnz havePtr ;skip if so...
endif ;---------------------------------------------------------------
havePtr:
mov ch, PIL_WINDOW
call OpenSetPtrImage
jmp short done ; don't resize on first press
notResizePending:
;
; combine new resize direction with any existing one
;
; is one of the opposite directions
; set?
test ds:[di].OLWI_moveResizeState, bh
jz bumpMouseNow ; no, do our same direction resize
mov al, bh
xor al, OLWMRS_RESIZING_MASK
; is one of our directions already set?
test ds:[di].OLWI_moveResizeState, al
jnz bumpMouseNow ; yes, just move in desired direction
mov newDirection, bl ; save new direction
mov ah, ds:[di].OLWI_moveResizeState
andnf ah, bh ; ah = current opposite direction
ornf bl, ah ; bl = new direction + current direction
jmp doNewResize
bumpMouseNow:
push bp ; save locals
mov ax, MSG_OL_WIN_TURN_ON_AND_BUMP_MOUSE
call ObjCallInstanceNoLock
pop bp ; restore locals
done:
.leave
ret
OLWMRKeyCommon endp
OLWMRKeyAbortMoveResize proc near
call FinishMoveResize
ret
OLWMRKeyAbortMoveResize endp
OLWMRKeyStopMoveResize proc near
mov di, ds:[di].VCI_window
tst di
jz releaseGrabs
mov cx, OLPI_NONE or (PIL_WINDOW shl 8)
call OpenSetPtrImage ;turn off any move/resize cursor
call ImGetMousePos ;cx, dx = mouse pos in doc coords
call OpenWinHandleEndMoveResize
releaseGrabs:
call KN_DerefVisSpec_DI
call FinishMoveResize ;finish up
ret
OLWMRKeyStopMoveResize endp
endif ;----------------------------------------------------------------------
KbdNavigation ends
| 26.668148 | 97 | 0.65863 |
6473dd5efd9da87fd1928d3c64b1b7f562f08796 | 5,452 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_259_1841.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_259_1841.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_259_1841.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 %r12
push %r15
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xd301, %rsi
lea addresses_A_ht+0x1699d, %rdi
nop
nop
nop
nop
xor %r12, %r12
mov $30, %rcx
rep movsl
nop
nop
nop
nop
dec %rax
lea addresses_D_ht+0x18881, %rsi
lea addresses_normal_ht+0x11681, %rdi
nop
inc %r15
mov $52, %rcx
rep movsw
dec %r15
lea addresses_D_ht+0xe581, %rax
nop
nop
nop
nop
nop
sub $59997, %rcx
mov (%rax), %r12w
nop
nop
nop
nop
nop
dec %r12
lea addresses_UC_ht+0x2881, %rsi
nop
nop
nop
sub $1833, %rbx
mov $0x6162636465666768, %r15
movq %r15, %xmm6
and $0xffffffffffffffc0, %rsi
movntdq %xmm6, (%rsi)
dec %rdi
lea addresses_WT_ht+0x8a01, %rbx
clflush (%rbx)
nop
nop
nop
nop
nop
cmp %rsi, %rsi
mov (%rbx), %rax
nop
nop
dec %rbx
lea addresses_D_ht+0x1eaf9, %r15
nop
nop
nop
nop
nop
add $4365, %rdi
mov $0x6162636465666768, %rbx
movq %rbx, %xmm0
movups %xmm0, (%r15)
xor $20159, %rsi
lea addresses_D_ht+0x18081, %rsi
lea addresses_WC_ht+0x14c81, %rdi
nop
nop
nop
dec %r9
mov $97, %rcx
rep movsw
nop
nop
nop
nop
nop
add $53737, %rsi
lea addresses_WC_ht+0x1b481, %rsi
nop
nop
xor %rcx, %rcx
movb (%rsi), %al
nop
nop
nop
nop
sub $60793, %r15
lea addresses_WT_ht+0x9c81, %rbx
nop
nop
nop
dec %rsi
vmovups (%rbx), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %rcx
nop
nop
nop
nop
nop
sub $34085, %rax
lea addresses_D_ht+0x8f81, %rsi
lea addresses_normal_ht+0x11461, %rdi
nop
sub %rax, %rax
mov $104, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $53759, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r15
push %rax
push %rbp
push %rdx
// Store
lea addresses_WC+0x14199, %rdx
nop
nop
nop
and %r11, %r11
movl $0x51525354, (%rdx)
and $22828, %rbp
// Store
lea addresses_PSE+0x14641, %r15
clflush (%r15)
cmp %r11, %r11
mov $0x5152535455565758, %r10
movq %r10, %xmm6
movups %xmm6, (%r15)
nop
nop
nop
nop
nop
sub $23430, %rdx
// Store
lea addresses_US+0x8c81, %rdx
nop
nop
nop
nop
nop
cmp %r10, %r10
mov $0x5152535455565758, %rax
movq %rax, (%rdx)
nop
and $14300, %r10
// Store
lea addresses_WT+0x13081, %rax
nop
nop
nop
add $10139, %r14
mov $0x5152535455565758, %r15
movq %r15, (%rax)
nop
nop
nop
sub %rax, %rax
// Faulty Load
lea addresses_RW+0x14881, %r15
nop
nop
nop
nop
sub %r11, %r11
mov (%r15), %edx
lea oracles, %r11
and $0xff, %rdx
shlq $12, %rdx
mov (%r11,%rdx,1), %rdx
pop %rdx
pop %rbp
pop %rax
pop %r15
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'32': 259}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 22.436214 | 776 | 0.655356 |
6fb57fa0a3e99e9fb2120d98df4b768eb089f4e6 | 20,743 | asm | Assembly | media_driver/agnostic/gen11_icllp/vp/kernel_free/Source/Interlace_444_16_Buf_0.asm | lacc97/media-driver | 8aa1d74b80668f9963e691b1c01ab564f50aec85 | [
"Intel",
"BSD-3-Clause",
"MIT"
] | 660 | 2017-11-21T15:55:52.000Z | 2022-03-31T06:31:00.000Z | media_driver/agnostic/gen11_icllp/vp/kernel_free/Source/Interlace_444_16_Buf_0.asm | lacc97/media-driver | 8aa1d74b80668f9963e691b1c01ab564f50aec85 | [
"Intel",
"BSD-3-Clause",
"MIT"
] | 1,070 | 2017-12-01T00:26:10.000Z | 2022-03-31T17:55:26.000Z | media_driver/agnostic/gen11_icllp/vp/kernel_free/Source/Interlace_444_16_Buf_0.asm | lacc97/media-driver | 8aa1d74b80668f9963e691b1c01ab564f50aec85 | [
"Intel",
"BSD-3-Clause",
"MIT"
] | 309 | 2017-11-30T08:34:09.000Z | 2022-03-30T18:52:07.000Z | /*
* Copyright (c) 2017, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
L0:
add (4|M0) a0.0<1>:uw r22.0<4;4,1>:w 0x0:uw {AccWrEn}
add (4|M0) a0.4<1>:uw a0.0<4;4,1>:uw r22.8<0;2,1>:w
and (1|M0) r10.0<1>:ud r2.2<0;1,0>:ud 0x1:ud
cmp (1|M0) (eq)f0.1 null.0<1>:w r10.0<0;1,0>:ud 0x0:ud
(W&f0.1) jmpi L2656
L80:
mov (16|M0) r9.0<1>:uw r64.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r72.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r80.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r88.0<16;16,1>:uw
mov (4|M0) r64.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r72.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r64.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r72.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r80.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r88.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r80.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r88.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r64.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r72.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r64.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r72.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r80.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r88.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r80.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r88.9<2>:uw r12.12<4;4,1>:uw
mov (16|M0) r9.0<1>:uw r65.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r73.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r81.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r89.0<16;16,1>:uw
mov (4|M0) r65.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r73.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r65.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r73.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r81.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r89.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r81.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r89.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r65.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r73.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r65.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r73.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r81.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r89.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r81.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r89.9<2>:uw r12.12<4;4,1>:uw
mov (16|M0) r9.0<1>:uw r66.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r74.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r82.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r90.0<16;16,1>:uw
mov (4|M0) r66.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r74.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r66.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r74.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r82.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r90.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r82.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r90.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r66.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r74.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r66.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r74.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r82.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r90.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r82.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r90.9<2>:uw r12.12<4;4,1>:uw
mov (16|M0) r9.0<1>:uw r67.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r75.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r83.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r91.0<16;16,1>:uw
mov (4|M0) r67.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r75.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r67.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r75.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r83.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r91.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r83.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r91.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r67.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r75.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r67.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r75.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r83.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r91.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r83.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r91.9<2>:uw r12.12<4;4,1>:uw
mov (16|M0) r9.0<1>:uw r68.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r76.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r84.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r92.0<16;16,1>:uw
mov (4|M0) r68.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r76.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r68.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r76.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r84.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r92.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r84.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r92.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r68.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r76.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r68.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r76.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r84.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r92.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r84.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r92.9<2>:uw r12.12<4;4,1>:uw
mov (16|M0) r9.0<1>:uw r69.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r77.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r85.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r93.0<16;16,1>:uw
mov (4|M0) r69.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r77.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r69.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r77.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r85.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r93.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r85.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r93.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r69.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r77.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r69.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r77.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r85.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r93.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r85.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r93.9<2>:uw r12.12<4;4,1>:uw
mov (16|M0) r9.0<1>:uw r70.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r78.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r86.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r94.0<16;16,1>:uw
mov (4|M0) r70.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r78.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r70.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r78.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r86.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r94.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r86.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r94.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r70.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r78.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r70.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r78.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r86.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r94.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r86.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r94.9<2>:uw r12.12<4;4,1>:uw
mov (16|M0) r9.0<1>:uw r71.0<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r79.0<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r87.0<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r95.0<16;16,1>:uw
mov (4|M0) r71.0<2>:uw r9.0<4;4,1>:uw
mov (4|M0) r79.0<2>:uw r9.4<4;4,1>:uw
mov (4|M0) r71.1<2>:uw r11.0<4;4,1>:uw
mov (4|M0) r79.1<2>:uw r11.4<4;4,1>:uw
mov (4|M0) r87.0<2>:uw r10.0<4;4,1>:uw
mov (4|M0) r95.0<2>:uw r10.4<4;4,1>:uw
mov (4|M0) r87.1<2>:uw r12.0<4;4,1>:uw
mov (4|M0) r95.1<2>:uw r12.4<4;4,1>:uw
mov (4|M0) r71.8<2>:uw r9.8<4;4,1>:uw
mov (4|M0) r79.8<2>:uw r9.12<4;4,1>:uw
mov (4|M0) r71.9<2>:uw r11.8<4;4,1>:uw
mov (4|M0) r79.9<2>:uw r11.12<4;4,1>:uw
mov (4|M0) r87.8<2>:uw r10.8<4;4,1>:uw
mov (4|M0) r95.8<2>:uw r10.12<4;4,1>:uw
mov (4|M0) r87.9<2>:uw r12.8<4;4,1>:uw
mov (4|M0) r95.9<2>:uw r12.12<4;4,1>:uw
(W) jmpi L3600
L2656:
mov (16|M0) r9.0<1>:uw r[a0.0,32]<16;16,1>:uw
mov (16|M0) r11.0<1>:uw r[a0.1,32]<16;16,1>:uw
mov (16|M0) r13.0<1>:uw r[a0.2,32]<16;16,1>:uw
mov (16|M0) r15.0<1>:uw r[a0.3,32]<16;16,1>:uw
mov (16|M0) r10.0<1>:uw r[a0.4,32]<16;16,1>:uw
mov (16|M0) r12.0<1>:uw r[a0.5,32]<16;16,1>:uw
mov (16|M0) r14.0<1>:uw r[a0.6,32]<16;16,1>:uw
mov (16|M0) r16.0<1>:uw r[a0.7,32]<16;16,1>:uw
mov (8|M0) r[a0.0,32]<1>:uw r[a0.0,16]<8;8,1>:uw
mov (8|M0) r[a0.1,32]<1>:uw r[a0.1,16]<8;8,1>:uw
mov (8|M0) r[a0.2,32]<1>:uw r[a0.2,16]<8;8,1>:uw
mov (8|M0) r[a0.3,32]<1>:uw r[a0.3,16]<8;8,1>:uw
mov (8|M0) r[a0.4,32]<1>:uw r[a0.4,16]<8;8,1>:uw
mov (8|M0) r[a0.5,32]<1>:uw r[a0.5,16]<8;8,1>:uw
mov (8|M0) r[a0.6,32]<1>:uw r[a0.6,16]<8;8,1>:uw
mov (8|M0) r[a0.7,32]<1>:uw r[a0.7,16]<8;8,1>:uw
add (4|M0) a0.4<1>:uw r22.0<4;4,1>:w 0x200:uw
mov (8|M0) r[a0.0,16]<1>:uw r[a0.4]<8;8,1>:uw
mov (8|M0) r[a0.0,48]<1>:uw r[a0.4,16]<8;8,1>:uw
mov (8|M0) r[a0.1,16]<1>:uw r[a0.5]<8;8,1>:uw
mov (8|M0) r[a0.1,48]<1>:uw r[a0.5,16]<8;8,1>:uw
mov (8|M0) r[a0.2,16]<1>:uw r[a0.6]<8;8,1>:uw
mov (8|M0) r[a0.2,48]<1>:uw r[a0.6,16]<8;8,1>:uw
mov (8|M0) r[a0.3,16]<1>:uw r[a0.7]<8;8,1>:uw
mov (8|M0) r[a0.3,48]<1>:uw r[a0.7,16]<8;8,1>:uw
add (8|M0) a0.0<1>:uw a0.0<8;8,1>:uw r22.8<0;2,1>:w
mov (8|M0) r[a0.0,16]<1>:uw r[a0.4]<8;8,1>:uw
mov (8|M0) r[a0.0,48]<1>:uw r[a0.4,16]<8;8,1>:uw
mov (8|M0) r[a0.1,16]<1>:uw r[a0.5]<8;8,1>:uw
mov (8|M0) r[a0.1,48]<1>:uw r[a0.5,16]<8;8,1>:uw
mov (8|M0) r[a0.2,16]<1>:uw r[a0.6]<8;8,1>:uw
mov (8|M0) r[a0.2,48]<1>:uw r[a0.6,16]<8;8,1>:uw
mov (8|M0) r[a0.3,16]<1>:uw r[a0.7]<8;8,1>:uw
mov (8|M0) r[a0.3,48]<1>:uw r[a0.7,16]<8;8,1>:uw
add (4|M0) a0.0<1>:uw r22.0<4;4,1>:w 0x200:uw
mov (8|M0) r[a0.0]<1>:uw r9.0<8;8,1>:uw
mov (8|M0) r[a0.1]<1>:uw r11.0<8;8,1>:uw
mov (8|M0) r[a0.2]<1>:uw r13.0<8;8,1>:uw
mov (8|M0) r[a0.3]<1>:uw r15.0<8;8,1>:uw
mov (8|M0) r[a0.4]<1>:uw r10.0<8;8,1>:uw
mov (8|M0) r[a0.5]<1>:uw r12.0<8;8,1>:uw
mov (8|M0) r[a0.6]<1>:uw r14.0<8;8,1>:uw
mov (8|M0) r[a0.7]<1>:uw r16.0<8;8,1>:uw
mov (8|M0) r[a0.0,16]<1>:uw r[a0.0,32]<8;8,1>:uw
mov (8|M0) r[a0.1,16]<1>:uw r[a0.1,32]<8;8,1>:uw
mov (8|M0) r[a0.2,16]<1>:uw r[a0.2,32]<8;8,1>:uw
mov (8|M0) r[a0.3,16]<1>:uw r[a0.3,32]<8;8,1>:uw
mov (8|M0) r[a0.4,16]<1>:uw r[a0.4,32]<8;8,1>:uw
mov (8|M0) r[a0.5,16]<1>:uw r[a0.5,32]<8;8,1>:uw
mov (8|M0) r[a0.6,16]<1>:uw r[a0.6,32]<8;8,1>:uw
mov (8|M0) r[a0.7,16]<1>:uw r[a0.7,32]<8;8,1>:uw
mov (8|M0) r[a0.0,32]<1>:uw r9.8<8;8,1>:uw
mov (8|M0) r[a0.1,32]<1>:uw r11.8<8;8,1>:uw
mov (8|M0) r[a0.2,32]<1>:uw r13.8<8;8,1>:uw
mov (8|M0) r[a0.3,32]<1>:uw r15.8<8;8,1>:uw
mov (8|M0) r[a0.4,32]<1>:uw r10.8<8;8,1>:uw
mov (8|M0) r[a0.5,32]<1>:uw r12.8<8;8,1>:uw
mov (8|M0) r[a0.6,32]<1>:uw r14.8<8;8,1>:uw
mov (8|M0) r[a0.7,32]<1>:uw r16.8<8;8,1>:uw
L3600:
nop
| 81.988142 | 113 | 0.294172 |
bfcf4a78aaf43d2373da0e528e099605cd0f99b2 | 471 | asm | Assembly | programs/oeis/204/A204896.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/204/A204896.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/204/A204896.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A204896: p(n)-q(n), where (p(n), q(n)) is the least pair of primes (ordered as in A204890) for which n divides p(n)-q(n).
; 1,2,3,4,5,6,14,8,9,10,11,12,26,14,15,16,17,18,38,20,21,22,46,24,50,26,27,28,29,30,62,32,66,34,35,36,74,38,39,40,41,42,86,44,45,46,94,48,98,50,51,52,106,54,110,56,57,58,59,60,122,62,126,64,65,66,134
mov $1,$0
seq $1,204897 ; a(n) = (p(n)-q(n))/n, where (p(n), q(n)) is the least pair of primes for which n divides p(n)-q(n).
mul $0,$1
add $0,$1
| 58.875 | 199 | 0.624204 |
fe7dc2f8bcf605863db2e806328b64b5fe59f153 | 4,734 | asm | Assembly | base/mvdm/dos/v86/cmd/edlin/edlequ.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/mvdm/dos/v86/cmd/edlin/edlequ.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/mvdm/dos/v86/cmd/edlin/edlequ.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | page 60,132 ;
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
.xlist
include version.inc
include DOSSYM.INC
include EDLSTDSW.INC
.list
;======================= START OF SPECIFICATIONS =========================
;
; MODULE NAME: EDLEQU.SAL
;
; DESCRIPTIVE NAME: EQUATES FOR EDLIN
;
; FUNCTION: PROVIDES EQUATES FOR EDLIN. IT ALSO PROVIDES THE MACRO
; VAL_YN.
;
; ENTRY POINT: NA
;
; INPUT: NA
;
; EXIT NORMAL: NA
;
; EXIT ERROR: NA
;
; INTERNAL REFERENCES:
;
; ROUTINE: VAL_YN - VALIDATES Y/N RESPONSES FROM THE KEYBOARD
;
; EXTERNAL REFERENCES:
;
; ROUTINE: NA
;
; NOTES: THIS MODULE IS TO BE PREPPED BY SALUT WITH THE "PR" OPTIONS.
; LINK EDLIN+EDLCMD1+EDLCMD2+EDLMES+EDLPARSE
;
; REVISION HISTORY:
;
; AN000 VERSION 4.00 - REVISIONS MADE RELATE TO THE FOLLOWING:
;
; - IMPLEMENT SYSPARSE
; - IMPLEMENT MESSAGE RETRIEVER
; - IMPLEMENT DBCS ENABLING
; - ENHANCED VIDEO SUPPORT
; - EXTENDED OPENS
; - SCROLLING ERROR
;
; COPYRIGHT: "MS DOS EDLIN UTILITY"
; "VERSION 4.00 (C) COPYRIGHT 1988 Microsoft"
;
;======================= END OF SPECIFICATIONS ===========================
COMAND_LINE_LENGTH EQU 128
QUOTE_CHAR EQU 16H ;Quote character = ^V
CR EQU 13
STKSIZ EQU 200h
STACK equ stksiz
asian_blk equ DB_SP_LO ;an000;asian blank 2nd. byte
dbcs_lead_byte equ DB_SP_HI ;an000;asian blank lead byte
nul equ 00h ;an000;nul character
Access_Denied equ 0005h ;an000;extended error code for access denied
;======== Y/N validation equates =========================================
yn_chk equ 23h ;an000;check for Y/N response
max_len equ 01h ;an000;max. len. for Y/N char.
yes equ 01h ;an000;boolean yes value
no equ 00h ;an000;boolean no value
;======== text display values for initialization =========================
video_get equ 0fh ;an000;int 10 get video attributes
video_set equ 00h ;an000;int 10 set video attributes
video_text equ 03h ;an000;80 X 25 color monitor
;======== code page values for functions =================================
get_set_cp equ 66h ;an000;get or set code page
get_cp equ 01h ;an000;get active code page
set_cp equ 02h ;an000;set active code page
;======== screen length & width defaults =================================
std_out equ 01h ;an000;console output
display_attr equ 03h ;an000;display for IOCTL
Get_Display equ 7fh ;an000;Get display for IOCTL
ifndef JAPAN
Def_Disp_Len equ 25 ;an000;default display length
else ; if JAPAN
Def_Disp_Len equ 24
endif
Def_Disp_Width equ 80 ;an000;default display width
;======== extended open equates ==========================================
rw equ 0082h ;an000;read/write
; compatibility
; noinherit
; int 24h handler
; no commit
ext_read equ 0080h ;an000;read
; compatibility
; noinherit
; int 24h handler
; no commit
rw_flag equ 0101h ;an000;fail if file not exist
; open if file exists
; don't validate code page
creat_flag equ 0110h ;an000;create if file does not exist
; fail if file exists
; don't validate code page
open_flag equ 0101h ;an000;fail if file not exist
; open if file exists
; don't validate code page
creat_open_flag equ 0112h ;an000;create if file does not exist
; open/replace if file exists
; don't validate code page
attr equ 00h ;an000;attributes set to 0
;======== parse value equates ============================================
nrm_parse_exit equ 0ffffh ;an000;normal exit from sysparse
too_many equ 01h ;an000;too many parms entered
op_missing equ 02h ;an000;required operand missing
sw_missing equ 03h ;an000;not a valid switch
;======== Strucs =========================================================
Display_Buffer_Struc Struc ;an000;dms;
Display_Info_Level db ? ;an000;dms;
Display_Reserved db ? ;an000;dms;
Display_Buffer_Size dw ? ;an000;dms;
Display_Flags dw ? ;an000;dms;
Display_Mode db ? ;an000;dms;
; TEXT=01
; APA =02
Display_Mode_Reserved db ? ;an000;dms;
Display_Colors dw ? ;an000;dms;# of colors
Display_Width_Pixels dw ? ;an000;dms;# of pixels in width
Display_Length_Pixels dw ? ;an000;dms;# of pixels in len.
Display_Width_Char dw ? ;an000;dms;# of chars in width
Display_Length_Char dw ? ;an000;dms;# of chars in length
Display_Buffer_Struc ends ;an000;dms;
| 28.865854 | 75 | 0.601394 |
8a0028f6d2c0ce26cdd2d506942250b9692bff94 | 797 | asm | Assembly | oeis/290/A290662.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/290/A290662.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/290/A290662.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A290662: Decimal representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 899", based on the 5-celled von Neumann neighborhood.
; 1,3,5,15,23,63,95,255,383,1023,1535,4095,6143,16383,24575,65535,98303,262143,393215,1048575,1572863,4194303,6291455,16777215,25165823,67108863,100663295,268435455,402653183,1073741823,1610612735,4294967295,6442450943,17179869183,25769803775,68719476735,103079215103,274877906943,412316860415,1099511627775,1649267441663,4398046511103,6597069766655,17592186044415,26388279066623,70368744177663,105553116266495,281474976710655,422212465065983,1125899906842623,1688849860263935,4503599627370495
mov $1,$0
mod $0,2
lpb $1
mul $0,2
add $0,3
sub $1,1
lpe
div $0,2
add $0,1
| 61.307692 | 493 | 0.826851 |
cc13bc8e597f09dea2e5551c8f59fddd086c3b4c | 3,298 | asm | Assembly | Driver/Printer/PrintCom/Graphics/graphicsPrintSwath48.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Driver/Printer/PrintCom/Graphics/graphicsPrintSwath48.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Driver/Printer/PrintCom/Graphics/graphicsPrintSwath48.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: 9-pin print drivers
FILE: graphicsPrintSwath48.asm
AUTHOR: Dave Durran 1 March 1990
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 3/1/90 Initial revision
Dave 3/92 moved from epson9
DESCRIPTION:
$Id: graphicsPrintSwath48.asm,v 1.1 97/04/18 11:51:21 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintSwath
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Print a swath passed from spooler, figure the number
of bands, and feed the correct amount to get to the top of
the next band.
Specialized routine for the Toshiba 24 pin dogs.
This routine assumes that there is 1 vertical resolution: 48dpi.
There is an approximation made to get the 180dpi printhead
height close to a 1/48" boundary, without using so few pins
as to render it useless.
The approximation is: 19 pins = 5.06666 1/48" units.
CALLED BY: GLOBAL
PASS: bp - PState segment
dx.cx - VM file and block handle for Huge bitmap
RETURN: carry - set if some transmission error
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 03/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintSwath proc far
uses ax,cx,ds,bx,dx,si,di,ds,es
.enter
mov es, bp ; es -> PState
; load the bitmap header into the PState
call LoadSwathHeader ; bitmap header into PS_swath
; load up the band width and height
call PrLoadPstateVars ;set up the pstate band Vars.
; size and allocate a graphics data buffer
call PrCreatePrintBuffers ;allocate the print buffer.
; get pointer to data
clr ax
mov es:[PS_curColorNumber],ax ;init offset into scanline.
call DerefFirstScanline ; ds:si -> scan line zero
call SetFirstCMYK ;set the ribbon up.
; dec cx ; see if only one band to do
jcxz printLastBand
bandLoop:
call PrPrintABand ;print a band from this swath.
jc exitErr
push dx ; save band count
mov dx,5 ;
call PrLineFeed ;do the line feed in 1/48.
pop dx
jc exitErr
loop bandLoop
; if any remainder, then we need to send it, plus a shorter
; line feed
printLastBand:
tst dx ; any remainder ?
jz destroyBuffer
call PrPrintABand ; print last band
jc exitErr
clr ax ;zero the 1/180 fraction
mov bx,ax ;div by 3.75 to get 1/48s in dx.
mov cx,17476
call GrMulWWFixed
;error on the short side, so toss fraction.
call PrLineFeed ;
jc exitErr
; all done, kill the buffer and leave
destroyBuffer:
call PrDestroyPrintBuffers ;get rid of print buffer space.
clc ; no errors
exit:
.leave
ret
; some transmission error. cleanup and exit.
exitErr:
call PrDestroyPrintBuffers ;get rid of print buffer space.
stc
jmp exit
PrintSwath endp
| 25.765625 | 79 | 0.605518 |
efb3f037a061d414f7220a8615ca75af1e40a760 | 7,109 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_4341_974.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_0xa0_notsx.log_4341_974.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_0xa0_notsx.log_4341_974.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 %r12
push %r15
push %r8
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x15fe0, %rsi
lea addresses_A_ht+0x3654, %rdi
and %r15, %r15
mov $17, %rcx
rep movsw
nop
nop
and $39373, %rax
lea addresses_D_ht+0x5c94, %rsi
lea addresses_WC_ht+0x2984, %rdi
clflush (%rdi)
nop
nop
nop
sub $10345, %rax
mov $8, %rcx
rep movsw
nop
nop
nop
nop
nop
sub $6750, %rax
lea addresses_D_ht+0x14194, %rsi
lea addresses_WT_ht+0x19f42, %rdi
cmp %r15, %r15
mov $24, %rcx
rep movsl
nop
nop
nop
nop
nop
add %rcx, %rcx
lea addresses_normal_ht+0x18660, %rsi
lea addresses_UC_ht+0x1d7bc, %rdi
nop
nop
nop
nop
nop
add $44524, %r8
mov $65, %rcx
rep movsw
nop
cmp %rsi, %rsi
lea addresses_WT_ht+0x14ad4, %rsi
lea addresses_WT_ht+0xd3f4, %rdi
nop
nop
inc %r12
mov $79, %rcx
rep movsq
nop
nop
nop
xor %r15, %r15
lea addresses_WC_ht+0xbc36, %rcx
inc %r12
movb $0x61, (%rcx)
add $27194, %rdi
lea addresses_normal_ht+0x6594, %rcx
nop
inc %r12
movw $0x6162, (%rcx)
nop
nop
nop
nop
dec %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r8
push %rax
push %rcx
push %rdi
push %rdx
// Store
lea addresses_D+0x17594, %r13
nop
nop
add $35135, %rdx
mov $0x5152535455565758, %rax
movq %rax, (%r13)
nop
nop
nop
nop
nop
cmp $29773, %rdx
// Store
lea addresses_US+0x3af4, %r14
clflush (%r14)
xor %r8, %r8
mov $0x5152535455565758, %rdi
movq %rdi, (%r14)
nop
nop
nop
inc %rdi
// Store
lea addresses_US+0x858c, %rax
sub $22243, %r13
movw $0x5152, (%rax)
nop
nop
cmp %rax, %rax
// Store
lea addresses_WC+0x1fe24, %rdx
nop
cmp %rcx, %rcx
mov $0x5152535455565758, %r14
movq %r14, %xmm0
vmovups %ymm0, (%rdx)
nop
nop
nop
nop
nop
add %rdi, %rdi
// Store
lea addresses_A+0x1332c, %rdi
nop
nop
cmp %r14, %r14
mov $0x5152535455565758, %r8
movq %r8, %xmm7
vmovups %ymm7, (%rdi)
nop
nop
nop
nop
nop
xor %r8, %r8
// Faulty Load
lea addresses_D+0x17594, %rdx
clflush (%rdx)
nop
nop
nop
nop
xor $3071, %rdi
movups (%rdx), %xmm0
vpextrq $1, %xmm0, %rax
lea oracles, %rcx
and $0xff, %rax
shlq $12, %rax
mov (%rcx,%rax,1), %rax
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'AVXalign': True, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}}
[Faulty Load]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 2, 'NT': False, 'same': False, 'congruent': 11}}
{'36': 4341}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 34.509709 | 2,999 | 0.657336 |
f9da888ad22a11718ef625096e08f5a979c65122 | 1,777 | asm | Assembly | programs/oeis/094/A094766.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/094/A094766.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/094/A094766.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A094766: Trajectory of 11 under repeated application of the map n -> n + 2*square excess of n (see A094765).
; 11,15,27,31,43,57,73,91,111,133,157,183,211,241,273,307,343,381,421,463,507,553,601,651,703,757,813,871,931,993,1057,1123,1191,1261,1333,1407,1483,1561,1641,1723,1807,1893,1981,2071,2163,2257,2353,2451,2551,2653,2757,2863,2971,3081,3193,3307,3423,3541,3661,3783,3907,4033,4161,4291,4423,4557,4693,4831,4971,5113,5257,5403,5551,5701,5853,6007,6163,6321,6481,6643,6807,6973,7141,7311,7483,7657,7833,8011,8191,8373,8557,8743,8931,9121,9313,9507,9703,9901,10101,10303,10507,10713,10921,11131,11343,11557,11773,11991,12211,12433,12657,12883,13111,13341,13573,13807,14043,14281,14521,14763,15007,15253,15501,15751,16003,16257,16513,16771,17031,17293,17557,17823,18091,18361,18633,18907,19183,19461,19741,20023,20307,20593,20881,21171,21463,21757,22053,22351,22651,22953,23257,23563,23871,24181,24493,24807,25123,25441,25761,26083,26407,26733,27061,27391,27723,28057,28393,28731,29071,29413,29757,30103,30451,30801,31153,31507,31863,32221,32581,32943,33307,33673,34041,34411,34783,35157,35533,35911,36291,36673,37057,37443,37831,38221,38613,39007,39403,39801,40201,40603,41007,41413,41821,42231,42643,43057,43473,43891,44311,44733,45157,45583,46011,46441,46873,47307,47743,48181,48621,49063,49507,49953,50401,50851,51303,51757,52213,52671,53131,53593,54057,54523,54991,55461,55933,56407,56883,57361,57841,58323,58807,59293,59781,60271,60763,61257,61753,62251,62751,63253
mov $2,$0
mov $3,$0
mov $6,$0
lpb $3,1
lpb $2,1
add $1,$2
mov $3,$2
sub $2,1
lpe
lpb $0,1
mov $4,5
mov $5,$0
sub $0,1
add $5,$1
lpe
trn $5,$4
add $1,$5
add $2,3
trn $3,$5
add $5,$1
mov $0,$5
sub $2,1
lpe
lpb $6,1
add $1,4
sub $6,1
lpe
add $1,11
| 55.53125 | 1,365 | 0.747327 |
64a45c745758b788d7945bf60922d1bfd6a50cce | 425 | asm | Assembly | programs/oeis/045/A045717.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/045/A045717.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/045/A045717.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A045717: For each prime p take the sum of nonprimes < p.
; 1,1,5,11,38,50,95,113,176,306,336,506,623,665,800,1050,1330,1390,1710,1917,1989,2369,2612,3042,3693,3990,4092,4407,4515,4848,6408,6795,7465,7603,8899,9049,9819,10619,11114,11964,12844,13024,14698,14890,15475
mov $3,1
lpb $0
sub $0,$3
mov $2,$0
max $2,0
seq $2,54265 ; Sum of composite numbers between successive primes.
add $1,$2
lpe
add $1,1
mov $0,$1
| 30.357143 | 209 | 0.705882 |
95516dc5e21869a6b4d5cc2dd0b5c08ef7d8abd0 | 1,318 | asm | Assembly | libsrc/psg/spectrum/psg_init.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/psg/spectrum/psg_init.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/psg/spectrum/psg_init.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; ZX Spectrum specific routines
; by Stefano Bodrato, Fall 2013
;
; int psg_init();
;
; Set up the PSG - most of the existing interfaces are supported
;
;
; $Id: psg_init.asm,v 1.3 2016-06-10 21:13:58 dom Exp $
;
SECTION code_clib
PUBLIC psg_init
PUBLIC _psg_init
EXTERN zx_soundchip
psg_init:
_psg_init:
call zx_soundchip
ld a,l
and a
ld hl,$ff3f ; select + read
ld bc,$ff5f ; write
jr z,fullermode
ld hl,$fffd ; select + read
ld bc,$bffd ; write
fullermode:
ld (__psg_select_and_read_port),hl
ld (__psg_write_port),bc
do_init:
ld e,@01010101
xor a ; R0: Channel A frequency low bits
call outpsg
ld e,a
ld d,12
psg_iniloop:
inc a ; R1-13: set all to 0 but 7 and 11
cp 7
jr z,skip
;cp 11
;jr z,skip
call outpsg
skip:
dec d
jr nz,psg_iniloop
ld e,@11111000 ; R7: Channel setting. Enable sound channels ABC and input on ports A and B
ld a,7
call outpsg
ld e,@00001011 ; R11: Envelope
ld a,11
outpsg:
ld bc,(__psg_select_and_read_port)
OUT (C),a
ld bc,(__psg_write_port)
OUT (C),e
; ZON-X
ld l,a
out ($ff),a
ld a,e
out ($7f),a
; ZXM and "William Stuart"
ld a,l
out ($9f),a
ld a,e
out ($df),a
ret
SECTION bss_clib
PUBLIC __psg_select_and_read_port
PUBLIC __psg_write_port
__psg_select_and_read_port: defw 0
__psg_write_port: defw 0
| 15.325581 | 92 | 0.688164 |
084cb7700c69563eb63d4cf993d46761a1724485 | 170 | asm | Assembly | app/hack/bad_handler.asm | USN484259/COFUOS | a751c3ab1a24f634ae33b5ddced55c184c8f9381 | [
"MIT"
] | 1 | 2022-03-03T09:57:56.000Z | 2022-03-03T09:57:56.000Z | app/hack/bad_handler.asm | USN484259/COFUOS | a751c3ab1a24f634ae33b5ddced55c184c8f9381 | [
"MIT"
] | null | null | null | app/hack/bad_handler.asm | USN484259/COFUOS | a751c3ab1a24f634ae33b5ddced55c184c8f9381 | [
"MIT"
] | 1 | 2022-01-22T14:19:24.000Z | 2022-01-22T14:19:24.000Z | [bits 64]
set_handler equ 0x0118
exit_process equ 0x0210
section .text
mov rdx,0x0000800000001000
mov eax,set_handler
syscall
mov edx,eax
mov eax,exit_process
syscall | 12.142857 | 26 | 0.823529 |
4b0de551c97b8b2e620bf56a17298bd147e9c1e8 | 5,951 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_/i9-9900K_12_0xa0_notsx.log_21829_689.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_/i9-9900K_12_0xa0_notsx.log_21829_689.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_/i9-9900K_12_0xa0_notsx.log_21829_689.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 %r14
push %r9
push %rbp
push %rdi
push %rdx
lea addresses_D_ht+0x4598, %rdx
nop
nop
nop
nop
nop
inc %rdi
movb (%rdx), %r9b
nop
nop
nop
nop
add %r9, %r9
lea addresses_WC_ht+0x1ea59, %rdx
clflush (%rdx)
cmp $62920, %r11
mov (%rdx), %r14
nop
cmp $57995, %rdi
lea addresses_normal_ht+0x1ee98, %r13
sub $20473, %rbp
mov (%r13), %r11
nop
nop
cmp $31287, %rbp
lea addresses_A_ht+0x5d22, %r9
nop
nop
nop
nop
and %r13, %r13
mov $0x6162636465666768, %rdi
movq %rdi, %xmm7
and $0xffffffffffffffc0, %r9
vmovntdq %ymm7, (%r9)
nop
nop
and $978, %r11
lea addresses_A_ht+0x12398, %rbp
cmp $7974, %r13
movb $0x61, (%rbp)
nop
nop
nop
nop
inc %rdi
lea addresses_UC_ht+0x818, %r11
nop
nop
nop
add $19987, %r14
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
movups %xmm4, (%r11)
nop
add %r9, %r9
lea addresses_normal_ht+0x170f6, %r9
nop
add %r13, %r13
vmovups (%r9), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %r14
nop
nop
nop
nop
sub %rdx, %rdx
pop %rdx
pop %rdi
pop %rbp
pop %r9
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r15
push %r8
push %rbp
push %rdx
push %rsi
// Store
mov $0xdd8, %rdx
nop
inc %r12
movw $0x5152, (%rdx)
// Exception!!!
nop
nop
nop
nop
mov (0), %r8
nop
nop
nop
sub $22507, %rbp
// Faulty Load
mov $0x398, %r8
nop
nop
inc %rsi
vmovntdqa (%r8), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %r12
lea oracles, %r8
and $0xff, %r12
shlq $12, %r12
mov (%r8,%r12,1), %r12
pop %rsi
pop %rdx
pop %rbp
pop %r8
pop %r15
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_P', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 5}}
[Faulty Load]
{'src': {'type': 'addresses_P', 'AVXalign': False, 'size': 32, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 4}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'b0': 5, 'ff': 52, '44': 10673, '51': 40, '00': 11059}
00 00 44 00 00 00 00 44 00 00 00 44 00 44 00 00 00 00 44 00 00 44 00 44 00 44 00 00 00 ff 44 00 44 44 00 44 00 44 00 44 44 00 44 00 00 44 00 44 00 00 44 44 00 44 44 00 00 44 44 00 44 00 00 44 44 00 00 44 00 44 00 44 00 00 44 00 44 44 00 44 00 44 00 44 44 00 44 00 44 00 00 44 00 44 00 44 00 00 00 44 00 00 44 44 44 00 44 00 44 44 44 00 44 44 00 44 00 44 00 44 00 44 44 00 44 00 44 00 00 44 00 00 00 00 44 00 44 00 44 00 44 00 00 00 00 44 00 44 00 44 00 00 00 00 44 00 44 44 00 00 00 44 00 00 44 00 44 00 44 00 44 00 44 00 44 00 00 00 00 00 44 00 44 00 44 00 44 00 00 00 44 00 00 44 00 44 44 44 44 00 00 44 00 44 00 44 44 00 44 00 00 44 44 00 00 44 44 00 44 00 44 00 44 00 44 00 00 44 00 44 00 44 00 44 44 00 44 00 00 00 00 00 00 44 00 44 44 00 44 44 00 00 00 00 44 00 44 44 44 44 44 44 44 00 44 00 00 00 00 00 00 44 00 44 00 44 00 44 44 00 00 44 44 00 44 00 44 00 44 00 44 00 44 00 00 44 44 00 44 00 44 44 00 44 00 44 00 00 00 b0 00 00 00 44 00 44 00 00 44 00 44 00 44 00 44 00 44 00 44 00 00 44 00 44 44 44 44 44 44 00 44 00 44 00 44 00 44 44 00 44 00 00 44 44 44 00 00 00 00 44 00 44 00 00 44 44 00 44 00 44 00 44 00 44 44 00 44 00 44 00 44 00 44 00 44 00 00 00 00 00 00 00 44 00 44 44 44 00 00 44 00 00 44 00 44 00 44 00 00 00 00 44 00 44 00 00 44 00 00 44 00 00 44 00 44 00 00 00 00 44 00 00 44 00 00 44 44 00 00 00 00 44 00 44 00 44 00 44 00 44 00 44 00 44 00 44 00 44 00 44 44 00 00 00 00 00 44 00 44 00 44 00 44 00 44 00 44 00 44 00 00 44 00 00 00 44 00 44 00 44 44 00 00 00 00 00 ff 44 44 44 00 00 44 44 00 00 00 00 44 00 00 00 00 00 44 00 44 00 00 00 44 00 44 00 00 00 00 44 00 44 00 44 00 44 00 44 44 00 44 00 44 00 44 00 44 44 00 44 00 44 00 44 00 44 00 00 00 00 00 44 00 00 00 44 00 00 44 00 00 00 44 00 44 00 00 00 44 00 44 00 00 44 00 44 00 44 00 44 00 00 44 44 44 00 44 44 00 44 00 44 00 44 00 44 00 44 00 44 00 44 00 00 00 00 00 00 44 00 00 00 00 44 44 00 44 00 44 00 44 00 00 44 00 44 44 00 44 00 44 00 00 44 00 44 00 44 44 44 44 00 44 00 44 00 00 00 44 00 00 00 00 00 44 00 44 00 44 44 44 00 00 00 00 44 00 44 00 44 00 00 00 00 00 b0 44 00 44 44 00 44 00 44 00 44 00 44 00 44 00 00 44 00 00 44 44 00 44 00 44 00 44 00 44 44 44 00 00 44 00 44 00 44 00 00 00 00 00 44 00 00 44 00 44 00 44 00 00 44 00 44 00 00 00 44 00 44 00 44 00 44 00 44 00 44 00 44 00 44 44 00 00 44 00 44 00 44 00 44 00 44 00 00 00 00 00 00 44 44 44 00 44 00 44 00 00 44 00 00 00 00 44 44 44 44 00 00 00 00 44 00 44 44 00 00 44 44 00 44 00 44 44 00 44 00 44 44 00 44 00 00 44 00 00 00 44 00 00 00 44 00 00 44 00 00 00 44 00 00 44 44 00 44 44 00 44 44 44 44 00 00 44 00 00 44 00 00 44 44 00 44 00 44 44 00 44 44 00 44 44 44 44 00 44 00 00 44 44 00 44 44 00 44 44 00 00 00 00 44 00 44 00 44 00 00 44 00 44 44 00 00 00 44 00 44 44 00 44 44 00 44 44 00 44 00 44 00 00 44 00 44 00 44 00 44 00 44 00 44 00 44 00 00 00 00 44 00 00 00 00 44 44 00 00 00 00 44 00 44 00 44 00 44 00 44 44 00 44 00 44 00 00 44 00 ff 00 44 00 44 00 44 00 44 00 00 00 44 44 00 44 00 44 00 44 00 44 44 00 00 00 44 00 44 00 44 00 44 00 44 00 44
*/
| 39.151316 | 2,999 | 0.653168 |
2224abcc9a91f777d7891f1b4a8172701ed6b5fb | 803 | asm | Assembly | oeis/322/A322360.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/322/A322360.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/322/A322360.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A322360: Multiplicative with a(p^e) = (p^2)-1.
; Submitted by Christian Krause
; 1,3,8,3,24,24,48,3,8,72,120,24,168,144,192,3,288,24,360,72,384,360,528,24,24,504,8,144,840,576,960,3,960,864,1152,24,1368,1080,1344,72,1680,1152,1848,360,192,1584,2208,24,48,72,2304,504,2808,24,2880,144,2880,2520,3480,576,3720,2880,384,3,4032,2880,4488,864,4224,3456,5040,24,5328,4104,192,1080,5760,4032,6240,72,8,5040,6888,1152,6912,5544,6720,360,7920,576,8064,1584,7680,6624,8640,24,9408,144,960,72
add $0,1
mov $1,1
lpb $0
mov $3,$0
lpb $3
mov $4,$0
mov $6,$2
cmp $6,0
add $2,$6
mod $4,$2
cmp $4,0
cmp $4,0
mov $5,$2
add $2,1
cmp $5,1
max $4,$5
sub $3,$4
lpe
lpb $0
dif $0,$2
mov $5,$2
lpe
sub $5,1
mul $1,$5
add $2,1
mul $1,$2
lpe
mov $0,$1
| 24.333333 | 402 | 0.608966 |
03122ab745c1e30a39af24a05cf2f41953bfc871 | 376 | asm | Assembly | programs/oeis/133/A133296.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/133/A133296.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/133/A133296.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A133296: Smallest number whose sum of digits is 2n.
; 0,2,4,6,8,19,39,59,79,99,299,499,699,899,1999,3999,5999,7999,9999,29999,49999,69999,89999,199999,399999,599999,799999,999999,2999999,4999999,6999999,8999999,19999999,39999999,59999999,79999999,99999999
mul $0,2
seq $0,71061 ; Abjad values of the Arabic letters in the traditional order for abjad calculations.
sub $0,1
| 53.714286 | 203 | 0.784574 |
28c001d3b87ec058d32d8c7a91062a46e7435ecc | 5,715 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_409.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_0xa0_notsx.log_21829_409.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_0xa0_notsx.log_21829_409.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 %r13
push %r14
push %r15
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x1726d, %r9
nop
nop
nop
inc %r11
vmovups (%r9), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %r13
nop
nop
nop
nop
nop
inc %r14
lea addresses_WT_ht+0x39fd, %r10
nop
nop
sub $14113, %r9
movb $0x61, (%r10)
lfence
lea addresses_A_ht+0x1e6fd, %rsi
lea addresses_WT_ht+0x196cd, %rdi
nop
nop
nop
dec %r14
mov $69, %rcx
rep movsw
nop
nop
nop
and $56116, %rdi
lea addresses_D_ht+0x18e81, %rsi
lea addresses_WC_ht+0x12afd, %rdi
nop
nop
nop
nop
nop
xor %r10, %r10
mov $79, %rcx
rep movsb
nop
nop
nop
inc %rdi
lea addresses_D_ht+0x160fd, %r11
nop
nop
nop
nop
xor %rsi, %rsi
mov $0x6162636465666768, %r14
movq %r14, %xmm0
vmovups %ymm0, (%r11)
nop
nop
cmp %rcx, %rcx
lea addresses_D_ht+0x4efd, %r9
nop
nop
nop
nop
dec %rcx
movb (%r9), %r11b
nop
nop
nop
nop
sub $4978, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r14
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r15
push %rbp
push %rdx
// Store
lea addresses_D+0xc8ad, %r13
nop
and %rdx, %rdx
mov $0x5152535455565758, %r11
movq %r11, (%r13)
cmp %r10, %r10
// Faulty Load
lea addresses_WC+0x186fd, %r15
nop
nop
nop
nop
and $5714, %rbp
mov (%r15), %dx
lea oracles, %r15
and $0xff, %rdx
shlq $12, %rdx
mov (%r15,%rdx,1), %rdx
pop %rdx
pop %rbp
pop %r15
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 5}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
| 38.355705 | 2,999 | 0.659668 |
18816326321b6da2b39b6e80f15a35b6e29a8478 | 630 | asm | Assembly | oeis/315/A315210.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/315/A315210.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/315/A315210.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A315210: Coordination sequence Gal.6.327.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.
; Submitted by Simon Strandgaard
; 1,6,10,14,20,25,29,34,40,44,48,54,60,64,68,74,79,83,88,94,98,102,108,114,118,122,128,133,137,142,148,152,156,162,168,172,176,182,187,191
mov $1,$0
mul $1,3
seq $1,311523 ; Coordination sequence Gal.6.119.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.
mov $2,$0
mul $0,16
sub $0,1
mod $0,$1
add $0,1
mov $3,$2
mul $3,2
add $0,$3
| 39.375 | 182 | 0.726984 |
a4d6129ecb7a0fa2824b73f261ca738f15651661 | 794 | asm | Assembly | programs/oeis/008/A008765.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/008/A008765.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/008/A008765.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A008765: Expansion of (1+x^4)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)).
; 1,1,2,3,6,7,11,14,20,24,32,38,49,57,70,81,98,111,131,148,172,192,220,244,277,305,342,375,418,455,503,546,600,648,708,762,829,889,962,1029,1110,1183,1271,1352,1448,1536,1640,1736,1849,1953,2074,2187,2318,2439,2579,2710,2860,3000,3160,3310,3481,3641,3822,3993,4186,4367,4571,4764,4980,5184,5412,5628,5869,6097,6350,6591,6858,7111,7391,7658,7952,8232,8540,8834,9157,9465,9802,10125,10478,10815,11183,11536,11920,12288,12688,13072,13489,13889,14322,14739
mov $2,$0
add $2,1
mov $5,$0
lpb $2
mov $0,$5
sub $2,1
sub $0,$2
seq $0,8733 ; Molien series for 3-dimensional group [2+, n] = 2*(n/2).
mov $3,0
mov $6,$0
add $0,16
mov $4,$0
add $4,$6
div $4,3
add $3,$4
mov $6,$3
sub $6,5
add $1,$6
lpe
mov $0,$1
| 33.083333 | 452 | 0.656171 |
844d5e9e4d7cfb35d2490836c4b9ad06a424b768 | 2,355 | asm | Assembly | asmFiles/search.asm | hythzz/MIPS-Processor | deb13e4f640da2fdfd4216c02c68a0947e748625 | [
"MIT"
] | null | null | null | asmFiles/search.asm | hythzz/MIPS-Processor | deb13e4f640da2fdfd4216c02c68a0947e748625 | [
"MIT"
] | null | null | null | asmFiles/search.asm | hythzz/MIPS-Processor | deb13e4f640da2fdfd4216c02c68a0947e748625 | [
"MIT"
] | null | null | null | #--------------------------------------
# Test a search algorithm
#--------------------------------------
org 0x0000
ori $sp, $zero, 0x80
start:
ori $1, $zero, 0x01
ori $2, $zero, 0x04
sw $0, 0($sp) # set result to 0
lw $3, 4($sp) # load search variable into $3
lw $4, 8($sp) # load search length into $4
addiu $5, $sp, 12 # search pointer is in $5
loop:
lw $6, 0($5) # load element at pointer $5
subu $7, $6, $3 # compare loaded element with search var
beq $7, $zero, found # if matches, go to found
addu $5, $5, $2 # increment pointer
subu $4, $4, $1 # subutract search length
beq $4, $zero, notfound # if end of list, go to not found
beq $0, $zero, loop # do loop again
found:
sw $5, 0($sp) # store into 0x80
notfound:
halt
org 0x80
item_position:
cfw 0 # should be found at 0x0124
search_item:
cfw 0x5c6f
list_length:
cfw 100
search_list:
cfw 0x087d
cfw 0x5fcb
cfw 0xa41a
cfw 0x4109
cfw 0x4522
cfw 0x700f
cfw 0x766d
cfw 0x6f60
cfw 0x8a5e
cfw 0x9580
cfw 0x70a3
cfw 0xaea9
cfw 0x711a
cfw 0x6f81
cfw 0x8f9a
cfw 0x2584
cfw 0xa599
cfw 0x4015
cfw 0xce81
cfw 0xf55b
cfw 0x399e
cfw 0xa23f
cfw 0x3588
cfw 0x33ac
cfw 0xbce7
cfw 0x2a6b
cfw 0x9fa1
cfw 0xc94b
cfw 0xc65b
cfw 0x0068
cfw 0xf499
cfw 0x5f71
cfw 0xd06f
cfw 0x14df
cfw 0x1165
cfw 0xf88d
cfw 0x4ba4
cfw 0x2e74
cfw 0x5c6f
cfw 0xd11e
cfw 0x9222
cfw 0xacdb
cfw 0x1038
cfw 0xab17
cfw 0xf7ce
cfw 0x8a9e
cfw 0x9aa3
cfw 0xb495
cfw 0x8a5e
cfw 0xd859
cfw 0x0bac
cfw 0xd0db
cfw 0x3552
cfw 0xa6b0
cfw 0x727f
cfw 0x28e4
cfw 0xe5cf
cfw 0x163c
cfw 0x3411
cfw 0x8f07
cfw 0xfab7
cfw 0x0f34
cfw 0xdabf
cfw 0x6f6f
cfw 0xc598
cfw 0xf496
cfw 0x9a9a
cfw 0xbd6a
cfw 0x2136
cfw 0x810a
cfw 0xca55
cfw 0x8bce
cfw 0x2ac4
cfw 0xddce
cfw 0xdd06
cfw 0xc4fc
cfw 0xfb2f
cfw 0xee5f
cfw 0xfd30
cfw 0xc540
cfw 0xd5f1
cfw 0xbdad
cfw 0x45c3
cfw 0x708a
cfw 0xa359
cfw 0xf40d
cfw 0xba06
cfw 0xbace
cfw 0xb447
cfw 0x3f48
cfw 0x899e
cfw 0x8084
cfw 0xbdb9
cfw 0xa05a
cfw 0xe225
cfw 0xfb0c
cfw 0xb2b2
cfw 0xa4db
cfw 0x8bf9
cfw 0x12f7
| 17.189781 | 70 | 0.601274 |
29eab9f0e842752cb3a1e5842f5ac3cc32befec2 | 94,895 | asm | Assembly | rom/dos/progs/monitor.asm | hisahi/ellipse1100 | 930588825d8cc3ad3b069269ff9d596022f84d02 | [
"Zlib"
] | null | null | null | rom/dos/progs/monitor.asm | hisahi/ellipse1100 | 930588825d8cc3ad3b069269ff9d596022f84d02 | [
"Zlib"
] | null | null | null | rom/dos/progs/monitor.asm | hisahi/ellipse1100 | 930588825d8cc3ad3b069269ff9d596022f84d02 | [
"Zlib"
] | null | null | null | ; Ellipse Workstation 1100 (fictitious computer)
; Ellipse DOS MONITOR.COM (machine language monitor)
;
; Copyright (c) 2020 Sampo Hippeläinen (hisahi)
;
; Permission is hereby granted, free of charge, to any person obtaining a copy
; of this software and associated documentation files (the "Software"), to deal
; in the Software without restriction, including without limitation the rights
; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
; copies of the Software, and to permit persons to whom the Software is
; furnished to do so, subject to the following conditions:
;
; The above copyright notice and this permission notice shall be included in all
; copies or substantial portions of the Software.
;
; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
; SOFTWARE.
;
; Written for the WLA-DX assembler
;
.INCLUDE "doscomhd.asm"
; KEYCODETABLE, KEYB_APPLY_CAPS_TO_KEY in keytbls.asm
.DEFINE MONPAGE $1200
.DEFINE MONBPAGE $800000|MONPAGE
.DEFINE OLDREGB $00
.DEFINE OLDREGD $02
.DEFINE OLDREGK $04
.DEFINE OLDREGP $06
.DEFINE OLDREGPC $08
.DEFINE MONADDRA $10
.DEFINE MONBANKA $12
.DEFINE MNREGD $14
.DEFINE MNREGP $16
.DEFINE MNREGB $17
.DEFINE MNREGACC $18
.DEFINE MNREGX $1A
.DEFINE MNREGY $1C
.DEFINE MNREGS $1E
.DEFINE MNLINELN $20
.DEFINE MNLINEPS $22
.DEFINE MNREGJML $25
.DEFINE MNREGPC $26
.DEFINE MNREGK $28
.DEFINE MNAXYSZ $2A
.DEFINE MNEMUL $2C
.DEFINE MONTMP1 $30
.DEFINE MONTMP2 $32
.DEFINE MONTMP3 $34
.DEFINE MONTMP4 $36
.DEFINE MONBRKOL $38
.DEFINE MONNMIOL $3B
.DEFINE MONINNMI $3E
.DEFINE MONBLINK $40
.DEFINE MONADDR1 $50
.DEFINE MONBANK1 $52
.DEFINE MONADDR2 $54
.DEFINE MONBANK2 $56
.DEFINE MONNUM1 $58
.DEFINE MONNUM2 $5A
.DEFINE MONADDRM $5C
.DEFINE MONBANKM $5E
.DEFINE MONADDRE $60
.DEFINE MONBANKE $62
.DEFINE MNPRPLEN $64
.DEFINE MONSTART $66
.DEFINE MONSBANK $68
.DEFINE MONBREAK $69
.DEFINE MNBPFLAG $6A
.DEFINE MNBPADDR $6C
.DEFINE MNBPINST $6F
.DEFINE MONBUF $80
MLMONITOR:
PHP
PHB
PHD
AXY16
LDA #MONPAGE
PHA
PLD
ACC8
LDA #$80
PHA
PLB
; stack: D B P PC K
LDA 3,S
STA OLDREGB.B
LDA 4,S
STA OLDREGP.B
LDA 7,S
STA OLDREGK.B
ACC16
LDA 1,S
STA OLDREGD.B
LDA 5,S
STA OLDREGPC.B
STZ MONINNMI.B
LDA #MLMONBRK.W
LDX #MONPAGE|MONBRKOL.W
LDY #$0001.W
JSL ROM_SWAPBRK.L
ACC8
PHK
PLA
ACC16
ANd #$FF
STZ MNREGP.B
STA MNREGK.B
STA MNREGB.B
STA MONSBANK.B
STA MONBANKA.B
ACC16
STZ MONSTART.B
STZ MONBLINK.B
STZ MNBPFLAG.B
LDA #$8000
STA MONSTART.B
STA MONADDRA.B
STA MNREGPC.B
LDA #$03FF
STA MNREGS.B
XBA
STZ MNREGACC.B
STZ MNREGX.B
STZ MNREGY.B
STZ MNREGD.B
STZ MONBREAK.B
@LOOP:
AXY16
LDA #$3F
STA MNPRPLEN.B
LDA #$0D
JSL TEXT_WRCHR.L
LDA #$3F
JSL TEXT_WRCHR.L
JSR MONITORPROMPT
LDA #0
ACC8
@HANDLE:
LDA MONBUF.B
BEQ @LOOP
AND #$DF
CMP #$41
BCC @UNKCMD
CMP #$5B
BCS @UNKCMD
SEC
SBC #$41
ASL A
TAX
JSR (MONITORROUTINES,X)
JMP @LOOP
@UNKCMD:
JSR MONITORERROR
BRA @LOOP
MONITORERROR:
ACC8
PHB
PHK
PLB
ACC16
LDA #MONITORMSGERROR
JSL TEXT_WRSTR.L
PLB
RTS
MONCODEBRK:
AXY16
LDA #MONPAGE
PHA
PLD
ACC8
LDA #$80
STA MONBREAK.B
PHA
PLB
ACC16
PHB
PHK
PLB
LDA #MONITORMSGBRK.W
JSL TEXT_WRSTR.L
PLB
ACC8
LDA MNBPFLAG.B
BEQ +
STZ MNBPFLAG.B
LDA MNBPINST.B
STA [MNBPADDR.B]
+ JSR MONITORDUMPREG
JMP MLMONITOR@LOOP
MONITORDUMPREG_MSG_A:
.DB 13,"A=",0
MONITORDUMPREG_MSG_X:
.DB " X=",0
MONITORDUMPREG_MSG_Y:
.DB " Y=",0
MONITORDUMPREG_MSG_S:
.DB " S=",0
MONITORDUMPREG_MSG_P:
.DB " P=",0
MONITORDUMPREG_MSG_PC:
.DB " PC=",0
MONITORDUMPREG_MSG_K:
.DB " K=",0
MONITORDUMPREG_MSG_B:
.DB " B=",0
MONITORDUMPREG_MSG_D:
.DB " D=",0
MONITORDUMPREG_MSG_CR_K:
.DB 13,"K=",0
MONITORDUMPREG_BRK:
.DB "BRK",0
MAKEHEX:
PHP
ACC8
CLC
ADC #$30
CMP #$3A
BCC +
CLC
ADC #7
+ PLP
RTS
WRITE_HEX_BYTE8:
.ACCU 8
PHA
XBA
LDA #0
XBA
AND #$F0
LSR A
LSR A
LSR A
LSR A
JSR MAKEHEX
JSL TEXT_WRCHR
LDA 1,S
AND #$0F
JSR MAKEHEX
JSL TEXT_WRCHR
PLA
RTS
WRITE_HEX_BYTE:
.ACCU 16
PHA
AND #$F0
LSR A
LSR A
LSR A
LSR A
JSR MAKEHEX
JSL TEXT_WRCHR
LDA 1,S
AND #$0F
JSR MAKEHEX
JSL TEXT_WRCHR
PLA
RTS
WRITE_HEX_WORD:
XBA
JSR WRITE_HEX_BYTE
XBA
JMP WRITE_HEX_BYTE
MONITORREG:
ACC8
LDX #1
LDA MONBUF,X
BNE +
JMP MONITORDUMPREG
+ AND #$DF
CMP #'A'
BEQ MONITORREGSETA
CMP #'X'
BEQ MONITORREGSETX
CMP #'Y'
BEQ MONITORREGSETY
CMP #'S'
BEQ MONITORREGSETS
CMP #'C'
BEQ MONITORREGSETPC
CMP #'D'
BEQ MONITORREGSETD
CMP #'P'
BEQ MONITORREGSETP
CMP #'K'
BEQ MONITORREGSETK
CMP #'B'
BEQ MONITORREGSETB
LDA MONBUF,X
CMP #'1'
BNE +
JMP MONITORREGSET1
+ CMP #'2'
BNE +
JMP MONITORREGSET2
+ JMP MONITORERROR
MONITORREGSETA:
LDY #MNREGACC.W
INX
JSR MONITORREAD16
BCS MONITORREGSET16
JMP MONITORERROR
MONITORREGSETX:
LDY #MNREGX.W
INX
JSR MONITORREAD16
BCS MONITORREGSET16
JMP MONITORERROR
MONITORREGSETY:
LDY #MNREGY.W
INX
JSR MONITORREAD16
BCS MONITORREGSET16
JMP MONITORERROR
MONITORREGSETS:
LDY #MNREGS.W
INX
JSR MONITORREAD16
BCS MONITORREGSET16
JMP MONITORERROR
MONITORREGSETPC:
LDY #MNREGPC.W
INX
JSR MONITORREAD16
BCS MONITORREGSET16
JMP MONITORERROR
MONITORREGSETD:
LDY #MNREGD.W
INX
JSR MONITORREAD16
BCS MONITORREGSET16
JMP MONITORERROR
MONITORREGSETP:
LDY #MNREGP.W
INX
JSR MONITORREAD8
BCS MONITORREGSET8
JMP MONITORERROR
MONITORREGSETK:
LDY #MNREGK.W
INX
JSR MONITORREAD8
BCS MONITORREGSET8
JMP MONITORERROR
MONITORREGSETB:
LDY #MNREGB.W
INX
JSR MONITORREAD8
BCS MONITORREGSET8
JMP MONITORERROR
MONITORREGSET8:
ACC8
LDA MONNUM1.B
STA MONPAGE,Y
LDA MONBREAK.B
BNE +
CPY #MNREGK.B
BNE +
STA MONSBANK.B
+ RTS
MONITORREGSET16:
ACC16
LDA MONNUM1.B
STA MONPAGE,Y
LDA MONBREAK.B
BNE +
CPY #MNREGPC.B
BNE +
STA MONSTART.B
+ RTS
MONITORREGSET1:
.ACCU 8
INX
LDA MONBUF,X
AND #$DF
CMP #'A'
BNE +
LDA MNREGP.B
ORA #$20
STA MNREGP.B
RTS
+ CMP #'X'
BNE +
LDA MNREGP.B
ORA #$10
STA MNREGP.B
RTS
+ JMP MONITORERROR
MONITORREGSET2:
.ACCU 8
INX
LDA MONBUF,X
AND #$DF
CMP #'A'
BNE +
LDA MNREGP.B
AND #$DF
STA MNREGP.B
RTS
+ CMP #'X'
BNE +
LDA MNREGP.B
AND #$EF
STA MNREGP.B
RTS
+ JMP MONITORERROR
MONITORDUMPREG:
PHB
PHK
PLB
ACC16
LDA #MONITORDUMPREG_MSG_A.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGACC.L
JSR WRITE_HEX_WORD.W
LDA #MONITORDUMPREG_MSG_X.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGX.L
JSR WRITE_HEX_WORD.W
LDA #MONITORDUMPREG_MSG_Y.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGY.L
JSR WRITE_HEX_WORD.W
LDA #MONITORDUMPREG_MSG_S.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGS.L
JSR WRITE_HEX_WORD.W
LDA #MONITORDUMPREG_MSG_P.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGP.L
JSR WRITE_HEX_BYTE.W
LDA #MONITORDUMPREG_MSG_PC.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGPC.L
JSR WRITE_HEX_WORD.W
LDA MONBPAGE|MNEMUL.L
BNE +
LDA #' '
JSL TEXT_WRCHR.L
BRA ++
+ LDA #'e'
JSL TEXT_WRCHR.L
++
LDA #MONITORDUMPREG_MSG_K.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGK.L
JSR WRITE_HEX_BYTE.W
LDA #MONITORDUMPREG_MSG_B.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGB.L
JSR WRITE_HEX_BYTE.W
LDA #MONITORDUMPREG_MSG_D.W
JSL TEXT_WRSTR.L
LDA MONBPAGE|MNREGD.L
JSR WRITE_HEX_WORD.W
LDA #' '
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
LDA MONBPAGE|MONBREAK.L
BEQ +
LDA #MONITORDUMPREG_BRK.W
JSL TEXT_WRSTR.L
+
PLB
RTS
; A is ASCII code, outputs $00-$0F
; carry set if success
MONITORREADHEX:
.ACCU 8
BEQ ++
CMP #$30
BCC +
CMP #$3A
BCS +
AND #$0F
SEC
RTS
+ AND #$DF
CMP #$41
BCC ++
CMP #$47
BCS ++
AND #$0F
CLC
ADC #$09
SEC
RTS
++ CLC
RTS
; X is index into buffer
; carry set if success
; output to MONNUM1
MONITORREAD8:
JSR MONITORSKIPSPACES
ACC8
LDA MONBUF,X
JSR MONITORREADHEX
BCC @RET
ASL A
ASL A
ASL A
ASL A
STA MONNUM1.B
INX
LDA MONBUF,X
JSR MONITORREADHEX
BCC @RET
ORA MONNUM1.B
STA MONNUM1.B
INX
SEC
@RET:
RTS
; X is index into buffer
; carry set if success
; output to MONNUM1
MONITORREAD16:
.ACCU 8
JSR MONITORSKIPSPACES
JSR MONITORREAD8
BCC @RET
LDA MONNUM1.B
STA MONNUM1+1.B
JSR MONITORREAD8
BCC @RET
@RET:
RTS
; same as above, but accepts less than 4 digits
MONITORREAD16LAZY:
.ACCU 8
JSR MONITORSKIPSPACES
LDA MONBUF.B+1,X
BEQ MONITORREAD16LAZY@1DIGIT
CMP #' '
BEQ MONITORREAD16LAZY@1DIGIT
LDA MONBUF.B+2,X
BEQ MONITORREAD16LAZY@2DIGIT
CMP #' '
BEQ MONITORREAD16LAZY@2DIGIT
LDA MONBUF.B+3,X
BEQ MONITORREAD16LAZY@3DIGIT
CMP #' '
BEQ MONITORREAD16LAZY@3DIGIT
BRA MONITORREAD16
@1DIGIT:
LDA MONBUF.B,X
JSR MONITORREADHEX
BCC @RTS
STA MONNUM1.B
STZ MONNUM1+1.B
INX
SEC
@RTS RTS
@2DIGIT:
JSR MONITORREAD8
BCC @RTS
STZ MONNUM1+1.B
INX
SEC
RTS
@3DIGIT:
LDA MONBUF.B,X
JSR MONITORREADHEX
BCC @RTS
INX
STA MONNUM1+1.B
JSR MONITORREAD8
BCC @RTS
SEC
RTS
; X is index into buffer
; carry set if success
; output to MONADDR1 and maybe MONBANK1
MONITORREADADDR:
.ACCU 8
JSR MONITORSKIPSPACES
LDA MONBUF,X
BEQ @RETC
LDA MONBUF+1,X
BEQ @RETC
CMP #':'
BEQ @BANK1
LDA MONBUF+2,X
BEQ @RETC
CMP #':'
BEQ @BANK2
@ADDR JSR MONITORREAD16
BCC @RET
ACC16
LDA MONNUM1.B
STA MONADDR1.B
ACC8
SEC
RTS
@RETC CLC
@RET RTS
@BANK1 LDA MONBUF,X
CMP #'K'
BNE +
LDA MNREGK.B
STA MONBANK1.B
BRA @ADDR
+ CMP #'B'
BEQ @RETC
LDA MNREGB.B
STA MONBANK1.B
BRA @ADDR
@BANK2 JSR MONITORREAD8
BCC @RET
LDA MONNUM1.B
STA MONBANK1.B
INX
BRA @ADDR
MONITORSKIPSPACES:
LDA MONBUF,X
CMP #' '
BNE +
INX
BRA MONITORSKIPSPACES
+ RTS
MONITORADDR:
ACC8
LDX #1
LDA MONBUF,X
BEQ @SHOW
JSR MONITORREAD16
BCC @ERROR
ACC16
LDA MONNUM1.B
STA MONSTART.B
RTS
@ERROR: JMP MONITORERROR
@SHOW:
ACC16
LDA #13
JSL TEXT_WRCHR.L
LDA MONSTART.B
JSR WRITE_HEX_WORD.W
RTS
MONITORBANK:
ACC8
LDX #1
LDA MONBUF,X
BEQ @SHOW
AND #$DF
CMP #'D'
BEQ @DATA
CMP #'K'
BEQ @CODE
@ERROR JMP MONITORERROR
@CODE:
INX
JSR MONITORREAD8
BCC @ERROR
LDA MONNUM1.B
STA MNREGK.B
RTS
@DATA:
INX
JSR MONITORREAD8
BCC @ERROR
LDA MONNUM1.B
STA MNREGB.B
RTS
@SHOW:
PHB
PHK
PLB
ACC16
LDA #MONITORDUMPREG_MSG_CR_K.W
JSL TEXT_WRSTR.L
LDA MNREGK.L
JSR WRITE_HEX_BYTE.W
LDA #MONITORDUMPREG_MSG_B.W
JSL TEXT_WRSTR.L
LDA MNREGB.L
JSR WRITE_HEX_BYTE.W
PLB
RTS
MONITORMEM:
.ACCU 8
LDX #1
LDA MONBUF.B,X
BEQ @NOADDR
LDA MNREGB.B
STA MONBANK1.B
JSR MONITORREADADDR.B
BCC @ERROR
LDA MONBUF.B,X
BEQ @READ1BYTE
JSR MONITORREAD16LAZY.B
BCS @READMANY
@ERROR JMP MONITORERROR.W
@NOADDR:
ACC16
LDA MONADDRM.B
STA MONADDR1.B
LDA MONBANKM.B
STA MONBANK1.B
LDA #$0100
STA MONNUM1.B
BRA @READMANY
@READ1BYTE:
.ACCu 8
LDA #13
JSL TEXT_WRCHR.L
LDA MONBANK1.B
ACC16
JSR WRITE_HEX_BYTE.W
LDA #':'
JSL TEXT_WRCHR.L
LDA MONADDR1.B
JSR WRITE_HEX_WORD.W
ACC8
LDA #9
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
LDA [$FF&MONADDR1.B]
ACC16
JSR WRITE_HEX_BYTE.W
LDA MONADDR1.B
STA MONADDRE.B
INC A
STA MONADDRM.B
LDA MONBANK1.B
STA MONBANKM.B
STA MONADDRE.B
@RTS RTS
@READMANY:
ACC16
LDA MONADDR1.B
STA MONADDRE.B
LDA MONBANK1.B
STA MONBANKE.B
LDX MONNUM1.B
BEQ @RTS
LDA MONADDR1.B
EOR #$000F
INC A
AND #$000F
STA MONTMP2.B
LDA MONADDR1.B
AND #$FFF0
STA MONADDR1.B
@YLOOP:
STX MONNUM1.B
ACC8
LDA #13
JSL TEXT_WRCHR.L
LDA MONBANK1.B
JSR WRITE_HEX_BYTE8.W
LDA #':'
JSL TEXT_WRCHR.L
ACC16
LDA MONADDR1.B
JSR WRITE_HEX_WORD.W
ACC8
LDA #9
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
LDY MONTMP2.B
BEQ @XLOOP
LDA #' '
@SPLOOP:
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
DEY
BNE @SPLOOP
LDY MONTMP2.B
@XLOOP:
LDA [$FF&MONADDR1.B],Y
JSR WRITE_HEX_BYTE8.W
LDA #' '
JSL TEXT_WRCHR.L
INY
CPY #$10
BCS @XLOOPEXIT
CPY MONNUM1.B
BCS @XLOOPEXITNOW
BRA @XLOOP
@XLOOPEXIT:
ACC16
STZ MONTMP2.B
LDA MONADDR1.B
CLC
ADC #$0010
STA MONADDR1.B
LDA MONNUM1.B
SEC
SBC #$0010
BEQ @XLOOPEXITNOW
TAX
JMP @YLOOP.W
@XLOOPEXITNOW:
LDA MONADDR1.B
STA MONADDRM.B
LDA MONBANK1.B
STA MONBANKM.B
RTS
MONITORENTER:
.ACCU 8
LDX #1
LDA MONBUF.B,X
BEQ @NOADDR
LDA MNREGB.B
STA MONBANK1.B
JSR MONITORREADADDR.B
BCS @ENTERLOOP
@ERROR JMP MONITORERROR.W
@NOADDR:
ACC16
LDA MONADDRE.B
STA MONADDR1.B
LDA MONBANKE.B
STA MONBANK1.B
LDA #$0100
STA MONNUM1.B
@ENTERLOOP:
ACC8
LDA #13
JSL TEXT_WRCHR.L
LDA MONBANK1.B
JSR WRITE_HEX_BYTE8.W
LDA #':'
JSL TEXT_WRCHR.L
ACC16
LDA MONADDR1.B
JSR WRITE_HEX_WORD.W
ACC8
LDA #9
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
ACC16
LDA #$30
STA MNPRPLEN.B
JSR MONITORPROMPT
LDA #0
ACC8
SEC
LDA MONBUF.B
BEQ @EXITSAFE ; success
LDX #0
JSR MONITORENTERVERIFY
BCC @SOFTERR ; error
@ENTERBYTE:
JSR MONITORSKIPSPACES
LDA MONBUF.B,X
BEQ @ENTERLOOP
JSR MONITORREAD8
BCC @EXIT
LDA MONNUM1.B
STA [$FF&MONADDR1]
INC MONADDR1.B
BRA @ENTERBYTE
@SOFTERR:
ACC16
JSR MONITORERROR.W
BRA @ENTERLOOP
@EXITSAFE:
SEC
@EXIT:
ACC16
LDA MONADDR1.B
STA MONADDRE.B
LDA MONBANK1.B
STA MONBANKE.B
BCS +
JMP MONITORERROR.W
+ RTS
MONITORENTERVERIFY:
.ACCU 8
PHX
@LOOP JSR MONITORSKIPSPACES
LDA MONBUF.B,X
BEQ @RETOK
JSR MONITORREADHEX
BCC @RET
INX
LDA MONBUF.B,X
JSR MONITORREADHEX
BCC @RET
INX
BRA @LOOP
@RETOK SEC
@RET PLX
RTS
MONITORCOPY:
ACC8
LDA MNREGB.B
STA MONBANK1.B
STA MONBANK2.B
LDX #1
JSR MONITORREADADDR.W
BCC @ERROR
ACC16
LDA MONADDR1.B
STA MONADDR2.B
ACC8
LDA MONBANK1.B
STA MONBANK2.B
JSR MONITORREADADDR.W
BCC @ERROR
JSR MONITORREAD16LAZY.W
BCS @OK
@ERROR JMP MONITORERROR.W
@OK ACC16
LDA MONNUM1.B
BEQ @RET
ACC8
LDA [$FF&MONADDR1]
STA [$FF&MONADDR2]
ACC16
INC MONADDR1.B
INC MONADDR2.B
DEC MONNUM1.B
BRA @OK
@RET RTS
MONITORCOMPARE:
ACC8
LDA MNREGB.B
STA MONBANK1.B
STA MONBANK2.B
LDX #1
JSR MONITORREADADDR.W
BCC @ERROR
ACC16
LDA MONADDR1.B
STA MONADDR2.B
ACC8
LDA MONBANK1.B
STA MONBANK2.B
JSR MONITORREADADDR.W
BCC @ERROR
JSR MONITORREAD16LAZY.W
BCS @OK
@ERROR JMP MONITORERROR.W
@OK ACC16
LDA MONNUM1.B
BEQ @RET
ACC8
LDA [$FF&MONADDR1]
CMP [$FF&MONADDR2]
BEQ +
ACC16
LDA #13
JSL TEXT_WRCHR.L
LDA MONBANK2.B
JSR WRITE_HEX_BYTE.W
LDA #':'
JSL TEXT_WRCHR.L
LDA MONADDR2.B
JSR WRITE_HEX_WORD.W
LDX #5
LDA #' '
- JSL TEXT_WRCHR.L
DEX
BNE -
ACC8
LDA [$FF&MONADDR2]
JSR WRITE_HEX_BYTE8.W
LDX #2
LDA #' '
- JSL TEXT_WRCHR.L
DEX
BNE -
LDA [$FF&MONADDR1]
JSR WRITE_HEX_BYTE8.W
ACC16
LDX #5
LDA #' '
- JSL TEXT_WRCHR.L
DEX
BNE -
LDA MONBANK1.B
JSR WRITE_HEX_BYTE.W
LDA #':'
JSL TEXT_WRCHR.L
LDA MONADDR1.B
JSR WRITE_HEX_WORD.W
+ ACC16
INC MONADDR1.B
INC MONADDR2.B
DEC MONNUM1.B
JMP @OK
@RET RTS
MONITORUNTIL:
ACC8
LDA MNREGK.B
STA MONBANK1.B
LDX #1
JSR MONITORREADADDR.W
BCS +
@ERROR JMP MONITORERROR
+ LDA MNBPFLAG.B
BEQ +
LDA MNBPINST.B
STA [MNBPADDR.B]
+ LDA [MONADDR1.B]
STA MNBPINST.B
ACC16
LDA MONADDR1.B
STA MNBPADDR.B
ACC8
LDA MONBANK1.B
STA MNBPADDR+2.B
LDA #0
STA [MNBPADDR.B]
LDA #$FF
STA MNBPFLAG.B
BRA MONITORGO@NOX
MONITORGO:
ACC8
LDX #1
@NOX LDA MONBUF.B,X
BNE @STARTAT
LDA MONBREAK.B
BNE @RESUME
ACC16
LDA MONSTART.B
STA MNREGPC.B
ACC8
LDA MONSBANK.B
STA MNREGK.B
BRA @START
@STARTAT:
.ACCu 8
JSR MONITORREADADDR.W
BCC MONITORUNTIL@ERROR
ACC16
LDA MONADDR1.B
STA MNREGPC.B
ACC8
LDA MONADDR1+2.B
STA MNREGK.B
@START:
ACC8
LDA #$FF
STA MONBREAK.B
PHK
PEA @STARTEND-1
ACC16
TSC
STA MNREGS.B
STZ MNEMUL.B
ACC8
@RESUME:
LDA #$5C
STA MNREGJML.B
AXY16
LDX MNREGX.B
LDY MNREGY.B
LDA MNREGD.B
TCD
ACC8
LDA MONPAGE|MNREGB.W
PHA
PLB
ACC16
LDA MONBPAGE|MNREGS.L
TCS
ACC8
LDA MONBPAGE|MNREGP.L
PHA
LDA MONBPAGE|MNEMUL.L
BNE @RESUME_E
ACC16
LDA MONBPAGE|MNREGACC.L
PLP
JML MONBPAGE|MNREGJML.L
@RESUME_E:
ACC16
LDA MONBPAGE|MNREGACC.L
SEC
XCE
PLP
JML MONBPAGE|MNREGJML.L
@STARTEND:
PHP
PHB
PHD
AXY16
PHA
ACC8
LDA #$80
PHA
PLB
STZ MONPAGE|MONBREAK.W
ACC16
LDA #MONPAGE
TCD
ACC8
LDA 6,S
STA MNREGP.B
LDA 5,S
STA MNREGB.B
ACC16
LDA 3,S
STA MNREGD.B
LDA 1,S
STA MNREGACC.B
PLA
PLA
PLA
TSC
STA MNREGS.B
STX MNREGX.B
STY MNREGY.B
PHB
PHK
PLB
LDA #MONITORMSGRTL.W
JSL TEXT_WRSTR.L
PLB
ACC8
JMP MONITORDUMPREG
.DEFINE DISASMINSTRS 10
MONITORDISASM:
ACC8
LDA MONBANKA.B
STA MONBANK1.B
LDX #1
LDA MONBUF.B,X
BNE @ADDR
BRA @START
@ADDR JSR MONITORREADADDR.W
BCC @ERROR
ACC16
LDA MONADDR1.B
STA MONADDRA.B
ACC8
LDA MONBANK1.B
STA MONBANKA.B
BRA @START
@ERROR JMP MONITORERROR.W
@START LDA MNREGP.B
ASL A
ASL A
AND #$C0
STA MNAXYSZ.B
ACC16
LDA #0
LDY #DISASMINSTRS
@ILOOP ACC16
LDA #13
JSL TEXT_WRCHR.L
LDA MONBANKA.B
JSR WRITE_HEX_BYTE.W
LDA #':'
JSL TEXT_WRCHR.L
LDA MONADDRA.B
JSR WRITE_HEX_WORD.W
LDA #9
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
ACC8
PHY
JSR MONITOR_AM_nextbyte.W
TAX
PHX
JSR WRITE_HEX_BYTE8.W
LDA #' '
JSL TEXT_WRCHR.L
JSR MONITORGETINSTRSIZE.W
BEQ +
STA MONTMP3.B
LDY #0
- LDA [MONADDRA.B],Y
JSR WRITE_HEX_BYTE8.W
LDA #' '
JSL TEXT_WRCHR.L
INY
CPY MONTMP3.B
BCC -
+ LDX #36
SEC
JSL TEXT_MVCURX.L
PLX
LDA MONITORDISASMINSTR1.L,X
JSL TEXT_WRCHR.L
LDA MONITORDISASMINSTR2.L,X
JSL TEXT_WRCHR.L
LDA MONITORDISASMINSTR3.L,X
JSL TEXT_WRCHR.L
LDA #9
JSL TEXT_WRCHR.L
CPX #$C2
BEQ @REP
CPX #$E2
BEQ @SEP
@CONT ACC16
TXA
ASL A
TAX
ACC8
JSR (MONITORDISASMMODES.L,X)
PLY
DEY
BEQ +
JMP @ILOOP
+ RTS
@REP LDA [MONADDRA.B]
EOR #$FF
ASL A
ASL A
AND MNAXYSZ.B
STA MNAXYSZ.B
BRA @CONT
@SEP LDA [MONADDRA.B]
ORA MNAXYSZ.B
AND #$C0
STA MNAXYSZ.B
BRA @CONT
MONITORGETINSTRSIZE:
LDA MONITORDISASMBYTES.L,X
CMP #$FE
BEQ @X
CMP #$FF
BEQ @A
DEC A
RTS
@X:
LDA #1
BIT MNAXYSZ.B
BVS +
INC A
+ RTS
@A:
LDA #1
BIT MNAXYSZ.B
BMI +
INC A
+ RTS
MONITORASM:
.ACCU 8
ACC8
LDA MONBANKA.B
STA MONBANK1.B
LDX #1
LDA MONBUF.B,X
BNE @ADDR
BRA @START
@ADDR JSR MONITORREADADDR.W
BCC @ERROR
ACC16
LDA MONADDR1.B
STA MONADDRA.B
ACC8
LDA MONBANK1.B
STA MONBANKA.B
BRA @START
@ERROR JMP MONITORERROR.W
@START:
LDA MNREGP.B
ASL A
ASL A
AND #$C0
STA MNAXYSZ.B
@ENTERLOOP:
ACC8
LDA #13
JSL TEXT_WRCHR.L
LDA MONBANKA.B
JSR WRITE_HEX_BYTE8.W
LDA #':'
JSL TEXT_WRCHR.L
ACC16
LDA MONADDRA.B
JSR WRITE_HEX_WORD.W
ACC8
LDA #9
JSL TEXT_WRCHR.L
JSL TEXT_WRCHR.L
LDX #36
SEC
JSL TEXT_MVCURX.L
ACC16
LDA #40
STA MNPRPLEN.B
JSR MONITORPROMPT
LDA #0
ACC8
SEC
LDA MONBUF.B
BEQ @EXIT ; success
LDX #16
SEC
JSL TEXT_MVCURX.L
JSR MONITORASMINSTRUCTION@GO
BCC @SOFTERR ; error
BRA @ENTERLOOP
@SOFTERR:
ACC16
JSR MONITORERROR.W
BRA @ENTERLOOP
@EXITSAFE:
SEC
@EXIT:
ACC16
BCS +
JMP MONITORERROR.W
+ RTS
MONITORASMINSTRUCTION:
@NOINSTR:
SEC
RTS
@ERROR:
CLC
RTS
@GO:
.ACCU 8
LDX #0
JSR MONITORSKIPSPACES
LDA MONBUF.B,X
BEQ @NOINSTR
AND #$DF
STA MONBUF.B,X
LDA MONBUF+1.B,X
BEQ @ERROR
AND #$DF
STA MONBUF+1.B,X
LDA MONBUF+2.B,X
BEQ @ERROR
AND #$DF
STA MONBUF+2.B,X
LDA MONBUF.B,X
CMP #$1B
BEQ @NOINSTR
CMP #14
BEQ +
JMP @NOTDOT
+ LDA MONBUF+1.B,X
CMP #$11
BEQ @NARROWREG
CMP #$12
BEQ @WIDEREG
AND #$DF
CMP #'D'
BNE @ERROR
LDA MONBUF+2.B,X
AND #$DF
CMP #'B'
BEQ @DB
CMP #'W'
BEQ @DW
BRA @ERROR
@NARROWREG:
LDA MONBUF+2.B,X
AND #$DF
CMP #'A'
BEQ @NARROWA
CMP #'X'
BNE @ERROR
LDA MNAXYSZ.B
ORA #$40
STA MNAXYSZ.B
SEC
RTS
@NARROWA:
LDA MNAXYSZ.B
ORA #$80
STA MNAXYSZ.B
SEC
RTS
@WIDEREG:
LDA MONBUF+2.B,X
AND #$DF
CMP #'A'
BEQ @WIDEA
CMP #'X'
BNE @ERROR
LDA MNAXYSZ.B
AND #$BF
STA MNAXYSZ.B
SEC
RTS
@WIDEA:
LDA MNAXYSZ.B
AND #$7F
STA MNAXYSZ.B
SEC
RTS
@DW INX
INX
INX
PHX
JSR MONITORASMVERIFYDW.W
PLX
BCC @ERROR2
@DWLOOP LDA MONBUF.B,X
BEQ @DWEND
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @ERROR2
LDA MONNUM1.B
STA [MONADDRA.B]
ACC16
INC MONADDRA.B
ACC8
LDA MONNUM1+1.B
STA [MONADDRA.B]
ACC16
INC MONADDRA.B
ACC8
BRA @DWLOOP
@DWEND SEC
RTS
@ERROR2:
CLC
RTS
@DB INX
INX
INX
PHX
JSR MONITORASMVERIFYDB.W
PLX
BCC @ERROR2
@DBLOOP LDA MONBUF.B,X
BEQ @DWEND
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @ERROR2
LDA MONNUM1.B
STA [MONADDRA.B]
ACC16
INC MONADDRA.B
ACC8
BRA @DBLOOP
@NOTDOT:
CMP #'A'
BCC @ERROR2
CMP #'Z'+1
BCS @ERROR2
SEC
SBC #'A'
ASL A
PHX
TXY
TAX
ACC16
LDA MONITORASMINSTR_LETTERS.L,X
ACC8
TAX
@SEARCHLOOP:
LDA MONITORASMINSTR_START.L,X
BEQ @SEARCHNOTFOUND
CMP MONPAGE|MONBUF+1.W,Y
BNE @SEARCHNOTMATCH
LDA MONITORASMINSTR_START+1.L,X
CMP MONPAGE|MONBUF+2.W,Y
BNE @SEARCHNOTMATCH
ACC16
LDA MONITORASMINSTR_START+2.L,X
STA MONTMP4.B
PLX
ACC8
@FOUND INX
INX
INX
JSR MONITORSKIPSPACES.W
JMP (MONPAGE|MONTMP4.W)
@SEARCHNOTMATCH:
INX
INX
INX
INX
BRA @SEARCHLOOP
@SEARCHNOTFOUND:
PLX
CLC
RTS
MONITORASMVERIFYDB:
.ACCU 8
PHX
@LOOP JSR MONITORSKIPSPACES
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B,X
BEQ @RETOK
JSR MONITORREADHEX
BCC @RET
INX
LDA MONBUF.B,X
JSR MONITORREADHEX
BCC @RET
INX
BRA @LOOP
@RETOK SEC
@RET PLX
RTS
MONITORASMVERIFYDW:
.ACCU 8
PHX
@LOOP JSR MONITORSKIPSPACES
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B,X
BEQ @RETOK
JSR MONITORREADHEX
BCC @RET
INX
LDA MONBUF.B,X
JSR MONITORREADHEX
BCC @RET
INX
LDA MONBUF.B,X
JSR MONITORREADHEX
BCC @RET
INX
LDA MONBUF.B,X
JSR MONITORREADHEX
BCC @RET
INX
BRA @LOOP
@RETOK SEC
@RET PLX
RTS
MONITORROUTINES:
.DW MONITORASM ; A
.DW MONITORBANK ; B
.DW MONITORCOPY ; C
.DW MONITORDISASM ; D
.DW MONITORENTER ; E
.DW MONITORERROR ; F
.DW MONITORGO ; G
.DW MONITORERROR ; H
.DW MONITORERROR ; I
.DW MONITORERROR ; J
.DW MONITORERROR ; K
.DW MONITORERROR ; L
.DW MONITORMEM ; M
.DW MONITORERROR ; N
.DW MONITORCOMPARE ; O
.DW MONITORERROR ; P
.DW MONITORQUIT ; Q
.DW MONITORREG ; R
.DW MONITORERROR ; S
.DW MONITORERROR ; T
.DW MONITORUNTIL ; U
.DW MONITORERROR ; V
.DW MONITORERROR ; W
.DW MONITORADDR ; X
.DW MONITORERROR ; Y
.DW MONITORERROR ; Z
MONITORPROMPT:
ACC16
LDA #$0A00
LDX #MONPAGE|MONBUF.W
LDY MNPRPLEN.B
DOSCALL
LDA #0
STA MONPAGE|MONBUF.W,Y
INY
STY MNLINELN.B
RTS
MONITORPROMPT_OLD:
ACC16
STZ MNLINELN.B
STZ MNLINEPS.B
STA MONBLINK.B
@LOOP:
LDA MONINNMI.B
BEQ +
DEC MONINNMI.B
JSL KEYB_INCTIMER.L
LDA MONBLINK.B
BEQ +
JSL TEXT_FLASHCUR.L
+ JSL KEYB_UPDKEYSI.L
LDA #28
LDX #26
JSL KEYB_GETKEY.L
ACC16
BEQ @LOOP
BCC @LOOP
CMP #$0D
BEQ @CR
CMP #$08
BEQ @BKSP
CMP #$1E
BEQ @ARRLEFT
CMP #$1F
BEQ @ARRRIGHT
CMP #$7F
BEQ @LOOP
CMP #$20
BCC @LOOP
@NORMAL:
LDX MNLINELN.B
CPX MNPRPLEN.B
BCS @LOOP
STA MONBUF.B,X
INC MNLINEPS.B
INX
STX MNLINELN.B
JSL TEXT_WRCHR
BRA @LOOP
@ARRLEFT:
LDX MNLINEPS.B
BEQ @LOOP
DEC MNLINEPS.B
JSL TEXT_WRCHR
BRA @LOOP
@ARRRIGHT:
LDX MNLINEPS.B
CPX MNLINELN.B
BCS @LOOP
INC MNLINEPS.B
JSL TEXT_WRCHR
BRA @LOOP
@BKSP:
LDX MNLINEPS.B
BEQ @LOOP
STA MONBUF.B,X
DEX
STX MNLINEPS.B
DEC MNLINELN.B
JSL TEXT_WRCHR
BRL @LOOP
@CR:
LDX MNLINELN.B
STZ MONBUF.B,X
INX
STX MNLINELN.B
STZ MONBLINK.B
RTS
MONITORQUIT:
AXY16
LDX #MONBRKOL.W
LDY #$0001.W
JSL ROM_UNSWAPBRK.L
ACC8
LDA #$80
PHA
PLB
LDA OLDREGK.B
PHA
ACC16
LDA OLDREGPC.B
PHA
ACC8
LDA OLDREGP.B
PHA
LDA OLDREGB.B
PHA
ACC16
LDA OLDREGD.B
PHA
PLD
PLB
PLP
LDA #$0000
DOSCALL
MONITORMSGBRK:
.DB 13,"## BRK",0
MONITORMSGRTL:
.DB 13,"## RTL",0
MONITORMSGERROR:
.DB 13,"## ERROR ##",0
ALIGNPAGE
MONITORDISASMINSTR1:
.DB "BOCOTOAOPOAPTOAOBOOOTOAOCOITTOAO"
.DB "JAJABARAPARPBARABAAABARASADTBARA"
.DB "REWEMELEPELPJELEBEEEMELECEPTJELE"
.DB "RAPASARAPARRJARABAAASARASAPTJARA"
.DB "BSBSSSSSDBTPSSSSBSSSSSSSTSTTSSSS"
.DB "LLLLLLLLTL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2,2,2,2,2,2,2,1,3,1,1,3,3,3,4
.DB 2,2,3,2,2,2,2,2,1,$FF,1,1,3,3,3,4
.DB 2,2,2,2,2,2,2,2,1,3,1,1,3,3,3,4
.DB $FE,2,$FE,2,2,2,2,2,1,$FF,1,1,3,3,3,4
.DB 2,2,2,2,2,2,2,2,1,3,1,1,3,3,3,4
.DB $FE,2,2,2,2,2,2,2,1,$FF,1,1,3,3,3,4
.DB 2,2,2,2,2,2,2,2,1,3,1,1,3,3,3,4
.DB $FE,2,2,2,2,2,2,2,1,$FF,1,1,3,3,3,4
.DB 2,2,2,2,3,2,2,2,1,3,1,1,3,3,3,4
MONITORDISASMMODES:
.DW MONITOR_AM_imm.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_imm.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_acc.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_acc.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_ablx.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_acc.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_acc.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_ablx.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_imm.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_bm.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_acc.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_bm.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_ablx.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_rel16.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_acc.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_iabs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_iabx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_ablx.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_rel16.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpy.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_ablx.W
.DW MONITOR_AM_immX.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_immX.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpy.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_ablx.W
.DW MONITOR_AM_imm.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_imm.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_iabl.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_ablx.W
.DW MONITOR_AM_imm.W
.DW MONITOR_AM_idpx.W
.DW MONITOR_AM_imm.W
.DW MONITOR_AM_sr.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_dp.W
.DW MONITOR_AM_idpl.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_immA.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_abl.W
.DW MONITOR_AM_rel8.W
.DW MONITOR_AM_idpy.W
.DW MONITOR_AM_idp.W
.DW MONITOR_AM_idsy.W
.DW MONITOR_AM_abs.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_dpx.W
.DW MONITOR_AM_idly.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_absy.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_none.W
.DW MONITOR_AM_iabx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_absx.W
.DW MONITOR_AM_ablx.W
MONITOR_AM_nextbyte:
LDA [MONADDRA.B]
ACC16
INC MONADDRA.B
ACC8
RTS
MONITOR_AM_none:
RTS
MONITOR_AM_acc:
LDA #'A'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_immX:
BIT MNAXYSZ.B
BVC MONITOR_AM_immw
BRA MONITOR_AM_imm
MONITOR_AM_immA:
BIT MNAXYSZ.B
BPL MONITOR_AM_immw
MONITOR_AM_imm:
LDA #'#'
JSL TEXT_WRCHR.L
MONITOR_AM_dp:
LDA #'$'
JSL TEXT_WRCHR.L
JSR MONITOR_AM_nextbyte.W
JSR WRITE_HEX_BYTE8.W
RTS
MONITOR_AM_dpx:
JSR MONITOR_AM_dp.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'X'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_dpy:
JSR MONITOR_AM_dp.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'Y'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_sr:
JSR MONITOR_AM_dp.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'S'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_immw:
LDA #'#'
JSL TEXT_WRCHR.L
MONITOR_AM_abs:
LDA #'$'
JSL TEXT_WRCHR.L
JSR MONITOR_AM_nextbyte.W
PHA
JSR MONITOR_AM_nextbyte.W
JSR WRITE_HEX_BYTE8.W
PLA
JSR WRITE_HEX_BYTE8.W
RTS
MONITOR_AM_absx:
JSR MONITOR_AM_abs.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'X'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_absy:
JSR MONITOR_AM_abs.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'Y'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_abl:
LDA #'$'
JSL TEXT_WRCHR.L
JSR MONITOR_AM_nextbyte.W
PHA
JSR MONITOR_AM_nextbyte.W
PHA
JSR MONITOR_AM_nextbyte.W
JSR WRITE_HEX_BYTE8.W
PLA
JSR WRITE_HEX_BYTE8.W
PLA
JSR WRITE_HEX_BYTE8.W
RTS
MONITOR_AM_ablx:
JSR MONITOR_AM_abs.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'X'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_bm:
JSR MONITOR_AM_dp.W
PHA
JSR MONITOR_AM_dp.W
JSR WRITE_HEX_BYTE.W
LDA #','
JSL TEXT_WRCHR.L
PLA
JSR WRITE_HEX_BYTE.W
RTS
MONITOR_AM_iabs:
LDA #'('
JSL TEXT_WRCHR.L
JSR MONITOR_AM_abs.W
LDA #')'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_iabx:
LDA #'('
JSL TEXT_WRCHR.L
JSR MONITOR_AM_absx.W
LDA #')'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_iabl:
LDA #'['
JSL TEXT_WRCHR.L
JSR MONITOR_AM_abs.W
LDA #']'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_idp:
LDA #'('
JSL TEXT_WRCHR.L
JSR MONITOR_AM_dp.W
LDA #')'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_idpl:
LDA #'['
JSL TEXT_WRCHR.L
JSR MONITOR_AM_dp.W
LDA #']'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_idpx:
LDA #'('
JSL TEXT_WRCHR.L
JSR MONITOR_AM_dpx.W
LDA #')'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_idpy:
JSR MONITOR_AM_idp.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'Y'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_idly:
JSR MONITOR_AM_idpl.W
LDA #','
JSL TEXT_WRCHR.L
LDA #'Y'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_idsy:
LDA #'('
JSL TEXT_WRCHR.L
JSR MONITOR_AM_sr.W
LDA #')'
JSL TEXT_WRCHR.L
LDA #','
JSL TEXT_WRCHR.L
LDA #'Y'
JSL TEXT_WRCHR.L
RTS
MONITOR_AM_rel8:
LDA #'$'
JSL TEXT_WRCHR.L
JSR MONITOR_AM_nextbyte.W
STA MONTMP1.B
STZ MONTMP1+1.B
BPL +
DEC MONTMP1+1.B
+ ACC16
LDA MONTMP1.B
CLC
ADC MONADDRA.B
JSR WRITE_HEX_WORD.W
ACC8
RTS
MONITOR_AM_rel16:
LDA #'$'
JSL TEXT_WRCHR.L
JSR MONITOR_AM_nextbyte.W
STA MONTMP1.B
JSR MONITOR_AM_nextbyte.W
STA MONTMP1+1.B
ACC16
LDA MONTMP1.B
CLC
ADC MONADDRA.B
JSR WRITE_HEX_WORD.W
ACC8
RTS
MONITORASMINSTR_LETTERS:
.DW MONITORASMINSTR_A-MONITORASMINSTR_START
.DW MONITORASMINSTR_B-MONITORASMINSTR_START
.DW MONITORASMINSTR_C-MONITORASMINSTR_START
.DW MONITORASMINSTR_D-MONITORASMINSTR_START
.DW MONITORASMINSTR_E-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_I-MONITORASMINSTR_START
.DW MONITORASMINSTR_J-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_L-MONITORASMINSTR_START
.DW MONITORASMINSTR_M-MONITORASMINSTR_START
.DW MONITORASMINSTR_N-MONITORASMINSTR_START
.DW MONITORASMINSTR_O-MONITORASMINSTR_START
.DW MONITORASMINSTR_P-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_R-MONITORASMINSTR_START
.DW MONITORASMINSTR_S-MONITORASMINSTR_START
.DW MONITORASMINSTR_T-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_W-MONITORASMINSTR_START
.DW MONITORASMINSTR_X-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
.DW MONITORASMINSTR_EMPTY-MONITORASMINSTR_START
MONITOR_INSTR_outbyte:
PHA
STA [MONADDRA.B]
JSR WRITE_HEX_BYTE8.W
LDA #' '
JSL TEXT_WRCHR.L
ACC16
INC MONADDRA.B
ACC8
PLA
RTS
MONITOR_ASM_SKIPDOLLAR:
LDA MONBUF.B,X
CMP #'$'
BNE +
INX
+ RTS
MONITOR_ASM_INSTR_STA:
LDA MONBUF.B,X
CMP #'#'
BNE +
CLC
RTS
+ LDA #$80
BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_ORA:
LDA #$00
BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_AND:
LDA #$20
BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_EOR:
LDA #$40
BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_ADC:
LDA #$60
BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_SBC:
LDA #$E0
BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_CMP:
LDA #$C0
BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_LDA:
LDA #$A0
;BRA MONITOR_ASM_INSTR_ALU_READ.W
MONITOR_ASM_INSTR_ALU_READ:
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BEQ @IMM
CMP #'['
BEQ @ILNG
CMP #'('
BNE +
JMP @IND
+ JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+4,X
JSR MONITORREADHEX.W
BCC +
JMP @ABSL
+ LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BCC @DP
JMP @ABS
@DP JSR MONITORREAD8.W
BCC @RTS
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @DPC
LDA MONTMP1.B
ORA #$05
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RTS RTS
@DPC CMP #','
BNE @ERR
LDA MONBUF.B+1,X
AND #$DF
CMP #'X'
BNE +
LDA #$15
BRA @DPCOK
+ CMP #'S'
BNE @ERR
LDA #$03
@DPCOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
@IMM INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16LAZY.W
BCC @RTS
LDA MONTMP1.B
ORA #$09
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
BIT MNAXYSZ.B
BMI @A8
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
@A8 SEC
RTS
@ILNG INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @RTS
LDA MONBUF.B,X
CMP #']'
BNE @ERR
INX
LDA MONBUF.B,X
BNE @ILNGI
LDA #$07
@ILOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK2 SEC
@RTS2 RTS
@ILNGI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'Y'
BNE @ERR
LDA #$17
BRA @ILOK
@IND INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @RTS2
LDA MONBUF.B,X
CMP #','
BEQ @INDX
CMP #')'
BNE @ERR2
LDA MONBUF+1.B,X
BNE @INDY
LDA #$12
@INDOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
BRA @OK2
@INDX LDA MONBUF+1.B,X
AND #$DF
CMP #'S'
BEQ @INDS
CMP #'X'
BNE @ERR2
LDA MONBUF+2.B,X
CMP #')'
BNE @ERR2
INX
INX
INX
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ERR2
LDA #$01
BRA @INDOK
@INDY CMP #','
BNE @ERR2
LDA MONBUF+2.B,X
AND #$DF
CMP #'Y'
BNE @ERR2
LDA #$11
BRA @INDOK
@INDS LDA MONBUF+2.B,X
CMP #')'
BNE @ERR2
LDA MONBUF+3.B,X
CMP #','
BNE @ERR2
LDA MONBUF+4.B,X
AND #$DF
CMP #'Y'
BNE @ERR2
LDA #$13
BRA @INDOK
@ERR2 CLC
@RTS3 RTS
@ABSL JSR MONITORREAD8.W
BCC @RTS3
LDA MONNUM1.B
STA MONNUM2.B
JSR MONITORREAD16.W
BCC @RTS3
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ABSLI
LDA #$0F
@ALOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM2.B
JSR MONITOR_INSTR_outbyte.W
@OK3 SEC
RTS
@ABSLI CMP #','
BNE @ERR2
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR2
LDA #$1F
BRA @ALOK
@ABS JSR MONITORREAD16.W
BCC @RTS3
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ABSI
LDA #$0D
@ABOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ABSI CMP #','
BNE @ERR2
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE +
LDA #$1D
BRA @ABOK
+ CMP #'Y'
BNE @ERR2
LDA #$19
BRA @ABOK
MONITOR_ASM_INSTR_DEC:
LDA MONBUF.B,X
BEQ @DEC_A
AND #$DF
CMP #'A'
BNE @DEC_NOT_A
LDA MONBUF.B+1,X
BNE @DEC_NOT_A
@DEC_A:
LDA #$3A
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@DEC_NOT_A:
LDA #$C0
BRA MONITOR_ASM_INSTR_RMW
MONITOR_ASM_INSTR_INC:
LDA MONBUF.B,X
BEQ @INC_A
AND #$DF
CMP #'A'
BNE @INC_NOT_A
LDA MONBUF.B+1,X
BNE @INC_NOT_A
@INC_A:
LDA #$1A
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@INC_NOT_A:
LDA #$E0
BRA MONITOR_ASM_INSTR_RMW
MONITOR_ASM_INSTR_ASL:
LDA #$00
BRA MONITOR_ASM_INSTR_RMW
MONITOR_ASM_INSTR_LSR:
LDA #$40
BRA MONITOR_ASM_INSTR_RMW
MONITOR_ASM_INSTR_ROL:
LDA #$20
BRA MONITOR_ASM_INSTR_RMW
MONITOR_ASM_INSTR_ROR:
LDA #$60
;BRA MONITOR_ASM_INSTR_RMW
MONITOR_ASM_INSTR_RMW:
STA MONTMP1.B
LDA MONBUF.B,X
BEQ @YES_ACC
AND #$DF
CMP #'A'
BNE @NOT_ACC
LDA MONBUF+1.B,X
BNE @NOT_ACC
@YES_ACC:
LDA MONTMP1.B
ORA #$0A
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@NOT_ACC:
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BCS @ABS
@DP JSR MONITORREAD8.W
BCC @RTS
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @DPI
LDA #$06
@DPOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RTS RTS
@DPI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA #$16
BRA @DPOK
@ERR CLC
RTS
@ABS JSR MONITORREAD16.W
BCC @RTS
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ABSI
LDA #$0E
@ABOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ABSI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA #$1E
BRA @ABOK
MONITOR_ASM_INSTR_BPL:
LDA #$10
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BMI:
LDA #$30
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BVC:
LDA #$50
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BVS:
LDA #$70
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BCC:
LDA #$90
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BCS:
LDA #$B0
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BNE:
LDA #$D0
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BEQ:
LDA #$F0
BRA MONITOR_ASM_INSTR_BRANCH
MONITOR_ASM_INSTR_BRA:
LDA #$80
MONITOR_ASM_INSTR_BRANCH:
STA MONTMP1.B
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @RTS
ACC16
LDA MONNUM1.B
SEC
SBC #2
SEC
SBC MONADDRA.B
BMI @BMI
CMP #$0080
BCS @ERR
@BMIOK ACC8
PHA
LDA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
PLA
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RTS RTS
.ACCU 16
@BMI CMP #$FF80
BCS @BMIOK
.ACCU 8
@ERR CLC
RTS
MONITOR_ASM_INSTR_JMP:
LDA MONBUF.B,X
CMP #'('
BEQ @IND
CMP #'['
BEQ @INDL
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @RTS
LDA #$4C
@JMPOK JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RTS RTS
@ERR CLC
RTS
@IND INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @RTS
LDA MONBUF.B,X
CMP #','
BEQ @INDX
CMP #')'
BNE @ERR
LDA #$6C
BRA @JMPOK
@INDX LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA MONBUF+2.B,X
CMP #')'
BNE @ERR
LDA #$7C
BRA @JMPOK
@INDL INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @RTS
LDA MONBUF.B,X
CMP #']'
BNE @ERR
LDA #$DC
BRA @JMPOK
MONITOR_ASM_INSTR_JML:
LDA MONBUF.B,X
CMP #'['
BEQ MONITOR_ASM_INSTR_JMP@INDL
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @RTS
LDA MONNUM1.B
STA MONNUM2.B
JSR MONITORREAD16.W
BCC @RTS
LDA #$5C
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM2.B
JSR MONITOR_INSTR_outbyte.W
SEC
@RTS RTS
MONITOR_ASM_INSTR_JSR:
LDA MONBUF.B,X
CMP #'('
BEQ @IND
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @RTS
LDA #$20
@JMPOK JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RTS RTS
@ERR CLC
RTS
@IND INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @RTS
LDA MONBUF.B,X
CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA MONBUF+2.B,X
CMP #')'
BNE @ERR
LDA #$FC
BRA @JMPOK
MONITOR_ASM_INSTR_JSL:
LDA MONBUF.B,X
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @RTS
LDA MONNUM1.B
STA MONNUM2.B
JSR MONITORREAD16.W
BCC @RTS
LDA #$22
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM2.B
JSR MONITOR_INSTR_outbyte.W
SEC
@RTS RTS
MONITOR_ASM_INSTR_REP:
LDA MONBUF.B,X
CMP #'#'
BNE @ERR
INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @ERR
LDA MONNUM1.B
ASL A
ASL A
EOR #$C0
AND MNAXYSZ.B
STA MNAXYSZ.B
LDA #$C2
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_BM_READ:
LDA MONBUF.B,X
CMP #'#'
BNE +
INX
+ JSR MONITOR_ASM_SKIPDOLLAR.W
JMP MONITORREAD8.W
MONITOR_ASM_INSTR_MVN:
JSR MONITOR_ASM_INSTR_BM_READ
BCC @ERR
LDA MONBUF.B,X
CMP #','
BNE @ERR
INX
JSR MONITORSKIPSPACES.W
LDA MONNUM1.B
STA MONNUM2.B
JSR MONITOR_ASM_INSTR_BM_READ
BCC @ERR
LDA #$54
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM2.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_MVP:
JSR MONITOR_ASM_INSTR_BM_READ
BCC @ERR
LDA MONBUF.B,X
CMP #','
BNE @ERR
JSR MONITORSKIPSPACES.W
LDA MONNUM1.B
STA MONNUM2.B
JSR MONITOR_ASM_INSTR_BM_READ
BCC @ERR
LDA #$44
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM2.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_BRK:
LDA MONBUF.B,X
BEQ @ZEROCONSTANT
JSR MONITOR_ASM_INSTR_BM_READ
BCC @ERR
LDA #$00
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ZEROCONSTANT:
LDA #$00
JSR MONITOR_INSTR_outbyte.W
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_COP:
LDA MONBUF.B,X
BEQ @ZEROCONSTANT
JSR MONITOR_ASM_INSTR_BM_READ
BCC @ERR
LDA #$02
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ZEROCONSTANT:
LDA #$02
JSR MONITOR_INSTR_outbyte.W
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_SEP:
LDA MONBUF.B,X
CMP #'#'
BNE @ERR
INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @ERR
LDA MONNUM1.B
ASL A
ASL A
AND #$C0
ORA MNAXYSZ.B
STA MNAXYSZ.B
LDA #$E2
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_PEA:
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @ERR
LDA #$F4
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_PEI:
LDA MONBUF.B,X
CMP #'('
BNE @ERR
INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD8.W
BCC @ERR
LDA MONBUF.B,X
CMP #')'
BNE @ERR
INX
LDA #$D4
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_PER:
LDA #$62
BRA MONITOR_ASM_INSTR_PER_BRL
MONITOR_ASM_INSTR_BRL:
LDA #$82
MONITOR_ASM_INSTR_PER_BRL:
STA MONTMP1.B
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16.W
BCC @ERR
ACC16
LDA MONNUM1.B
SEC
SBC #3
SEC
SBC MONADDRA.B
STA MONNUM1.B
ACC8
LDA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR CLC
RTS
MONITOR_ASM_INSTR_TRB:
LDA #$10
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BEQ MONITOR_ASM_INSTR_PER_BRL@ERR
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BRA MONITOR_ASM_INSTR_CPXY_REST
MONITOR_ASM_INSTR_TSB:
LDA #$00
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BEQ MONITOR_ASM_INSTR_PER_BRL@ERR
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BRA MONITOR_ASM_INSTR_CPXY_REST
MONITOR_ASM_INSTR_CPX:
LDA #$E0
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BEQ MONITOR_ASM_INSTR_CPY@IMM
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BRA MONITOR_ASM_INSTR_CPXY_REST
MONITOR_ASM_INSTR_CPY:
LDA #$C0
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BEQ @IMM
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BRA MONITOR_ASM_INSTR_CPXY_REST
@IMM:
JMP MONITOR_ASM_INSTR_LDX@IMM
MONITOR_ASM_INSTR_CPXY_REST:
BCS @ABS
@DP JSR MONITORREAD8.W
BCC @RET
LDA MONTMP1.B
ORA #$04
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RET RTS
@ABS JSR MONITORREAD16.W
BCC @RET
LDA MONTMP1.B
ORA #$0C
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
BRA @OK
MONITOR_ASM_INSTR_LDX:
LDA #$A2
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BEQ @IMM
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BCS @ABS
@DP JSR MONITORREAD8.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @DPI
LDA #$04
@DPOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RET RTS
@DPI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'Y'
BNE @ERR
LDA #$14
BRA @DPOK
@ERR CLC
RTS
@ABS JSR MONITORREAD16.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ABSI
LDA #$0C
@ABOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
BRA @OK
@ABSI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'Y'
BNE @ERR
LDA #$1C
BRA @ABOK
@IMM INX
JSR MONITOR_ASM_SKIPDOLLAR.W
JSR MONITORREAD16LAZY.W
BCC @RTS
LDA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
BIT MNAXYSZ.B
BVS @X8
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
@X8 SEC
@RTS RTS
MONITOR_ASM_INSTR_BIT:
LDA #$20
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BNE MONITOR_ASM_INSTR_LDY@NS
@IMM LDA #$80
STA MONTMP1.B
BRL MONITOR_ASM_INSTR_ALU_READ@IMM
MONITOR_ASM_INSTR_LDY:
LDA #$A0
STA MONTMP1.B
LDA MONBUF.B,X
CMP #'#'
BEQ MONITOR_ASM_INSTR_LDX@IMM
@NS JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BCS @ABS
@DP JSR MONITORREAD8.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @DPI
LDA #$04
@DPOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RET RTS
@DPI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA #$14
BRA @DPOK
@ERR CLC
RTS
@ABS JSR MONITORREAD16.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ABSI
LDA #$0C
@ABOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
BRA @OK
@ABSI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA #$1C
BRA @ABOK
MONITOR_ASM_INSTR_STX:
LDA #$86
STA MONTMP1.B
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BCS @ABS
@DP JSR MONITORREAD8.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @DPI
LDA #$04
@DPOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RET RTS
@DPI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'Y'
BNE @ERR
LDA #$14
BRA @DPOK
@ERR CLC
RTS
@ABS JSR MONITORREAD16.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ERR
LDA #$0C
ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
BRA @OK
MONITOR_ASM_INSTR_STY:
LDA #$84
STA MONTMP1.B
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BCS @ABS
@DP JSR MONITORREAD8.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @DPI
LDA #$04
@DPOK ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RET RTS
@DPI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA #$14
BRA @DPOK
@ERR CLC
RTS
@ABS JSR MONITORREAD16.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ERR
LDA #$0C
ORA MONTMP1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
BRA @OK
MONITOR_ASM_INSTR_STZ:
JSR MONITOR_ASM_SKIPDOLLAR.W
LDA MONBUF.B+2,X
JSR MONITORREADHEX.W
BCS @ABS
@DP JSR MONITORREAD8.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @DPI
LDA #$64
@DPOK JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
@OK SEC
@RET RTS
@DPI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA #$74
BRA @DPOK
@ERR CLC
RTS
@ABS JSR MONITORREAD16.W
BCC @RET
JSR MONITORSKIPSPACES.W
LDA MONBUF.B,X
BNE @ABSI
LDA #$9C
@ABOK JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1.B
JSR MONITOR_INSTR_outbyte.W
LDA MONNUM1+1.B
JSR MONITOR_INSTR_outbyte.W
BRA @OK
@ABSI CMP #','
BNE @ERR
LDA MONBUF+1.B,X
AND #$DF
CMP #'X'
BNE @ERR
LDA #$9E
BRA @ABOK
.MACRO MONITOR_SINGLE_BYTE_INSTR
LDA MONBUF.B,X
BNE @ERR
LDA #\1
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR: CLC
RTS
.ENDM
MONITOR_ASM_INSTR_WDM:
LDA MONBUF.B,X
BNE @ERR
LDA #$42
JSR MONITOR_INSTR_outbyte.W
JSR MONITOR_INSTR_outbyte.W
SEC
RTS
@ERR: CLC
RTS
MONITOR_ASM_INSTR_DEX:
MONITOR_SINGLE_BYTE_INSTR $CA
MONITOR_ASM_INSTR_DEY:
MONITOR_SINGLE_BYTE_INSTR $88
MONITOR_ASM_INSTR_INX:
MONITOR_SINGLE_BYTE_INSTR $E8
MONITOR_ASM_INSTR_INY:
MONITOR_SINGLE_BYTE_INSTR $C8
MONITOR_ASM_INSTR_CLC:
MONITOR_SINGLE_BYTE_INSTR $18
MONITOR_ASM_INSTR_CLD:
MONITOR_SINGLE_BYTE_INSTR $D8
MONITOR_ASM_INSTR_CLI:
MONITOR_SINGLE_BYTE_INSTR $58
MONITOR_ASM_INSTR_CLV:
MONITOR_SINGLE_BYTE_INSTR $B8
MONITOR_ASM_INSTR_SEC:
MONITOR_SINGLE_BYTE_INSTR $38
MONITOR_ASM_INSTR_SED:
MONITOR_SINGLE_BYTE_INSTR $F8
MONITOR_ASM_INSTR_SEI:
MONITOR_SINGLE_BYTE_INSTR $78
MONITOR_ASM_INSTR_PHA:
MONITOR_SINGLE_BYTE_INSTR $48
MONITOR_ASM_INSTR_PHB:
MONITOR_SINGLE_BYTE_INSTR $8B
MONITOR_ASM_INSTR_PHD:
MONITOR_SINGLE_BYTE_INSTR $0B
MONITOR_ASM_INSTR_PHK:
MONITOR_SINGLE_BYTE_INSTR $4B
MONITOR_ASM_INSTR_PHP:
MONITOR_SINGLE_BYTE_INSTR $08
MONITOR_ASM_INSTR_PHX:
MONITOR_SINGLE_BYTE_INSTR $DA
MONITOR_ASM_INSTR_PHY:
MONITOR_SINGLE_BYTE_INSTR $5A
MONITOR_ASM_INSTR_PLA:
MONITOR_SINGLE_BYTE_INSTR $68
MONITOR_ASM_INSTR_PLB:
MONITOR_SINGLE_BYTE_INSTR $AB
MONITOR_ASM_INSTR_PLD:
MONITOR_SINGLE_BYTE_INSTR $2B
MONITOR_ASM_INSTR_PLP:
MONITOR_SINGLE_BYTE_INSTR $28
MONITOR_ASM_INSTR_PLX:
MONITOR_SINGLE_BYTE_INSTR $FA
MONITOR_ASM_INSTR_PLY:
MONITOR_SINGLE_BYTE_INSTR $7A
MONITOR_ASM_INSTR_TAX:
MONITOR_SINGLE_BYTE_INSTR $AA
MONITOR_ASM_INSTR_TAY:
MONITOR_SINGLE_BYTE_INSTR $A8
MONITOR_ASM_INSTR_TSX:
MONITOR_SINGLE_BYTE_INSTR $BA
MONITOR_ASM_INSTR_TXA:
MONITOR_SINGLE_BYTE_INSTR $8A
MONITOR_ASM_INSTR_TXS:
MONITOR_SINGLE_BYTE_INSTR $9A
MONITOR_ASM_INSTR_TXY:
MONITOR_SINGLE_BYTE_INSTR $9B
MONITOR_ASM_INSTR_TYA:
MONITOR_SINGLE_BYTE_INSTR $98
MONITOR_ASM_INSTR_TYX:
MONITOR_SINGLE_BYTE_INSTR $BB
MONITOR_ASM_INSTR_TCD:
MONITOR_SINGLE_BYTE_INSTR $5B
MONITOR_ASM_INSTR_TCS:
MONITOR_SINGLE_BYTE_INSTR $1B
MONITOR_ASM_INSTR_TDC:
MONITOR_SINGLE_BYTE_INSTR $7B
MONITOR_ASM_INSTR_TSC:
MONITOR_SINGLE_BYTE_INSTR $3B
MONITOR_ASM_INSTR_RTL:
MONITOR_SINGLE_BYTE_INSTR $6B
MONITOR_ASM_INSTR_RTS:
MONITOR_SINGLE_BYTE_INSTR $60
MONITOR_ASM_INSTR_RTI:
MONITOR_SINGLE_BYTE_INSTR $40
MONITOR_ASM_INSTR_STP:
MONITOR_SINGLE_BYTE_INSTR $DB
MONITOR_ASM_INSTR_WAI:
MONITOR_SINGLE_BYTE_INSTR $CB
MONITOR_ASM_INSTR_XBA:
MONITOR_SINGLE_BYTE_INSTR $EB
MONITOR_ASM_INSTR_XCE:
MONITOR_SINGLE_BYTE_INSTR $FB
MONITOR_ASM_INSTR_NOP:
MONITOR_SINGLE_BYTE_INSTR $EA
MONITORASMINSTR_START:
MONITORASMINSTR_A:
.DB "DC"
.DW MONITOR_ASM_INSTR_ADC
.DB "ND"
.DW MONITOR_ASM_INSTR_AND
.DB "SL"
.DW MONITOR_ASM_INSTR_ASL
MONITORASMINSTR_EMPTY:
.DB 0
MONITORASMINSTR_B:
.DB "CC"
.DW MONITOR_ASM_INSTR_BCC
.DB "CS"
.DW MONITOR_ASM_INSTR_BCS
.DB "EQ"
.DW MONITOR_ASM_INSTR_BEQ
.DB "IT"
.DW MONITOR_ASM_INSTR_BIT
.DB "MI"
.DW MONITOR_ASM_INSTR_BMI
.DB "NE"
.DW MONITOR_ASM_INSTR_BNE
.DB "PL"
.DW MONITOR_ASM_INSTR_BPL
.DB "RA"
.DW MONITOR_ASM_INSTR_BRA
.DB "RK"
.DW MONITOR_ASM_INSTR_BRK
.DB "RL"
.DW MONITOR_ASM_INSTR_BRL
.DB "VC"
.DW MONITOR_ASM_INSTR_BVC
.DB "VS"
.DW MONITOR_ASM_INSTR_BVS
.DB 0
MONITORASMINSTR_C:
.DB "LC"
.DW MONITOR_ASM_INSTR_CLC
.DB "LD"
.DW MONITOR_ASM_INSTR_CLD
.DB "LI"
.DW MONITOR_ASM_INSTR_CLI
.DB "LV"
.DW MONITOR_ASM_INSTR_CLV
.DB "MP"
.DW MONITOR_ASM_INSTR_CMP
.DB "OP"
.DW MONITOR_ASM_INSTR_COP
.DB "PX"
.DW MONITOR_ASM_INSTR_CPX
.DB "PY"
.DW MONITOR_ASM_INSTR_CPY
.DB 0
MONITORASMINSTR_D:
.DB "EC"
.DW MONITOR_ASM_INSTR_DEC
.DB "EX"
.DW MONITOR_ASM_INSTR_DEX
.DB "EY"
.DW MONITOR_ASM_INSTR_DEY
.DB 0
MONITORASMINSTR_E:
.DB "OR"
.DW MONITOR_ASM_INSTR_EOR
.DB 0
MONITORASMINSTR_I:
.DB "NC"
.DW MONITOR_ASM_INSTR_INC
.DB "NX"
.DW MONITOR_ASM_INSTR_INX
.DB "NY"
.DW MONITOR_ASM_INSTR_INY
.DB 0
MONITORASMINSTR_J:
.DB "ML"
.DW MONITOR_ASM_INSTR_JML
.DB "MP"
.DW MONITOR_ASM_INSTR_JMP
.DB "SL"
.DW MONITOR_ASM_INSTR_JSL
.DB "SR"
.DW MONITOR_ASM_INSTR_JSR
.DB 0
MONITORASMINSTR_L:
.DB "DA"
.DW MONITOR_ASM_INSTR_LDA
.DB "DX"
.DW MONITOR_ASM_INSTR_LDX
.DB "DY"
.DW MONITOR_ASM_INSTR_LDY
.DB "SR"
.DW MONITOR_ASM_INSTR_LSR
.DB 0
MONITORASMINSTR_M:
.DB "VN"
.DW MONITOR_ASM_INSTR_MVN
.DB "VP"
.DW MONITOR_ASM_INSTR_MVP
.DB 0
MONITORASMINSTR_N:
.DB "OP"
.DW MONITOR_ASM_INSTR_NOP
.DB 0
MONITORASMINSTR_O:
.DB "RA"
.DW MONITOR_ASM_INSTR_ORA
.DB 0
MONITORASMINSTR_P:
.DB "EA"
.DW MONITOR_ASM_INSTR_PEA
.DB "EI"
.DW MONITOR_ASM_INSTR_PEI
.DB "ER"
.DW MONITOR_ASM_INSTR_PER
.DB "HA"
.DW MONITOR_ASM_INSTR_PHA
.DB "HB"
.DW MONITOR_ASM_INSTR_PHB
.DB "HD"
.DW MONITOR_ASM_INSTR_PHD
.DB "HK"
.DW MONITOR_ASM_INSTR_PHK
.DB "HP"
.DW MONITOR_ASM_INSTR_PHP
.DB "HX"
.DW MONITOR_ASM_INSTR_PHX
.DB "HY"
.DW MONITOR_ASM_INSTR_PHY
.DB "LA"
.DW MONITOR_ASM_INSTR_PLA
.DB "LB"
.DW MONITOR_ASM_INSTR_PLB
.DB "LD"
.DW MONITOR_ASM_INSTR_PLD
.DB "LP"
.DW MONITOR_ASM_INSTR_PLP
.DB "LX"
.DW MONITOR_ASM_INSTR_PLX
.DB "LY"
.DW MONITOR_ASM_INSTR_PLY
.DB 0
MONITORASMINSTR_R:
.DB "EP"
.DW MONITOR_ASM_INSTR_REP
.DB "OL"
.DW MONITOR_ASM_INSTR_ROL
.DB "OR"
.DW MONITOR_ASM_INSTR_ROR
.DB "TI"
.DW MONITOR_ASM_INSTR_RTI
.DB "TL"
.DW MONITOR_ASM_INSTR_RTL
.DB "TS"
.DW MONITOR_ASM_INSTR_RTS
.DB 0
MONITORASMINSTR_S:
.DB "BC"
.DW MONITOR_ASM_INSTR_SBC
.DB "EC"
.DW MONITOR_ASM_INSTR_SEC
.DB "ED"
.DW MONITOR_ASM_INSTR_SED
.DB "EI"
.DW MONITOR_ASM_INSTR_SEI
.DB "EP"
.DW MONITOR_ASM_INSTR_SEP
.DB "TA"
.DW MONITOR_ASM_INSTR_STA
.DB "TP"
.DW MONITOR_ASM_INSTR_STP
.DB "TX"
.DW MONITOR_ASM_INSTR_STX
.DB "TY"
.DW MONITOR_ASM_INSTR_STY
.DB "TZ"
.DW MONITOR_ASM_INSTR_STZ
.DB 0
MONITORASMINSTR_T:
.DB "AX"
.DW MONITOR_ASM_INSTR_TAX
.DB "AY"
.DW MONITOR_ASM_INSTR_TAY
.DB "CD"
.DW MONITOR_ASM_INSTR_TCD
.DB "CS"
.DW MONITOR_ASM_INSTR_TCS
.DB "DC"
.DW MONITOR_ASM_INSTR_TDC
.DB "RB"
.DW MONITOR_ASM_INSTR_TRB
.DB "SB"
.DW MONITOR_ASM_INSTR_TSB
.DB "SC"
.DW MONITOR_ASM_INSTR_TSC
.DB "SX"
.DW MONITOR_ASM_INSTR_TSX
.DB "XA"
.DW MONITOR_ASM_INSTR_TXA
.DB "XS"
.DW MONITOR_ASM_INSTR_TXS
.DB "XY"
.DW MONITOR_ASM_INSTR_TXY
.DB "YA"
.DW MONITOR_ASM_INSTR_TYA
.DB "YX"
.DW MONITOR_ASM_INSTR_TYX
.DB 0
MONITORASMINSTR_W:
.DB "AI"
.DW MONITOR_ASM_INSTR_WAI
.DB "DM"
.DW MONITOR_ASM_INSTR_WDM
.DB 0
MONITORASMINSTR_X:
.DB "BA"
.DW MONITOR_ASM_INSTR_XBA
.DB "CE"
.DW MONITOR_ASM_INSTR_XCE
.DB 0
MLMONBRK:
CLI
BNE MLMONBRKE
SETBD16 $80, MONPAGE
LDA 11,S
SEC
SBC #2
STA MNREGPC.B
LDA 8,S
STA MNREGACC.B
LDA 6,S
STA MNREGX.B
LDA 4,S
STA MNREGY.B
LDA 1,S
STA MNREGD.B
LDA #0
ACC8
LDA 3,S
STA MNREGB.B
LDA 10,S
STA MNREGP.B
LDA 13,S
STA MNREGK.B
AXY16
TSC
CLC
ADC #13
STA MNREGS.B
TCS
LDA #0
STA MNEMUL.B
JMP MONCODEBRK
MLMONBRKE:
SETBD16 $80, MONPAGE
LDA 15,S
SEC
SBC #2
STA MNREGPC.B
LDA 8,S
STA MNREGACC.B
LDA 6,S
STA MNREGX.B
LDA 4,S
STA MNREGY.B
LDA 1,S
STA MNREGD.B
LDA #0
ACC8
LDA 3,S
STA MNREGB.B
LDA 14,S
STA MNREGP.B
STZ MNREGK.B
AXY16
TSC
CLC
ADC #17
STA MNREGS.B
TCS
LDA #1
STA MNEMUL.B
JMP MONCODEBRK
MLMONNMI:
; increment NMI counter
SETB16 $80
INC MONPAGE|MONINNMI.W
JML [MONPAGE|MONNMIOL.W]
| 25.258185 | 81 | 0.45799 |
419d9235ac3f16fd314cbf41c6d0e6e4da3831b0 | 1,686 | asm | Assembly | programs/oeis/069/A069178.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/069/A069178.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/069/A069178.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A069178: Centered 21-gonal numbers.
; 1,22,64,127,211,316,442,589,757,946,1156,1387,1639,1912,2206,2521,2857,3214,3592,3991,4411,4852,5314,5797,6301,6826,7372,7939,8527,9136,9766,10417,11089,11782,12496,13231,13987,14764,15562,16381,17221,18082,18964,19867,20791,21736,22702,23689,24697,25726,26776,27847,28939,30052,31186,32341,33517,34714,35932,37171,38431,39712,41014,42337,43681,45046,46432,47839,49267,50716,52186,53677,55189,56722,58276,59851,61447,63064,64702,66361,68041,69742,71464,73207,74971,76756,78562,80389,82237,84106,85996,87907,89839,91792,93766,95761,97777,99814,101872,103951,106051,108172,110314,112477,114661,116866,119092,121339,123607,125896,128206,130537,132889,135262,137656,140071,142507,144964,147442,149941,152461,155002,157564,160147,162751,165376,168022,170689,173377,176086,178816,181567,184339,187132,189946,192781,195637,198514,201412,204331,207271,210232,213214,216217,219241,222286,225352,228439,231547,234676,237826,240997,244189,247402,250636,253891,257167,260464,263782,267121,270481,273862,277264,280687,284131,287596,291082,294589,298117,301666,305236,308827,312439,316072,319726,323401,327097,330814,334552,338311,342091,345892,349714,353557,357421,361306,365212,369139,373087,377056,381046,385057,389089,393142,397216,401311,405427,409564,413722,417901,422101,426322,430564,434827,439111,443416,447742,452089,456457,460846,465256,469687,474139,478612,483106,487621,492157,496714,501292,505891,510511,515152,519814,524497,529201,533926,538672,543439,548227,553036,557866,562717,567589,572482,577396,582331,587287,592264,597262,602281,607321,612382,617464,622567,627691,632836,638002,643189,648397,653626
sub $1,$0
bin $1,2
mul $1,21
add $1,1
| 210.75 | 1,608 | 0.83452 |
fc88693a5532521e398c1e31511aae1f44767a3b | 566 | asm | Assembly | oeis/024/A024002.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/024/A024002.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/024/A024002.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A024002: a(n) = 1 - n^4.
; 1,0,-15,-80,-255,-624,-1295,-2400,-4095,-6560,-9999,-14640,-20735,-28560,-38415,-50624,-65535,-83520,-104975,-130320,-159999,-194480,-234255,-279840,-331775,-390624,-456975,-531440,-614655,-707280,-809999,-923520,-1048575,-1185920,-1336335,-1500624,-1679615,-1874160,-2085135,-2313440,-2559999,-2825760,-3111695,-3418800,-3748095,-4100624,-4477455,-4879680,-5308415,-5764800,-6249999,-6765200,-7311615,-7890480,-8503055,-9150624,-9834495,-10556000,-11316495,-12117360,-12959999,-13845840,-14776335
pow $0,4
mov $1,1
sub $1,$0
mov $0,$1
| 70.75 | 499 | 0.717314 |
a090402a8f614fd68cd40a17abccc3527d9c6cad | 415 | asm | Assembly | programs/oeis/169/A169919.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/169/A169919.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/169/A169919.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A169919: a(n) = n*n in the arithmetic where digits are added in base 10 (as usual) but when digits are to be multiplied they are also added in base 10.
; 0,2,4,6,8,10,12,14,16,18,220,242,264,286,308,330,352,374,396,418,440,462,484,506,528,550,572,594,616,638,660,682,704,726,748,770,792,814,836,858,880,902,924,946,968,990,1012,1034,1056,1078,1100,1122,1144
mov $1,$0
lpb $1
mul $0,11
mod $1,10
lpe
mul $0,2
| 41.5 | 205 | 0.708434 |
01f498bbdcb14c486d205ecd62c4f25a46f24c58 | 5,930 | asm | Assembly | ee/wman/trap3.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ee/wman/trap3.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ee/wman/trap3.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ; New colour trap dispatcher V1.02 2002 Marcel Kilgus
;
; 2003-01-30 1.01 Fixed condition code returns (MK)
; 2002-06-05 1.02 Fixed bug in setborder (MK + WL)
; 2010-12-17 1.03 Fixed 3d border with zero width
section wman
xdef wmc_trap3
xdef wmc_colour
xdef wmc_error
xref wm_getspentry
xref wm_3db
xref wm_rmbrdr
include 'dev8_keys_qdos_io'
include 'dev8_keys_wman'
wmc.reg reg d1-d2
wmc.d1 equ 0
wmc.d2 equ 4
; Could do a jump table but it's only 6 different codes anyway
wmc_trap3
movem.l wmc.reg,-(sp)
cmp.w #iow.defb,d0
beq.s wmc_defb
cmp.w #iow.defw,d0
beq.s wmc_defw
cmp.w #iow.spap,d0
beq wmc_spap
cmp.w #iow.sstr,d0
beq wmc_sstr
cmp.w #iow.sink,d0
beq wmc_sink
cmp.w #iow.blok,d0
beq wmc_blok
movem.l (sp)+,wmc.reg
trap #3
tst.l d0
rts
trap3
move.l wmc.d2(sp),d2
trap #3
movem.l (sp)+,wmc.reg
tst.l d0
rts
; Define window
wmc_defw
tst.w d2 ; no border? -> no special code
beq.s trap3
movem.l d1-d3,-(sp)
moveq #0,d2 ; no border at first
trap #3
tst.l d0
bne.s wmc_err12
movem.l (sp)+,d1-d3
moveq #iow.defb,d0
bra.s wmc_setborder
wmc_err16
adda.w #4,sp
wmc_err12
adda.w #12,sp ; skip d1-d3
movem.l (sp)+,wmc.reg ; restore original d1/d2
rts
; Define window border
wmc_defb
jsr wm_rmbrdr ; first remove existing border
wmc_setborder
bsr wmc_colour
bne.s wmsb_ordinary ; high colour border
move.w d1,d2 ; either "oldstyle" or 3d special
andi.w #$ff00,d2
beq.s wmsb_draw
move.w wmc.d2+2(sp),d2 ; border width
beq.s wmsb_draw
jsr wm_3db ; draw 3d border
bra.s wmsb_exit
wmsb_ordinary
addq.l #iow.borp-iow.papp,d0
tst.l d2 ; stipple requested?
bmi.s wmsb_draw ; no
movem.l d0-d3,-(sp)
moveq #-1,d2 ; define main colour
trap #3
tst.l d0
bne.s wmc_err16
movem.l (sp)+,d0-d3
moveq #0,d1
move.w d2,d1 ; stipple colour in d1
wmsb_draw
move.w wmc.d2+2(sp),d2 ; border width. MSW of d2 is stipple code or -1
trap #3
wmsb_exit
movem.l (sp)+,wmc.reg
tst.l d0
rts
; Set paper colour
wmc_spap
bsr wmc_colour
beq trap3
wmc_new3
tst.l d2 ; stipple requested?
bmi.s wm3_solid
movem.l d0-d2,-(sp)
moveq #-1,d2
trap #3 ; first do solid colour
tst.l d0
bne.s wmc_err12
movem.l (sp)+,d0-d2
moveq #0,d1
move.w d2,d1 ; stipple colour
swap d2 ; stipple key
wm3_solid
trap #3
movem.l (sp)+,wmc.reg
tst.l d0
rts
; Set strip colour
wmc_sstr
bsr.s wmc_colour
beq trap3
addq.l #iow.strp-iow.papp,d0
bra.s wmc_new3
; Set ink colour
wmc_sink
bsr.s wmc_colour
beq trap3
addq.l #iow.inkp-iow.papp,d0
bra.s wmc_new3
; Draw block
wmc_blok
bsr.s wmc_colour
beq trap3
move.l a2,-(sp)
suba.l #3*4,sp ; build colour block on stack
move.l d1,(sp) ; main colour
tst.l d2
bmi.s wmb_solid ; no stipple
clr.w 4(sp)
move.w d2,6(sp) ; stipple colour
swap d2
clr.w 8(sp)
move.w d2,10(sp) ; stipple code
bra.s wmb_draw
wmb_solid
move.l d1,4(sp)
move.l d2,8(sp) ; no stipple
wmb_draw
subi.l #iow.papp,d0 ; d0 now 0, 4 or 8
lsr.l #2,d0 ; 0, 1 or 2
addi.l #iow.blkp,d0 ; iow.blkp, iow.blkt or iow.blkn
movea.l sp,a2 ; colour block
trap #3
adda.l #3*4,sp ; release stack frame
movem.l (sp)+,a2
movem.l (sp)+,wmc.reg
tst.l d0
rts
;+++
; Interpret colour code given as a word and convert it to a code
; that can be given to one of the traps. Also return which trap to
; use for the code.
;
; d0 r either untouched (Z set) or a new paper colour trap # (Z clear)
; d1 cr old word colour code / new colour code
; d2 r -1 if no stipple, 000s00cc for stipple code/stipple colour
; all other registers preserved
;--
wmc_colour
move.l d3,-(sp)
moveq #6,d3 ; allow 5 recursive sys pal entries
wmc_loop
btst #wmc..rgb,d1 ; 15 bit RGB definition?
bne wmc_15bit
btst #wmc..stip,d1
bne.s wmc_stipple ; 2*6 bit stipple definition?
move.l d1,-(sp)
lsr.w #8,d1
beq.s wmc_keep ; just keep colour code
cmp.b #wmc.pal,d1 ; palette mode?
beq.s wmc_palette
cmp.b #wmc.syspal,d1 ; system palette?
beq.s wmc_syspal
cmp.b #wmc.gray,d1 ; gray colour?
beq.s wmc_gray
cmp.b #wmc.3db,d1 ; special border code?
bne.s wmc_error8 ; unknown colour code
; Old style or special code - just pass back original colour code
wmc_keep
movem.l (sp)+,d1/d3 ; Keep Z flag state!
rts
; Return error colour
wmc_error8
move.l (sp)+,d1
wmc_error4
move.l (sp)+,d3
wmc_error
move.w #238,d1 ; error colour
cmp.b d1,d1 ; set Z flag
rts
; Palette entry
wmc_palette
movem.l (sp)+,d1/d3
andi.l #$ff,d1
moveq #-1,d2 ; no stipple
moveq #iow.papp,d0 ; use palette functions
rts
; System palette entry. Can be recursive
wmc_syspal
move.l (sp)+,d1
andi.w #$ff,d1
bsr wm_getspentry ; get entry out of system palette
subq.w #1,d3 ; max recursion level reached?
bne.s wmc_loop ; no, evaluate colour
bra.s wmc_error4
; Stipple colour
wmc_stipple
move.w d1,d2 ; %000000000000000001wwxxxxxxyyyyyy
andi.l #$3f,d1 ; %00000000000000000000000000yyyyyy
asl.l #4,d2 ; %00000000000001wwxxxxxxyyyyyy0000
rol.w #6,d2 ; %00000000000001wwyyyyyy0000xxxxxx
andi.l #$3003f,d2 ; %00000000000000ww0000000000xxxxxx
move.l (sp)+,d3
moveq #iow.papp,d0 ; use palette functions
rts
; Gray colour
wmc_gray
moveq #0,d1
move.b 3(sp),d1
asl.l #8,d1
move.b 3(sp),d1 ; repeat byte
asl.l #8,d1
move.b 3(sp),d1 ; and again
asl.l #8,d1
adda.l #4,sp
move.l (sp)+,d3
moveq #-1,d2 ; no stipple
moveq #iow.papt,d0 ; true colour routine
rts
; 15 bit RGB colour
wmc_15bit
move.w d1,d0
swap d0
move.w d1,d0
rol.w #6,d1
lsr.w #5,d0
andi.w #$1f,d1 ; r
andi.w #$1f,d0 ; g
move.b wmc_5to8(pc,d1.w),d1 ; R
asl.l #8,d1
move.b wmc_5to8(pc,d0.w),d1 ; RG
asl.l #8,d1
swap d0
andi.w #$1f,d0 ; b
move.b wmc_5to8(pc,d0.w),d1 ; RGB
asl.l #8,d1 ; RGB0
move.l (sp)+,d3
moveq #-1,d2 ; no stipple
moveq #iow.papt,d0 ; use true colour functions
rts
wmc_5to8
dc.b $00,$08,$10,$18,$21,$29,$31,$39
dc.b $42,$4a,$52,$5a,$63,$6b,$73,$7b
dc.b $84,$8c,$94,$9c,$a5,$ad,$b5,$bd
dc.b $c6,$ce,$d6,$de,$e7,$ef,$f7,$ff
end
| 19.442623 | 71 | 0.685497 |
b0bdda00d936d014430ad133b5b5db6f8815b00c | 808 | asm | Assembly | oeis/277/A277954.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/277/A277954.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/277/A277954.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A277954: Decimal representation of the x-axis, from the left edge to the origin, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 14", based on the 5-celled von Neumann neighborhood.
; Submitted by Jon Maiga
; 1,3,6,14,26,58,106,234,426,938,1706,3754,6826,15018,27306,60074,109226,240298,436906,961194,1747626,3844778,6990506,15379114,27962026,61516458,111848106,246065834,447392426,984263338,1789569706,3937053354,7158278826,15748213418,28633115306,62992853674,114532461226,251971414698,458129844906,1007885658794,1832519379626,4031542635178,7330077518506,16126170540714,29320310074026,64504682162858,117281240296106,258018728651434,469124961184426,1032074914605738,1876499844737706,4128299658422954
add $0,1
mov $1,2
pow $1,$0
gcd $0,2
add $0,9
mul $0,$1
div $0,12
| 67.333333 | 492 | 0.82797 |
19d9277aa9045576c56c9d63f94c63d6546891cc | 16,795 | asm | Assembly | ThemidaSDK/Include/C/Via ASM module/SecureEngineMacros.asm | qzhsjz/LXDInjector | 44c34e9677b4e3543e58584fad3844eb7bb33ff8 | [
"MIT"
] | 1 | 2021-05-22T11:10:43.000Z | 2021-05-22T11:10:43.000Z | ThemidaSDK/Include/C/Via ASM module/SecureEngineMacros.asm | luoxiandu/LXDInjector | 44c34e9677b4e3543e58584fad3844eb7bb33ff8 | [
"MIT"
] | null | null | null | ThemidaSDK/Include/C/Via ASM module/SecureEngineMacros.asm | luoxiandu/LXDInjector | 44c34e9677b4e3543e58584fad3844eb7bb33ff8 | [
"MIT"
] | null | null | null | ; ****************************************************************************
; Module: asm_macros_x32.asm
; Description: Another way to link with the SecureEngine SDK via an ASM module
;
; Authors: Oreans Technologies
; (c) 2013 Oreans Technologies
; ****************************************************************************
IFDEF RAX
ELSE
.586
.model flat,stdcall
option casemap:none
ENDIF
; ****************************************************************************
; Data Segment
; ****************************************************************************
.DATA
; ****************************************************************************
; Constants
; ****************************************************************************
.CONST
VM_START_ID = 1
VM_END_ID = 2
CODEREPLACE_START_ID = 3
CODEREPLACE_END_ID = 4
REGISTERED_START_ID = 5
REGISTERED_END_ID = 6
ENCODE_START_ID = 7
ENCODE_END_ID = 8
CLEAR_START_ID = 9
CLEAR_END_ID = 10
UNREGISTERED_START_ID = 11
UNREGISTERED_END_ID = 12
REGISTEREDVM_START_ID = 13
REGISTEREDVM_END_ID = 14
UNPROTECTED_START_ID = 15
UNPROTECTED_END_ID = 16
CHECK_PROTECTION_ID = 17
CHECK_CODE_INTEGRITY_ID = 18
CHECK_REGISTRATION_ID = 19
CHECK_VIRTUAL_PC_ID = 20
MUTATE_START_ID = 21
MUTATE_END_ID = 22
STR_ENCRYPT_START_ID = 23
STR_ENCRYPT_END_ID = 24
STR_ENCRYPTW_START_ID = 27
STR_ENCRYPTW_END_ID = 28
; ****************************************************************************
; Code Segment
; ****************************************************************************
.CODE
IFDEF RAX
VM_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, VM_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
VM_START_ASM64 ENDP
VM_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, VM_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
VM_END_ASM64 ENDP
REGISTERED_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, REGISTERED_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
REGISTERED_START_ASM64 ENDP
REGISTERED_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, REGISTERED_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
REGISTERED_END_ASM64 ENDP
ENCODE_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, ENCODE_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
ENCODE_START_ASM64 ENDP
ENCODE_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, ENCODE_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
ENCODE_END_ASM64 ENDP
CLEAR_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, CLEAR_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
CLEAR_START_ASM64 ENDP
CLEAR_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, CLEAR_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
CLEAR_END_ASM64 ENDP
MUTATE_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, MUTATE_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
MUTATE_START_ASM64 ENDP
MUTATE_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, MUTATE_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
MUTATE_END_ASM64 ENDP
STR_ENCRYPT_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPT_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
STR_ENCRYPT_START_ASM64 ENDP
STR_ENCRYPT_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPT_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
STR_ENCRYPT_END_ASM64 ENDP
STR_ENCRYPTW_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPTW_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
STR_ENCRYPTW_START_ASM64 ENDP
STR_ENCRYPTW_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPTW_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
STR_ENCRYPTW_END_ASM64 ENDP
UNREGISTERED_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, UNREGISTERED_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
UNREGISTERED_START_ASM64 ENDP
UNREGISTERED_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, UNREGISTERED_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
UNREGISTERED_END_ASM64 ENDP
REGISTEREDVM_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, REGISTEREDVM_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
REGISTEREDVM_START_ASM64 ENDP
REGISTEREDVM_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, REGISTEREDVM_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
REGISTEREDVM_END_ASM64 ENDP
UNPROTECTED_START_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, UNPROTECTED_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
UNPROTECTED_START_ASM64 ENDP
UNPROTECTED_END_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, UNPROTECTED_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
ret
UNPROTECTED_END_ASM64 ENDP
CHECK_PROTECTION_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, CHECK_PROTECTION_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
mov dword ptr [rcx], edx
ret
CHECK_PROTECTION_ASM64 ENDP
CHECK_CODE_INTEGRITY_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, CHECK_CODE_INTEGRITY_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
mov dword ptr [rcx], edx
ret
CHECK_CODE_INTEGRITY_ASM64 ENDP
CHECK_REGISTRATION_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, CHECK_REGISTRATION_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
mov dword ptr [rcx], edx
ret
CHECK_REGISTRATION_ASM64 ENDP
CHECK_VIRTUAL_PC_ASM64 PROC
push rax
push rbx
push rcx
mov eax, 'TMWL'
mov ebx, CHECK_VIRTUAL_PC_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop rcx
pop rbx
pop rax
mov dword ptr [rcx], edx
ret
CHECK_VIRTUAL_PC_ASM64 ENDP
ELSE
VM_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, VM_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
VM_START_ASM32 ENDP
VM_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, VM_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
VM_END_ASM32 ENDP
REGISTERED_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, REGISTERED_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
REGISTERED_START_ASM32 ENDP
REGISTERED_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, REGISTERED_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
REGISTERED_END_ASM32 ENDP
ENCODE_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, ENCODE_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
ENCODE_START_ASM32 ENDP
ENCODE_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, ENCODE_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
ENCODE_END_ASM32 ENDP
CLEAR_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, CLEAR_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
CLEAR_START_ASM32 ENDP
CLEAR_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, CLEAR_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
CLEAR_END_ASM32 ENDP
MUTATE_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, MUTATE_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
MUTATE_START_ASM32 ENDP
MUTATE_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, MUTATE_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
MUTATE_END_ASM32 ENDP
STR_ENCRYPT_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPT_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
STR_ENCRYPT_START_ASM32 ENDP
STR_ENCRYPT_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPT_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
STR_ENCRYPT_END_ASM32 ENDP
STR_ENCRYPTW_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPTW_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
STR_ENCRYPTW_START_ASM32 ENDP
STR_ENCRYPTW_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, STR_ENCRYPTW_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
STR_ENCRYPTW_END_ASM32 ENDP
UNREGISTERED_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, UNREGISTERED_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
UNREGISTERED_START_ASM32 ENDP
UNREGISTERED_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, UNREGISTERED_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
UNREGISTERED_END_ASM32 ENDP
REGISTEREDVM_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, REGISTEREDVM_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
REGISTEREDVM_START_ASM32 ENDP
REGISTEREDVM_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, REGISTEREDVM_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
REGISTEREDVM_END_ASM32 ENDP
UNPROTECTED_START_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, UNPROTECTED_START_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
UNPROTECTED_START_ASM32 ENDP
UNPROTECTED_END_ASM32 PROC
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, UNPROTECTED_END_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
ret
UNPROTECTED_END_ASM32 ENDP
CHECK_PROTECTION_ASM32 PROC var_ptr, var_value
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, CHECK_PROTECTION_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
; set fake value in unprotected state
push eax
push ebx
mov eax, [var_ptr]
mov ebx, [var_value]
mov dword ptr [eax], ebx
pop ebx
pop eax
ret
CHECK_PROTECTION_ASM32 ENDP
CHECK_CODE_INTEGRITY_ASM32 PROC var_ptr, var_value
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, CHECK_CODE_INTEGRITY_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
; set fake value in unprotected state
push eax
push ebx
mov eax, [var_ptr]
mov ebx, [var_value]
mov dword ptr [eax], ebx
pop ebx
pop eax
ret
CHECK_CODE_INTEGRITY_ASM32 ENDP
CHECK_REGISTRATION_ASM32 PROC var_ptr, var_value
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, CHECK_REGISTRATION_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
; set fake value in unprotected state
push eax
push ebx
mov eax, [var_ptr]
mov ebx, [var_value]
mov dword ptr [eax], ebx
pop ebx
pop eax
ret
CHECK_REGISTRATION_ASM32 ENDP
CHECK_VIRTUAL_PC_ASM32 PROC var_ptr, var_value
push eax
push ebx
push ecx
mov eax, 'TMWL'
mov ebx, CHECK_VIRTUAL_PC_ID
mov ecx, 'TMWL'
add ebx, eax
add ecx, eax
pop ecx
pop ebx
pop eax
; set fake value in unprotected state
push eax
push ebx
mov eax, [var_ptr]
mov ebx, [var_value]
mov dword ptr [eax], ebx
pop ebx
pop eax
ret
CHECK_VIRTUAL_PC_ASM32 ENDP
ENDIF
include SecureEngineCustomVmMacros.inc
END
| 16.25847 | 78 | 0.51301 |
a81ebf94ca9612d96d441d24249f1141dcc5f5c8 | 3,133 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0_notsx.log_9_1110.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0_notsx.log_9_1110.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0_notsx.log_9_1110.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 %r13
push %r14
push %r9
push %rax
push %rcx
lea addresses_normal_ht+0x6019, %rax
nop
nop
nop
nop
cmp $31429, %r14
movb $0x61, (%rax)
and %r10, %r10
lea addresses_A_ht+0x17b61, %r13
nop
nop
nop
and $13523, %r11
mov $0x6162636465666768, %r9
movq %r9, %xmm7
movups %xmm7, (%r13)
nop
nop
xor %rax, %rax
lea addresses_A_ht+0x1635, %rcx
dec %r14
vmovups (%rcx), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %r11
nop
nop
nop
nop
cmp %r13, %r13
lea addresses_WC_ht+0x7439, %r11
clflush (%r11)
nop
nop
nop
cmp $21782, %r13
mov $0x6162636465666768, %r9
movq %r9, (%r11)
nop
nop
sub $3328, %rax
lea addresses_UC_ht+0x178e9, %r14
add $2228, %rcx
mov $0x6162636465666768, %rax
movq %rax, (%r14)
nop
nop
nop
nop
nop
add %rcx, %rcx
lea addresses_WC_ht+0x7239, %rax
nop
nop
nop
add %rcx, %rcx
mov (%rax), %r10w
nop
nop
and $65178, %rax
lea addresses_normal_ht+0x7339, %rcx
nop
nop
nop
nop
cmp $42367, %r10
mov $0x6162636465666768, %r13
movq %r13, %xmm1
vmovups %ymm1, (%rcx)
nop
xor $28903, %r14
lea addresses_WT_ht+0x18b63, %r14
nop
cmp $18873, %rcx
mov $0x6162636465666768, %r10
movq %r10, (%r14)
nop
nop
sub $54417, %r13
lea addresses_A_ht+0x1a619, %r10
nop
nop
nop
inc %rcx
movl $0x61626364, (%r10)
nop
nop
add $13461, %rcx
pop %rcx
pop %rax
pop %r9
pop %r14
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %rcx
push %rdi
push %rdx
// Faulty Load
lea addresses_US+0x12239, %rdi
nop
xor $38803, %r12
mov (%rdi), %cx
lea oracles, %rdi
and $0xff, %rcx
shlq $12, %rcx
mov (%rdi,%rcx,1), %rcx
pop %rdx
pop %rdi
pop %rcx
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 5}}
{'00': 9}
00 00 00 00 00 00 00 00 00
*/
| 21.026846 | 129 | 0.649856 |
ccb170ef4d052b24653191968e78c4dc22eaf123 | 358 | asm | Assembly | programs/oeis/130/A130494.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/130/A130494.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/130/A130494.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A130494: Row sums of triangle A130478.
; 1,4,11,37,163,907,6067,47107,415027,4084147,44363827,526994227,6793931827,94451224627,1408352613427,22418320792627,379413423256627,6802709918872627
mov $3,1
mov $2,$0
lpb $2,1
mov $0,2
mov $1,$2
add $1,$3
sub $0,3
add $0,$2
mov $3,2
lpb $0,1
add $3,$1
sub $0,1
lpe
sub $2,1
lpe
mov $1,$3
| 17.9 | 149 | 0.662011 |
d720f12c1753b1160ddcaa7786979d95e415cd73 | 483 | asm | Assembly | libsrc/target/sms/set_vdp_reg.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/target/sms/set_vdp_reg.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/target/sms/set_vdp_reg.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | SECTION code_clib
PUBLIC set_vdp_reg
PUBLIC _set_vdp_reg
;==============================================================
; void set_vdp_reg(int reg, int value)
;==============================================================
; Sets the value of a VDP register
;==============================================================
.set_vdp_reg
._set_vdp_reg
ld hl, 2
add hl, sp
ld a, (hl) ; Value
inc hl
inc hl
di
out ($bf),a
ld a, (hl) ; Register #
out ($bf),a
ei
ret
| 20.125 | 63 | 0.399586 |
79b7ce7471a79f0ef9b1076ae6c538f17eb7a322 | 2,708 | asm | Assembly | programs/oeis/017/A017463.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/017/A017463.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/017/A017463.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A017463: a(n) = (11*n + 6)^3.
; 216,4913,21952,59319,125000,226981,373248,571787,830584,1157625,1560896,2048383,2628072,3307949,4096000,5000211,6028568,7189057,8489664,9938375,11543176,13312053,15252992,17373979,19683000,22188041,24897088,27818127,30959144,34328125,37933056,41781923,45882712,50243409,54872000,59776471,64964808,70444997,76225024,82312875,88716536,95443993,102503232,109902239,117649000,125751501,134217728,143055667,152273304,161878625,171879616,182284263,193100552,204336469,216000000,228099131,240641848,253636137,267089984,281011375,295408296,310288733,325660672,341532099,357911000,374805361,392223168,410172407,428661064,447697125,467288576,487443403,508169592,529475129,551368000,573856191,596947688,620650477,644972544,669921875,695506456,721734273,748613312,776151559,804357000,833237621,862801408,893056347,924010424,955671625,988047936,1021147343,1054977832,1089547389,1124864000,1160935651,1197770328,1235376017,1273760704,1312932375,1352899016,1393668613,1435249152,1477648619,1520875000,1564936281,1609840448,1655595487,1702209384,1749690125,1798045696,1847284083,1897413272,1948441249,2000376000,2053225511,2106997768,2161700757,2217342464,2273930875,2331473976,2389979753,2449456192,2509911279,2571353000,2633789341,2697228288,2761677827,2827145944,2893640625,2961169856,3029741623,3099363912,3170044709,3241792000,3314613771,3388518008,3463512697,3539605824,3616805375,3695119336,3774555693,3855122432,3936827539,4019679000,4103684801,4188852928,4275191367,4362708104,4451411125,4541308416,4632407963,4724717752,4818245769,4913000000,5008988431,5106219048,5204699837,5304438784,5405443875,5507723096,5611284433,5716135872,5822285399,5929741000,6038510661,6148602368,6260024107,6372783864,6486889625,6602349376,6719171103,6837362792,6956932429,7077888000,7200237491,7323988888,7449150177,7575729344,7703734375,7833173256,7964053973,8096384512,8230172859,8365427000,8502154921,8640364608,8780064047,8921261224,9063964125,9208180736,9353919043,9501187032,9649992689,9800344000,9952248951,10105715528,10260751717,10417365504,10575564875,10735357816,10896752313,11059756352,11224377919,11390625000,11558505581,11728027648,11899199187,12072028184,12246522625,12422690496,12600539783,12780078472,12961314549,13144256000,13328910811,13515286968,13703392457,13893235264,14084823375,14278164776,14473267453,14670139392,14868788579,15069223000,15271450641,15475479488,15681317527,15888972744,16098453125,16309766656,16522921323,16737925112,16954786009,17173512000,17394111071,17616591208,17840960397,18067226624,18295397875,18525482136,18757487393,18991421632,19227292839,19465109000,19704878101,19946608128,20190307067,20435982904,20683643625
mul $0,11
add $0,6
pow $0,3
mov $1,$0
| 338.5 | 2,636 | 0.893648 |
847fa8c52642a810ccf71bcb6d7980e0ceb0f7c1 | 6,673 | asm | Assembly | Projects/extxterm/extxterm.asm | agguro/linux-nasm | 3e72083c3db6d7118eb2aa430b73e0d20e88456b | [
"Unlicense"
] | 6 | 2020-07-19T18:34:43.000Z | 2022-03-26T10:21:09.000Z | Projects/extxterm/extxterm.asm | NrdyBhu1/linux-nasm | 3e72083c3db6d7118eb2aa430b73e0d20e88456b | [
"Unlicense"
] | null | null | null | Projects/extxterm/extxterm.asm | NrdyBhu1/linux-nasm | 3e72083c3db6d7118eb2aa430b73e0d20e88456b | [
"Unlicense"
] | 3 | 2020-07-19T18:35:10.000Z | 2021-07-25T17:34:50.000Z | ;name: extxterm.asm
;
;description: redirect stderr to a separate terminal, xterm in this example.
;
;inspirated by Evan Terans edb debugger
bits 64
%include "../extxterm/extxterm.inc"
global main
section .bss
;uninitialized read-write data
stderrchildpid: resq 1
stdoutchildpid: resq 1
fdfifo: resq 1
buffer: resb 1024
.len: equ $-buffer
nbytesread: resq 1
fdterm: resq 1
oldstdout: resq 1
oldstderr: resq 1
section .data
;initialized read-write data
section .rodata
;read-only data
;error messages
mknoderror: db "mknod error",10
.len: equ $-mknoderror
forkerror: db "fork error",10
.len: equ $-forkerror
execveerror: db "execve error(not expected)",10
.len: equ $-execveerror
wait4error: db "wait4 error",10
.len: equ $-wait4error
;fifoname
fifobuffer: db FIFOBUFFER,0
;xterm
command: db COMMAND,0
;arguments to pass to xterm
arg:
.1: db "/usr/bin/xterm",0
.2: db "-fa",0
;to chose another font:
;http://www.futurile.net/2016/06/14/xterm-setup-and-truetype-font-configuration/
.3: db "DejaVu Sans Mono",0
.4: db "-fs",0
.5: db "11",0
.6: db "-hold",0
.7: db "-title",0
.8: db DISPLAYNAME,0
.9: db "-e",0
.10: db "sh",0
.11: db "-c",0
.12: db SCRIPT,0
argp: dq arg.1,arg.2,arg.3,arg.4,arg.5,arg.6,arg.7,arg.8,arg.9,arg.10,arg.11,arg.12
dq 0
;environment parameters to pass to xterm
env:
.1: db "DISPLAY=:0",0
.2: db "PATH=/bin:/usr/bin",0
envp: dq env.1,env.2
dq 0
stderrmsg: db "stderr: message received",0x0A
.len: equ $-stderrmsg
stdoutmsg: db "stdout: message received",0x0A
.len: equ $-stdoutmsg
section .text
main:
;create a FIFO file to communicate with the terminal to get the tty of it.
;once we got it, we can delete it and communication continues over the
;tty device.
syscall mknod , fifobuffer , S_IFIFO | S_IRUSR | S_IWUSR , 0
and rax,rax ;if mknod doesn't return zero there is a problem
jz .startfork ;all ok here
cmp rax,EEXIST ;if fifo already exists on disk so we can continue
jne .mknoderror ;otherwise there is something else wrong
.startfork:
;fork to get a child process, this will terminate when the parent terminates.
syscall fork
mov [stderrchildpid],rax ;save pid from child
and rax,rax
js .forkerror
jnz .parent
.stderrchild:
;we are in the child process. The child starts xterm.
syscall execve,command,argp,envp
and rax,rax
js .execveerror
jmp .exit ;if success we will not get it to here
.parent:
;we are in the parent process
;open a connection to the fifo to read from it
syscall open,fifobuffer, 666o ,O_RDONLY
and rax,rax
js .openerror ;if negative we got an error
mov [fdfifo],rax ;save filedescriptor to fifo
;read the message the shell script in xterm has send to us. This should contain the
;pseude terminal device of xterm
;wait until child is done
syscall read,[fdfifo],buffer,buffer.len
and rax,rax
js .readerror ;if return value is negative we have an error
jz .commerror ;if return value is zero we have a communication error
mov [nbytesread],rax ;save length of returned string
;close the fifo
syscall close,[fdfifo]
and rax,rax ;if negative there was an error
js .closeerror
;delete the FIFO file, we don't need it any more(?)
syscall unlink,fifobuffer ;if return value negative then error
js .unlinkerror
;the problem we got is that this string contains an end of line character in it
;we have to replace this with a zero
mov rax,buffer ;get address of buffer
add rax,[nbytesread] ;go to last character+1
dec rax ;go to location of 0x0A
mov byte[rax],0 ;overwrite with 0x00
;the buffer contains the path to xterm
;at this point we can check, when debugging that we can send messages to the terminal with
;for example: echo "message" > /dev/pts/6. Just replace /dev/pts/6 with the string in the buffer.
;open a connection to the new path, we just want to write
syscall open, buffer, 0666o ,O_WRONLY ;we just want to write
js .openerror ;if negative we got an error
mov [fdterm],rax ;save filedescriptor to terminal
syscall close,stderr
syscall dup,[fdterm]
syscall close,[fdterm]
syscall write,stderr,stderrmsg,stderrmsg.len ;write a message to stderr, should be visible in xterm
syscall write,stdout,stdoutmsg,stdoutmsg.len ;write a message to stdout, should be visible in normal terminal
;wait for the kid to end
syscall wait4,0,0,0,0
and rax,rax
js .waiterror
.exit:
;exit program
xor rax,rax ;return error code
ret ;exit is handled by compiler
;this section can be used to deal with errors
.unlinkerror:
;
;jmp .errexit
.writeerror:
;
;jmp .errexit
.commerror:
;
;jmp .errexit
.closeerror:
;
;jmp .errexit
.readerror:
;
;jmp .errexit
.openerror:
;
;jmp .errexit
.waiterror:
;
;jmp .errexit
.execveerror:
;
;jmp .errexit
.forkerror:
;
;jmp .errexit
.mknoderror:
;
;jmp .errexit
.errexit:
mov rax,-1
ret
| 36.266304 | 120 | 0.524652 |
62d8e13bfbb3fc2b8313052c9dce04f2ce8bbf5f | 815 | asm | Assembly | data/types/names.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | data/types/names.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | data/types/names.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | TypeNames:
; entries correspond to types (see constants/type_constants.asm)
dw Normal
dw Fighting
dw Flying
dw Poison
dw Ground
dw Rock
dw Bird
dw Bug
dw Ghost
dw Steel
dw Normal
dw Normal
dw Normal
dw Normal
dw Normal
dw Normal
dw Normal
dw Normal
dw Normal
dw CurseType
dw Fire
dw Water
dw Grass
dw Electric
dw Psychic
dw Ice
dw Dragon
dw Dark
Normal: db "NORMAL@"
Fighting: db "FIGHTING@"
Flying: db "FLYING@"
Poison: db "POISON@"
CurseType: db "???@"
Fire: db "FIRE@"
Water: db "WATER@"
Grass: db "GRASS@"
Electric: db "ELECTRIC@"
Psychic: db "PSYCHIC@"
Ice: db "ICE@"
Ground: db "GROUND@"
Rock: db "ROCK@"
Bird: db "BIRD@"
Bug: db "BUG@"
Ghost: db "GHOST@"
Steel: db "STEEL@"
Dragon: db "DRAGON@"
Dark: db "DARK@"
| 15.980392 | 64 | 0.629448 |
b1a4e94ac03c5fe65d06794b2c39f1cecd7b417a | 666 | asm | Assembly | oeis/077/A077972.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/077/A077972.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/077/A077972.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A077972: Expansion of 1/(1+x-x^2+2*x^3).
; Submitted by Jamie Morken(s1)
; 1,-1,2,-5,9,-18,37,-73,146,-293,585,-1170,2341,-4681,9362,-18725,37449,-74898,149797,-299593,599186,-1198373,2396745,-4793490,9586981,-19173961,38347922,-76695845,153391689,-306783378,613566757,-1227133513,2454267026,-4908534053,9817068105,-19634136210,39268272421,-78536544841,157073089682,-314146179365,628292358729,-1256584717458,2513169434917,-5026338869833,10052677739666,-20105355479333,40210710958665,-80421421917330,160842843834661,-321685687669321,643371375338642,-1286742750677285
mov $2,1
mov $3,2
lpb $0
sub $0,1
mod $2,2
mul $3,-1
add $2,$3
add $3,$2
lpe
mov $0,$2
| 44.4 | 492 | 0.765766 |
4802e3adfce07ebd29e527725d723947e6411cd8 | 854 | asm | Assembly | Library/Net/alert.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Net/alert.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Net/alert.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: Novell NetWare Library
FILE: alert.asm (code to monitor for alert messages from the
system console.)
REVISION HISTORY:
Name Date Description
---- ---- -----------
Eric 12/91 Initial version
DESCRIPTION:
This library allows PC/GEOS applications to access the Novell NetWare
Applications Programmers Interface (API). This permits an application
to send and receive packets, set up connections between nodes on the
network, access Novell's "Bindery", which contains information about
network users, etc.
RCS STAMP:
$Id: alert.asm,v 1.1 97/04/05 01:25:09 newdeal Exp $
------------------------------------------------------------------------------@
| 30.5 | 80 | 0.586651 |
1a4568a0bd5bb595a3289622b47ac6e778221ccd | 6,235 | asm | Assembly | base/crts/crtw32/string/i386/strspn.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/crts/crtw32/string/i386/strspn.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/crts/crtw32/string/i386/strspn.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | page ,132
title strspn - search for init substring of chars from control str
;***
;strspn.asm - find length of initial substring of chars from a control string
;
; Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
;
;Purpose:
; defines strspn() - finds the length of the initial substring of
; a string consisting entirely of characters from a control string.
;
; defines strcspn()- finds the length of the initial substring of
; a string consisting entirely of characters not in a control string.
;
; defines strpbrk()- finds the index of the first character in a string
; that is not in a control string
;
;Revision History:
; 10-28-83 RN initial version
; 06-30-87 SKS Faster version -- also reentrant
; 05-18-88 SJM Add model-independent (large model) ifdef
; 08-02-88 SJM Created 386-specific version.
; 08-23-88 JCR 386 cleanup
; 10-10-88 JCR Misc bug fixes
; 10-26-88 JCR General cleanup for 386-only code
; 03-26-90 GJF Changed to _stdcall. Also, fixed the copyright.
; 05-10-91 GJF Back to _cdecl, sigh...
; 09-25-91 JCR Build "strspn" if no other directives are given
; 01-17-92 GJF Fixed build of "strspn".
; 01-17-95 GJF Tuned.
; 06-12-01 PML inc->add 1, dec->sub 1 for Pentium 4 perf (vs7#267015)
;
;*******************************************************************************
.xlist
include cruntime.inc
.list
page
;***
;int strspn(string, control) - find init substring of control chars
;
;Purpose:
; Finds the index of the first character in string that does belong
; to the set of characters specified by control. This is
; equivalent to the length of the initial substring of string that
; consists entirely of characters from control. The '\0' character
; that terminates control is not considered in the matching process.
;
; Algorithm:
; int
; strspn (string, control)
; unsigned char *string, *control;
; {
; unsigned char map[32];
; int count;
;
; for (count = 0; count < 32; count++)
; map[count] = 0;
; while (*control)
; {
; map[*control >> 3] |= (1 << (*control & 7));
; control++;
; }
; if (*string)
; {
; while (map[*string >> 3] & (1 << (*string & 7)))
; {
; count++;
; string++;
; }
; return(count);
; }
; return(0);
; }
;
;Entry:
; char *string - string to search
; char *control - string containing characters not to search for
;
;Exit:
; returns index of first char in string not in control
;
;Uses:
;
;Exceptions:
;
;*******************************************************************************
;***
;int strcspn(string, control) - search for init substring w/o control chars
;
;Purpose:
; returns the index of the first character in string that belongs
; to the set of characters specified by control. This is equivalent
; to the length of the length of the initial substring of string
; composed entirely of characters not in control. Null chars not
; considered.
;
; Algorithm:
; int
; strcspn (string, control)
; unsigned char *string, *control;
; {
; unsigned char map[32];
; int count;
;
; for (count = 0; count < 32; count++)
; map[count] = 0;
; while (*control)
; {
; map[*control >> 3] |= (1 << (*control & 7));
; control++;
; }
; map[0] |= 1;
; while (!(map[*string >> 3] & (1 << (*string & 7))))
; {
; count++;
; string++;
; }
; return(count);
; }
;
;Entry:
; char *string - string to search
; char *control - set of characters not allowed in init substring
;
;Exit:
; returns the index of the first char in string
; that is in the set of characters specified by control.
;
;Uses:
;
;Exceptions:
;
;*******************************************************************************
;***
;char *strpbrk(string, control) - scans string for a character from control
;
;Purpose:
; Finds the first occurence in string of any character from
; the control string.
;
; Algorithm:
; char *
; strpbrk (string, control)
; unsigned char *string, *control;
; {
; unsigned char map[32];
; int count;
;
; for (count = 0; count < 32; count++)
; map[count] = 0;
; while (*control)
; {
; map[*control >> 3] |= (1 << (*control & 7));
; control++;
; }
; while (*string)
; {
; if (map[*string >> 3] & (1 << (*string & 7)))
; return(string);
; string++;
; }
; return(NULL);
; }
;
;Entry:
; char *string - string to search in
; char *control - string containing characters to search for
;
;Exit:
; returns a pointer to the first character from control found
; in string.
; returns NULL if string and control have no characters in common.
;
;Uses:
;
;Exceptions:
;
;*******************************************************************************
ifdef SSTRCSPN
_STRSPN_ equ <strcspn>
elseifdef SSTRPBRK
_STRSPN_ equ <strpbrk>
else
; Default is to build strspn()
SSTRSPN equ 1
_STRSPN_ equ <strspn>
endif
% public _STRSPN_
CODESEG
_STRSPN_ proc \
uses esi, \
string:ptr byte, \
control:ptr byte
; create and zero out char bit map
xor eax,eax
push eax ; 32
push eax
push eax
push eax ; 128
push eax
push eax
push eax
push eax ; 256
map equ [esp]
; Set control char bits in map
mov edx,control ; si = control string
align @WordSize
lab listnext ; init char bit map
mov al,[edx]
or al,al
jz short listdone
add edx,1
bts map,eax
jmp short listnext
lab listdone
; Loop through comparing source string with control bits
mov esi,string ; si = string
_ifnd SSTRPBRK <or ecx,-1> ; set ecx to -1
align @WordSize
lab dstnext
_ifnd SSTRPBRK <add ecx,1>
mov al,[esi]
or al,al
jz short dstdone
add esi,1
bt map, eax
ifdef SSTRSPN
jc short dstnext ; strspn: found char, continue
elseifdef SSTRCSPN
jnc short dstnext ; strcspn: did not find char, continue
elseifdef SSTRPBRK
jnc short dstnext ; strpbrk: did not find char, continue
lea eax,[esi - 1] ; found char, return address of it
endif
; Return code
lab dstdone
_ifnd SSTRPBRK <mov eax,ecx> ; strspn/strcspn: return index
add esp,32
ret ; _cdecl return
_STRSPN_ endp
end
| 22.428058 | 81 | 0.607057 |
cecd0f1a88a46a91b64654c5e225b60f0db4521d | 287 | asm | Assembly | oeis/021/A021371.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/021/A021371.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/021/A021371.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A021371: Decimal expansion of 1/367.
; 0,0,2,7,2,4,7,9,5,6,4,0,3,2,6,9,7,5,4,7,6,8,3,9,2,3,7,0,5,7,2,2,0,7,0,8,4,4,6,8,6,6,4,8,5,0,1,3,6,2,3,9,7,8,2,0,1,6,3,4,8,7,7,3,8,4,1,9,6,1,8,5,2,8,6,1,0,3,5,4,2,2,3,4,3,3,2,4,2,5,0,6,8,1,1,9,8,9,1
seq $0,173833 ; 10^n - 3.
div $0,367
mod $0,10
| 41 | 199 | 0.54007 |
192943e0b3e2888e7407386d50278ddab5d278e8 | 848 | asm | Assembly | pin-3.22-98547-g7a303a835-gcc-linux/source/tools/Regvalue/fptag_conversion_app_asm.asm | ArthasZhang007/15418FinalProject | a71f698ea48ebbc446111734c198f16a55633669 | [
"MIT"
] | null | null | null | pin-3.22-98547-g7a303a835-gcc-linux/source/tools/Regvalue/fptag_conversion_app_asm.asm | ArthasZhang007/15418FinalProject | a71f698ea48ebbc446111734c198f16a55633669 | [
"MIT"
] | null | null | null | pin-3.22-98547-g7a303a835-gcc-linux/source/tools/Regvalue/fptag_conversion_app_asm.asm | ArthasZhang007/15418FinalProject | a71f698ea48ebbc446111734c198f16a55633669 | [
"MIT"
] | null | null | null | ;
; Copyright (C) 2020-2020 Intel Corporation.
; SPDX-License-Identifier: MIT
;
include asm_macros.inc
PROLOGUE
PUBLIC FldzFunc
PUBLIC Fld1Func
PUBLIC FptagInitFunc
PUBLIC FldInfFunc
PUBLIC DoFnstenv
PUBLIC FstpFunc
.data
zero DD 0
.code
;initialize the FPU
FptagInitFunc PROC
finit
ret
FptagInitFunc ENDP
;push 1 to the FPU
Fld1Func PROC
fld1
ret
Fld1Func ENDP
;push 0 to the FPU
FldzFunc PROC
fldz
ret
FldzFunc ENDP
;push infinity to the FPU
FldInfFunc PROC
fldpi
fdiv zero
ret
FldInfFunc ENDP
;save fpu state in PARAM1 address
DoFnstenv PROC
BEGIN_STACK_FRAME
mov GAX_REG,PARAM1
fnstenv [GAX_REG]
END_STACK_FRAME
ret
DoFnstenv ENDP
;pop st(0) from FPU stack
FstpFunc PROC
fstp st(0)
ret
FstpFunc ENDP
end
| 13.460317 | 44 | 0.679245 |
e9b5db69ae9a8a399f1eed690f632cb019f4c106 | 1,038 | asm | Assembly | programs/oeis/047/A047293.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/047/A047293.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/047/A047293.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A047293: Numbers that are congruent to {0, 2, 4, 6} mod 7.
; 0,2,4,6,7,9,11,13,14,16,18,20,21,23,25,27,28,30,32,34,35,37,39,41,42,44,46,48,49,51,53,55,56,58,60,62,63,65,67,69,70,72,74,76,77,79,81,83,84,86,88,90,91,93,95,97,98,100,102,104,105,107,109,111,112,114,116,118,119,121,123,125,126,128,130,132,133,135,137,139,140,142,144,146,147,149,151,153,154,156,158,160,161,163,165,167,168,170,172,174,175,177,179,181,182,184,186,188,189,191,193,195,196,198,200,202,203,205,207,209,210,212,214,216,217,219,221,223,224,226,228,230,231,233,235,237,238,240,242,244,245,247,249,251,252,254,256,258,259,261,263,265,266,268,270,272,273,275,277,279,280,282,284,286,287,289,291,293,294,296,298,300,301,303,305,307,308,310,312,314,315,317,319,321,322,324,326,328,329,331,333,335,336,338,340,342,343,345,347,349,350,352,354,356,357,359,361,363,364,366,368,370,371,373,375,377,378,380,382,384,385,387,389,391,392,394,396,398,399,401,403,405,406,408,410,412,413,415,417,419,420,422,424,426,427,429,431,433,434,436
mov $1,$0
mul $1,7
add $1,3
div $1,4
| 129.75 | 938 | 0.719653 |
9d908c482d47521291522c5c4cad94b11bb06c1e | 1,050 | asm | Assembly | programs/oeis/168/A168336.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/168/A168336.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/168/A168336.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A168336: a(n) = 5 + 7*floor((n-1)/2).
; 5,5,12,12,19,19,26,26,33,33,40,40,47,47,54,54,61,61,68,68,75,75,82,82,89,89,96,96,103,103,110,110,117,117,124,124,131,131,138,138,145,145,152,152,159,159,166,166,173,173,180,180,187,187,194,194,201,201,208,208,215,215,222,222,229,229,236,236,243,243,250,250,257,257,264,264,271,271,278,278,285,285,292,292,299,299,306,306,313,313,320,320,327,327,334,334,341,341,348,348,355,355,362,362,369,369,376,376,383,383,390,390,397,397,404,404,411,411,418,418,425,425,432,432,439,439,446,446,453,453,460,460,467,467,474,474,481,481,488,488,495,495,502,502,509,509,516,516,523,523,530,530,537,537,544,544,551,551,558,558,565,565,572,572,579,579,586,586,593,593,600,600,607,607,614,614,621,621,628,628,635,635,642,642,649,649,656,656,663,663,670,670,677,677,684,684,691,691,698,698,705,705,712,712,719,719,726,726,733,733,740,740,747,747,754,754,761,761,768,768,775,775,782,782,789,789,796,796,803,803,810,810,817,817,824,824,831,831,838,838,845,845,852,852,859,859,866,866,873,873
mov $1,$0
div $1,2
mul $1,7
add $1,5
| 131.25 | 971 | 0.722857 |
8f7dc529fb5508d1c58ad3d91faec32460d4d00d | 60 | asm | Assembly | data/wild/kanto_water.asm | AtmaBuster/pokeplat-gen2 | fa83b2e75575949b8f72cb2c48f7a1042e97f70f | [
"blessing"
] | 6 | 2021-06-19T06:41:19.000Z | 2022-02-15T17:12:33.000Z | data/wild/kanto_water.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | null | null | null | data/wild/kanto_water.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | 2 | 2021-08-11T19:47:07.000Z | 2022-01-01T07:07:56.000Z | ; Kanto Pokémon in water
KantoWaterWildMons:
db -1 ; end
| 10 | 24 | 0.716667 |
6fabf6a147dcb07f81ba28f8db98a98297843a64 | 287 | asm | Assembly | programs/oeis/300/A300403.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/300/A300403.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/300/A300403.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A300403: Smallest integer i such that SSCG(i) >= n.
; 0,0,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
mov $1,2
mov $2,6
trn $2,$0
add $2,4
div $2,3
div $1,$2
| 28.7 | 175 | 0.536585 |
e0a68ad99a097dc45f8b34e892036d9527b45f99 | 2,796 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i3-7100_9_0xca_notsx.log_279_1616.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_0xca_notsx.log_279_1616.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_0xca_notsx.log_279_1616.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 %r12
push %r13
push %r14
push %r9
push %rax
push %rcx
push %rdi
// Store
lea addresses_RW+0x1a9d5, %rax
nop
nop
cmp %r9, %r9
mov $0x5152535455565758, %r13
movq %r13, %xmm1
vmovntdq %ymm1, (%rax)
nop
nop
nop
inc %r9
// Store
lea addresses_PSE+0x42d5, %r9
nop
nop
nop
nop
nop
inc %r12
mov $0x5152535455565758, %r14
movq %r14, %xmm4
movups %xmm4, (%r9)
nop
nop
nop
nop
dec %rcx
// Store
lea addresses_UC+0xbb8d, %rdi
nop
nop
nop
dec %r14
movw $0x5152, (%rdi)
add %rdi, %rdi
// Store
lea addresses_D+0x3d5, %rax
and $39806, %r9
movl $0x51525354, (%rax)
nop
nop
nop
sub %rdi, %rdi
// Store
mov $0x63593c00000002d5, %rdi
xor %rcx, %rcx
mov $0x5152535455565758, %r9
movq %r9, (%rdi)
nop
nop
nop
add $56569, %r9
// Faulty Load
lea addresses_US+0x46d5, %rdi
nop
nop
xor %rax, %rax
mov (%rdi), %r9
lea oracles, %r13
and $0xff, %r9
shlq $12, %r9
mov (%r13,%r9,1), %r9
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': True, 'type': 'addresses_RW', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_PSE', 'size': 16, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_UC', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_D', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_NC', 'size': 8, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'00': 279}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 26.130841 | 836 | 0.646638 |
35a2268d198e25eb722328ab5ca2604585648035 | 100,745 | asm | Assembly | test/data/ASM-Z-80/shftspr.asm | jfitz/code-stat | dd2a13177f3ef03ab42123ef3cfcbbd062a2ae26 | [
"MIT"
] | null | null | null | test/data/ASM-Z-80/shftspr.asm | jfitz/code-stat | dd2a13177f3ef03ab42123ef3cfcbbd062a2ae26 | [
"MIT"
] | null | null | null | test/data/ASM-Z-80/shftspr.asm | jfitz/code-stat | dd2a13177f3ef03ab42123ef3cfcbbd062a2ae26 | [
"MIT"
] | null | null | null | ;; Example to draw a pre-shifted masked sprite to the screen
;;
;; The sprite pixels are stored in a form that can be poked
;; direct to screen and seen.
;;
;; This example uses mode 1 sprites where pen 0 is transparent
;; leaving 3 other pens for sprites.
;;
;; A mask table/array is generated for each byte combination (mask table
;; is therefore 256 bytes long).
;;
;; Using the sprite pixel data, the appropiate mask is found in the
;; table/array.
;;
;; The sprite is then combine with the screen pixels to the display.
;;
;; However, drawing the sprite to the display also changes it.
;; So in this example the rectangle that the sprite will cover
;; is stored into a buffer so it can be copied back to the screen when
;; the sprite is moved.
;;
;; Normally, moving a sprite byte-by-byte on a mode 1 screen will move
;; the sprite at a rate of 4 pixels a time.
;;
;; However, we use pre-shifted sprites to move 1 pixel at a time.
;; We have one image per pixel in a byte. So we have 4 images, each moved by 1
;; pixel more than the other.
;;
;; As we move we decide which to draw, and in this way the sprite appears to move
;; at 1 pixel rate.
;;
;; In addition this code also shows how to speed up KM_READ_CHAR by changing the
;; keyboard repeat rate, and also only redrawing the sprite when necessary. Both are
;; suggestions from Markus.
;;
;; This code is dedicated to Markus because he likes Smileys with Tongues.
;;
;; This source released under the GNU Library License v2 or later.
;; Code by Kev Thacker 2010
;;
;; NOTE: Sprite will flicker when you move.
;; sprite width in bytes
sprite_width equ 64/4
sprite_height equ 64
;; firmware functions we use
scr_next_line equ &bc26
scr_set_mode equ &bc0e
scr_set_border equ &bc38
scr_set_ink equ &bc32
mc_wait_flyback equ &bd19
km_read_char equ &bb09
km_set_delay equ &bb3f
;; table is aligned on a 256-byte boundary
mask_table equ &200
org &1000
nolist
start:
;; equivalent to SPEED KEY 1,1
;; tip from Markus to speed up key repeat
;; when using km_read_char
ld h,1
ld l,1
call km_set_delay
;; set 4 colour mode 1
ld a,1
call scr_set_mode
;; set border to black
ld bc,0
call scr_set_border
;; set pens
ld hl,pens
ld b,4 ;; 4 pens for mode 1
xor a ;; initial pen index
set_pens
push bc
push af
ld c,(hl) ;; B,C = inks for pen. If they are the same then no
;; flashing
ld b,c
inc hl
push hl
call scr_set_ink
pop hl
pop af
pop bc
inc a ;; increment pen index
djnz set_pens
ld hl,scr_pixels
ld de,&c000
ld bc,&4000
ldir
call make_scr_table
call init_mask_table
;; define initial sprite coords
ld hl,50
ld (sprite_x),hl
ld a,100
ld (sprite_y),a
call calc_spr_scr_addr
call draw_sprite
;; the main loop which draws and updates sprite
main_loop:
call mc_wait_flyback
;; check keys and update sprite position
call check_keys
;; redraw sprite?
ld a,(spr_redraw)
or a
jr z,main_loop2
;; reset for next time
xor a
ld (spr_redraw),a
;; restore background (where sprite used to be)
ld hl,(spr_scr_addr)
ld de,sprite_background
ld b,sprite_height
ld c,sprite_width
;; low byte of x coordinate
ld a,(spr_pixel_offs)
call sprite_background_restore
;; recalc screen address for new position
call calc_spr_scr_addr
call draw_sprite
;; jumps to here if sprite has not moved and no update is required
main_loop2:
jp main_loop
draw_sprite:
;; store background pixels where sprite is located
ld hl,(spr_scr_addr)
ld de,sprite_background
ld b,sprite_height
ld c,sprite_width
;; low byte of x coordinate
ld a,(spr_pixel_offs)
call sprite_background_store
;; draw sprite (writes over background pixels)
ld de,sprite_pixel_ptrs
ld hl,(spr_scr_addr)
ld b,sprite_height
ld c,sprite_width
ld a,(spr_pixel_offs)
call sprite_draw
ret
;; This function will generate a lookup table of pixel masks.
;; This table can be used to plot masked sprites onto a mode 1 display.
;;
;;
;; call init_mask_table to initialise.
;;
;;
;; NOTES:
;; - This code is for mode 1.
;; - The pen which will be plotted transparent is 0.
;; - Relocate mask_table to an address which is on a 256 byte boundary. (i.e.
;; it's low byte is 0). This will allow you to access it much quicker.
.init_mask_table
ld hl,mask_table ;; base address of the mask table
ld b,0 ;; counter
ld c,0 ;; initial pixel value
.mmt1
ld d,0 ;; initialise initial mask
ld a,c
and &88
jr z,mmt2
ld a,d
or &88
ld d,a
.mmt2
ld a,c
and &44
jr z,mmt3
ld a,d
or &44
ld d,a
.mmt3
ld a,c
and &22
jr z,mmt4
ld a,d
or &22
ld d,a
.mmt4
ld a,c
and &11
jr z,mmt5
ld a,d
or &11
ld d,a
.mmt5
ld a,d
cpl
ld (hl),a ;; store final mask in table
inc hl ;; increment position in table
inc c ;; increment pixel value
djnz mmt1 ;; loop
ret
;; check if a key has been pressed and perform action if it has
check_keys:
call km_read_char
ret nc
;; A = ascii char of key pressed
;; we check for both upper and lower case chars
cp 'q'
jp z,sprite_up
cp 'Q'
jp z,sprite_up
cp 'a'
jp z,sprite_down
cp 'A'
jp z,sprite_down
cp 'o'
jp z,sprite_left
cp 'O'
jp z,sprite_left
cp 'p'
jp z,sprite_right
cp 'P'
jp z,sprite_right
ret
;; move sprite one byte to left
;; 2 pixels in mode 0
sprite_left:
ld hl,(sprite_x)
ld a,h
or l
ret z
dec hl
ld (sprite_x),hl
ld a,1
ld (spr_redraw),a
ret
;; mode sprite one byte to right
;; 2 pixels in mode 0
sprite_width_pixels equ sprite_width*4
right_side equ 320-sprite_width_pixels
sprite_right:
ld hl,(sprite_x)
ld bc,right_side
or a
sbc hl,bc
ret p
add hl,bc
inc hl
ld (sprite_x),hl
ld a,1
ld (spr_redraw),a
ret
;; move sprite up one scan line
sprite_up:
ld a,(sprite_y)
or a
ret z
dec a
ld (sprite_y),a
ld a,1
ld (spr_redraw),a
ret
bottom_side equ 199-sprite_height
;; move sprite down one scan line
sprite_down:
ld a,(sprite_y)
cp bottom_side
ret z
inc a
ld (sprite_y),a
ld a,1
ld (spr_redraw),a
ret
;; Y line coordinate of sprite
sprite_y:
defb 0
;; x pixel coordinate of sprite
sprite_x:
defw 0
;; screen address of sprite
spr_scr_addr:
defw 0
spr_pixel_offs:
defb 0
;; this will be 0 for no redraw
;; 1 otherwise
;;
;; this is one way to reduce flicker by only
;; drawing sprite if it has moved
spr_redraw:
defb 0
;; From our x,y coordinates generate
;; a screen address for top-left of sprite to be drawn at.
;; IN:
;; H = x byte coord
;; L = y line
;; OUT:
;; HL = screen address
get_scr_addr:
push bc
push de
ld c,h
ld h,0
add hl,hl
ld de,scr_addr_table
add hl,de
ld a,(hl)
inc hl
ld h,(hl)
ld l,a
ld b,0
add hl,bc
pop de
pop bc
ret
;; generate table of screen addresses
;; one address per scanline. The address
;; is for the first byte of each line.
make_scr_table:
ld ix,scr_addr_table ;; address to store table
ld hl,&c000 ;; start address of first scanline
ld b,200 ;; number of scanlines on screen
mst1:
ld (ix+0),l
ld (ix+1),h
inc ix
inc ix
push bc
call scr_next_line
pop bc
djnz mst1
ret
calc_spr_scr_addr:
;; X screen coord in range 0..320
;; convert to byte coordinates by dividing X by 4
;; (4 = number of pixels per byte in mode 1)
ld hl,(sprite_x)
srl h ;; HL = HL / 2
rr l
srl h ;; HL = HL / 2
rr l
;; result = HL = HL /4
ld h,l
;; now fetch y line coordinate
ld a,(sprite_y)
ld l,a
;; calculate screen address
call get_scr_addr
;; store it
ld (spr_scr_addr),hl
ld a,(sprite_x+0)
;; find pixel offset within byte (0..3)
and &3
ld (spr_pixel_offs),a
ret
;; HL = screen address
;; DE = pointer to array of sprite data
;; A = pixel offset in sprite
;; B = height
;; C = width
sprite_draw:
or a
jr z,sprite_draw2
inc c ;; when sprite is shifted, the width is one byte larger
sprite_draw2:
ex de,hl
add a,a ;; A = A * 2
add a,l ;; add low byte of array
ld l,a
ld a,h
adc a,0
ld h,a
;; HL = address in array
ld a,(hl)
inc hl
ld h,(hl)
ld l,a ;; read address from array = address of sprite pixel data
ex de,hl
push bc
pop ix ;; low byte of IX = C
;; high byte of IX = B
;; B = upper 8-bits (bits 15..8) of mask table memory address
ld b,mask_table/256
sprite_draw_height:
push ix
push hl
sprite_draw_width:
ld a,(de) ;; get byte of sprite pixel data
ld c,a ;; C = byte of sprite pixel data/look-up table value
;; BC = address (in look-up table) of mask corresponding to this sprite pixel data
ld a,(bc) ;; lookup mask from table
and (hl) ;; mask pixels on screen (remove pixels which will be replaced)
or c ;; combine with sprite pixel data
ld (hl),a ;; write result to screen
inc de
inc hl
defb &dd ;; DEC LIX
dec l
jr nz,sprite_draw_width
pop hl
call scr_next_line
pop ix
defb &dd ;; DEC HIX
dec h
jr nz,sprite_draw_height
ret
;; HL = screen address of sprite
;; DE = address to store screen data
;; B = height
;; C = width
;; A = pixel offset into byte
;; store a rectangle from the screen into a buffer
sprite_background_store:
or a
jr z,sprite_back_height
inc c ;; when sprite is shifted, the width is one byte larger
sprite_back_height:
push bc
push hl
sprite_back_width:
ld a,(hl) ;; read from screen
ld (de),a ;; store to buffer
inc hl
inc de
dec c
jr nz,sprite_back_width
pop hl
call scr_next_line
pop bc
djnz sprite_back_height
ret
;; HL = screen address of sprite
;; H = x byte coord
;; L = y line
;; DE = address to store screen data
;; B = height
;; C = width
;; A = pixel offset into byte
;; restore a rectangle to the screen
sprite_background_restore:
or a
jr z,sprite_reback_height
inc c ;; when sprite is shifted, the width is one byte larger
sprite_reback_height:
push bc
push hl
sprite_reback_width:
ld a,(de) ;; read from buffer
ld (hl),a ;; write to screen
inc hl
inc de
dec c
jr nz,sprite_reback_width
pop hl
call scr_next_line
pop bc
djnz sprite_reback_height
ret
sprite_preshifted_width equ sprite_width+1
buffer_size equ sprite_height*sprite_preshifted_width
;; a buffer to store screen behind sprite
sprite_background:
defs buffer_size
;; table/array for screen addresses for each scan line
scr_addr_table:
defs 200*2
;; the inks for the pens
pens:
defb 1
defb 20
defb 2
defb 14
sprite_pixel_ptrs:
defw smiley1 ;; sprite at pixel pos 0 in byte
defw smiley2 ;; sprite at pixel pos 1 in byte
defw smiley3 ;; sprite at pixel pos 2 in byte
defw smiley4 ;; sprite at pixle pos 3 in byte
scr_pixels:
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&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&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &3f,&3f,&87,&0e,&08,&00,&00,&00,&03,&0f,&0f,&0f,&2d,&7f,&8f,&0f
defb &1f,&4d,&5f,&67,&bf,&2f,&8e,&2d,&9e,&2f,&8f,&cf,&0f,&0f,&0f,&1f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&4f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&9e,&4f,&af,&7f,&ca,&0f,&0f,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &0f,&0a,&00,&00,&00,&00,&00,&03,&02,&12,&81,&25,&09,&52,&8e,&0d
defb &cf,&b7,&4f,&9f,&0f,&3f,&0f,&1b,&1f,&0f,&0e,&af,&0f,&9f,&0f,&4f
defb &00,&07,&0f,&1f,&7f,&3f,&df,&ff,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&7e,&0f,&0f,&0f,&0e,&0a,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&01,&0f,&0f,&0f,&c2,&0f,&cb,&0f,&0f,&87,&0f,&0f,&0e,&2d
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&02,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &02,&08,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&02,&09,&f7
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0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f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&cf,&0f,&0f,&0f,&fc,&87,&0f,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&0f,&00,&00,&03,&09,&02,&16,&6d,&86,&49
defb &ca,&af,&1e,&2f,&2f,&0e,&0f,&0f,&0f,&0f,&4e,&0b,&0f,&2d,&0f,&0f
defb &00,&03,&0f,&3d,&0f,&f7,&ff,&cf,&0f,&ff,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&7f,&87,&0d,&0f,&0f,&0c,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&0f,&0f,&0f,&0e,&05,&a7,&0f,&4f,&87,&00,&01,&ce,&0b
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&08,&0e
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f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f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&ff,&0f,&0f,&ef,&0f,&0d,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&1f,&3f,&ff
defb &69,&0e,&0f,&0f,&00,&00,&00,&00,&00,&00,&01,&0f,&0f,&3c,&ff,&ff
defb &2a,&4b,&af,&0e,&a7,&08,&07,&07,&07,&0f,&0f,&f0,&9f,&0f,&8f,&26
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &8f,&1f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&3f,&6d,&0f,&0c,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&0f,&00,&00,&06,&03,&00,&01,&06,&0a,&0d
defb &ef,&be,&cf,&0f,&83,&5e,&0f,&0f,&0f,&0f,&27,&8f,&4f,&0f,&0f,&0f
defb &00,&00,&0f,&0f,&0f,&0f,&0f,&3c,&ff,&cf,&ff,&ff,&ff,&ff,&3f,&cf
defb &fe,&e1,&0d,&0e,&0a,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&04,&05,&2d,&0f,&04,&09,&04,&12,&05,&06
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&02,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb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,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &37,&cf,&2f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&3f,&1f,&fc,&87,&07,&03,&0c,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&0c,&00,&00,&04,&06,&01,&08,&03,&02,&0c
defb &05,&03,&cf,&17,&2f,&0f,&3d,&3f,&7f,&4f,&8e,&5f,&0f,&0f,&0f,&0f
defb &00,&00,&0f,&08,&0f,&0c,&0d,&0f,&07,&1e,&ff,&ff,&ff,&ff,&7c,&0f
defb &0f,&0f,&0f,&0e,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&0c,&0a,&1e,&0e,&05,&00,&01,&00,&02
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&03,&03
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f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defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&1f,&3f,&8f,&7f,&ff,&ff,&ff,&cf,&3f,&8f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&ff,&ff,&4b,&07
defb &0f,&0f,&0e,&08,&00,&00,&00,&00,&00,&00,&00,&00,&03,&0f,&0f,&0e
defb &5f,&87,&cf,&42,&0e,&06,&08,&08,&05,&82,&0d,&0f,&7e,&1a,&af,&9f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &ef,&7f,&9f,&2f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&3f,&ff,&fc,&0f,&0f,&0f,&0e,&01,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&04,&01,&0b,&0f,&02,&05
defb &0c,&0f,&c9,&3e,&df,&73,&af,&47,&0f,&1f,&6f,&4f,&0f,&2f,&0f,&0f
defb &00,&00,&00,&0e,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &08,&0f,&07,&08,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &07,&0f,&0c,&00,&00,&00,&04,&01,&0a,&1a,&0b,&05,&00,&08,&0b,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f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&04,&0f,&0e,&8f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &3d,&ff,&9f,&e7,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&ef,&3f,&0f,&0f,&0b,&0f,&0c,&06,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&01,&00,&0c,&02,&08,&0e,&07
defb &02,&86,&8d,&63,&4f,&87,&3f,&f9,&8d,&fc,&7b,&3f,&bf,&0f,&0f,&0f
defb &00,&00,&00,&07,&0e,&00,&00,&00,&0f,&09,&0f,&0f,&0f,&0f,&0f,&0e
defb &08,&03,&02,&00,&00,&00,&00,&00,&02,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &0f,&0f,&0c,&00,&00,&00,&00,&01,&0b,&01,&03,&0c,&01,&0c,&12,&49
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&f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0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&9f,&ff,&0f,&0f,&0f,&0f,&0c,&0f,&3d,&ef,&8f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&fe,&86,&08,&07
defb &00,&01,&00,&06,&0f,&0f,&0f,&0e,&00,&00,&00,&03,&0c,&00,&0f,&00
defb &0c,&2d,&02,&09,&0d,&1a,&08,&08,&03,&0b,&07,&0a,&0f,&1e,&3d,&2d
defb &0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &08,&3f,&6b,&5f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&1f,&ef,&ef,&cb,&01,&0f,&0a,&05,&00,&0e,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&08,&00,&00,&00,&01,&0c,&0e,&0b,&06,&02
defb &03,&0b,&03,&0f,&0e,&0f,&43,&0b,&f7,&87,&97,&4f,&ba,&af,&1f,&1f
defb &0f,&0c,&06,&00,&00,&00,&08,&00,&00,&0f,&0f,&0f,&0f,&0f,&00,&07
defb &00,&00,&00,&06,&00,&00,&00,&00,&0f,&0f,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &0f,&0f,&0f,&0e,&00,&00,&00,&01,&00,&00,&0d,&0d,&00,&0c,&0d,&4b
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&06
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &f0,&f0,&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0d,&16,&0f,&07,&07,&06,&08,&06,&05,&0a,&00,&1a,&0f,&9f
defb &e3,&2f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &01,&0f,&27,&5f,&df,&5f,&4f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f,&0f
defb &0f,&0f,&1f,&f1,&0f,&0f,&0f,&0e,&03,&04,&0c,&06,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&03,&00,&00,&00,&02,&02,&0a,&07,&0e
defb &00,&05,&0c,&0d,&0f,&0d,&4e,&0a,&df,&1f,&af,&1f,&4a,&0f,&7f,&2d
defb &0f,&0c,&07,&00,&00,&00,&00,&00,&08,&00,&00,&00,&00,&00,&0f,&00
defb &00,&00,&00,&06,&00,&00,&00,&00,&0f,&0f,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &0f,&0f,&0f,&0e,&00,&00,&00,&01,&00,&02,&04,&08,&04,&09,&0b,&ce
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&07,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
;; scr
smiley1:
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&10,&fe,&80,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&31,&f9,&c0,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&d0,&00,&30,&80,&60,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&70,&fe,&80,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&f3,&f1,&40,&0f,&0e,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&10,&e5,&0f,&87,&0f,&e1,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&16,&87,&0f,&0f,&1e,&c3,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&01,&1e,&0f,&0f,&0f,&1e,&87,&0f,&00,&00,&00,&00,&00
defb &00,&00,&00,&03,&0f,&0f,&0f,&0f,&1e,&87,&0f,&0c,&00,&00,&00,&00
defb &00,&00,&01,&0f,&0f,&0f,&0f,&0f,&1f,&87,&0f,&0e,&00,&00,&00,&00
defb &00,&00,&03,&0f,&0f,&0f,&3c,&f0,&f0,&87,&0f,&0f,&00,&00,&00,&00
defb &00,&10,&03,&0f,&0f,&0f,&7a,&96,&f3,&87,&0f,&0f,&08,&00,&00,&00
defb &00,&03,&07,&0f,&0f,&0f,&e5,&0f,&1e,&8f,&0f,&0f,&08,&00,&00,&00
defb &00,&25,&0f,&0f,&0f,&1e,&e9,&0f,&1e,&87,&0f,&0f,&0c,&00,&00,&00
defb &00,&4b,&0f,&0f,&0f,&3c,&cb,&0f,&0f,&87,&0f,&0f,&0e,&00,&00,&00
defb &00,&c3,&0f,&0f,&0f,&3d,&87,&0f,&0f,&0f,&0f,&0f,&0f,&00,&00,&00
defb &00,&87,&0f,&0f,&0f,&3c,&87,&0f,&78,&0f,&e5,&0f,&0f,&08,&00,&00
defb &10,&87,&0f,&0f,&0f,&3e,&0f,&0f,&f7,&cb,&f6,&0f,&0f,&08,&00,&00
defb &10,&0f,&0f,&0f,&0f,&7a,&0f,&1e,&ff,&cf,&f6,&0f,&0f,&0c,&00,&00
defb &30,&0f,&0f,&0f,&0f,&78,&0f,&1e,&ff,&ed,&69,&0f,&0f,&0e,&00,&00
defb &30,&0f,&78,&87,&0f,&69,&0f,&1e,&f7,&ed,&0f,&0f,&0f,&0e,&00,&00
defb &61,&0f,&f0,&c3,&0f,&69,&0f,&0f,&f7,&ed,&0f,&0f,&0f,&0e,&00,&00
defb &61,&0f,&f0,&c3,&0f,&78,&0f,&0f,&f5,&ed,&0f,&0f,&0f,&0e,&00,&00
defb &61,&0f,&f0,&c3,&0f,&6b,&0f,&0f,&78,&c3,&4b,&0f,&0f,&0e,&00,&00
defb &e1,&0f,&f0,&c3,&0f,&7a,&0f,&0f,&0f,&0f,&4f,&0f,&0f,&0e,&00,&00
defb &e1,&87,&78,&c3,&0f,&7a,&0f,&0f,&0f,&0f,&e7,&0f,&0f,&0e,&00,&00
defb &e1,&0f,&78,&87,&0f,&3d,&0f,&0f,&0f,&0f,&fd,&87,&0f,&2c,&00,&00
defb &f0,&4b,&0f,&0f,&0f,&3d,&87,&0f,&0f,&1e,&f8,&cb,&0f,&2c,&00,&00
defb &e1,&87,&3c,&0f,&0f,&1e,&cb,&0f,&0f,&1f,&da,&f4,&87,&68,&00,&00
defb &f8,&4b,&78,&87,&0f,&1e,&e5,&0f,&0f,&3f,&87,&7b,&fc,&e8,&00,&00
defb &f0,&4b,&3c,&87,&0f,&0f,&7a,&87,&0f,&f2,&0f,&3c,&f2,&e0,&00,&00
defb &f8,&a5,&3c,&0f,&0f,&69,&3d,&fc,&f1,&e9,&1e,&4b,&d2,&e0,&00,&00
defb &f0,&a5,&87,&0f,&0f,&e1,&0f,&f3,&f6,&87,&0f,&3c,&d2,&68,&00,&00
defb &f8,&d2,&0f,&0f,&0f,&f0,&0f,&1e,&4b,&0f,&5a,&5a,&b4,&e0,&00,&00
defb &74,&e1,&a5,&0f,&0f,&e1,&0f,&0f,&0f,&0f,&0f,&b4,&d2,&e0,&00,&00
defb &74,&e1,&87,&0f,&0f,&4b,&0f,&0f,&0f,&1e,&5a,&5a,&f0,&e0,&00,&00
defb &74,&f0,&5a,&0f,&1e,&87,&0f,&0f,&0f,&0f,&2d,&b4,&d2,&e0,&00,&00
defb &74,&f0,&a5,&87,&3c,&e1,&0f,&0f,&0f,&5a,&5a,&5a,&f0,&c0,&00,&00
defb &72,&f0,&d2,&5a,&b4,&e1,&0f,&0f,&0f,&0f,&a5,&b4,&f0,&c0,&00,&00
defb &72,&f0,&e1,&87,&3c,&f0,&0f,&0f,&a5,&a5,&a5,&d2,&f0,&c0,&00,&00
defb &32,&f0,&f0,&69,&78,&e1,&0f,&2d,&0f,&1e,&5a,&78,&f0,&f0,&e0,&00
defb &31,&f0,&f0,&f0,&78,&e1,&a5,&1e,&5a,&5a,&78,&f0,&f1,&ff,&ff,&c0
defb &31,&f0,&f0,&f0,&3c,&e1,&5a,&4b,&a5,&a5,&b4,&f0,&f3,&ff,&ff,&ce
defb &12,&f8,&f0,&d2,&f0,&f0,&5a,&5a,&f0,&f0,&f0,&f0,&ff,&ff,&ff,&ef
defb &10,&f8,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&78,&f0,&f1,&ff,&ff,&fe,&fa
defb &01,&f8,&f0,&f0,&f0,&e1,&a5,&a5,&b4,&f0,&b4,&f3,&ff,&ff,&fa,&fb
defb &00,&f4,&f0,&f0,&f0,&f0,&5a,&5a,&f1,&ff,&f8,&ff,&ff,&ff,&fd,&f1
defb &00,&f6,&f0,&f0,&f0,&d2,&f0,&e1,&f3,&f1,&ff,&ff,&ff,&f4,&f4,&f1
defb &00,&73,&f0,&f0,&f0,&f0,&f0,&f0,&f6,&f0,&f1,&f7,&fe,&fa,&f0,&f1
defb &00,&71,&f0,&f0,&f0,&f0,&f0,&f8,&fc,&f0,&f0,&f3,&ff,&f0,&f0,&f1
defb &00,&30,&f8,&f0,&f0,&f0,&f0,&f7,&f0,&f0,&f0,&f0,&f1,&f8,&f0,&f1
defb &00,&10,&f6,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&e1,&10,&f6,&f0,&f2
defb &00,&00,&73,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&c0,&00,&71,&f0,&e0
defb &00,&00,&31,&fc,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&80,&00,&10,&f5,&c0
defb &00,&00,&10,&fe,&f0,&f0,&f0,&f0,&f0,&f0,&f4,&00,&00,&00,&70,&80
defb &00,&00,&00,&f7,&fe,&f0,&f0,&f0,&f0,&f1,&c0,&00,&00,&00,&00,&00
defb &00,&00,&00,&11,&ff,&f8,&f0,&f0,&f1,&cc,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&33,&ff,&fe,&fb,&ff,&c8,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&77,&ff,&ff,&fe,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
;; smiley1
.smiley2
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&f7,&c0,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&10,&fc,&e8,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&60,&80,&10,&c0,&30,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&30,&f7,&c0,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&71,&f8,&a8,&07,&0f,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&f2,&0f,&4b,&0f,&78
defb &08,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&03,&c3,&0f,&0f,&0f
defb &e1,&08,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&0f,&87,&0f,&0f
defb &0f,&c3,&0f,&08,&00,&00,&00,&00,&00,&00,&00,&00,&01,&0f,&0f,&0f
defb &0f,&0f,&c3,&0f,&0e,&00,&00,&00,&00,&00,&00,&00,&00,&0f,&0f,&0f
defb &0f,&0f,&0f,&cb,&0f,&0f,&00,&00,&00,&00,&00,&00,&00,&01,&0f,&0f
defb &0f,&1e,&f0,&f0,&c3,&0f,&0f,&08,&00,&00,&00,&00,&00,&00,&81,&0f
defb &0f,&0f,&3d,&c3,&f1,&cb,&0f,&0f,&0c,&00,&00,&00,&00,&00,&01,&0b
defb &0f,&0f,&0f,&7a,&0f,&0f,&c7,&0f,&0f,&0c,&00,&00,&00,&00,&00,&12
defb &0f,&0f,&0f,&0f,&f4,&0f,&0f,&c3,&0f,&0f,&0e,&00,&00,&00,&00,&00
defb &25,&0f,&0f,&0f,&1e,&e5,&0f,&0f,&4b,&0f,&0f,&0f,&00,&00,&00,&00
defb &00,&61,&0f,&0f,&0f,&1e,&cb,&0f,&0f,&0f,&0f,&0f,&0f,&08,&00,&00
defb &00,&00,&43,&0f,&0f,&0f,&1e,&c3,&0f,&3c,&87,&7a,&0f,&0f,&0c,&00
defb &00,&00,&00,&c3,&0f,&0f,&0f,&1f,&87,&0f,&7b,&ed,&7b,&87,&0f,&0c
defb &00,&00,&00,&00,&87,&0f,&0f,&0f,&3d,&87,&0f,&f7,&ef,&7b,&87,&0f
defb &0e,&00,&00,&00,&10,&87,&0f,&0f,&0f,&3c,&87,&0f,&f7,&fe,&3c,&0f
defb &0f,&0f,&00,&00,&00,&10,&87,&3c,&c3,&0f,&3c,&0f,&0f,&f3,&fe,&0f
defb &0f,&0f,&0f,&00,&00,&00,&30,&0f,&78,&e1,&0f,&3c,&0f,&0f,&7b,&fe
defb &0f,&0f,&0f,&0f,&00,&00,&00,&30,&0f,&78,&e1,&0f,&3c,&87,&0f,&7a
defb &fe,&0f,&0f,&0f,&0f,&00,&00,&00,&30,&0f,&78,&e1,&0f,&3d,&0f,&0f
defb &3c,&e1,&2d,&0f,&0f,&0f,&00,&00,&00,&70,&0f,&78,&e1,&0f,&3d,&87
defb &0f,&0f,&0f,&2f,&0f,&0f,&0f,&00,&00,&00,&70,&4b,&3c,&e1,&0f,&3d
defb &87,&0f,&0f,&0f,&7b,&0f,&0f,&0f,&00,&00,&00,&70,&0f,&3c,&c3,&0f
defb &1e,&8f,&0f,&0f,&0f,&7e,&cb,&0f,&1e,&00,&00,&00,&70,&a5,&0f,&0f
defb &0f,&1e,&cb,&0f,&0f,&0f,&f4,&e5,&0f,&1e,&00,&00,&00,&70,&4b,&1e
defb &87,&0f,&0f,&e5,&0f,&0f,&0f,&ed,&f2,&c3,&3c,&00,&00,&00,&74,&a5
defb &3c,&c3,&0f,&0f,&f2,&0f,&0f,&1f,&cb,&3d,&fe,&f4,&00,&00,&00,&70
defb &a5,&1e,&c3,&0f,&0f,&3d,&c3,&0f,&79,&87,&1e,&f1,&f0,&00,&00,&00
defb &74,&d2,&1e,&87,&0f,&3c,&1e,&fe,&f0,&fc,&0f,&a5,&69,&f0,&00,&00
defb &00,&70,&d2,&4b,&0f,&0f,&78,&0f,&79,&fb,&c3,&0f,&1e,&e1,&b4,&00
defb &00,&00,&74,&e1,&87,&0f,&0f,&78,&87,&0f,&a5,&0f,&2d,&a5,&d2,&f0
defb &00,&00,&00,&32,&f0,&5a,&0f,&0f,&78,&0f,&0f,&0f,&0f,&0f,&5a,&e1
defb &f0,&00,&00,&00,&32,&f0,&4b,&0f,&0f,&2d,&0f,&0f,&0f,&0f,&a5,&a5
defb &f0,&f0,&00,&00,&00,&32,&f0,&a5,&87,&0f,&c3,&0f,&0f,&0f,&0f,&1e
defb &5a,&e1,&f0,&00,&00,&00,&32,&f0,&d2,&4b,&1e,&f0,&0f,&0f,&0f,&2d
defb &a5,&a5,&f0,&e0,&00,&00,&00,&31,&f0,&e1,&a5,&d2,&f0,&0f,&0f,&0f
defb &0f,&5a,&5a,&f0,&e0,&00,&00,&00,&31,&f0,&f0,&4b,&1e,&f0,&87,&0f
defb &5a,&5a,&5a,&69,&f0,&e0,&00,&00,&00,&11,&f0,&f0,&b4,&3c,&f0,&0f
defb &1e,&0f,&0f,&a5,&b4,&f0,&f0,&f0,&00,&00,&10,&f8,&f0,&f0,&b4,&f0
defb &5a,&0f,&a5,&a5,&b4,&f0,&f0,&ff,&ff,&e8,&00,&10,&f8,&f0,&f0,&96
defb &f0,&2d,&a5,&5a,&5a,&5a,&f0,&f1,&ff,&ff,&ef,&00,&01,&f4,&f0,&e1
defb &f0,&f0,&a5,&a5,&f0,&f0,&f0,&f0,&f7,&ff,&ff,&ff,&08,&00,&f4,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&b4,&f0,&f0,&ff,&ff,&ff,&f5,&80,&00,&7c
defb &f0,&f0,&f0,&f0,&5a,&5a,&5a,&f0,&d2,&f1,&ff,&ff,&fd,&f5,&88,&00
defb &72,&f0,&f0,&f0,&f0,&a5,&a5,&f0,&ff,&fc,&f7,&ff,&ff,&fe,&f8,&88
defb &00,&73,&f0,&f0,&f0,&e1,&f0,&f0,&79,&f8,&ff,&ff,&ff,&fa,&f2,&f0
defb &88,&00,&31,&f8,&f0,&f0,&f0,&f0,&f0,&f3,&f0,&f0,&fb,&ff,&f5,&f0
defb &f0,&88,&00,&30,&f8,&f0,&f0,&f0,&f0,&f4,&f6,&f0,&f0,&f1,&ff,&f8
defb &f0,&f0,&88,&00,&10,&f4,&f0,&f0,&f0,&f0,&f3,&f8,&f0,&f0,&f0,&f0
defb &fc,&f0,&f0,&88,&00,&00,&f3,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &08,&f3,&f0,&f1,&80,&00,&00,&31,&f8,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &e0,&00,&30,&f8,&f0,&00,&00,&00,&10,&fe,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&c0,&00,&00,&f2,&e8,&00,&00,&00,&00,&f7,&f0,&f0,&f0,&f0,&f0
defb &f0,&f2,&80,&00,&00,&30,&c0,&00,&00,&00,&00,&73,&ff,&f0,&f0,&f0
defb &f0,&f0,&e8,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&ff,&fc,&f0
defb &f0,&f0,&ee,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&11,&ff
defb &ff,&f5,&ff,&ec,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &33,&ff,&ff,&ff,&80,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
;; smiley2
.smiley3
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&73,&e8,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&f6,&f4,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&30,&40,&00,&e0,&10,&80,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&10,&f3,&e8,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&30,&fc,&d4,&03,&0f,&08
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&71,&87,&2d,&0f,&3c
defb &84,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&01,&69,&0f,&0f,&0f
defb &78,&0c,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&07,&4b,&0f,&0f
defb &0f,&69,&0f,&0c,&00,&00,&00,&00,&00,&00,&00,&00,&00,&0f,&0f,&0f
defb &0f,&0f,&69,&0f,&0f,&00,&00,&00,&00,&00,&00,&00,&00,&07,&0f,&0f
defb &0f,&0f,&0f,&6d,&0f,&0f,&08,&00,&00,&00,&00,&00,&00,&00,&0f,&0f
defb &0f,&0f,&f0,&f0,&e1,&0f,&0f,&0c,&00,&00,&00,&00,&00,&00,&40,&0f
defb &0f,&0f,&1e,&e9,&78,&ed,&0f,&0f,&0e,&00,&00,&00,&00,&00,&00,&0d
defb &0f,&0f,&0f,&3d,&87,&0f,&6b,&0f,&0f,&0e,&00,&00,&00,&00,&00,&01
defb &87,&0f,&0f,&0f,&7a,&87,&0f,&69,&0f,&0f,&0f,&00,&00,&00,&00,&00
defb &12,&0f,&0f,&0f,&0f,&f2,&0f,&0f,&2d,&0f,&0f,&0f,&08,&00,&00,&00
defb &00,&30,&0f,&0f,&0f,&0f,&e5,&0f,&0f,&0f,&0f,&0f,&0f,&0c,&00,&00
defb &00,&00,&21,&0f,&0f,&0f,&0f,&e1,&0f,&1e,&c3,&3d,&87,&0f,&0e,&00
defb &00,&00,&00,&61,&0f,&0f,&0f,&0f,&cb,&0f,&3d,&fe,&3d,&cb,&0f,&0e
defb &00,&00,&00,&00,&43,&0f,&0f,&0f,&1e,&cb,&0f,&7b,&ff,&3d,&cb,&0f
defb &0f,&00,&00,&00,&00,&c3,&0f,&0f,&0f,&1e,&c3,&0f,&7b,&ff,&96,&87
defb &0f,&0f,&08,&00,&00,&00,&c3,&1e,&e1,&0f,&1e,&87,&0f,&79,&ff,&87
defb &0f,&0f,&0f,&08,&00,&00,&10,&87,&3c,&f0,&0f,&1e,&87,&0f,&3d,&ff
defb &87,&0f,&0f,&0f,&08,&00,&00,&10,&87,&3c,&f0,&0f,&1e,&c3,&0f,&3d
defb &f7,&87,&0f,&0f,&0f,&08,&00,&00,&10,&87,&3c,&f0,&0f,&1e,&8f,&0f
defb &1e,&f0,&1e,&0f,&0f,&0f,&08,&00,&00,&30,&87,&3c,&f0,&0f,&1e,&cb
defb &0f,&0f,&0f,&1f,&0f,&0f,&0f,&08,&00,&00,&30,&a5,&1e,&f0,&0f,&1e
defb &cb,&0f,&0f,&0f,&3d,&8f,&0f,&0f,&08,&00,&00,&30,&87,&1e,&e1,&0f
defb &0f,&c7,&0f,&0f,&0f,&3f,&e5,&0f,&0f,&80,&00,&00,&30,&d2,&0f,&0f
defb &0f,&0f,&e5,&0f,&0f,&0f,&7a,&f2,&0f,&0f,&80,&00,&00,&30,&a5,&0f
defb &c3,&0f,&0f,&7a,&0f,&0f,&0f,&7e,&79,&e1,&1e,&80,&00,&00,&32,&d2
defb &1e,&e1,&0f,&0f,&79,&87,&0f,&0f,&ed,&1e,&ff,&f2,&80,&00,&00,&30
defb &d2,&0f,&e1,&0f,&0f,&1e,&e9,&0f,&3c,&cb,&0f,&f0,&f8,&80,&00,&00
defb &32,&e1,&87,&c3,&0f,&1e,&87,&f7,&f0,&f6,&87,&5a,&3c,&78,&80,&00
defb &00,&30,&e1,&a5,&0f,&0f,&3c,&87,&3c,&fd,&e9,&0f,&0f,&f0,&5a,&80
defb &00,&00,&32,&f0,&4b,&0f,&0f,&3c,&c3,&0f,&5a,&0f,&1e,&5a,&69,&f0
defb &80,&00,&00,&11,&f0,&a5,&87,&0f,&3c,&87,&0f,&0f,&0f,&0f,&2d,&f0
defb &78,&80,&00,&00,&11,&f0,&a5,&0f,&0f,&1e,&0f,&0f,&0f,&0f,&5a,&5a
defb &78,&f0,&80,&00,&00,&11,&f0,&d2,&4b,&0f,&69,&0f,&0f,&0f,&0f,&0f
defb &a5,&f0,&78,&80,&00,&00,&11,&f0,&e1,&a5,&0f,&f0,&87,&0f,&0f,&1e
defb &5a,&5a,&78,&f0,&00,&00,&00,&10,&f8,&f0,&5a,&69,&f0,&87,&0f,&0f
defb &0f,&2d,&a5,&f0,&f0,&00,&00,&00,&10,&f8,&f0,&a5,&0f,&f0,&c3,&0f
defb &2d,&a5,&a5,&b4,&78,&f0,&00,&00,&00,&00,&f8,&f0,&d2,&96,&f0,&87
defb &0f,&87,&0f,&5a,&5a,&f0,&f0,&f0,&80,&00,&00,&f4,&f0,&f0,&d2,&f0
defb &a5,&87,&5a,&5a,&5a,&f0,&f0,&f7,&ff,&fc,&00,&00,&f4,&f0,&f0,&c3
defb &f0,&96,&5a,&2d,&a5,&a5,&f0,&f0,&ff,&ff,&ff,&08,&00,&7a,&f0,&f0
defb &78,&f0,&d2,&5a,&78,&f0,&f0,&f0,&f3,&ff,&ff,&ff,&8c,&00,&72,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&d2,&f0,&f0,&f7,&ff,&ff,&fa,&c8,&00,&36
defb &f0,&f0,&f0,&f0,&a5,&a5,&a5,&f0,&e1,&f0,&ff,&ff,&fe,&fa,&cc,&00
defb &31,&f0,&f0,&f0,&f0,&d2,&5a,&78,&f7,&fe,&f3,&ff,&ff,&ff,&f4,&c4
defb &00,&31,&f8,&f0,&f0,&f0,&78,&f0,&b4,&fc,&f7,&ff,&ff,&fd,&f1,&f0
defb &c4,&00,&10,&fc,&f0,&f0,&f0,&f0,&f0,&f1,&f8,&f0,&f5,&ff,&fa,&f8
defb &f0,&c4,&00,&10,&f4,&f0,&f0,&f0,&f0,&f2,&f3,&f0,&f0,&f0,&ff,&fc
defb &f0,&f0,&c4,&00,&00,&f2,&f0,&f0,&f0,&f0,&f1,&fc,&f0,&f0,&f0,&f0
defb &f6,&f0,&f0,&c4,&00,&00,&71,&f8,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &84,&71,&f8,&f0,&c8,&00,&00,&10,&fc,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&00,&10,&f4,&f0,&80,&00,&00,&00,&f7,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&e0,&00,&00,&71,&f4,&00,&00,&00,&00,&73,&f8,&f0,&f0,&f0,&f0
defb &f0,&f1,&c0,&00,&00,&10,&e0,&00,&00,&00,&00,&31,&ff,&f8,&f0,&f0
defb &f0,&f0,&f4,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&77,&fe,&f0
defb &f0,&f0,&f7,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&ff
defb &ff,&fa,&ff,&fe,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &11,&ff,&ff,&ff,&c8,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
;; smiley3
.smiley4
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&31,&fc,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&73,&f2,&80,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&10,&a0,&00,&70,&00,&c0,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&f1,&fc,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&10,&f6,&e2,&81,&0f,&0c
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&30,&cb,&1e,&0f,&1e
defb &c2,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&3c,&0f,&0f,&0f
defb &3c,&86,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&03,&2d,&0f,&0f
defb &0f,&3c,&0f,&0e,&00,&00,&00,&00,&00,&00,&00,&00,&00,&07,&0f,&0f
defb &0f,&0f,&3c,&0f,&0f,&08,&00,&00,&00,&00,&00,&00,&00,&03,&0f,&0f
defb &0f,&0f,&0f,&3e,&0f,&0f,&0c,&00,&00,&00,&00,&00,&00,&00,&07,&0f
defb &0f,&0f,&78,&f0,&f0,&0f,&0f,&0e,&00,&00,&00,&00,&00,&00,&20,&07
defb &0f,&0f,&0f,&f4,&3c,&f6,&0f,&0f,&0f,&00,&00,&00,&00,&00,&00,&06
defb &0f,&0f,&0f,&1e,&cb,&0f,&3d,&0f,&0f,&0f,&00,&00,&00,&00,&00,&00
defb &4b,&0f,&0f,&0f,&3d,&c3,&0f,&3c,&0f,&0f,&0f,&08,&00,&00,&00,&00
defb &01,&87,&0f,&0f,&0f,&79,&87,&0f,&1e,&0f,&0f,&0f,&0c,&00,&00,&00
defb &00,&10,&87,&0f,&0f,&0f,&7a,&0f,&0f,&0f,&0f,&0f,&0f,&0e,&00,&00
defb &00,&00,&10,&0f,&0f,&0f,&0f,&78,&0f,&0f,&e1,&1e,&cb,&0f,&0f,&00
defb &00,&00,&00,&30,&0f,&0f,&0f,&0f,&6d,&0f,&1e,&ff,&96,&ed,&0f,&0f
defb &00,&00,&00,&00,&21,&0f,&0f,&0f,&0f,&e5,&0f,&3d,&ff,&9e,&ed,&0f
defb &0f,&08,&00,&00,&00,&61,&0f,&0f,&0f,&0f,&e1,&0f,&3d,&ff,&cb,&c3
defb &0f,&0f,&0c,&00,&00,&00,&61,&0f,&f0,&0f,&0f,&c3,&0f,&3c,&ff,&cb
defb &0f,&0f,&0f,&0c,&00,&00,&00,&c3,&1e,&f0,&87,&0f,&c3,&0f,&1e,&ff
defb &cb,&0f,&0f,&0f,&0c,&00,&00,&00,&c3,&1e,&f0,&87,&0f,&e1,&0f,&1e
defb &fb,&cb,&0f,&0f,&0f,&0c,&00,&00,&00,&c3,&1e,&f0,&87,&0f,&c7,&0f
defb &0f,&f0,&87,&87,&0f,&0f,&0c,&00,&00,&10,&c3,&1e,&f0,&87,&0f,&e5
defb &0f,&0f,&0f,&0f,&8f,&0f,&0f,&0c,&00,&00,&10,&d2,&0f,&f0,&87,&0f
defb &e5,&0f,&0f,&0f,&1e,&cf,&0f,&0f,&0c,&00,&00,&10,&c3,&0f,&f0,&0f
defb &0f,&6b,&0f,&0f,&0f,&1f,&fa,&0f,&0f,&48,&00,&00,&10,&e1,&87,&0f
defb &0f,&0f,&7a,&0f,&0f,&0f,&3d,&f1,&87,&0f,&48,&00,&00,&10,&d2,&0f
defb &69,&0f,&0f,&3d,&87,&0f,&0f,&3f,&b4,&f8,&0f,&c0,&00,&00,&11,&e1
defb &87,&f0,&0f,&0f,&3c,&cb,&0f,&0f,&7e,&0f,&f7,&f9,&c0,&00,&00,&10
defb &e1,&87,&78,&0f,&0f,&0f,&f4,&0f,&1e,&e5,&0f,&78,&f4,&c0,&00,&00
defb &11,&f0,&4b,&69,&0f,&0f,&c3,&7b,&f8,&f3,&c3,&2d,&96,&b4,&c0,&00
defb &00,&10,&f0,&5a,&0f,&0f,&1e,&c3,&1e,&f6,&fc,&0f,&0f,&78,&a5,&c0
defb &00,&00,&11,&f0,&a5,&0f,&0f,&1e,&e1,&0f,&2d,&87,&0f,&a5,&b4,&78
defb &c0,&00,&00,&00,&f8,&d2,&4b,&0f,&1e,&c3,&0f,&0f,&0f,&0f,&1e,&78
defb &b4,&c0,&00,&00,&00,&f8,&d2,&0f,&0f,&0f,&87,&0f,&0f,&0f,&2d,&a5
defb &b4,&f0,&c0,&00,&00,&00,&f8,&e1,&a5,&0f,&3c,&0f,&0f,&0f,&0f,&0f
defb &5a,&78,&b4,&c0,&00,&00,&00,&f8,&f0,&5a,&0f,&78,&c3,&0f,&0f,&0f
defb &a5,&a5,&b4,&f0,&80,&00,&00,&00,&f4,&f0,&a5,&b4,&78,&c3,&0f,&0f
defb &0f,&1e,&5a,&78,&f0,&80,&00,&00,&00,&f4,&f0,&d2,&0f,&78,&e1,&0f
defb &1e,&5a,&5a,&5a,&b4,&f0,&80,&00,&00,&00,&74,&f0,&e1,&c3,&f0,&c3
defb &0f,&4b,&0f,&2d,&a5,&f0,&f0,&f0,&c0,&00,&00,&72,&f0,&f0,&e1,&f0
defb &d2,&4b,&2d,&a5,&a5,&f0,&f0,&f3,&ff,&fe,&80,&00,&72,&f0,&f0,&e1
defb &78,&c3,&a5,&96,&5a,&5a,&78,&f0,&f7,&ff,&ff,&8c,&00,&35,&f0,&f0
defb &b4,&f0,&e1,&a5,&b4,&f0,&f0,&f0,&f1,&ff,&ff,&ff,&ce,&00,&31,&f0
defb &f0,&f0,&f0,&f0,&f0,&f0,&e1,&f0,&f0,&f3,&ff,&ff,&fd,&e4,&00,&13
defb &f0,&f0,&f0,&f0,&d2,&5a,&5a,&78,&f0,&78,&f7,&ff,&ff,&f5,&e6,&00
defb &10,&f8,&f0,&f0,&f0,&e1,&a5,&b4,&f3,&ff,&f1,&ff,&ff,&ff,&fa,&e2
defb &00,&10,&fc,&f0,&f0,&f0,&b4,&f0,&d2,&f6,&f3,&ff,&ff,&fe,&f8,&f8
defb &e2,&00,&00,&f6,&f0,&f0,&f0,&f0,&f0,&f0,&fc,&f0,&f2,&ff,&fd,&f4
defb &f0,&e2,&00,&00,&f2,&f0,&f0,&f0,&f0,&f1,&f1,&f8,&f0,&f0,&f7,&fe
defb &f0,&f0,&e2,&00,&00,&71,&f0,&f0,&f0,&f0,&f0,&fe,&f0,&f0,&f0,&f0
defb &f3,&f0,&f0,&e2,&00,&00,&30,&fc,&f0,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &c2,&30,&fc,&f0,&e4,&00,&00,&00,&f6,&f0,&f0,&f0,&f0,&f0,&f0,&f0
defb &f0,&80,&00,&f2,&f0,&c0,&00,&00,&00,&73,&f8,&f0,&f0,&f0,&f0,&f0
defb &f0,&f0,&00,&00,&30,&fa,&80,&00,&00,&00,&31,&fc,&f0,&f0,&f0,&f0
defb &f0,&f0,&e8,&00,&00,&00,&f0,&00,&00,&00,&00,&10,&ff,&fc,&f0,&f0
defb &f0,&f0,&f2,&80,&00,&00,&00,&00,&00,&00,&00,&00,&00,&33,&ff,&f0
defb &f0,&f0,&f3,&88,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&77
defb &ff,&fd,&f7,&ff,&80,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&ff,&ff,&ff,&ec,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
defb &00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00,&00
;; smiley4
| 53.903157 | 91 | 0.534687 |
a5b5eb0fa14bd3d618c4e426019e0fd0880559c5 | 780 | asm | Assembly | stuff/R316/old/lib/datastack.asm | Daswf852/Stuff | 36f32ce7da1c7a829cb064d9c91c61272ac6bd2e | [
"WTFPL"
] | null | null | null | stuff/R316/old/lib/datastack.asm | Daswf852/Stuff | 36f32ce7da1c7a829cb064d9c91c61272ac6bd2e | [
"WTFPL"
] | null | null | null | stuff/R316/old/lib/datastack.asm | Daswf852/Stuff | 36f32ce7da1c7a829cb064d9c91c61272ac6bd2e | [
"WTFPL"
] | null | null | null | %ifndef __DATASTACK_ASM
%define __DATASTACK_ASM
%include "common.asm"
%macro dpush value
mov [--r6], value
%endmacro
%macro dpop target
mov target, [r6++]
%endmacro
%macro ddup
dpush r6
%endmacro
%macro ddrop
add r6, 1
%endmacro
datastack:
datastack.init:
mov r6, datastack.stack
add r6, _dataStackSize
ret
datastack.dropString: ; ( CString -- )
push r0
.loop:
dpop r0
cmp r0, 0
jnz .loop
pop r0
ret
datastack.pushStringPointer: ; ( CStringPointer -- )
dpop r0
loop r1, 0xFFFF, .loop, .loop_end
.loop:
.loop_end:
ret
datastack.stack:
org { datastack.stack _dataStackSize + }
%endif | 16.25 | 56 | 0.55641 |
b11cca1b97828162441b2cf69f4012415ac318a7 | 1,904 | asm | Assembly | programs/oeis/158/A158776.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/158/A158776.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/158/A158776.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A158776: a(n) = 80*n^2 + 1.
; 1,81,321,721,1281,2001,2881,3921,5121,6481,8001,9681,11521,13521,15681,18001,20481,23121,25921,28881,32001,35281,38721,42321,46081,50001,54081,58321,62721,67281,72001,76881,81921,87121,92481,98001,103681,109521,115521,121681,128001,134481,141121,147921,154881,162001,169281,176721,184321,192081,200001,208081,216321,224721,233281,242001,250881,259921,269121,278481,288001,297681,307521,317521,327681,338001,348481,359121,369921,380881,392001,403281,414721,426321,438081,450001,462081,474321,486721,499281,512001,524881,537921,551121,564481,578001,591681,605521,619521,633681,648001,662481,677121,691921,706881,722001,737281,752721,768321,784081,800001,816081,832321,848721,865281,882001,898881,915921,933121,950481,968001,985681,1003521,1021521,1039681,1058001,1076481,1095121,1113921,1132881,1152001,1171281,1190721,1210321,1230081,1250001,1270081,1290321,1310721,1331281,1352001,1372881,1393921,1415121,1436481,1458001,1479681,1501521,1523521,1545681,1568001,1590481,1613121,1635921,1658881,1682001,1705281,1728721,1752321,1776081,1800001,1824081,1848321,1872721,1897281,1922001,1946881,1971921,1997121,2022481,2048001,2073681,2099521,2125521,2151681,2178001,2204481,2231121,2257921,2284881,2312001,2339281,2366721,2394321,2422081,2450001,2478081,2506321,2534721,2563281,2592001,2620881,2649921,2679121,2708481,2738001,2767681,2797521,2827521,2857681,2888001,2918481,2949121,2979921,3010881,3042001,3073281,3104721,3136321,3168081,3200001,3232081,3264321,3296721,3329281,3362001,3394881,3427921,3461121,3494481,3528001,3561681,3595521,3629521,3663681,3698001,3732481,3767121,3801921,3836881,3872001,3907281,3942721,3978321,4014081,4050001,4086081,4122321,4158721,4195281,4232001,4268881,4305921,4343121,4380481,4418001,4455681,4493521,4531521,4569681,4608001,4646481,4685121,4723921,4762881,4802001,4841281,4880721,4920321,4960081
mov $1,$0
pow $1,2
mul $1,80
add $1,1
| 238 | 1,834 | 0.84979 |
141bd58a4cb538433b9b60aacc6f7dcffdfdb01e | 1,699 | asm | Assembly | programs/oeis/246/A246831.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/246/A246831.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/246/A246831.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A246831: a(n) is the concatenation of n and 3n in binary.
; 0,7,22,57,76,95,210,245,280,315,350,737,804,871,938,1005,1072,1139,1206,1273,1340,1407,2882,3013,3144,3275,3406,3537,3668,3799,3930,4061,4192,4323,4454,4585,4716,4847,4978,5109,5240,5371,5502,11137,11396,11655,11914,12173,12432,12691,12950,13209,13468,13727,13986,14245,14504,14763,15022,15281,15540,15799,16058,16317,16576,16835,17094,17353,17612,17871,18130,18389,18648,18907,19166,19425,19684,19943,20202,20461,20720,20979,21238,21497,21756,22015,44290,44805,45320,45835,46350,46865,47380,47895,48410,48925,49440,49955,50470,50985,51500,52015,52530,53045,53560,54075,54590,55105,55620,56135,56650,57165,57680,58195,58710,59225,59740,60255,60770,61285,61800,62315,62830,63345,63860,64375,64890,65405,65920,66435,66950,67465,67980,68495,69010,69525,70040,70555,71070,71585,72100,72615,73130,73645,74160,74675,75190,75705,76220,76735,77250,77765,78280,78795,79310,79825,80340,80855,81370,81885,82400,82915,83430,83945,84460,84975,85490,86005,86520,87035,87550,175617,176644,177671,178698,179725,180752,181779,182806,183833,184860,185887,186914,187941,188968,189995,191022,192049,193076,194103,195130,196157,197184,198211,199238,200265,201292,202319,203346,204373,205400,206427,207454,208481,209508,210535,211562,212589,213616,214643,215670,216697,217724,218751,219778,220805,221832,222859,223886,224913,225940,226967,227994,229021,230048,231075,232102,233129,234156,235183,236210,237237,238264,239291,240318,241345,242372,243399,244426,245453,246480,247507,248534,249561,250588,251615,252642,253669,254696,255723
mov $1,$0
mov $2,$0
mov $4,2
mul $4,$0
add $2,$4
mov $5,$0
lpb $2,1
mul $1,2
div $2,2
lpe
mov $3,$5
mul $3,3
add $1,$3
| 99.941176 | 1,514 | 0.805768 |
5d2e159fe0e0dda8497c6e27169ef9f9753bf8cd | 1,994 | asm | Assembly | 41.asm | Dhananjay8/MIT_lab | 6b3487a04440372133773298ed64627a1463f151 | [
"Apache-2.0"
] | null | null | null | 41.asm | Dhananjay8/MIT_lab | 6b3487a04440372133773298ed64627a1463f151 | [
"Apache-2.0"
] | null | null | null | 41.asm | Dhananjay8/MIT_lab | 6b3487a04440372133773298ed64627a1463f151 | [
"Apache-2.0"
] | null | null | null | section .data
msg1: db "enter string :"
len1: equ $-msg1
msg2: db "enter choice",10
db "1.cal lenght",10
db "2.cal rev",10
db "3.cal pal",10
db "4.exit",10
len2:equ $-msg2
msg3: db "lenght::"
len3: equ $-msg3
msg4: db "reverse:"
len4: equ $-msg4
msg5: db "entered string is pal :",10
len5: equ $-msg5
msg6: db "entered string is not pal :",10
len6: equ $-msg6
n: db "",10
section .bss
%macro write 2
mov rax,1
mov rdi,1
mov rsi,%1
mov rdx,%2
syscall
%endmacro
%macro read 2
mov rax,0
mov rdi,0
mov rsi,%1
mov rdx,%2
syscall
%endmacro
str1: resq 4
str2: resq 4
len: resb 1
chc: resb 2
cnt: resb 1
bool: resb 1
global _start
section .text
_start:
list:
write msg2,len2
read chc,2
cmp byte[chc],31h
je length
cmp byte[chc],32h
je reverse
cmp byte[chc],33h
je palindrom
jmp exit
length:
write msg1,len1
read str1,32
call lencall
write msg3,len3
write len,1
write n,1
jmp list
reverse:
write msg1,len1
read str1,32
call lencall
call revcall
write msg4,len4
write str2,32
write n,1
jmp list
palindrom:
write msg1,len1
read str1,32
call lencall
call revcall
call palcall
cmp byte[bool],30h
jbe true
cmp byte[bool],31h
jbe false
true: write msg5,len5
jmp list
false: write msg6,len6
jmp list
lencall:
mov rsi,str1
mov byte[len],0
up: cmp byte[rsi],0xA
je bellow
inc rsi
inc byte[len]
jmp up
bellow:
mov bl,byte[len]
cmp bl,09h
jbe add30
add bl,07h
add30: add bl,30h
mov byte[len],bl
ret
revcall:
mov bl,byte[len]
cmp bl,39h
jbe sub30
sub bl,07h
sub30: sub bl,30h
mov byte[len],bl
mov byte[cnt],bl
dec byte[cnt]
mov rsi,str1
mov rdi,str2
mov rcx,00
mov cl,byte[cnt]
add rsi,rcx
inc byte[cnt]
up2: mov al,byte[rsi]
mov byte[rdi],al
inc rdi
dec rsi
dec byte[cnt]
jnz up2
ret
palcall:
mov rsi,str1
mov rdi,str2
up3:
mov al,byte[rsi]
cmp byte[rdi],al
jz t
f: mov byte[bool],31h
jmp a
t: inc rsi
inc rdi
dec byte[len]
jnz up3
mov byte[bool],30h
a:
ret
exit:
mov rax,60
mov rdi,00
syscall
| 12.084848 | 41 | 0.682548 |
1c576cb132fd5899f6729e00933fc9a82475f644 | 2,239 | asm | Assembly | lab4/binary.asm | mochisvelas/Microprogramming | 565d49e1c0c84b5e45b121e484324e770b65ed72 | [
"MIT"
] | null | null | null | lab4/binary.asm | mochisvelas/Microprogramming | 565d49e1c0c84b5e45b121e484324e770b65ed72 | [
"MIT"
] | null | null | null | lab4/binary.asm | mochisvelas/Microprogramming | 565d49e1c0c84b5e45b121e484324e770b65ed72 | [
"MIT"
] | null | null | null | .model small
.data
numPrompt db 'Insert number: $'
inputerror_message db 'ERROR: Invalid input$'
num db 00h
cont db 00h
tmp db 00h
.stack
.code
program:
mov ax,@data
mov ds,ax
xor ax,ax
;Ask for number
mov dx,offset numPrompt
mov ah,09h
int 21h
numtag:
mov ah,01h ;Get digit
int 21h
cmp al,0Dh ;Check if is an enter
jne bridge
jmp inputerror ;If yes, show error
bridge:
sub al,30h ;Convert to real number
xor ah,ah ;Clear ah
;Store the tens and hundreds if existent
shl bl,01h ;Multiply itself by 2
mov tmp,bl
mov cl,02h
shl bl,cl ;Multiply itself by 4, so by 8 in total
add bl,tmp ;By 10 in total
add bl,al
mov num,bl ;Store in variable
inc cont ;Add 1 to cont
cmp cont,02h ;Check if 2 digits have been inserted
je evalnum ;If yes, go to nextnum
jmp numtag
;-----------------------------------------------------------------------
evalnum:
;Clean registers
xor ax,ax
xor bx,bx
xor cx,cx
mov bl,num ;Store num in bl
mov cl,07h ;Times to iterate the binary loop
;Print new line
mov ah,02h
mov dl,0ah
int 21h
;Binary loop
binary:
xor al,al
shl bl,01h ;Shift to left and store the msb in cf flag
adc al,00h ;Add with carry. al = al + cf + 0
;Print al
mov ah,02h
mov dl,al
add dl,30h
int 21h
;Check if cl is 0
cmp cl,00h
je finalize
dec cl ;Sub 1 to cl
jmp binary ;Iterate again
;-----------------------------------------------------------------------
;Show input error message
inputerror:
;Print new line
mov ah,02h
mov dl,0ah
int 21h
mov dx,offset inputerror_message
mov ah,09h
int 21h
;Finalize program
finalize:
mov ah,4Ch
int 21h
END program
| 21.32381 | 72 | 0.467173 |
95a74569b93e14342265f5fd0a25c81f40b88ea9 | 657 | asm | Assembly | data/prizes.asm | etdv-thevoid/pokemon-rgb-enhanced | 5b244c1cf46aab98b9c820d1b7888814eb7fa53f | [
"MIT"
] | 1 | 2022-01-09T05:28:52.000Z | 2022-01-09T05:28:52.000Z | data/prizes.asm | ETDV-TheVoid/pokemon-rgb-enhanced | 5b244c1cf46aab98b9c820d1b7888814eb7fa53f | [
"MIT"
] | null | null | null | data/prizes.asm | ETDV-TheVoid/pokemon-rgb-enhanced | 5b244c1cf46aab98b9c820d1b7888814eb7fa53f | [
"MIT"
] | null | null | null | PrizeDifferentMenuPtrs:
dw PrizeMenuMon1Entries
dw PrizeMenuMon1Cost
dw PrizeMenuMon2Entries
dw PrizeMenuMon2Cost
dw PrizeMenuTMsEntries
dw PrizeMenuTMsCost
NoThanksText:
db "NO THANKS@"
PrizeMenuMon1Entries:
db ABRA
db CLEFAIRY
db DRATINI
db "@"
PrizeMenuMon1Cost:
coins 250
coins 1000
coins 2750
db "@"
PrizeMenuMon2Entries:
db EEVEE
IF DEF(_RED)
db MAGMAR
ENDC
IF DEF(_GREEN)
db ELECTABUZZ
ENDC
IF DEF(_BLUE)
db JYNX
ENDC
db PORYGON
db "@"
PrizeMenuMon2Cost:
coins 4400
coins 6600
coins 8800
db "@"
PrizeMenuTMsEntries:
db TM_36
db TM_15
db TM_50
db "@"
PrizeMenuTMsCost:
coins 3300
coins 5500
coins 7700
db "@"
| 11.526316 | 24 | 0.754947 |
625de73ccbc411a1c642768310fa76fa6a4690ca | 100 | asm | Assembly | test2.asm | zxYin/mips-pipeline-simulator | e3ce1aeec850f092357458b288adbea04dfa40bc | [
"MIT"
] | null | null | null | test2.asm | zxYin/mips-pipeline-simulator | e3ce1aeec850f092357458b288adbea04dfa40bc | [
"MIT"
] | null | null | null | test2.asm | zxYin/mips-pipeline-simulator | e3ce1aeec850f092357458b288adbea04dfa40bc | [
"MIT"
] | null | null | null | addi $t0, $zero, 2
addi $t1, $zero, 5
add $t2, $zero, $zero
add $t3, $zero, $zero
add $s0, $t0, $t1
| 16.666667 | 21 | 0.57 |
2218a385c13bee9643f5b043dcfcd3051c87acdb | 6,331 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48_notsx.log_21829_1632.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_notsx.log_21829_1632.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_notsx.log_21829_1632.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 %r12
push %r13
push %rdi
push %rdx
lea addresses_A_ht+0x20d8, %r12
cmp $18217, %r13
and $0xffffffffffffffc0, %r12
vmovaps (%r12), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %rdi
nop
nop
xor %rdx, %rdx
pop %rdx
pop %rdi
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0x2638, %r12
nop
dec %rcx
movl $0x51525354, (%r12)
nop
nop
nop
nop
nop
add $15893, %r8
// REPMOV
lea addresses_UC+0x138d8, %rsi
lea addresses_PSE+0xf0d8, %rdi
nop
nop
nop
nop
nop
add %r8, %r8
mov $57, %rcx
rep movsb
nop
nop
nop
nop
sub %rcx, %rcx
// Store
lea addresses_PSE+0x11208, %r9
nop
nop
sub %r12, %r12
movw $0x5152, (%r9)
nop
nop
nop
nop
nop
dec %rsi
// Store
lea addresses_WT+0x1b6d8, %rdi
nop
nop
nop
nop
nop
sub $29032, %rsi
mov $0x5152535455565758, %r13
movq %r13, %xmm0
vmovups %ymm0, (%rdi)
nop
inc %r13
// Load
lea addresses_RW+0x190d8, %rdi
clflush (%rdi)
nop
lfence
mov (%rdi), %r8w
nop
nop
nop
xor $19803, %rbp
// Store
lea addresses_UC+0xd58, %r8
nop
add %r9, %r9
mov $0x5152535455565758, %rcx
movq %rcx, (%r8)
cmp $18991, %rbp
// Load
mov $0x7adc6400000008d8, %r12
nop
sub $63492, %r8
mov (%r12), %rdi
nop
dec %rsi
// Load
mov $0x32e7c30000000cd8, %rsi
clflush (%rsi)
nop
xor %rdi, %rdi
movaps (%rsi), %xmm2
vpextrq $1, %xmm2, %rbp
dec %rbp
// Store
mov $0x42539b00000000b8, %r9
nop
nop
nop
nop
and %rbp, %rbp
movb $0x51, (%r9)
nop
nop
nop
nop
xor $41229, %r9
// Faulty Load
mov $0x7adc6400000008d8, %r8
xor $9306, %r9
mov (%r8), %r13
lea oracles, %rdi
and $0xff, %r13
shlq $12, %r13
mov (%rdi,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_UC'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT', 'congruent': 7}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_RW', 'congruent': 9}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC', 'congruent': 7}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_NC', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_NC', 'congruent': 10}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_NC', 'congruent': 4}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_NC', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_A_ht', 'congruent': 11}}
{'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
*/
| 35.768362 | 2,999 | 0.650608 |
de9798ec0416c2d9e12093e809a0a55f2f008fc3 | 453 | asm | Assembly | programs/oeis/252/A252735.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/252/A252735.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/252/A252735.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A252735: a(1) = 0; for n > 1: a(2n) = a(n), a(2n+1) = 1 + a(A064989(n)).
; 0,0,1,0,2,1,3,0,1,2,4,1,5,3,2,0,6,1,7,2,3,4,8,1,2,5,1,3,9,2,10,0,4,6,3,1,11,7,5,2,12,3,13,4,2,8,14,1,3,2,6,5,15,1,4,3,7,9,16,2,17,10,3,0,5,4,18,6,8,3,19,1,20,11,2,7,4,5,21,2,1,12,22,3,6,13,9,4,23,2,5,8,10,14,7,1,24,3,4,2
seq $0,6530 ; Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.
sub $0,1
seq $0,36234 ; Number of primes <= n, if 1 is counted as a prime.
trn $0,2
| 56.625 | 222 | 0.554084 |
d00864da95c7b3a61834e4e1246a988a889923a7 | 244 | asm | Assembly | asm/remove_optimization_for_freecam_ntsc.asm | Colt-Zero/spyro06-source | 60fcc0d252e084f667d4c46a5bbf07313d91f5a3 | [
"Unlicense"
] | null | null | null | asm/remove_optimization_for_freecam_ntsc.asm | Colt-Zero/spyro06-source | 60fcc0d252e084f667d4c46a5bbf07313d91f5a3 | [
"Unlicense"
] | null | null | null | asm/remove_optimization_for_freecam_ntsc.asm | Colt-Zero/spyro06-source | 60fcc0d252e084f667d4c46a5bbf07313d91f5a3 | [
"Unlicense"
] | null | null | null | .open "sys/main.dol"
; Free cam, credit goes to marius851000, NTSC translation by Colt Zero(Olivine Ellva)
.org 0x8034f59c
li r3, 1 ; 0434f59c 38600001
blr ; 0434f5a0 4e800020
.org 0x80324168
nop ; 04324168 60000000
.close | 30.5 | 86 | 0.704918 |
1917408c5d20d8dc7278b0057c5f3e1f0707b4e6 | 51,436 | asm | Assembly | hmi_sdk/hmi_sdk/Tools/ffmpeg-2.6.2/libavcodec/x86/hevc_mc.asm | APCVSRepo/android_packet | 5d4237234656b777cd9b0cae4731afea51986582 | [
"BSD-3-Clause"
] | 4 | 2016-09-21T12:36:24.000Z | 2020-10-29T01:45:03.000Z | hmi_sdk/hmi_sdk/Tools/ffmpeg-2.6.2/libavcodec/x86/hevc_mc.asm | APCVSRepo/android_packet | 5d4237234656b777cd9b0cae4731afea51986582 | [
"BSD-3-Clause"
] | 7 | 2016-06-01T01:21:44.000Z | 2017-11-03T08:18:23.000Z | hmi_sdk/hmi_sdk/Tools/ffmpeg-2.6.2/libavcodec/x86/hevc_mc.asm | APCVSRepo/android_packet | 5d4237234656b777cd9b0cae4731afea51986582 | [
"BSD-3-Clause"
] | 8 | 2017-08-29T10:51:50.000Z | 2021-03-24T10:19:11.000Z | ; /*
; * Provide SSE luma and chroma mc functions for HEVC decoding
; * Copyright (c) 2013 Pierre-Edouard LEPERE
; *
; * This file is part of FFmpeg.
; *
; * FFmpeg is free software; you can redistribute it and/or
; * modify it under the terms of the GNU Lesser General Public
; * License as published by the Free Software Foundation; either
; * version 2.1 of the License, or (at your option) any later version.
; *
; * FFmpeg is distributed in the hope that it will be useful,
; * but WITHOUT ANY WARRANTY; without even the implied warranty of
; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; * Lesser General Public License for more details.
; *
; * You should have received a copy of the GNU Lesser General Public
; * License along with FFmpeg; if not, write to the Free Software
; * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
; */
%include "libavutil/x86/x86util.asm"
SECTION_RODATA 32
cextern pw_255
cextern pw_512
cextern pw_2048
cextern pw_8192
cextern pw_1023
cextern pw_1024
cextern pw_4096
%define pw_8 pw_512
%define pw_10 pw_2048
%define pw_12 pw_8192
%define pw_bi_10 pw_1024
%define pw_bi_12 pw_4096
%define max_pixels_8 pw_255
%define max_pixels_10 pw_1023
pw_bi_8: times 16 dw (1 << 8)
max_pixels_12: times 16 dw ((1 << 12)-1)
cextern pd_1
cextern pb_0
SECTION_TEXT 32
%macro EPEL_TABLE 4
hevc_epel_filters_%4_%1 times %2 d%3 -2, 58
times %2 d%3 10, -2
times %2 d%3 -4, 54
times %2 d%3 16, -2
times %2 d%3 -6, 46
times %2 d%3 28, -4
times %2 d%3 -4, 36
times %2 d%3 36, -4
times %2 d%3 -4, 28
times %2 d%3 46, -6
times %2 d%3 -2, 16
times %2 d%3 54, -4
times %2 d%3 -2, 10
times %2 d%3 58, -2
%endmacro
EPEL_TABLE 8,16, b, avx2
EPEL_TABLE 10, 8, w, avx2
EPEL_TABLE 8, 8, b, sse4
EPEL_TABLE 10, 4, w, sse4
EPEL_TABLE 12, 4, w, sse4
%macro QPEL_TABLE 4
hevc_qpel_filters_%4_%1 times %2 d%3 -1, 4
times %2 d%3 -10, 58
times %2 d%3 17, -5
times %2 d%3 1, 0
times %2 d%3 -1, 4
times %2 d%3 -11, 40
times %2 d%3 40,-11
times %2 d%3 4, -1
times %2 d%3 0, 1
times %2 d%3 -5, 17
times %2 d%3 58,-10
times %2 d%3 4, -1
%endmacro
QPEL_TABLE 8, 8, b, sse4
QPEL_TABLE 10, 4, w, sse4
QPEL_TABLE 12, 4, w, sse4
QPEL_TABLE 8,16, b, avx2
QPEL_TABLE 10, 8, w, avx2
%define MAX_PB_SIZE 64
%define hevc_qpel_filters_sse4_14 hevc_qpel_filters_sse4_10
%define hevc_qpel_filters_avx2_14 hevc_qpel_filters_avx2_10
%if ARCH_X86_64
%macro SIMPLE_BILOAD 4 ;width, tab, r1, r2
%if %1 <= 4
movq %3, [%2] ; load data from source2
%elif %1 <= 8
movdqa %3, [%2] ; load data from source2
%elif %1 <= 12
%if cpuflag(avx2)
mova %3, [%2]
%else
movdqa %3, [%2] ; load data from source2
movq %4, [%2+16] ; load data from source2
%endif ;avx
%elif %1 <= 16
%if cpuflag(avx2)
mova %3, [%2]
%else
movdqa %3, [%2] ; load data from source2
movdqa %4, [%2+16] ; load data from source2
%endif ; avx
%else ; %1 = 32
mova %3, [%2]
mova %4, [%2+32]
%endif
%endmacro
%macro SIMPLE_LOAD 4 ;width, bitd, tab, r1
%if %1 == 2 || (%2 == 8 && %1 <= 4)
movd %4, [%3] ; load data from source
%elif %1 == 4 || (%2 == 8 && %1 <= 8)
movq %4, [%3] ; load data from source
%elif notcpuflag(avx)
movu %4, [%3] ; load data from source
%elif %1 <= 8 || (%2 == 8 && %1 <= 16)
movdqu %4, [%3]
%else
movu %4, [%3]
%endif
%endmacro
%macro EPEL_FILTER 5 ; bit depth, filter index, xmma, xmmb, gprtmp
%if cpuflag(avx2)
%assign %%offset 32
%ifdef PIC
lea %5q, [hevc_epel_filters_avx2_%1]
%define FILTER %5q
%else
%define FILTER hevc_epel_filters_avx2_%1
%endif
%else
%assign %%offset 16
%ifdef PIC
lea %5q, [hevc_epel_filters_sse4_%1]
%define FILTER %5q
%else
%define FILTER hevc_epel_filters_sse4_%1
%endif
%endif ;cpuflag(avx2)
sub %2q, 1
%if cpuflag(avx2)
shl %2q, 6 ; multiply by 64
%else
shl %2q, 5 ; multiply by 32
%endif
mova %3, [FILTER + %2q] ; get 2 first values of filters
mova %4, [FILTER + %2q+%%offset] ; get 2 last values of filters
%endmacro
%macro EPEL_HV_FILTER 1
%if cpuflag(avx2)
%assign %%offset 32
%assign %%shift 6
%define %%table hevc_epel_filters_avx2_%1
%else
%assign %%offset 16
%assign %%shift 5
%define %%table hevc_epel_filters_sse4_%1
%endif
%ifdef PIC
lea r3srcq, [%%table]
%define FILTER r3srcq
%else
%define FILTER %%table
%endif
sub mxq, 1
sub myq, 1
shl mxq, %%shift ; multiply by 32
shl myq, %%shift ; multiply by 32
mova m14, [FILTER + mxq] ; get 2 first values of filters
mova m15, [FILTER + mxq+%%offset] ; get 2 last values of filters
%if cpuflag(avx2)
%define %%table hevc_epel_filters_avx2_10
%else
%define %%table hevc_epel_filters_sse4_10
%endif
%ifdef PIC
lea r3srcq, [%%table]
%define FILTER r3srcq
%else
%define FILTER %%table
%endif
mova m12, [FILTER + myq] ; get 2 first values of filters
mova m13, [FILTER + myq+%%offset] ; get 2 last values of filters
lea r3srcq, [srcstrideq*3]
%endmacro
%macro QPEL_FILTER 2
%if cpuflag(avx2)
%assign %%offset 32
%assign %%shift 7
%define %%table hevc_qpel_filters_avx2_%1
%else
%assign %%offset 16
%assign %%shift 6
%define %%table hevc_qpel_filters_sse4_%1
%endif
%ifdef PIC
lea rfilterq, [%%table]
%else
%define rfilterq %%table
%endif
sub %2q, 1
shl %2q, %%shift ; multiply by 32
mova m12, [rfilterq + %2q] ; get 4 first values of filters
mova m13, [rfilterq + %2q + %%offset] ; get 4 first values of filters
mova m14, [rfilterq + %2q + 2*%%offset] ; get 4 first values of filters
mova m15, [rfilterq + %2q + 3*%%offset] ; get 4 first values of filters
%endmacro
%macro EPEL_LOAD 4
%if (%1 == 8 && %4 <= 4)
%define %%load movd
%elif (%1 == 8 && %4 <= 8) || (%1 > 8 && %4 <= 4)
%define %%load movq
%else
%define %%load movdqu
%endif
%%load m0, [%2q ]
%ifnum %3
%%load m1, [%2q+ %3]
%%load m2, [%2q+2*%3]
%%load m3, [%2q+3*%3]
%else
%%load m1, [%2q+ %3q]
%%load m2, [%2q+2*%3q]
%%load m3, [%2q+r3srcq]
%endif
%if %1 == 8
%if %4 > 8
SBUTTERFLY bw, 0, 1, 7
SBUTTERFLY bw, 2, 3, 7
%else
punpcklbw m0, m1
punpcklbw m2, m3
%endif
%else
%if %4 > 4
SBUTTERFLY wd, 0, 1, 7
SBUTTERFLY wd, 2, 3, 7
%else
punpcklwd m0, m1
punpcklwd m2, m3
%endif
%endif
%endmacro
%macro QPEL_H_LOAD 4
%assign %%stride (%1+7)/8
%if %1 == 8
%if %3 <= 4
%define %%load movd
%elif %3 == 8
%define %%load movq
%else
%define %%load movu
%endif
%else
%if %3 == 2
%define %%load movd
%elif %3 == 4
%define %%load movq
%else
%define %%load movu
%endif
%endif
%%load m0, [%2-3*%%stride] ;load data from source
%%load m1, [%2-2*%%stride]
%%load m2, [%2-%%stride ]
%%load m3, [%2 ]
%%load m4, [%2+%%stride ]
%%load m5, [%2+2*%%stride]
%%load m6, [%2+3*%%stride]
%%load m7, [%2+4*%%stride]
%if %1 == 8
%if %3 > 8
SBUTTERFLY wd, 0, 1, %4
SBUTTERFLY wd, 2, 3, %4
SBUTTERFLY wd, 4, 5, %4
SBUTTERFLY wd, 6, 7, %4
%else
punpcklbw m0, m1
punpcklbw m2, m3
punpcklbw m4, m5
punpcklbw m6, m7
%endif
%else
%if %3 > 4
SBUTTERFLY dq, 0, 1, %4
SBUTTERFLY dq, 2, 3, %4
SBUTTERFLY dq, 4, 5, %4
SBUTTERFLY dq, 6, 7, %4
%else
punpcklwd m0, m1
punpcklwd m2, m3
punpcklwd m4, m5
punpcklwd m6, m7
%endif
%endif
%endmacro
%macro QPEL_V_LOAD 5
lea %5q, [%2]
sub %5q, r3srcq
movu m0, [%5q ] ;load x- 3*srcstride
movu m1, [%5q+ %3q ] ;load x- 2*srcstride
movu m2, [%5q+ 2*%3q ] ;load x-srcstride
movu m3, [%2 ] ;load x
movu m4, [%2+ %3q] ;load x+stride
movu m5, [%2+ 2*%3q] ;load x+2*stride
movu m6, [%2+r3srcq] ;load x+3*stride
movu m7, [%2+ 4*%3q] ;load x+4*stride
%if %1 == 8
%if %4 > 8
SBUTTERFLY bw, 0, 1, 8
SBUTTERFLY bw, 2, 3, 8
SBUTTERFLY bw, 4, 5, 8
SBUTTERFLY bw, 6, 7, 8
%else
punpcklbw m0, m1
punpcklbw m2, m3
punpcklbw m4, m5
punpcklbw m6, m7
%endif
%else
%if %4 > 4
SBUTTERFLY wd, 0, 1, 8
SBUTTERFLY wd, 2, 3, 8
SBUTTERFLY wd, 4, 5, 8
SBUTTERFLY wd, 6, 7, 8
%else
punpcklwd m0, m1
punpcklwd m2, m3
punpcklwd m4, m5
punpcklwd m6, m7
%endif
%endif
%endmacro
%macro PEL_12STORE2 3
movd [%1], %2
%endmacro
%macro PEL_12STORE4 3
movq [%1], %2
%endmacro
%macro PEL_12STORE6 3
movq [%1], %2
psrldq %2, 8
movd [%1+8], %2
%endmacro
%macro PEL_12STORE8 3
movdqa [%1], %2
%endmacro
%macro PEL_12STORE12 3
movdqa [%1], %2
movq [%1+16], %3
%endmacro
%macro PEL_12STORE16 3
PEL_12STORE8 %1, %2, %3
movdqa [%1+16], %3
%endmacro
%macro PEL_10STORE2 3
movd [%1], %2
%endmacro
%macro PEL_10STORE4 3
movq [%1], %2
%endmacro
%macro PEL_10STORE6 3
movq [%1], %2
psrldq %2, 8
movd [%1+8], %2
%endmacro
%macro PEL_10STORE8 3
movdqa [%1], %2
%endmacro
%macro PEL_10STORE12 3
movdqa [%1], %2
movq [%1+16], %3
%endmacro
%macro PEL_10STORE16 3
%if cpuflag(avx2)
movu [%1], %2
%else
PEL_10STORE8 %1, %2, %3
movdqa [%1+16], %3
%endif
%endmacro
%macro PEL_10STORE32 3
PEL_10STORE16 %1, %2, %3
movu [%1+32], %3
%endmacro
%macro PEL_8STORE2 3
pextrw [%1], %2, 0
%endmacro
%macro PEL_8STORE4 3
movd [%1], %2
%endmacro
%macro PEL_8STORE6 3
movd [%1], %2
pextrw [%1+4], %2, 2
%endmacro
%macro PEL_8STORE8 3
movq [%1], %2
%endmacro
%macro PEL_8STORE12 3
movq [%1], %2
psrldq %2, 8
movd [%1+8], %2
%endmacro
%macro PEL_8STORE16 3
%if cpuflag(avx2)
movdqu [%1], %2
%else
mova [%1], %2
%endif ; avx
%endmacro
%macro PEL_8STORE32 3
movu [%1], %2
%endmacro
%macro LOOP_END 3
add %1q, 2*MAX_PB_SIZE ; dst += dststride
add %2q, %3q ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
%endmacro
%macro MC_PIXEL_COMPUTE 2-3 ;width, bitdepth
%if %2 == 8
%if cpuflag(avx2) && %0 ==3
%if %1 > 16
vextracti128 xm1, m0, 1
pmovzxbw m1, xm1
psllw m1, 14-%2
%endif
pmovzxbw m0, xm0
%else ; not avx
%if %1 > 8
punpckhbw m1, m0, m2
psllw m1, 14-%2
%endif
punpcklbw m0, m2
%endif
%endif ;avx
psllw m0, 14-%2
%endmacro
%macro EPEL_COMPUTE 4-8 ; bitdepth, width, filter1, filter2, HV/m0, m2, m1, m3
%if %0 == 8
%define %%reg0 %5
%define %%reg2 %6
%define %%reg1 %7
%define %%reg3 %8
%else
%define %%reg0 m0
%define %%reg2 m2
%define %%reg1 m1
%define %%reg3 m3
%endif
%if %1 == 8
%if cpuflag(avx2) && (%0 == 5)
%if %2 > 16
vperm2i128 m10, m0, m1, q0301
%endif
vinserti128 m0, m0, xm1, 1
mova m1, m10
%if %2 > 16
vperm2i128 m10, m2, m3, q0301
%endif
vinserti128 m2, m2, xm3, 1
mova m3, m10
%endif
pmaddubsw %%reg0, %3 ;x1*c1+x2*c2
pmaddubsw %%reg2, %4 ;x3*c3+x4*c4
paddw %%reg0, %%reg2
%if %2 > 8
pmaddubsw %%reg1, %3
pmaddubsw %%reg3, %4
paddw %%reg1, %%reg3
%endif
%else
pmaddwd %%reg0, %3
pmaddwd %%reg2, %4
paddd %%reg0, %%reg2
%if %2 > 4
pmaddwd %%reg1, %3
pmaddwd %%reg3, %4
paddd %%reg1, %%reg3
%if %1 != 8
psrad %%reg1, %1-8
%endif
%endif
%if %1 != 8
psrad %%reg0, %1-8
%endif
packssdw %%reg0, %%reg1
%endif
%endmacro
%macro QPEL_HV_COMPUTE 4 ; width, bitdepth, filter idx
%if cpuflag(avx2)
%assign %%offset 32
%define %%table hevc_qpel_filters_avx2_%2
%else
%assign %%offset 16
%define %%table hevc_qpel_filters_sse4_%2
%endif
%ifdef PIC
lea rfilterq, [%%table]
%else
%define rfilterq %%table
%endif
%if %2 == 8
pmaddubsw m0, [rfilterq + %3q*8 ] ;x1*c1+x2*c2
pmaddubsw m2, [rfilterq + %3q*8+%%offset] ;x3*c3+x4*c4
pmaddubsw m4, [rfilterq + %3q*8+2*%%offset] ;x5*c5+x6*c6
pmaddubsw m6, [rfilterq + %3q*8+3*%%offset] ;x7*c7+x8*c8
paddw m0, m2
paddw m4, m6
paddw m0, m4
%else
pmaddwd m0, [rfilterq + %3q*8 ]
pmaddwd m2, [rfilterq + %3q*8+%%offset]
pmaddwd m4, [rfilterq + %3q*8+2*%%offset]
pmaddwd m6, [rfilterq + %3q*8+3*%%offset]
paddd m0, m2
paddd m4, m6
paddd m0, m4
%if %2 != 8
psrad m0, %2-8
%endif
%if %1 > 4
pmaddwd m1, [rfilterq + %3q*8 ]
pmaddwd m3, [rfilterq + %3q*8+%%offset]
pmaddwd m5, [rfilterq + %3q*8+2*%%offset]
pmaddwd m7, [rfilterq + %3q*8+3*%%offset]
paddd m1, m3
paddd m5, m7
paddd m1, m5
%if %2 != 8
psrad m1, %2-8
%endif
%endif
p%4 m0, m1
%endif
%endmacro
%macro QPEL_COMPUTE 2-3 ; width, bitdepth
%if %2 == 8
%if cpuflag(avx2) && (%0 == 3)
vperm2i128 m10, m0, m1, q0301
vinserti128 m0, m0, xm1, 1
SWAP 1, 10
vperm2i128 m10, m2, m3, q0301
vinserti128 m2, m2, xm3, 1
SWAP 3, 10
vperm2i128 m10, m4, m5, q0301
vinserti128 m4, m4, xm5, 1
SWAP 5, 10
vperm2i128 m10, m6, m7, q0301
vinserti128 m6, m6, xm7, 1
SWAP 7, 10
%endif
pmaddubsw m0, m12 ;x1*c1+x2*c2
pmaddubsw m2, m13 ;x3*c3+x4*c4
pmaddubsw m4, m14 ;x5*c5+x6*c6
pmaddubsw m6, m15 ;x7*c7+x8*c8
paddw m0, m2
paddw m4, m6
paddw m0, m4
%if %1 > 8
pmaddubsw m1, m12
pmaddubsw m3, m13
pmaddubsw m5, m14
pmaddubsw m7, m15
paddw m1, m3
paddw m5, m7
paddw m1, m5
%endif
%else
pmaddwd m0, m12
pmaddwd m2, m13
pmaddwd m4, m14
pmaddwd m6, m15
paddd m0, m2
paddd m4, m6
paddd m0, m4
%if %2 != 8
psrad m0, %2-8
%endif
%if %1 > 4
pmaddwd m1, m12
pmaddwd m3, m13
pmaddwd m5, m14
pmaddwd m7, m15
paddd m1, m3
paddd m5, m7
paddd m1, m5
%if %2 != 8
psrad m1, %2-8
%endif
%endif
%endif
%endmacro
%macro BI_COMPUTE 7-8 ; width, bitd, src1l, src1h, scr2l, scr2h, pw
paddsw %3, %5
%if %1 > 8
paddsw %4, %6
%endif
UNI_COMPUTE %1, %2, %3, %4, %7
%if %0 == 8 && cpuflag(avx2) && (%2 == 8)
vpermq %3, %3, 216
vpermq %4, %4, 216
%endif
%endmacro
%macro UNI_COMPUTE 5
pmulhrsw %3, %5
%if %1 > 8 || (%2 > 8 && %1 > 4)
pmulhrsw %4, %5
%endif
%if %2 == 8
packuswb %3, %4
%else
CLIPW %3, [pb_0], [max_pixels_%2]
%if (%1 > 8 && notcpuflag(avx)) || %1 > 16
CLIPW %4, [pb_0], [max_pixels_%2]
%endif
%endif
%endmacro
; ******************************
; void put_hevc_mc_pixels(int16_t *dst, ptrdiff_t dststride,
; uint8_t *_src, ptrdiff_t _srcstride,
; int height, int mx, int my)
; ******************************
%macro HEVC_PUT_HEVC_PEL_PIXELS 2
HEVC_PEL_PIXELS %1, %2
HEVC_UNI_PEL_PIXELS %1, %2
HEVC_BI_PEL_PIXELS %1, %2
%endmacro
%macro HEVC_PEL_PIXELS 2
cglobal hevc_put_hevc_pel_pixels%1_%2, 4, 4, 3, dst, src, srcstride,height
pxor m2, m2
.loop
SIMPLE_LOAD %1, %2, srcq, m0
MC_PIXEL_COMPUTE %1, %2, 1
PEL_10STORE%1 dstq, m0, m1
LOOP_END dst, src, srcstride
RET
%endmacro
%macro HEVC_UNI_PEL_PIXELS 2
cglobal hevc_put_hevc_uni_pel_pixels%1_%2, 5, 5, 2, dst, dststride, src, srcstride,height
.loop
SIMPLE_LOAD %1, %2, srcq, m0
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
%endmacro
%macro HEVC_BI_PEL_PIXELS 2
cglobal hevc_put_hevc_bi_pel_pixels%1_%2, 6, 6, 6, dst, dststride, src, srcstride, src2, height
pxor m2, m2
movdqa m5, [pw_bi_%2]
.loop
SIMPLE_LOAD %1, %2, srcq, m0
SIMPLE_BILOAD %1, src2q, m3, m4
MC_PIXEL_COMPUTE %1, %2, 1
BI_COMPUTE %1, %2, m0, m1, m3, m4, m5, 1
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
%endmacro
; ******************************
; void put_hevc_epel_hX(int16_t *dst, ptrdiff_t dststride,
; uint8_t *_src, ptrdiff_t _srcstride,
; int height, int mx, int my, int width);
; ******************************
%macro HEVC_PUT_HEVC_EPEL 2
%if cpuflag(avx2)
%define XMM_REGS 11
%else
%define XMM_REGS 8
%endif
cglobal hevc_put_hevc_epel_h%1_%2, 5, 6, XMM_REGS, dst, src, srcstride, height, mx, rfilter
%assign %%stride ((%2 + 7)/8)
EPEL_FILTER %2, mx, m4, m5, rfilter
.loop
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m4, m5, 1
PEL_10STORE%1 dstq, m0, m1
LOOP_END dst, src, srcstride
RET
cglobal hevc_put_hevc_uni_epel_h%1_%2, 6, 7, XMM_REGS, dst, dststride, src, srcstride, height, mx, rfilter
%assign %%stride ((%2 + 7)/8)
movdqa m6, [pw_%2]
EPEL_FILTER %2, mx, m4, m5, rfilter
.loop
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m4, m5
UNI_COMPUTE %1, %2, m0, m1, m6
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
cglobal hevc_put_hevc_bi_epel_h%1_%2, 7, 8, XMM_REGS, dst, dststride, src, srcstride, src2, height, mx, rfilter
movdqa m6, [pw_bi_%2]
EPEL_FILTER %2, mx, m4, m5, rfilter
.loop
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m4, m5, 1
SIMPLE_BILOAD %1, src2q, m2, m3
BI_COMPUTE %1, %2, m0, m1, m2, m3, m6, 1
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
; ******************************
; void put_hevc_epel_v(int16_t *dst, ptrdiff_t dststride,
; uint8_t *_src, ptrdiff_t _srcstride,
; int height, int mx, int my, int width)
; ******************************
cglobal hevc_put_hevc_epel_v%1_%2, 4, 6, XMM_REGS, dst, src, srcstride, height, r3src, my
movifnidn myd, mym
sub srcq, srcstrideq
EPEL_FILTER %2, my, m4, m5, r3src
lea r3srcq, [srcstrideq*3]
.loop
EPEL_LOAD %2, srcq, srcstride, %1
EPEL_COMPUTE %2, %1, m4, m5, 1
PEL_10STORE%1 dstq, m0, m1
LOOP_END dst, src, srcstride
RET
cglobal hevc_put_hevc_uni_epel_v%1_%2, 5, 7, XMM_REGS, dst, dststride, src, srcstride, height, r3src, my
movifnidn myd, mym
movdqa m6, [pw_%2]
sub srcq, srcstrideq
EPEL_FILTER %2, my, m4, m5, r3src
lea r3srcq, [srcstrideq*3]
.loop
EPEL_LOAD %2, srcq, srcstride, %1
EPEL_COMPUTE %2, %1, m4, m5
UNI_COMPUTE %1, %2, m0, m1, m6
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
cglobal hevc_put_hevc_bi_epel_v%1_%2, 6, 8, XMM_REGS, dst, dststride, src, srcstride, src2, height, r3src, my
movifnidn myd, mym
movdqa m6, [pw_bi_%2]
sub srcq, srcstrideq
EPEL_FILTER %2, my, m4, m5, r3src
lea r3srcq, [srcstrideq*3]
.loop
EPEL_LOAD %2, srcq, srcstride, %1
EPEL_COMPUTE %2, %1, m4, m5, 1
SIMPLE_BILOAD %1, src2q, m2, m3
BI_COMPUTE %1, %2, m0, m1, m2, m3, m6, 1
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
%endmacro
; ******************************
; void put_hevc_epel_hv(int16_t *dst, ptrdiff_t dststride,
; uint8_t *_src, ptrdiff_t _srcstride,
; int height, int mx, int my, int width)
; ******************************
%macro HEVC_PUT_HEVC_EPEL_HV 2
cglobal hevc_put_hevc_epel_hv%1_%2, 6, 7, 16 , dst, src, srcstride, height, mx, my, r3src
%assign %%stride ((%2 + 7)/8)
sub srcq, srcstrideq
EPEL_HV_FILTER %2
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m8, m1
%endif
SWAP m4, m0
add srcq, srcstrideq
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m9, m1
%endif
SWAP m5, m0
add srcq, srcstrideq
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m10, m1
%endif
SWAP m6, m0
add srcq, srcstrideq
.loop
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m11, m1
%endif
SWAP m7, m0
punpcklwd m0, m4, m5
punpcklwd m2, m6, m7
%if %1 > 4
punpckhwd m1, m4, m5
punpckhwd m3, m6, m7
%endif
EPEL_COMPUTE 14, %1, m12, m13
%if (%1 > 8 && (%2 == 8))
punpcklwd m4, m8, m9
punpcklwd m2, m10, m11
punpckhwd m8, m8, m9
punpckhwd m3, m10, m11
EPEL_COMPUTE 14, %1, m12, m13, m4, m2, m8, m3
%if cpuflag(avx2)
vinserti128 m2, m0, xm4, 1
vperm2i128 m3, m0, m4, q0301
PEL_10STORE%1 dstq, m2, m3
%else
PEL_10STORE%1 dstq, m0, m4
%endif
%else
PEL_10STORE%1 dstq, m0, m1
%endif
movdqa m4, m5
movdqa m5, m6
movdqa m6, m7
%if (%1 > 8 && (%2 == 8))
mova m8, m9
mova m9, m10
mova m10, m11
%endif
LOOP_END dst, src, srcstride
RET
cglobal hevc_put_hevc_uni_epel_hv%1_%2, 7, 8, 16 , dst, dststride, src, srcstride, height, mx, my, r3src
%assign %%stride ((%2 + 7)/8)
sub srcq, srcstrideq
EPEL_HV_FILTER %2
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m8, m1
%endif
SWAP m4, m0
add srcq, srcstrideq
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m9, m1
%endif
SWAP m5, m0
add srcq, srcstrideq
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m10, m1
%endif
SWAP m6, m0
add srcq, srcstrideq
.loop
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m11, m1
%endif
mova m7, m0
punpcklwd m0, m4, m5
punpcklwd m2, m6, m7
%if %1 > 4
punpckhwd m1, m4, m5
punpckhwd m3, m6, m7
%endif
EPEL_COMPUTE 14, %1, m12, m13
%if (%1 > 8 && (%2 == 8))
punpcklwd m4, m8, m9
punpcklwd m2, m10, m11
punpckhwd m8, m8, m9
punpckhwd m3, m10, m11
EPEL_COMPUTE 14, %1, m12, m13, m4, m2, m8, m3
UNI_COMPUTE %1, %2, m0, m4, [pw_%2]
%else
UNI_COMPUTE %1, %2, m0, m1, [pw_%2]
%endif
PEL_%2STORE%1 dstq, m0, m1
mova m4, m5
mova m5, m6
mova m6, m7
%if (%1 > 8 && (%2 == 8))
mova m8, m9
mova m9, m10
mova m10, m11
%endif
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
cglobal hevc_put_hevc_bi_epel_hv%1_%2, 8, 9, 16, dst, dststride, src, srcstride, src2, height, mx, my, r3src
%assign %%stride ((%2 + 7)/8)
sub srcq, srcstrideq
EPEL_HV_FILTER %2
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m8, m1
%endif
SWAP m4, m0
add srcq, srcstrideq
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m9, m1
%endif
SWAP m5, m0
add srcq, srcstrideq
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m10, m1
%endif
SWAP m6, m0
add srcq, srcstrideq
.loop
EPEL_LOAD %2, srcq-%%stride, %%stride, %1
EPEL_COMPUTE %2, %1, m14, m15
%if (%1 > 8 && (%2 == 8))
SWAP m11, m1
%endif
SWAP m7, m0
punpcklwd m0, m4, m5
punpcklwd m2, m6, m7
%if %1 > 4
punpckhwd m1, m4, m5
punpckhwd m3, m6, m7
%endif
EPEL_COMPUTE 14, %1, m12, m13
%if (%1 > 8 && (%2 == 8))
punpcklwd m4, m8, m9
punpcklwd m2, m10, m11
punpckhwd m8, m8, m9
punpckhwd m3, m10, m11
EPEL_COMPUTE 14, %1, m12, m13, m4, m2, m8, m3
SIMPLE_BILOAD %1, src2q, m8, m3
%if cpuflag(avx2)
vinserti128 m1, m8, xm3, 1
vperm2i128 m2, m8, m3, q0301
BI_COMPUTE %1, %2, m0, m4, m1, m2, [pw_bi_%2]
%else
BI_COMPUTE %1, %2, m0, m4, m8, m3, [pw_bi_%2]
%endif
%else
SIMPLE_BILOAD %1, src2q, m8, m9
BI_COMPUTE %1, %2, m0, m1, m8, m9, [pw_bi_%2]
%endif
PEL_%2STORE%1 dstq, m0, m4
mova m4, m5
mova m5, m6
mova m6, m7
%if (%1 > 8 && (%2 == 8))
mova m8, m9
mova m9, m10
mova m10, m11
%endif
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
%endmacro
; ******************************
; void put_hevc_qpel_hX_X_X(int16_t *dst, ptrdiff_t dststride,
; uint8_t *_src, ptrdiff_t _srcstride,
; int height, int mx, int my, int width)
; ******************************
%macro HEVC_PUT_HEVC_QPEL 2
cglobal hevc_put_hevc_qpel_h%1_%2, 5, 6, 16, dst, src, srcstride, height, mx, rfilter
QPEL_FILTER %2, mx
.loop
QPEL_H_LOAD %2, srcq, %1, 10
QPEL_COMPUTE %1, %2, 1
%if %2 > 8
packssdw m0, m1
%endif
PEL_10STORE%1 dstq, m0, m1
LOOP_END dst, src, srcstride
RET
cglobal hevc_put_hevc_uni_qpel_h%1_%2, 6, 7, 16 , dst, dststride, src, srcstride, height, mx, rfilter
mova m9, [pw_%2]
QPEL_FILTER %2, mx
.loop
QPEL_H_LOAD %2, srcq, %1, 10
QPEL_COMPUTE %1, %2
%if %2 > 8
packssdw m0, m1
%endif
UNI_COMPUTE %1, %2, m0, m1, m9
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
cglobal hevc_put_hevc_bi_qpel_h%1_%2, 7, 8, 16 , dst, dststride, src, srcstride, src2, height, mx, rfilter
movdqa m9, [pw_bi_%2]
QPEL_FILTER %2, mx
.loop
QPEL_H_LOAD %2, srcq, %1, 10
QPEL_COMPUTE %1, %2, 1
%if %2 > 8
packssdw m0, m1
%endif
SIMPLE_BILOAD %1, src2q, m10, m11
BI_COMPUTE %1, %2, m0, m1, m10, m11, m9, 1
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
; ******************************
; void put_hevc_qpel_vX_X_X(int16_t *dst, ptrdiff_t dststride,
; uint8_t *_src, ptrdiff_t _srcstride,
; int height, int mx, int my, int width)
; ******************************
cglobal hevc_put_hevc_qpel_v%1_%2, 4, 8, 16, dst, src, srcstride, height, r3src, my, rfilter
movifnidn myd, mym
lea r3srcq, [srcstrideq*3]
QPEL_FILTER %2, my
.loop
QPEL_V_LOAD %2, srcq, srcstride, %1, r7
QPEL_COMPUTE %1, %2, 1
%if %2 > 8
packssdw m0, m1
%endif
PEL_10STORE%1 dstq, m0, m1
LOOP_END dst, src, srcstride
RET
cglobal hevc_put_hevc_uni_qpel_v%1_%2, 5, 9, 16, dst, dststride, src, srcstride, height, r3src, my, rfilter
movifnidn myd, mym
movdqa m9, [pw_%2]
lea r3srcq, [srcstrideq*3]
QPEL_FILTER %2, my
.loop
QPEL_V_LOAD %2, srcq, srcstride, %1, r8
QPEL_COMPUTE %1, %2
%if %2 > 8
packssdw m0, m1
%endif
UNI_COMPUTE %1, %2, m0, m1, m9
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
cglobal hevc_put_hevc_bi_qpel_v%1_%2, 6, 10, 16, dst, dststride, src, srcstride, src2, height, r3src, my, rfilter
movifnidn myd, mym
movdqa m9, [pw_bi_%2]
lea r3srcq, [srcstrideq*3]
QPEL_FILTER %2, my
.loop
QPEL_V_LOAD %2, srcq, srcstride, %1, r9
QPEL_COMPUTE %1, %2, 1
%if %2 > 8
packssdw m0, m1
%endif
SIMPLE_BILOAD %1, src2q, m10, m11
BI_COMPUTE %1, %2, m0, m1, m10, m11, m9, 1
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
%endmacro
; ******************************
; void put_hevc_qpel_hvX_X(int16_t *dst, ptrdiff_t dststride,
; uint8_t *_src, ptrdiff_t _srcstride,
; int height, int mx, int my)
; ******************************
%macro HEVC_PUT_HEVC_QPEL_HV 2
cglobal hevc_put_hevc_qpel_hv%1_%2, 6, 8, 16, dst, src, srcstride, height, mx, my, r3src, rfilter
%if cpuflag(avx2)
%assign %%shift 4
%else
%assign %%shift 3
%endif
sub mxq, 1
sub myq, 1
shl mxq, %%shift ; multiply by 32
shl myq, %%shift ; multiply by 32
lea r3srcq, [srcstrideq*3]
sub srcq, r3srcq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m8, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m9, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m10, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m11, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m12, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m13, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m14, m0
add srcq, srcstrideq
.loop
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m15, m0
punpcklwd m0, m8, m9
punpcklwd m2, m10, m11
punpcklwd m4, m12, m13
punpcklwd m6, m14, m15
%if %1 > 4
punpckhwd m1, m8, m9
punpckhwd m3, m10, m11
punpckhwd m5, m12, m13
punpckhwd m7, m14, m15
%endif
QPEL_HV_COMPUTE %1, 14, my, ackssdw
PEL_10STORE%1 dstq, m0, m1
%if %1 <= 4
movq m8, m9
movq m9, m10
movq m10, m11
movq m11, m12
movq m12, m13
movq m13, m14
movq m14, m15
%else
movdqa m8, m9
movdqa m9, m10
movdqa m10, m11
movdqa m11, m12
movdqa m12, m13
movdqa m13, m14
movdqa m14, m15
%endif
LOOP_END dst, src, srcstride
RET
cglobal hevc_put_hevc_uni_qpel_hv%1_%2, 7, 9, 16 , dst, dststride, src, srcstride, height, mx, my, r3src, rfilter
%if cpuflag(avx2)
%assign %%shift 4
%else
%assign %%shift 3
%endif
sub mxq, 1
sub myq, 1
shl mxq, %%shift ; multiply by 32
shl myq, %%shift ; multiply by 32
lea r3srcq, [srcstrideq*3]
sub srcq, r3srcq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m8, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m9, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m10, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m11, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m12, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m13, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m14, m0
add srcq, srcstrideq
.loop
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m15, m0
punpcklwd m0, m8, m9
punpcklwd m2, m10, m11
punpcklwd m4, m12, m13
punpcklwd m6, m14, m15
%if %1 > 4
punpckhwd m1, m8, m9
punpckhwd m3, m10, m11
punpckhwd m5, m12, m13
punpckhwd m7, m14, m15
%endif
QPEL_HV_COMPUTE %1, 14, my, ackusdw
UNI_COMPUTE %1, %2, m0, m1, [pw_%2]
PEL_%2STORE%1 dstq, m0, m1
%if %1 <= 4
movq m8, m9
movq m9, m10
movq m10, m11
movq m11, m12
movq m12, m13
movq m13, m14
movq m14, m15
%else
mova m8, m9
mova m9, m10
mova m10, m11
mova m11, m12
mova m12, m13
mova m13, m14
mova m14, m15
%endif
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
cglobal hevc_put_hevc_bi_qpel_hv%1_%2, 8, 10, 16, dst, dststride, src, srcstride, src2, height, mx, my, r3src, rfilter
%if cpuflag(avx2)
%assign %%shift 4
%else
%assign %%shift 3
%endif
sub mxq, 1
sub myq, 1
shl mxq, %%shift ; multiply by 32
shl myq, %%shift ; multiply by 32
lea r3srcq, [srcstrideq*3]
sub srcq, r3srcq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m8, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m9, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m10, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m11, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m12, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m13, m0
add srcq, srcstrideq
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m14, m0
add srcq, srcstrideq
.loop
QPEL_H_LOAD %2, srcq, %1, 15
QPEL_HV_COMPUTE %1, %2, mx, ackssdw
SWAP m15, m0
punpcklwd m0, m8, m9
punpcklwd m2, m10, m11
punpcklwd m4, m12, m13
punpcklwd m6, m14, m15
%if %1 > 4
punpckhwd m1, m8, m9
punpckhwd m3, m10, m11
punpckhwd m5, m12, m13
punpckhwd m7, m14, m15
%endif
QPEL_HV_COMPUTE %1, 14, my, ackssdw
SIMPLE_BILOAD %1, src2q, m8, m9 ;m9 not used in this case
BI_COMPUTE %1, %2, m0, m1, m8, m9, [pw_bi_%2]
PEL_%2STORE%1 dstq, m0, m1
%if %1 <= 4
movq m8, m9
movq m9, m10
movq m10, m11
movq m11, m12
movq m12, m13
movq m13, m14
movq m14, m15
%else
movdqa m8, m9
movdqa m9, m10
movdqa m10, m11
movdqa m11, m12
movdqa m12, m13
movdqa m13, m14
movdqa m14, m15
%endif
add dstq, dststrideq ; dst += dststride
add srcq, srcstrideq ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
%endmacro
%macro WEIGHTING_FUNCS 2
%if WIN64 || ARCH_X86_32
cglobal hevc_put_hevc_uni_w%1_%2, 4, 5, 7, dst, dststride, src, height, denom, wx, ox
mov r4d, denomm
%define SHIFT r4d
%else
cglobal hevc_put_hevc_uni_w%1_%2, 6, 6, 7, dst, dststride, src, height, denom, wx, ox
%define SHIFT denomd
%endif
lea SHIFT, [SHIFT+14-%2] ; shift = 14 - bitd + denom
%if %1 <= 4
pxor m1, m1
%endif
movd m2, wxm ; WX
movd m4, SHIFT ; shift
%if %1 <= 4
punpcklwd m2, m1
%else
punpcklwd m2, m2
%endif
dec SHIFT
movdqu m5, [pd_1]
movd m6, SHIFT
pshufd m2, m2, 0
mov SHIFT, oxm
pslld m5, m6
%if %2 != 8
shl SHIFT, %2-8 ; ox << (bitd - 8)
%endif
movd m3, SHIFT ; OX
pshufd m3, m3, 0
%if WIN64 || ARCH_X86_32
mov SHIFT, heightm
%endif
.loop
SIMPLE_LOAD %1, 10, srcq, m0
%if %1 <= 4
punpcklwd m0, m1
pmaddwd m0, m2
paddd m0, m5
psrad m0, m4
paddd m0, m3
%else
pmulhw m6, m0, m2
pmullw m0, m2
punpckhwd m1, m0, m6
punpcklwd m0, m6
paddd m0, m5
paddd m1, m5
psrad m0, m4
psrad m1, m4
paddd m0, m3
paddd m1, m3
%endif
packssdw m0, m1
%if %2 == 8
packuswb m0, m0
%else
CLIPW m0, [pb_0], [max_pixels_%2]
%endif
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, 2*MAX_PB_SIZE ; src += srcstride
dec heightd ; cmp height
jnz .loop ; height loop
RET
cglobal hevc_put_hevc_bi_w%1_%2, 4, 6, 10, dst, dststride, src, src2, height, denom, wx0, wx1, ox0, ox1
movifnidn r5d, denomm
%if %1 <= 4
pxor m1, m1
%endif
movd m2, wx0m ; WX0
lea r5d, [r5d+14-%2] ; shift = 14 - bitd + denom
movd m3, wx1m ; WX1
movd m0, r5d ; shift
%if %1 <= 4
punpcklwd m2, m1
punpcklwd m3, m1
%else
punpcklwd m2, m2
punpcklwd m3, m3
%endif
inc r5d
movd m5, r5d ; shift+1
pshufd m2, m2, 0
mov r5d, ox0m
pshufd m3, m3, 0
add r5d, ox1m
%if %2 != 8
shl r5d, %2-8 ; ox << (bitd - 8)
%endif
inc r5d
movd m4, r5d ; offset
pshufd m4, m4, 0
%if UNIX64
%define h heightd
%else
mov r5d, heightm
%define h r5d
%endif
pslld m4, m0
.loop
SIMPLE_LOAD %1, 10, srcq, m0
SIMPLE_LOAD %1, 10, src2q, m8
%if %1 <= 4
punpcklwd m0, m1
punpcklwd m8, m1
pmaddwd m0, m3
pmaddwd m8, m2
paddd m0, m4
paddd m0, m8
psrad m0, m5
%else
pmulhw m6, m0, m3
pmullw m0, m3
pmulhw m7, m8, m2
pmullw m8, m2
punpckhwd m1, m0, m6
punpcklwd m0, m6
punpckhwd m9, m8, m7
punpcklwd m8, m7
paddd m0, m8
paddd m1, m9
paddd m0, m4
paddd m1, m4
psrad m0, m5
psrad m1, m5
%endif
packssdw m0, m1
%if %2 == 8
packuswb m0, m0
%else
CLIPW m0, [pb_0], [max_pixels_%2]
%endif
PEL_%2STORE%1 dstq, m0, m1
add dstq, dststrideq ; dst += dststride
add srcq, 2*MAX_PB_SIZE ; src += srcstride
add src2q, 2*MAX_PB_SIZE ; src2 += srcstride
dec h ; cmp height
jnz .loop ; height loop
RET
%endmacro
INIT_XMM sse4 ; adds ff_ and _sse4 to function name
WEIGHTING_FUNCS 2, 8
WEIGHTING_FUNCS 4, 8
WEIGHTING_FUNCS 6, 8
WEIGHTING_FUNCS 8, 8
WEIGHTING_FUNCS 2, 10
WEIGHTING_FUNCS 4, 10
WEIGHTING_FUNCS 6, 10
WEIGHTING_FUNCS 8, 10
WEIGHTING_FUNCS 2, 12
WEIGHTING_FUNCS 4, 12
WEIGHTING_FUNCS 6, 12
WEIGHTING_FUNCS 8, 12
HEVC_PUT_HEVC_PEL_PIXELS 2, 8
HEVC_PUT_HEVC_PEL_PIXELS 4, 8
HEVC_PUT_HEVC_PEL_PIXELS 6, 8
HEVC_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
HEVC_PUT_HEVC_QPEL 8, 8
HEVC_PUT_HEVC_QPEL 12, 8
HEVC_PUT_HEVC_QPEL 16, 8
HEVC_PUT_HEVC_QPEL 4, 10
HEVC_PUT_HEVC_QPEL 8, 10
HEVC_PUT_HEVC_QPEL 4, 12
HEVC_PUT_HEVC_QPEL 8, 12
HEVC_PUT_HEVC_QPEL_HV 2, 8
HEVC_PUT_HEVC_QPEL_HV 4, 8
HEVC_PUT_HEVC_QPEL_HV 6, 8
HEVC_PUT_HEVC_QPEL_HV 8, 8
HEVC_PUT_HEVC_QPEL_HV 2, 10
HEVC_PUT_HEVC_QPEL_HV 4, 10
HEVC_PUT_HEVC_QPEL_HV 6, 10
HEVC_PUT_HEVC_QPEL_HV 8, 10
HEVC_PUT_HEVC_QPEL_HV 2, 12
HEVC_PUT_HEVC_QPEL_HV 4, 12
HEVC_PUT_HEVC_QPEL_HV 6, 12
HEVC_PUT_HEVC_QPEL_HV 8, 12
%if HAVE_AVX2_EXTERNAL
INIT_YMM avx2 ; adds ff_ and _avx2 to function name & enables 256b registers : m0 for 256b, xm0 for 128b. cpuflag(avx2) = 1 / notcpuflag(avx) = 0
HEVC_PUT_HEVC_PEL_PIXELS 32, 8
HEVC_PUT_HEVC_PEL_PIXELS 16, 10
HEVC_PUT_HEVC_EPEL 32, 8
HEVC_PUT_HEVC_EPEL 16, 10
HEVC_PUT_HEVC_EPEL_HV 16, 10
HEVC_PUT_HEVC_EPEL_HV 32, 8
HEVC_PUT_HEVC_QPEL 32, 8
HEVC_PUT_HEVC_QPEL 16, 10
HEVC_PUT_HEVC_QPEL_HV 16, 10
%endif ;AVX2
%endif ; ARCH_X86_64
| 30.763158 | 147 | 0.474298 |
16dfa43018b269ca98727855713db80e689dd82f | 354 | asm | Assembly | programs/oeis/230/A230089.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/230/A230089.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/230/A230089.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A230089: If n is divisible by 4 then 4, if n is divisible by 2 then 2, otherwise n.
; 1,2,3,4,5,2,7,4,9,2,11,4,13,2,15,4,17,2,19,4,21,2,23,4,25,2,27,4,29,2,31,4,33,2,35,4,37,2,39,4,41,2,43,4,45,2,47,4,49,2,51,4,53,2,55,4,57,2,59,4,61,2,63,4,65,2,67,4,69,2,71,4,73,2,75,4,77,2,79,4,81,2,83,4,85,2,87,4,89,2
lpb $0,$0
pow $0,3
mod $0,4
lpe
add $0,1
| 39.333333 | 221 | 0.60452 |
48dd673ce1a789b0c2e451ac4ca28feffc3ce613 | 579 | asm | Assembly | oeis/166/A166267.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/166/A166267.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/166/A166267.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A166267: Number of 1's in the binary representation of A000129(n).
; Submitted by Jon Maiga
; 0,1,1,2,2,4,3,4,4,7,5,8,6,7,10,11,10,8,13,12,12,14,16,17,11,14,17,20,16,17,19,21,23,17,17,19,24,24,25,18,29,26,29,26,26,29,35,29,26,40,29,33,33,38,36,34,28,38,42,40,37,34,40,27,45,35,37,41,40,44,48,45,41,45
seq $0,163271 ; Numerators of fractions in a 'zero-transform' approximation of sqrt(2) by means of a(n) = (a(n-1) + c)/(a(n-1) + 1) with c=2 and a(1)=0.
add $0,1
seq $0,120 ; 1's-counting sequence: number of 1's in binary expansion of n (or the binary weight of n).
sub $0,1
| 64.333333 | 208 | 0.668394 |
bf1ec349faf2278547f210479c685611f02ef508 | 1,278 | asm | Assembly | programs/oeis/005/A005367.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/005/A005367.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/005/A005367.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A005367: a(n) = 2*(2^n + 1)*(2^(n+1) - 1).
; 4,18,70,270,1054,4158,16510,65790,262654,1049598,4196350,16781310,67117054,268451838,1073774590,4295032830,17180000254,68719738878,274878431230,1099512676350,4398048608254,17592190238718,70368752566270,281474993487870,1125899940397054,4503599694479358,18014398643699710,72057594306363390,288230376688582654,1152921505680588798,4611686020574871550,18446744078004518910,73786976303428141054,295147905196532695038,1180591620751771041790,4722366482938364690430,18889465931616019808254,75557863726189201326078,302231454904207049490430,1208925819615728686333950,4835703278460715722080254,19342813113838464841809918,77371252455345063274217470,309485009821362660910825470,1237940039285415459271213054,4951760157141591468340674558,19807040628566225135874342910,79228162514264619068520660990,316912650057057913324129222654,1267650600228230527396610047998,5070602400912919857786626506750,20282409603651674927546878656510,81129638414606690702988259885054,324518553658426744797554530058238,1298074214633706943161421101268990,5192296858534827700588090367148030,20769187434139310658237173392736254,83076749736557242344718317419233278,332306998946228968802412517373509630
mov $1,2
pow $1,$0
mul $1,2
add $1,1
bin $1,2
sub $1,1
mul $1,2
mov $0,$1
| 106.5 | 1,157 | 0.902973 |
22af7efdd4be6c27f2cb2d28102d017827f7531c | 7,077 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_648.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_0xa0_notsx.log_21829_648.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_0xa0_notsx.log_21829_648.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 %r12
push %r14
push %r15
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x63ad, %rsi
lea addresses_normal_ht+0x832b, %rdi
nop
add %r14, %r14
mov $39, %rcx
rep movsl
nop
and %rax, %rax
lea addresses_UC_ht+0x322b, %rsi
lea addresses_D_ht+0x1a82b, %rdi
nop
nop
xor $52409, %r12
mov $56, %rcx
rep movsb
nop
and %rsi, %rsi
lea addresses_WC_ht+0x1ad53, %r12
nop
nop
nop
sub %r15, %r15
mov $0x6162636465666768, %r14
movq %r14, %xmm4
and $0xffffffffffffffc0, %r12
movntdq %xmm4, (%r12)
nop
nop
nop
add %r14, %r14
lea addresses_WT_ht+0x1ee2b, %rcx
nop
cmp %r15, %r15
movb (%rcx), %al
nop
nop
nop
nop
dec %rdi
lea addresses_UC_ht+0x7c2b, %rcx
nop
nop
nop
xor %r12, %r12
mov (%rcx), %r14d
nop
nop
nop
nop
nop
mfence
lea addresses_A_ht+0xa82b, %rax
nop
sub $49464, %rcx
movl $0x61626364, (%rax)
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_normal_ht+0x1482b, %rcx
nop
nop
nop
nop
nop
lfence
mov (%rcx), %rax
nop
nop
nop
nop
nop
sub %r12, %r12
lea addresses_WT_ht+0x101ab, %rcx
nop
sub %rdi, %rdi
mov (%rcx), %r15d
nop
nop
nop
inc %r12
lea addresses_A_ht+0xc7ab, %rsi
lea addresses_normal_ht+0xa42b, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
add $20706, %r12
mov $81, %rcx
rep movsq
nop
nop
nop
lfence
lea addresses_UC_ht+0x1bd9e, %r15
add %rcx, %rcx
movw $0x6162, (%r15)
nop
nop
nop
cmp %rcx, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
// Load
lea addresses_RW+0x1206b, %rbp
nop
cmp $50616, %r12
vmovups (%rbp), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %r14
nop
nop
nop
xor %rbp, %rbp
// REPMOV
lea addresses_WC+0x1fd2b, %rsi
lea addresses_normal+0x1ad2b, %rdi
nop
nop
nop
and %r15, %r15
mov $40, %rcx
rep movsq
nop
nop
cmp %rdi, %rdi
// Faulty Load
lea addresses_D+0xf82b, %r8
nop
xor %rdi, %rdi
vmovups (%r8), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %rbp
lea oracles, %rsi
and $0xff, %rbp
shlq $12, %rbp
mov (%rsi,%rbp,1), %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_RW', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal', 'congruent': 8, 'same': False}}
[Faulty Load]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': True}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 9}}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 11}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 34.691176 | 2,999 | 0.658612 |
16783b8a94705b30210f3c1abdb088542579d7f8 | 16,257 | asm | Assembly | 45/runtime/rt/gwini.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/runtime/rt/gwini.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/runtime/rt/gwini.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | TITLE GWINI - GW BASIC 2.0 Initialization/Utility Routines
;***
; GWINI - GW BASIC 2.0 Initialization/Utility Routines
;
; Copyright <C> 1986, Microsoft Corporation
;
;Purpose:
;
; The routines in this module are always called; regardless of
; whether the statements they are initializing are found in the
; program or not. This module should not cause any statement
; processing module to be linked in (i.e. only low-level routines
; should be called).
;
;******************************************************************************
INCLUDE switch.inc
INCLUDE rmacros.inc ; general runtime macros
UseSeg _BSS
UseSeg _DATA
UseSeg ER_TEXT
UseSeg RT_TEXT
INCLUDE seg.inc ; Segment definitions
INCLUDE baslibma.inc
INCLUDE files.inc
INCLUDE nhutil.inc
INCLUDE idmac.inc ; Internal debugging macros
INCLUDE const.inc ; bit flag constants
INCLUDE rtps.inc ; constants shared with QBI
.radix 10
sBegin _DATA
globalW b$pCommSave,Near_Ret,1 ; conditional vector to B$CommSave
globalW b$pCommRestore,Near_Ret,1 ; conditional vector to B$CommRestore
; b$TempSD is a general purpose string descriptor for temporary use
globalW b$TempSD,?,2 ; handle (ppData) & SB
externB b$CRTWIDTH ; Physical width
externB b$SCRNWIDTH ; Logical width
externB b$WDOBOT
externB b$WDOTOP
externW b$CURSOR ; (1,1)-relative screen cursor
externB b$LINCNT
externW b$VWINI_PTR ;Calls B$GRPINI once initialized
externW __aenvseg
; Added with revision [28]
;***
;b$IOFLAG - General Purpose IO Bits
;OEM-callback routine (variable)
;
;Purpose:
; This variable keeps track of the global state of the I/O module.
; Most of the bits in the flag variable are used to handle all the
; different cases for I/O redirection.
;
;Allocation:
; b$IOFLAG is a BYTE value declared in the _DATA segment by
; the OEM-Independent code.
;
;Values:
; Field definitions of b$IOFLAG are in CONST.INC. Initially, all
; fields are set to 0.
;
; RED_INP is a bit that is set when input from stdin is being redirected
; from a file. This field is set during console initialization
; by the runtime and is not changed. (01H)
;
; RED_OUT is a bit that is set when output stdout is being redirected
; to a file. This field is set during console initialization
; by the runtime and is not changed. (02H)
;
; LPR_ECHO is a bit that is set when output to the screen is being
; echoed to the line printer. Its value does not affect redirected
; IO, but the printer will not echo redirected output. (04H)
; This field is set/cleared when the Print Scrn key is recognized.
;
; F_KDSP is a bit that is set when currently updating a function key
; display, and output should not be sent to the printer or a
; redirected file. A special routine to map the function keys
; is called when this is true. (08H)
;
; IN_INPUT is a bit that is set when redirected output to stdout is
; to be inhibited. This is when an INPUT statement is being
; processed, and the user is editing his input. Not until the
; user hits <return> is the data entered sent to the redirected
; file, so that the editing corrections are not present.
; However, while IN_INPUT is set , output will go to the screen,
; using screen cursor values. (10H)
;
; F_EDIT is a bit that is set when in the INPUT statement, and B$PRTMAP
; should be disabled as B$EDTMAP does the mapping. (20H)
;
; SCN_INIT is a bit that is set to indicate that the screen has been
; physically initialized. This field is set by the OEM at the
; time the screen is actually initialized (B$SCINIT). (40H)
;
; SCN_SCROLL is a bit indicating that we need to scroll the screen
; upon the first screen operation because we entered on the last
; line of the screen. This flag is only used by the OEM before
; the screen has been physically initialized. (80H)
;
;Initially Set:
; RED_INP is set by the OEM-Independent code before B$GWINI or
; B$RTLLINIT are called.
; RED_OUT is set by the OEM-Independent code before B$GWINI or
; B$RTLLINIT are called.
; LPR_ECHO is statically initialized to be 0.
; F_KDSP is statically initialized to be 0.
; IN_INPUT is statically initialized to be 0.
; F_EDIT is statically initialized to be 0.
; SCN_INIT is statically initialized to be 0.
; SCN_SCROLL is statically initialized to be 0.
;
;Modified By:
; RED_INP and RED_OUT should not be modified once initialized.
; LPR_ECHO is modified by the OEM-Independent code upon detection
; of the Print Screen Key and upon a RUN command.
; F_KDSP is set at the beginning of the function key update routines
; and cleared at the end of them.
; IN_INPUT and F_EDIT are set and cleared by the Screen Editor
; SCN_INIT and SCN_SCROLL are only modified by the OEM-Dependent code.
;
;Used By:
; All the fields of b$IOFLAG except for SCN_INIT and SCN_SCROLL are
; only used by the OEM-Independent Code. SCN_INIT is used by both
; the OEM-Dependent code and the termination code. If SCN_INIT
; is 1 at termination time, then B$RESETSCN will be called. Otherwise
; B$RESETSCN will not be called by the termination code. SCN_SCROLL
; is not used by the OEM-Independent Code in any way. This flag
; may be used for any purpose.
;****
globalB b$IOFLAG,0 ; general-purpose IO bits defined above.
;***
;b$vKEYDSP - Vector for indirect call to B$KEYDSP, display/clear function keys
;OEM-callback routine (variable)
;
;Purpose:
; Update the function key display. If b$KEY_SW is set to 0 then
; the function key display is disabled and is removed from the
; screen if it existed. If b$KEY_SW is set to -1, then the
; function key display is enabled and is displayed on the screen
; if needed.
;
; This routine is called indirectly through the vector
; b$vKEYDSP
;
;Entry:
; B$KEY_SW set appropriately: 0 = turn off function key display
; -1 = display function keys.
;
;Exit:
; None.
;
;Uses:
; Per Convention
;
;Preserves:
; AX, BX, CX, DX
;
;Exceptions:
; Just returns unless B$KEYDSP is linked in by B$INPP or B$KFUN.
;
;Vector Information:
; b$vKeyDSP is a WORD value defined in the _DATA segment by the
; OEM-Independent code. It is set up by an initializer before
; the BASIC runtime is first called. It should not be modified.
;******************************************************************************
globalW b$vKEYDSP,Near_Ret,1
sEnd _DATA
sBegin _BSS
externB b$KEY_SW ;GWDATA -
externW B$WNDWSW ;GWDATA -
;***
; b$HugeShift, b$HugeDelta - OS selector shift count for HUGE access
;OEM-callback routine (variable)
;
;Purpose:
; This value is used to access successive pieces of a
; HUGE array. To get to the next segment of memory in
; which the array exists, use the following formula:
; (assuming that the array is accessed through DS:)
;
; DS: = DS: + (1 << b$HugeShift)
;
; The value (1 << b$HugeShift) is precomputed and stored
; in the variable b$HugeDelta.
;
; NOTE: For DOS, these variables are guarenteed to be identical
; each time the program is run and could be replaced by
; constants.
;
;Allocation:
; b$HugeShift is a BYTE value defined in the _BSS segment by
; the runtime code.
;
; b$HugeDelta is a WORD value defined in the _BSS segment by
; the runtime code.
;
;Values:
; The values for b$HugeShift and b$HugeDelta are dependent upon
; the operating system. Both variables are initialized by the
; runtime during runtime initialization and should not be changed.
;
;Initially Set:
; The values of these variables are undefined until they are set
; at initialization time. They are initialized after B$GWINI and
; and B$RTLLINIT are called but before any user code is executed
; or interpreted.
;
;Modified By:
; These variables should not be modified once they are initialized.
;
;Used By:
; These variables are used by anyone who wants to access a dynamic
; array bigger than 64K.
;****************************************************************************
globalB b$HugeShift,? ;OS selector shift count for HUGE access
;NOTE: this uses an extra byte from
;b$HugeDelta when we pass b$HugeShift to
;DOSGETHUGESHIFT (which returns a WORD)
globalW b$HugeDelta,? ;OS selector seg increment for HUGE access
;***
;b$Buf1, b$Buf2 - temporary buffer space
;OEM-callback routine (variable)
;
;Purpose:
; Both b$Buf1 and b$Buf2 are large buffers of temporary storage
; for general use. These buffers are used in many places
; throughout the runtime. While it is theoretically possible for
; the OEM code to use either or both of these buffers any time they
; are not in use, there is no way to determine whether they are being
; used. The mechanism in the rest of the runtime for determining
; availability is visual inspection and use of the routines
; B$HoldBuf(n) and B$FreeBuf(n) which do not exist in a release
; version.
;
; These buffers are mainly described here for the understanding
; of the sample code supplied by MicroSoft. However, there are a
; couple of specific times the buffers are guaranteed to be free,
; which are described below.
;
; Note that b$Buf2 immediately follows b$Buf1, so if both are
; available you have a block of 258 contiguous bytes of DGROUP.
;
;Allocated:
; b$Buf1 is a block of 129 BYTES allocated in _BSS by the runtime.
; b$Buf2 is a block of 129 BYTES allocated in _BSS by the runtime.
;
;Values:
; Undefined
;
;Initially Set:
; Undefined
;
;Modified By:
; Undefined
;
;Used By:
; b$BUF1 is guaranteed to be available during the calls to
; B$GWINI and B$RTLLINI. Furthermore, it is guaranteed
; that the value of b$BUF1 will not change between these
; two calls.
; b$BUF2 is guaranteed to be available with the same conditions as
; b$BUF1. Also, b$BUF2 will be available for use during
; the execution of any of the routines in LLCOM5.ASM.
; However, the contents of the buffer may change between
; calls to these routines.
;******************************************************************************
;
; NOTE -- Any (or all) of these LARGE buffers can be used by anyone
; that wants to, provided they are not used in a calling routine.
; IN DEBUG CODE, call B$HoldBuf(1,2,12,3) to allocate the the buffers to
; your routine, and B$FreeBuf(1,2,12,3) to release the buffers.
;
;#########
labelB <PUBLIC,b$PATHNAM> ; pathname buffer
globalB b$Buf1,,FILNAML ; 1st large (pathname-sized) scratch buffer
globalB b$Buf2,,FILNAML ; 2nd large (pathname-sized) scratch buffer
globalB b$Buf3,,16 ; 3rd scratch buffer
; these buffers MUST remain contiguous
sEnd _BSS
sBegin RT_TEXT
assumes cs,RT_TEXT
PAGE
SUBTTL Screen initialization
;***
; B$WHOME - Home the text cursor
; Moved here from iotty.asm with revision [60]. See note below!
;
; Input:
; b$WDOTOP set
; Output:
; [DL] == home row of cursor
; [DH] == home column of cursor
; Modifies:
; NONE
; Note:
; IMPORTANT: Must be kept in sync with the local WHOME routine in iotty.asm
;****
cProc B$WHOME,<PUBLIC,NEAR>
cBegin
MOV DL,b$WDOTOP
MOV DH,1
cEnd
;***
; B$CRLF - Adust cursor row/column while doing a CR/LF. [61]
; Added with [60].
;
; Purpose:
; This routine is called every time a CR/LF is to be output
; to the screen. It checks whether the screen will need to be
; scrolled and if not, increments DL. Flags are set indicating
; whether or not the screen must be scrolled. DH is set to 1.
;
; Entry:
; DL = current line
;
; Exit:
; DH = 1
; DL = new line
; ZF ==> didn't change DL, since on last line
; NZ ==> changed DL, since not on last line
;
; Modifies:
; None
;****
cProc B$CRLF,<PUBLIC,NEAR>
cBegin
MOV DH,1 ; reset cursor column to 1
CMP DL,b$LINCNT ; on status line?
JNE NOT_STATUS ; brif not -- don't adjust line
MOV DL,b$WDOBOT ; move cursor to bottom
; line of text window
NOT_STATUS:
CMP b$WDOBOT,DL ; Are we at bottom of window?
JE NO_INC ; brif so -- ZF ==> last line
INC DX ; increment row (NZ)
NO_INC: ; return with flags set
cEnd
;***
;B$SCNCLR - Home Text & Graphics Cursor, Refresh Function Key Display
;OEM-callback routine
;
; Re-written with revision [54].
;
;Purpose:
; This routine is used to initialize the screen editor, reset
; the graphics viewport and window to the screen dimensions,
; center the graphics cursor, home the text cursor and display
; the function keys if needed.
;
; This routine must be called at initialization and whenever
; screen characters are no longer accessible to the user because
; the screen dimensions have changed. This routine should only
; be called from B$SCRSTT, B$SWIDTH, B$RESETSCN, and during
; initialization.
;
;Entry:
; None.
;
;Exit:
; None.
;
;Uses:
; Per Convention
;
;Preserves:
; BX, CX, DX
;
;Exceptions:
; None.
;****
cProc B$SCNCLR,<NEAR,PUBLIC>
cBegin
CALL B$WHOME ; DX=text cursor home
MOV b$CURSOR,DX ; update b$CURSOR
CALL [b$vKEYDSP] ; Conditionally display softkeys
; (displays user cursor at position
; b$CURSOR when done)
cEnd <nogen> ; fall into B$VIEWINIT
; Added as part of revision [30]
;***
;B$VIEWINIT - Initialize viewport, center graphics cursor
;OEM-callback routine
;
;Purpose:
; Initialize the graphics viewport and centers the graphics cursor.
; Sets the logical coordinate system to be identical to the
; physical coordinate system (disable WINDOW command).
;
;Entry:
; None
;
;Exit:
; None
;
;Uses:
; Per Convention
;
;Preserves:
; AX, BX, CX, DX
;
;Exceptions:
; None.
;****
cProc B$VIEWINIT,<NEAR,PUBLIC>
cBegin
CALL [b$VWINI_PTR] ;Initialize viewport, center graphics cursor
MOV B$WNDWSW,0 ;Turn B$WNDWSW and B$WNDWSC off
Near_Ret: ;near ret for vectors
cEnd
;***
;B$SCNSWI - Set screen width(logical/physical) and height
;OEM-callback routine
;
;Purpose:
; B$SCNSWI will set the screen width (both logical and physical)
; and screen height. Since this routine is used to communicate
; the screen dimensions to the Screen Editor, it must be called at
; initialization and whenever the character dimensions of the
; screen are modified.
;
;Input:
; AL=width, CL=height
;
;Output:
; None.
;
;Uses:
; Per Convention
;
;Preserves:
; AX, BX, CX, DX
;
;Exceptions:
; None.
;****
cProc B$SCNSWI,<PUBLIC,NEAR>
cBegin
MOV b$CRTWIDTH,AL ; Set physical width of screen
MOV b$SCRNWIDTH,AL ; Set SCRN: logical width
MOV B$LINCNT,CL ;Save physical height
MOV b$WDOTOP,1 ;Init window top
PUSH CX
DEC CL ; Reserve status line
MOV b$WDOBOT,CL ;Set window bottom
POP CX
cEnd ; End of B$SCNSWI
;***
;B$UPCASE - Convert Character to Upper Case
;DBCS-callback
;
;Purpose:
; Convert the character in AL to uppercase if possible. If it is
; not a character or it is already uppercase, it is not modified.
; This is done by a comparison against the range 'a'-> 'z'. It does
; not use the Operating System call to case convert characters
; outside of this range.
;
; NOTE: It is the caller's responsibility to make sure that it is
; not sending 1/2 of a KANJI character to this routine.
;
; WARNING: Because this routine is called by B$GETCH
;
; DS != DGROUP
;
; If you go to change the code, keep this in mind!!!
;Entry:
; AL = Character to convert
;
;Exit:
; AL = UpperCase version of character
;
;Uses:
; Per Convention
;
;Preserves:
; AH, BX, CX, DX
;
;Exceptions:
; None.
;****
cProc B$UPCASE,<PUBLIC,NEAR>
cBegin
CMP AL,'a' ;Is AL < 'a'
JB upret ;Skip it
CMP AL,'z' ;Is AL > 'z'
JA upret ;Skit it
upit:
AND AL,255-' ' ;Convert to Upper Case
upret:
cEnd
;***
;B$Mul32x16 -- 32 by 16 bit multiply
;
;Purpose:
; Added with revision [68].
;
;Entry:
; [DX|AX] = multiplicand
; [CX] = multiplier
;
;Exit:
; [DX|AX] = [DX|AX] * [CX]
; CF ==> overflow
;
;Uses:
; BX
;
;Preserves
; CX
;
;Exceptions:
; None
;
;******************************************************************************
cProc B$Mul32x16,<PUBLIC,NEAR>
cBegin
xchg bx,dx ; [BX|AX] = multiplicand
mul cx ; multiply low word by 1000 ([DX|AX] = result)
push ax ; save low word result
push dx ; save first overflow
xchg ax,bx ; AX = high word
mul cx ; [DX|AX] = result of high word multiply
pop dx ; DX = original high word
jc Overflow ; brif overflow (need to clean stack)
add ax,dx ; AX = high word of result (PSW.C if overflow)
xchg ax,dx ; DX = high word of result
OverFlow:
pop ax ; AX = low word of result
cEnd
page
sEnd RT_TEXT
END
| 27.885077 | 79 | 0.703266 |
94d9ec5ceb9b0431debf99eb9c7e958f28c09309 | 893 | asm | Assembly | ucle/core/tests/fnsim/frisc/isa/test_str.asm | mcavrag/UCLE-ide | 6036b75ddf5f6a05c552887f3da4bb84d534d144 | [
"MIT"
] | null | null | null | ucle/core/tests/fnsim/frisc/isa/test_str.asm | mcavrag/UCLE-ide | 6036b75ddf5f6a05c552887f3da4bb84d534d144 | [
"MIT"
] | 82 | 2018-03-28T11:27:30.000Z | 2018-06-26T05:00:41.000Z | ucle/core/tests/fnsim/frisc/isa/test_str.asm | mcavrag/UCLE-ide | 6036b75ddf5f6a05c552887f3da4bb84d534d144 | [
"MIT"
] | null | null | null | ORG 0
MOVE MSTART, SP
MOVE 1, R0
STORE R0, (M1)
LOAD R0, (M1) ; assert R0 == 1
LOAD R1, (NUM1)
STORE R1, (SP+4)
LOAD R1, (SP+4) ; assert R1 == 0xABCDDCBA
MOVE 2, R2
STOREH R2, (M3)
LOADH R2, (M3) ; assert R2 == 2
LOAD R3, (NUM1)
STOREH R3, (SP+0C)
LOADH R3, (SP+0C) ; assert R3 == 0xDCBA
MOVE 3, R4
STOREB R4, (M5)
LOADB R4, (M5) ; assert R4 == 3
LOAD R5, (NUM1)
STOREB R5, (SP+14)
LOADB R5, (SP+14) ; assert R5 == 0xBA
MOVE 0FF, R6
STOREB R6, (NUM1)
LOAD R6, (NUM1) ; assert R6 == 0xABCDCFF
HALT
NUM1 DW 0ABCDDCBA
MSTART
M1 DW 0
M2 DW 0
M3 DH 0
M4 DH 0
M5 DB 0
M6 DB 0
| 21.261905 | 57 | 0.404255 |
1e0148c9da7139bbe14cec3bcce3f7d66c4d1a90 | 6,994 | asm | Assembly | gc.asm | MichaelRFairhurst/copycollect.asm | 9403788d888faa307230ba9949840f19f72cb83e | [
"MIT"
] | null | null | null | gc.asm | MichaelRFairhurst/copycollect.asm | 9403788d888faa307230ba9949840f19f72cb83e | [
"MIT"
] | null | null | null | gc.asm | MichaelRFairhurst/copycollect.asm | 9403788d888faa307230ba9949840f19f72cb83e | [
"MIT"
] | null | null | null | default rel
struc heap_obj
heap_obj_type: resb 1
endstruc
struc string_matrix
resb 1 ; matrix_type
string_matrix_data: ; contiguous data
endstruc
struc fixed_matrix
resb 1 ; matrix_type
fixed_matrix_rows: resd 1 ; 64 bytes
fixed_matrix_cols: resd 1 ;
fixed_matrix_data: ; contiguous data
endstruc
struc moved_heap_obj
resb 1 ; matrix_type
moved_heap_obj_newptr: ; new ptr
endstruc
struc pair
resb 1 ; matrix_type
pair_first: resq 1; ptr
pair_second: resq 1; ptr
pair_object_size: ; empty
endstruc
%define TYPE_FIXED_MATRIX 0
%define TYPE_STRING_MATRIX 1
%define TYPE_PAIR 2
%define TYPE_MOVED 3
section .data
; fixed_matrix_size: dd $ - fixed_matrix
cursor_msg: db "Heap Offset %d", 10, 0
type_fixed_matrix_msg: db "[FIXED_MATRIX]", 10, 0
rows_msg: db ":rows=%d", 10, 0
cols_msg: db ":cols=%d", 10, 0
type_moved_object_msg: db "[MOVED_OBJECT]", 10, 0
newptr_msg: db ":newptr=%d", 10, 0
type_pair_msg: db "[PAIR]", 10, 0
pairptr_msg: db ":pairptr=%d", 10, 0
collect_msg: db "....collecting.....", 10, 0
error_msg: db "ERROR, didn't expect byte %d", 10, 0
flipper: db 0
gcsec1ptr: dq gcsec1
gcsec2ptr: dq gcsec2
section .bss
gcsec1: resq 10000
gcsec2: resq 10000
overflow: ; empty. Just address the overflow point
section .text
global start
extern malloc
extern _printf
extern _exit
extern _memcpy
; code at last yaaay!
start:
push rbp
mov rbp, rsp
sub rsp, 24 ; align stack & reserve
mov rdi, 10
mov rsi, 8
call alloc_fixed_matrix
mov rdi, 12
mov rsi, 16
call alloc_fixed_matrix
mov [rsp+8], rax
mov rdi, 6
mov rsi, 4
call alloc_fixed_matrix
mov [rsp+16], rax
mov rdi, [rsp+8]
mov rsi, [rsp+16]
call alloc_pair
mov [rsp+24], rax
mov rdi, rax
mov rsi, [rsp+8]
call alloc_pair
mov [rsp], rax
call print_heap
mov rdi, [rsp]
call collect
call print_heap
mov rdi, 12
mov rsi, 16
call alloc_fixed_matrix
mov [rsp+16], rax
call print_heap
mov rdi, [rsp+16]
call collect
call print_heap
add rsp, 24
mov rax, 0x2000001
xor rdi, rdi
syscall
print_heap:
push r13
push r14
sub rsp, 8
call get_heap_ptr
mov r13, rax
call get_heap_cursor
mov r14, rax
print_heap_next:
mov rdi, cursor_msg
mov rsi, r13
call _printf
cmp byte [r13], TYPE_FIXED_MATRIX
je print_fixed_matrix
cmp byte [r13], TYPE_MOVED
je print_moved_object
cmp byte [r13], TYPE_PAIR
je print_pair
jne print_heap_error
print_fixed_matrix:
mov rdi, type_fixed_matrix_msg
call _printf
mov rdi, rows_msg
xor rsi, rsi
mov esi, dword [ r13 + fixed_matrix_rows ]
call _printf
mov rdi, cols_msg
xor rsi, rsi
mov esi, dword [ r13 + fixed_matrix_cols ]
call _printf
mov rdi, r13
call sizeof_fixed_matrix
add r13, rax
jmp print_heap_continue
print_moved_object:
mov rdi, type_moved_object_msg
call _printf
mov rdi, newptr_msg
mov rsi, [r13 + moved_heap_obj_newptr]
call _printf
mov r13, r14
jmp print_heap_continue
print_pair:
mov rdi, type_pair_msg
call _printf
mov rdi, pairptr_msg
mov rsi, [r13 + pair_first]
call _printf
mov rdi, pairptr_msg
mov rsi, [r13 + pair_second]
call _printf
add r13, pair_object_size
jmp print_heap_continue
print_heap_continue:
cmp r13, r14
jl print_heap_next
add rsp, 8
pop r13
pop r14
ret
print_heap_error:
mov rdi, error_msg
xor rax, rax
mov al, [r13]
mov rsi, rax
call _printf
add rsp, 8
pop r13
pop r14
ret
collect:
push rdi
mov rdi, collect_msg
call _printf
pop rdi
sub rsp, 8 ; stack alignment
call collect_step
add rsp, 8
jmp heap_flip
collect_step:
sub rsp, 24 ; 2 vars, aligned
mov [rsp+8], rdi ; save original ptr
cmp byte [rdi], TYPE_FIXED_MATRIX
je collect_fixed_matrix
cmp byte [rdi], TYPE_PAIR
je collect_pair
cmp byte [rdi], TYPE_MOVED
je collect_moved_object
jne print_heap_error ; I guess this is a more general error...
collect_fixed_matrix:
call sizeof_fixed_matrix
mov [rsp+16], rax ; save size
mov rdx, rax
call get_opposing_heap_cursor
mov rsi, [rsp+8] ; original ptr
mov rdi, rax
call _memcpy
mov rdi, [rsp+16] ; size
call opposing_heap_reserve
jmp collect_mark_moved
collect_moved_object:
; nothing to do but return the new pointer
mov rax, [rdi+moved_heap_obj_newptr]
add rsp, 24
ret
collect_pair:
mov rdx, pair_object_size
call get_opposing_heap_cursor
mov rsi, [rsp+8] ; original ptr
mov rdi, rax
call _memcpy
mov rdi, pair_object_size
call opposing_heap_reserve
mov rdi, [rsp+8] ; original ptr
mov byte [rdi], TYPE_MOVED
mov [rdi + moved_heap_obj_newptr], rax
mov [rsp+8], rax ; back up new ptr
; now copy the items in the pair
mov rdi, [rax + pair_first] ; collect from here
call collect_step
mov rdi, [rsp+8] ; bring up new ptr
mov [rdi + pair_first], rax ; move moved pair ptr
mov rdi, [rdi + pair_second] ; collect from here
call collect_step
mov rdi, [rsp+8] ; bring up new ptr
mov [rdi + pair_second], rax ; move moved pair ptr
mov rax, rdi ; still return new ptr for the pair
add rsp, 24
ret
collect_mark_moved:
mov rdi, [rsp+8] ; original ptr
mov byte [rdi], TYPE_MOVED
mov [rdi + moved_heap_obj_newptr], rax
add rsp, 24
ret
sizeof_fixed_matrix:
mov rax, 20
xor rsi, rsi
mov esi, dword [ rdi + fixed_matrix_rows ]
xor rcx, rcx
mov ecx, dword [ rdi + fixed_matrix_cols ]
imul rcx, rsi
imul rcx, 8
add rax, rcx
ret
alloc_fixed_matrix:
push rdi
push rsi
imul rdi, rsi ; calc sizeof in rdi
lea rdi, [rdi*8+20]
call heap_reserve ; reserve it & get addr
pop rsi
pop rdi
mov byte [rax], TYPE_FIXED_MATRIX
mov [rax + fixed_matrix_rows], edi
mov [rax + fixed_matrix_cols], esi
ret
alloc_pair:
push rdi
push rsi
mov rdi, pair_object_size
call heap_reserve ; reserve it & get addr
pop rsi
pop rdi
mov byte [rax], TYPE_PAIR
mov [rax + pair_first], rdi
mov [rax + pair_second], rsi
ret
alloc_string_matrix:
mov rdi, 20
call heap_reserve
mov byte [rax], 0 ; null byte
ret
get_heap_cursor:
call get_heap_cursor_ptr
mov rax, [rax]
ret
get_heap_cursor_ptr:
cmp byte [flipper], 0
jne get_heap_cursor_ptr_use_gcsec2
mov rax, gcsec1ptr
ret
get_heap_cursor_ptr_use_gcsec2:
mov rax, gcsec2ptr
ret
get_opposing_heap_cursor:
call get_opposing_heap_cursor_ptr
mov rax, [rax]
ret
get_opposing_heap_cursor_ptr:
cmp byte [flipper], 1
jne get_opposing_heap_cursor_ptr_use_gcsec2
mov rax, gcsec1ptr
ret
get_opposing_heap_cursor_ptr_use_gcsec2:
mov rax, gcsec2ptr
ret
get_heap_ptr:
cmp byte [flipper], 0
jne get_heap_ptr_use_gcsec2
mov rax, gcsec1
ret
get_heap_ptr_use_gcsec2:
mov rax, gcsec2
ret
heap_flip:
call get_heap_ptr
mov rdi, rax
call get_heap_cursor_ptr
mov [rax], rdi
mov rax, 0
mov al, [flipper]
xor al, 0x01
mov [flipper], al
ret
heap_reserve:
push rdi
call get_heap_cursor_ptr
pop rdi
mov rcx, rax
mov rax, [rax]
add rdi, rax
mov [rcx], rdi
ret
opposing_heap_reserve:
push rdi
call get_opposing_heap_cursor_ptr
pop rdi
mov rcx, rax
mov rax, [rax]
add rdi, rax
mov [rcx], rdi
ret
| 18.902703 | 63 | 0.727338 |
d362b2c98b38dabad4a64f5a2f05827bcc109365 | 487 | asm | Assembly | data/maps/objects/PalletTown.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | data/maps/objects/PalletTown.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | data/maps/objects/PalletTown.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | PalletTown_Object:
db $b ; border block
def_warps
warp 5, 5, 0, REDS_HOUSE_1F
warp 13, 5, 0, BLUES_HOUSE
warp 12, 11, 1, OAKS_LAB
def_signs
sign 13, 13, 4 ; PalletTownText4
sign 7, 9, 5 ; PalletTownText5
sign 3, 5, 6 ; PalletTownText6
sign 11, 5, 7 ; PalletTownText7
def_objects
object SPRITE_OAK, 8, 5, STAY, NONE, 1 ; person
object SPRITE_GIRL, 3, 8, WALK, ANY_DIR, 2 ; person
object SPRITE_FISHER, 11, 14, WALK, ANY_DIR, 3 ; person
def_warps_to PALLET_TOWN
| 23.190476 | 56 | 0.700205 |
b76c0ee3a7a330879ff8443ea9013633cc119e21 | 1,581 | asm | Assembly | programs/oeis/071/A071231.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/071/A071231.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/071/A071231.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A071231: a(n) = (n^8 + n^4)/2.
; 0,1,136,3321,32896,195625,840456,2883601,8390656,21526641,50005000,107186761,215001216,407879641,737913736,1281470625,2147516416,3487920481,5510032776,8491846681,12800080000,18911526921,27438053896,39155632561,55037822976,76294140625,104413760776,141215033961,188901306496,250123560121,328050405000,426445980481,549756338176,703204902081,892897620616,1125938445625,1410555793536,1756240664041,2173897111816,2676005786961,3276801280000,3992464027441,4841327554056,5844101848201,7024113686656,8407564745625,10023808354696,11905645770721,14089642868736,16616468167201,19531253125000,22883975667801,26729867921536,31129849150921,36150984921096,41866973520625,48358660704256,55714583834001,64031546517256,73415224860841,83980806480000,95853663421561,109170060180616,124077898010241,140737496743936,159322415370625,180020312622216,203033848853881,228581630517376,256899198547881,288240062005000,322876778328721,361102081591296,403230060146161,449597385095176,500564591015625,556517410408576,617868163350361,685057203849096,758554424428321,838860820480000,926510115949281,1022070451933576,1126146139798681,1239379480434816,1362452651295625,1496089662883336,1641058386363441,1798172654012416,1968294434222161,2152336082805000,2351262672363241,2566094401507456,2797909085727801,3047844731742856,3317102197170625,3606947937386496,3918716841453121,4253815159027336,4613723520169401,5000000050000000,5414283580170601,5858296959132936,6333850463213521,6842845310519296,7387277279720625,7969240435778056,8590930964699401
pow $0,4
mov $1,$0
bin $0,2
add $1,$0
| 197.625 | 1,508 | 0.906388 |
727edd0ee526ab8c3500c9874542d9c0d7134dca | 482 | asm | Assembly | uebung7/u7a10.asm | Sebb767/rechnerarchitektur | 3df204684d66b3305110ab3ef882869ffc76a291 | [
"WTFPL"
] | 1 | 2016-05-02T12:16:44.000Z | 2016-05-02T12:16:44.000Z | uebung7/u7a10.asm | Sebb767/rechnerarchitektur | 3df204684d66b3305110ab3ef882869ffc76a291 | [
"WTFPL"
] | null | null | null | uebung7/u7a10.asm | Sebb767/rechnerarchitektur | 3df204684d66b3305110ab3ef882869ffc76a291 | [
"WTFPL"
] | null | null | null | section .text
extern printf
global main
main:
mov eax, 0 ; k
mov ebx, 0 ; ebx = counter
mov edx, 0 ; index
lp:
mov eax, [buffer+edx]
jz enderr
add edx, eax
inc ebx
mov [buffer+edx], 0
jmp lp
end:
; exit
mov eax, 1 ; sys_exit
int 0x80 ; invoke kernel again
enderr:
; exit
mov eax, 1 ; sys_exit
int 0x80 ; invoke kernel again
section .data
; data section
buffer db 2, 3, -1, 2, -1
section .bss
; ram section
; storage: resb 128 ; reserve 128 byte | 12.358974 | 39 | 0.643154 |
b673bab64fb599d748e98ce747762edbdbf9a07d | 21 | asm | Assembly | pkgs/tools/yasm/src/modules/parsers/nasm/tests/charconstmath.asm | manggoguy/parsec-modified | d14edfb62795805c84a4280d67b50cca175b95af | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | pkgs/tools/yasm/src/modules/parsers/nasm/tests/charconstmath.asm | manggoguy/parsec-modified | d14edfb62795805c84a4280d67b50cca175b95af | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | pkgs/tools/yasm/src/modules/parsers/nasm/tests/charconstmath.asm | manggoguy/parsec-modified | d14edfb62795805c84a4280d67b50cca175b95af | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | db "string", " "+80h
| 10.5 | 20 | 0.52381 |
253faddfdadbcfca729bcd18a0b83f5280514c74 | 6,821 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_669.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_notsx.log_21829_669.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_notsx.log_21829_669.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 %rax
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xc483, %rsi
lea addresses_WT_ht+0xa483, %rdi
nop
nop
cmp %r10, %r10
mov $16, %rcx
rep movsl
nop
nop
inc %rax
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0x18643, %r12
nop
add %r9, %r9
mov $0x5152535455565758, %rcx
movq %rcx, (%r12)
xor $44785, %r9
// Store
lea addresses_UC+0xda83, %rcx
nop
nop
nop
nop
sub $1170, %r14
mov $0x5152535455565758, %r9
movq %r9, %xmm6
vmovups %ymm6, (%rcx)
nop
nop
nop
nop
nop
cmp $37862, %r12
// REPMOV
lea addresses_normal+0x6923, %rsi
lea addresses_PSE+0x128c3, %rdi
nop
nop
nop
nop
inc %rbx
mov $24, %rcx
rep movsl
nop
nop
nop
nop
sub $6682, %rbx
// Store
lea addresses_UC+0x6c83, %rsi
add %rcx, %rcx
movl $0x51525354, (%rsi)
nop
nop
nop
sub %r14, %r14
// Store
lea addresses_WT+0xa493, %rcx
nop
nop
nop
nop
nop
cmp %r15, %r15
movw $0x5152, (%rcx)
nop
nop
nop
nop
nop
dec %rdi
// Store
lea addresses_WT+0xae2b, %r12
nop
xor $45318, %rcx
mov $0x5152535455565758, %r14
movq %r14, (%r12)
xor %rbx, %rbx
// Store
lea addresses_WC+0x1cacf, %r12
nop
nop
nop
nop
nop
cmp $55053, %r15
mov $0x5152535455565758, %rdi
movq %rdi, %xmm6
movups %xmm6, (%r12)
nop
nop
nop
nop
sub $13825, %r15
// Load
lea addresses_WC+0xba43, %rbp
nop
nop
nop
add $28385, %r14
mov (%rbp), %si
nop
nop
and $59500, %r15
// Store
lea addresses_UC+0x1a4d7, %rsi
nop
nop
inc %r14
mov $0x5152535455565758, %rbx
movq %rbx, (%rsi)
nop
nop
nop
nop
nop
xor %rsi, %rsi
// Store
lea addresses_UC+0x16a63, %r9
nop
nop
nop
nop
add $18863, %rdi
movl $0x51525354, (%r9)
nop
nop
nop
nop
nop
sub %r14, %r14
// Faulty Load
lea addresses_PSE+0x18c83, %rcx
nop
nop
nop
nop
cmp %rbp, %rbp
vmovups (%rcx), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %r12
lea oracles, %r14
and $0xff, %r12
shlq $12, %r12
mov (%r14,%r12,1), %r12
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_normal'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_WT'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_WT'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 1, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 31.873832 | 2,999 | 0.655036 |
3e0383ee93ba8900e617fdc548b7fd3948ec747e | 1,073 | asm | Assembly | programs/oeis/048/A048763.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/048/A048763.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/048/A048763.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A048763: Smallest cube >= n.
; 0,1,8,8,8,8,8,8,8,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,216,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343
lpb $0,1
sub $0,1
add $2,6
add $4,1
add $3,$4
sub $4,1
trn $0,$4
add $4,$2
lpe
add $0,$3
mov $1,$0
| 71.533333 | 927 | 0.698043 |
56aa688852ae23479b6e04f25b18711a5dcbf4fa | 2,826 | asm | Assembly | src/disp.asm | drdanick/apricot-os | 65fcc85313986f9c6a8aa5738c4b19fa5544caac | [
"MIT"
] | null | null | null | src/disp.asm | drdanick/apricot-os | 65fcc85313986f9c6a8aa5738c4b19fa5544caac | [
"MIT"
] | null | null | null | src/disp.asm | drdanick/apricot-os | 65fcc85313986f9c6a8aa5738c4b19fa5544caac | [
"MIT"
] | 1 | 2018-07-10T19:35:07.000Z | 2018-07-10T19:35:07.000Z | ; asmsyntax=apricos
; ===================================
; == ==
; == ApricotOS Display Library ==
; == ==
; == Revision 2 ==
; == ==
; == (C) 2014-17 Nick Stones-Havas ==
; == ==
; == ==
; == Provides routines for ==
; == controlling basic character ==
; == mode displays. ==
; == ==
; ===================================
;
#name "libdisp"
#segment 8
#include "apricotosint.asm"
#include "portout.asm"
#include "math.asm"
#macro TTY_MODE mode treg {
ASET treg
LARl mode
PORTOUT_TTY_WRITE
}
#macro PUTCHAR treg {
ASET treg
PORTOUT_TTY_WRITE
}
#macro PUTNEWLINE {
LARl 10
PORTOUT_TTY_WRITE
}
; Routine pointers
.nearptr PUTSTR
.nearptr PUTNUM
.nearptr TTYRESET
; Write a null terminated string to the display
; The input string is allowed to cross a segment boundary
; $a8 - memory block containing string
; $a9 - block local address of string
;
; Volatile registers:
; $a8
; $a9
; $a10
;
PUTSTR:
ASET 8
STah
ASET 9
STal
PRINT_LOOP:
ASET 10
LD
BRz PRINT_END
PORTOUT_TTY_WRITE
ASET 9
ADD 1
STal
BRnp PRINT_LOOP
; An overflow occured, so increment the segment number
ASET 8
ADD 1
STah
JMP PRINT_LOOP
PRINT_END:
; Return to caller
ASET 9
OS_SYSCALL_RET
; Write an 8 bit number to the display
; $a8 - The number to write
;
; Volatile registers:
; $a8
; $a9
; $a10
; $a11
PUTNUM:
ASET 9
LARl 100
ASET 10
OS_SYSCALL LIBMATH_DIV
ASET 10
BRz PUTNUM_SKIP_100
SPUSH
LARl DECTOCHAR_TABLE
SPOP ADD
STal
LAh DECTOCHAR_TABLE
LD
PORTOUT_TTY_WRITE
PUTNUM_SKIP_100:
ASET 11
SPUSH
ASET 8
SPOP
ASET 9
LARl 10
ASET 10
OS_SYSCALL LIBMATH_DIV
ASET 10
BRz PUTNUM_SKIP_10
SPUSH
LARl DECTOCHAR_TABLE
SPOP ADD
STal
LAh DECTOCHAR_TABLE
LD
PORTOUT_TTY_WRITE
PUTNUM_SKIP_10:
ASET 11
SPUSH
LARl DECTOCHAR_TABLE
SPOP ADD
STal
LAh DECTOCHAR_TABLE
LD
PORTOUT_TTY_WRITE
OS_SYSCALL_RET
; Reset the TTY
;
; Volatile registers:
; $a8
;
TTYRESET:
; End any previous TTY command
ASET 8
AND 0
ADD 3
PORTOUT_TTY_WRITE ; End any previous TTY command
; Disable the cursor
LARl 0x10 ; Cursor disable
PORTOUT_TTY_WRITE
AND 0
PORTOUT_TTY_WRITE
; Clear the screen
LARl 0x12 ; CLS
PORTOUT_TTY_WRITE
PORTOUT_TTY_WRITE
OS_SYSCALL_RET
;
; ================
; PUTNUM DATA
; ================
;
DECTOCHAR_TABLE:
.stringz '0123456789'
| 16.526316 | 62 | 0.550602 |
3923e07fc9c4ccbe138ce761e97786587dcdeb65 | 1,472 | asm | Assembly | programs/oeis/115/A115067.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/115/A115067.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/115/A115067.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A115067: a(n) = (3*n^2 - n - 2)/2.
; 0,4,11,21,34,50,69,91,116,144,175,209,246,286,329,375,424,476,531,589,650,714,781,851,924,1000,1079,1161,1246,1334,1425,1519,1616,1716,1819,1925,2034,2146,2261,2379,2500,2624,2751,2881,3014,3150,3289,3431,3576,3724,3875,4029,4186,4346,4509,4675,4844,5016,5191,5369,5550,5734,5921,6111,6304,6500,6699,6901,7106,7314,7525,7739,7956,8176,8399,8625,8854,9086,9321,9559,9800,10044,10291,10541,10794,11050,11309,11571,11836,12104,12375,12649,12926,13206,13489,13775,14064,14356,14651,14949,15250,15554,15861,16171,16484,16800,17119,17441,17766,18094,18425,18759,19096,19436,19779,20125,20474,20826,21181,21539,21900,22264,22631,23001,23374,23750,24129,24511,24896,25284,25675,26069,26466,26866,27269,27675,28084,28496,28911,29329,29750,30174,30601,31031,31464,31900,32339,32781,33226,33674,34125,34579,35036,35496,35959,36425,36894,37366,37841,38319,38800,39284,39771,40261,40754,41250,41749,42251,42756,43264,43775,44289,44806,45326,45849,46375,46904,47436,47971,48509,49050,49594,50141,50691,51244,51800,52359,52921,53486,54054,54625,55199,55776,56356,56939,57525,58114,58706,59301,59899,60500,61104,61711,62321,62934,63550,64169,64791,65416,66044,66675,67309,67946,68586,69229,69875,70524,71176,71831,72489,73150,73814,74481,75151,75824,76500,77179,77861,78546,79234,79925,80619,81316,82016,82719,83425,84134,84846,85561,86279,87000,87724,88451,89181,89914,90650,91389,92131,92876,93624
mov $1,6
mul $1,$0
add $1,10
mul $1,$0
div $1,4
| 163.555556 | 1,385 | 0.798234 |
14d1e599180c0acfeac737aa2453c37574e0cb0c | 215 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sccz80/exp2_fastcall.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sccz80/exp2_fastcall.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sccz80/exp2_fastcall.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_fp_math16
PUBLIC exp2f16_fastcall
EXTERN _m16_exp2f
defc exp2f16_fastcall = _m16_exp2f
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _exp2f16_fastcall
defc _exp2f16_fastcall = _m16_exp2f
ENDIF
| 14.333333 | 35 | 0.832558 |
568bfb02766280e2971f57117f9f775aece08637 | 257 | asm | Assembly | kernel/utils.asm | mido3ds/soso | f646dead7afed029ba9ab4b0ef655af4b673885a | [
"BSD-2-Clause"
] | 1 | 2021-03-29T04:23:20.000Z | 2021-03-29T04:23:20.000Z | kernel/utils.asm | athna/soso | 742d53e5912049a901e15fd242d64df0f1086818 | [
"BSD-2-Clause"
] | null | null | null | kernel/utils.asm | athna/soso | 742d53e5912049a901e15fd242d64df0f1086818 | [
"BSD-2-Clause"
] | null | null | null | [GLOBAL readEip]
readEip:
pop eax
jmp eax
[GLOBAL disablePaging]
disablePaging:
mov edx, cr0
and edx, 0x7fffffff
mov cr0, edx
ret
[GLOBAL enablePaging]
enablePaging:
mov edx, cr0
or edx, 0x80000000
mov cr0, edx
ret
| 13.526316 | 23 | 0.649805 |
f863e72feb7fdd284f19e38ee0df513d1e96a424 | 866 | asm | Assembly | oeis/142/A142263.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142263.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142263.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142263: Primes congruent to 14 mod 43.
; Submitted by Jamie Morken(s4)
; 229,401,487,659,1433,1777,1949,2207,2293,2551,3067,3583,4013,4099,4271,4357,4787,5303,5647,6163,6421,6679,7109,7883,9001,9173,9431,9689,10463,10979,11839,12011,12097,12269,12527,12613,13043,13903,14419,14591,15107,15193,15451,15881,16139,16741,17257,18289,18461,18719,19751,20353,20611,21557,22073,22159,23879,24137,24223,24481,25169,25771,25943,26029,26459,26717,27061,27749,28351,28867,29297,29383,29641,30071,30931,31189,31963,32479,32909,33769,33941,34457,34543,35059,35317,35747,36263,36607
mov $1,2
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,26
mul $1,2
sub $2,1
mov $3,$1
add $1,3
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,31
div $1,2
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,33
| 32.074074 | 497 | 0.7194 |
170daf6be64c64f8184c5221794f2168d2927e6a | 511 | asm | Assembly | libsrc/_DEVELOPMENT/stdlib/z80/asm_strtof.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/stdlib/z80/asm_strtof.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/stdlib/z80/asm_strtof.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; ===============================================================
; Jun 2015
; ===============================================================
;
; float strtof(const char *nptr, char **endptr)
;
; Read float from string per C11.
;
; An alias for strtod() since the C compilers do not distinguish
; between float and double currently.
;
; ===============================================================
SECTION code_clib
SECTION code_stdlib
PUBLIC asm_strtof
EXTERN asm_strtod
defc asm_strtof = asm_strtod
| 22.217391 | 65 | 0.46184 |
4ac5dc36d948d714d8204ec71878a6d151a8f4dc | 319 | asm | Assembly | src/stars/tests/tests/pseudoOps/sle_sleu_test.asm | kevintmcdonnell/stars | ce0df570c546a8490ef4f9ceeb84c8e1132b2791 | [
"MIT"
] | 9 | 2020-11-05T21:26:09.000Z | 2022-03-04T15:24:40.000Z | src/stars/tests/tests/pseudoOps/sle_sleu_test.asm | kevintmcdonnell/stars | ce0df570c546a8490ef4f9ceeb84c8e1132b2791 | [
"MIT"
] | 7 | 2020-11-06T15:59:40.000Z | 2021-08-31T16:36:43.000Z | src/stars/tests/tests/pseudoOps/sle_sleu_test.asm | kevintmcdonnell/stars | ce0df570c546a8490ef4f9ceeb84c8e1132b2791 | [
"MIT"
] | 1 | 2021-07-13T21:55:02.000Z | 2021-07-13T21:55:02.000Z | .text
main:
# Testing with same values
li $t0, 10
li $t1, 10
# Should be 1
sle $a0, $t0, $t1
li $v0, 1
syscall
# Should be 1
sleu $a0, $t0, $t1
li $v0, 1
syscall
# Testing with diff values
li $t0, -10
li $t1, 10
# Should be 1
sle $a0, $t0, $t1
li $v0, 1
syscall
# Should be 0
sleu $a0, $t0, $t1
li $v0, 1
syscall | 10.290323 | 26 | 0.61442 |
0a143e3f7a10b1a3c41eb2cc06bd874dceec56a1 | 16,077 | asm | Assembly | words/__words.asm | paulscottrobson/MZ-System | 5bad81f02826c893463ddd2a44402f7465e6b4bf | [
"MIT"
] | null | null | null | words/__words.asm | paulscottrobson/MZ-System | 5bad81f02826c893463ddd2a44402f7465e6b4bf | [
"MIT"
] | null | null | null | words/__words.asm | paulscottrobson/MZ-System | 5bad81f02826c893463ddd2a44402f7465e6b4bf | [
"MIT"
] | null | null | null | ;
; Generated.
;
; ***************************************************************************************
; ***************************************************************************************
;
; Name : binary.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 16th November 2018
; Purpose : Binary operators
;
; ***************************************************************************************
; ***************************************************************************************
__mzword_s_2b_3a_3a_6d_61_63_72_6f:
; @macro +
add hl,de
__mzword_e_2b_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_2d_3a_3a_6d_61_63_72_6f:
; @macro -
push de
ex de,hl
xor a
sbc hl,de
pop de
__mzword_e_2d_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_2a_3a_3a_77_6f_72_64:
; @word *
jp __CALLMultiply
__mzword_e_2a_3a_3a_77_6f_72_64:
; @end
__mzword_s_2f_3a_3a_77_6f_72_64:
; @word /
push de
call __CALLDivide
ex de,hl
pop de
ret
__mzword_e_2f_3a_3a_77_6f_72_64:
; @end
__mzword_s_6d_6f_64_3a_3a_77_6f_72_64:
; @word mod
push de
call __CALLDivide
pop de
ret
__mzword_e_6d_6f_64_3a_3a_77_6f_72_64:
; @end
__mzword_s_61_6e_64_3a_3a_77_6f_72_64:
; @word and
ld a,h
and d
ld h,a
ld a,l
and e
ld l,a
ret
__mzword_e_61_6e_64_3a_3a_77_6f_72_64:
; @end
__mzword_s_78_6f_72_3a_3a_77_6f_72_64:
; @word xor
ld a,h
xor d
ld h,a
ld a,l
xor e
ld l,a
ret
__mzword_e_78_6f_72_3a_3a_77_6f_72_64:
; @end
__mzword_s_6f_72_3a_3a_77_6f_72_64:
; @word or
ld a,h
or d
ld h,a
ld a,l
or e
ld l,a
ret
__mzword_e_6f_72_3a_3a_77_6f_72_64:
; @end
__mzword_s_6d_61_78_3a_3a_77_6f_72_64:
; @word max
ld a,h
xor d
bit 7,a
jr nz,__Max2
push hl
sbc hl,de
pop hl
ret nc
ex de,hl
ret
__Max2:
bit 7,h
ret z
ex de,hl
ret
__mzword_e_6d_61_78_3a_3a_77_6f_72_64:
; @end
__mzword_s_6d_69_6e_3a_3a_77_6f_72_64:
; @word min
ld a,h
xor d
bit 7,a
jr nz,__Min2
push hl
sbc hl,de
pop hl
ret c
ex de,hl
ret
__Min2:
bit 7,h
ret nz
ex de,hl
ret
__mzword_e_6d_69_6e_3a_3a_77_6f_72_64:
; @end
; ***************************************************************************************
; ***************************************************************************************
;
; Name : compare.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 15th November 2018
; Purpose : Comparison words, min and max.
;
; ***************************************************************************************
; ***************************************************************************************
__mzword_s_3d_3a_3a_77_6f_72_64:
; @word =
ld a,h
cp d
jr nz,__COMFalse
ld a,l
cp e
jr nz,__COMFalse
__COMTrue:
ld hl,$FFFF
ret
__COMFalse:
ld hl,$0000
ret
__mzword_e_3d_3a_3a_77_6f_72_64:
; @end
__mzword_s_3c_3e_3a_3a_77_6f_72_64:
; @word <>
ld a,h
cp d
jr nz,__COM2True
ld a,l
cp e
jr z,__COM2False
__COM2True:
ld hl,$FFFF
ret
__COM2False:
ld hl,$0000
ret
__mzword_e_3c_3e_3a_3a_77_6f_72_64:
; @end
__mzword_s_3e_3a_3a_77_6f_72_64:
; @word >
ld a,h
xor d
bit 7,a
jr nz,__Greater
sbc hl,de
jr c,__COM3True
jr __COM3False
__Greater:
bit 7,d
jr nz,__COM3False
__COM3True:
ld hl,$FFFF
ret
__COM3False:
ld hl,$0000
ret
__mzword_e_3e_3a_3a_77_6f_72_64:
; @end
__mzword_s_3c_3d_3a_3a_77_6f_72_64:
; @word <=
ld a,h
xor d
bit 7,a
jr nz,__LessEqual
sbc hl,de
jr nc,__COM4True
jr __COM4False
__LessEqual:
bit 7,d
jr z,__COM4False
__COM4True:
ld hl,$FFFF
ret
__COM4False:
ld hl,$0000
ret
__mzword_e_3c_3d_3a_3a_77_6f_72_64:
; @end
__mzword_s_3e_3d_3a_3a_77_6f_72_64:
; @word >=
dec hl
ld a,h
xor d
bit 7,a
jr nz,__Greater2
sbc hl,de
jr c,__COM6True
jr __COM6False
__Greater2:
bit 7,d
jr nz,__COM6False
__COM6True:
ld hl,$FFFF
ret
__COM6False:
ld hl,$0000
ret
__mzword_e_3e_3d_3a_3a_77_6f_72_64:
; @end
__mzword_s_3c_3a_3a_77_6f_72_64:
; @word <
dec hl
ld a,h
xor d
bit 7,a
jr nz,__LessEqual2
sbc hl,de
jr nc,__COM5True
jr __COM5False
__LessEqual2:
bit 7,d
jr z,__COM5False
__COM5True:
ld hl,$FFFF
ret
__COM5False:
ld hl,$0000
ret
__mzword_e_3c_3a_3a_77_6f_72_64:
; @end
; ***************************************************************************************
; ***************************************************************************************
;
; Name : graphic.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 15th November 2018
; Purpose : Graphic System words
;
; ***************************************************************************************
; ***************************************************************************************
; *********************************************************************************
__mzword_s_6d_6f_64_65_2e_34_38_3a_3a_77_6f_72_64:
; @word mode.48
push de
call __CALLMode48
call __CALLConfigure
pop de
ret
__mzword_e_6d_6f_64_65_2e_34_38_3a_3a_77_6f_72_64:
; @end
; *********************************************************************************
__mzword_s_6d_6f_64_65_2e_6c_6f_77_72_65_73_3a_3a_77_6f_72_64:
; @word mode.lowres
push de
call __CALLModeLow
call __CALLConfigure
pop de
ret
__mzword_e_6d_6f_64_65_2e_6c_6f_77_72_65_73_3a_3a_77_6f_72_64:
; @end
; *********************************************************************************
__mzword_s_6d_6f_64_65_2e_6c_61_79_65_72_32_3a_3a_77_6f_72_64:
; @word mode.layer2
push de
call __CALLModeLayer2
call __CALLConfigure
pop de
ret
__mzword_e_6d_6f_64_65_2e_6c_61_79_65_72_32_3a_3a_77_6f_72_64:
; @end
; ***************************************************************************************
; ***************************************************************************************
;
; Name : memory.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 15th November 2018
; Purpose : Memory and Hardware access
;
; ***************************************************************************************
; ***************************************************************************************
__mzword_s_63_40_3a_3a_6d_61_63_72_6f:
; @macro c@
ld l,(hl)
ld h,0
__mzword_e_63_40_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_40_3a_3a_6d_61_63_72_6f:
; @macro @
ld a,(hl)
inc hl
ld h,(hl)
ld l,a
__mzword_e_40_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_63_21_3a_3a_6d_61_63_72_6f:
; @macro c!
ld (hl),e
__mzword_e_63_21_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_21_3a_3a_6d_61_63_72_6f:
; @macro !
ld (hl),e
inc hl
ld (hl),d
dec hl
__mzword_e_21_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_2b_21_3a_3a_77_6f_72_64:
; @word +!
ld a,(hl)
add a,e
ld (hl),a
inc hl
ld a,(hl)
adc a,d
ld (hl),a
dec hl
ret
__mzword_e_2b_21_3a_3a_77_6f_72_64:
; @end
__mzword_s_70_21_3a_3a_77_6f_72_64:
; @word p!
push bc
ld c,l
ld b,h
out (c),e
pop bc
ret
__mzword_e_70_21_3a_3a_77_6f_72_64:
; @end
__mzword_s_70_40_3a_3a_77_6f_72_64:
; @word p@
push bc
ld c,l
ld b,h
in l,(c)
ld h,0
pop bc
ret
__mzword_e_70_40_3a_3a_77_6f_72_64:
; @end
; ***************************************************************************************
; ***************************************************************************************
;
; Name : register.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 15th November 2018
; Purpose : Register operators
;
; ***************************************************************************************
; ***************************************************************************************
__mzword_s_73_77_61_70_3a_3a_6d_61_63_72_6f:
; @macro swap
ex de,hl
__mzword_e_73_77_61_70_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_61_3e_62_3a_3a_6d_61_63_72_6f:
; @macro a>b
ld d,h
ld e,l
__mzword_e_61_3e_62_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_62_3e_61_3a_3a_6d_61_63_72_6f:
; @macro b>a
ld h,d
ld l,e
__mzword_e_62_3e_61_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_61_3e_63_3a_3a_6d_61_63_72_6f:
; @macro a>c
ld b,h
ld c,l
__mzword_e_61_3e_63_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_63_3e_61_3a_3a_6d_61_63_72_6f:
; @macro c>a
ld h,b
ld l,c
__mzword_e_63_3e_61_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_62_3e_63_3a_3a_6d_61_63_72_6f:
; @macro b>c
ld b,d
ld c,e
__mzword_e_62_3e_63_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_63_3e_62_3a_3a_6d_61_63_72_6f:
; @macro c>b
ld d,b
ld e,c
__mzword_e_63_3e_62_3a_3a_6d_61_63_72_6f:
; @end
; ***************************************************************************************
; ***************************************************************************************
;
; Name : stack.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 15th November 2018
; Purpose : Stack operators
;
; ***************************************************************************************
; ***************************************************************************************
__mzword_s_61_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @macro a>r protected
push hl
__mzword_e_61_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_62_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @macro b>r protected
push de
__mzword_e_62_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_63_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @macro c>r protected
push bc
__mzword_e_63_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_61_62_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @macro ab>r protected
push de
push hl
__mzword_e_61_62_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_61_62_63_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @macro abc>r protected
push bc
push de
push hl
__mzword_e_61_62_63_3e_72_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_72_3e_61_3a_3a_6d_61_63_72_6f_2f_70:
; @macro r>a protected
pop hl
__mzword_e_72_3e_61_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_72_3e_62_3a_3a_6d_61_63_72_6f_2f_70:
; @macro r>b protected
pop de
__mzword_e_72_3e_62_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_72_3e_63_3a_3a_6d_61_63_72_6f_2f_70:
; @macro r>c protected
pop bc
__mzword_e_72_3e_63_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_72_3e_61_62_3a_3a_6d_61_63_72_6f_2f_70:
; @macro r>ab protected
pop hl
pop de
__mzword_e_72_3e_61_62_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_72_3e_61_62_63_3a_3a_6d_61_63_72_6f_2f_70:
; @macro r>abc protected
pop hl
pop de
pop bc
__mzword_e_72_3e_61_62_63_3a_3a_6d_61_63_72_6f_2f_70:
; @end
; ***************************************************************************************
; ***************************************************************************************
;
; Name : unary.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 15th November 2018
; Purpose : Unary operators
;
; ***************************************************************************************
; ***************************************************************************************
__mzword_s_30_3d_3a_3a_77_6f_72_64:
; @word 0=
ld a,h
or l
ld hl,$0000
ret nz
dec hl
ret
__mzword_e_30_3d_3a_3a_77_6f_72_64:
; @end
__mzword_s_30_3c_3a_3a_77_6f_72_64:
; @word 0<
bit 7,h
ld hl,$0000
ret z
dec hl
ret
__mzword_e_30_3c_3a_3a_77_6f_72_64:
; @end
__mzword_s_30_2d_3a_3a_77_6f_72_64:
; @word 0-
ld a,h
cpl
ld h,a
ld a,l
cpl
ld l,a
inc hl
ret
__mzword_e_30_2d_3a_3a_77_6f_72_64:
; @end
__mzword_s_6e_6f_74_3a_3a_77_6f_72_64:
; @word not
ld a,h
cpl
ld h,a
ld a,l
cpl
ld l,a
ret
__mzword_e_6e_6f_74_3a_3a_77_6f_72_64:
; @end
__mzword_s_61_62_73_3a_3a_77_6f_72_64:
; @word abs
bit 7,h
ret z
ld a,h
cpl
ld h,a
ld a,l
cpl
ld l,a
inc hl
ret
__mzword_e_61_62_73_3a_3a_77_6f_72_64:
; @end
__mzword_s_31_2b_3a_3a_6d_61_63_72_6f:
; @macro 1+
inc hl
__mzword_e_31_2b_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_31_2d_3a_3a_6d_61_63_72_6f:
; @macro 1-
dec hl
__mzword_e_31_2d_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_32_2b_3a_3a_6d_61_63_72_6f:
; @macro 2+
inc hl
inc hl
__mzword_e_32_2b_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_32_2d_3a_3a_6d_61_63_72_6f:
; @macro 2-
dec hl
dec hl
__mzword_e_32_2d_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_32_2a_3a_3a_6d_61_63_72_6f:
; @macro 2*
add hl,hl
__mzword_e_32_2a_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_32_2f_3a_3a_6d_61_63_72_6f:
; @macro 2/
sra h
rr l
__mzword_e_32_2f_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_34_2a_3a_3a_6d_61_63_72_6f:
; @macro 4*
add hl,hl
add hl,hl
__mzword_e_34_2a_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_34_2f_3a_3a_77_6f_72_64:
; @word 4/
sra h
rr l
sra h
rr l
ret
__mzword_e_34_2f_3a_3a_77_6f_72_64:
; @end
__mzword_s_38_2a_3a_3a_6d_61_63_72_6f:
; @macro 8*
add hl,hl
add hl,hl
add hl,hl
__mzword_e_38_2a_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_31_36_2a_3a_3a_6d_61_63_72_6f:
; @macro 16*
add hl,hl
add hl,hl
add hl,hl
add hl,hl
__mzword_e_31_36_2a_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_31_36_2f_3a_3a_77_6f_72_64:
; @word 16/
sra h
rr l
sra h
rr l
sra h
rr l
sra h
rr l
ret
__mzword_e_31_36_2f_3a_3a_77_6f_72_64:
; @end
__mzword_s_32_35_36_2a_3a_3a_6d_61_63_72_6f:
; @macro 256*
ld h,l
ld l,0
__mzword_e_32_35_36_2a_3a_3a_6d_61_63_72_6f:
; @end
__mzword_s_32_35_36_2f_3a_3a_77_6f_72_64:
; @word 256/
ld l,h
ld h,0
bit 7,l
ret z
dec h
ret
__mzword_e_32_35_36_2f_3a_3a_77_6f_72_64:
; @end
__mzword_s_62_73_77_61_70_3a_3a_6d_61_63_72_6f:
; @macro bswap
ld a,l
ld l,h
ld h,a
__mzword_e_62_73_77_61_70_3a_3a_6d_61_63_72_6f:
; @end
; ***************************************************************************************
; ***************************************************************************************
;
; Name : utility.words
; Author : Paul Robson (paul@robsons.org.uk)
; Date : 15th November 2018
; Purpose : Miscellaneous words.
;
; ***************************************************************************************
; ***************************************************************************************
__mzword_s_62_72_65_61_6b_3a_3a_6d_61_63_72_6f_2f_70:
; @macro break protected
db $DD,$01
__mzword_e_62_72_65_61_6b_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_73_79_73_2e_69_6e_66_6f_3a_3a_77_6f_72_64:
; @word sys.info
ex de,hl
ld hl,SystemInformationTable
ret
__mzword_e_73_79_73_2e_69_6e_66_6f_3a_3a_77_6f_72_64:
; @end
__mzword_s_3b_3a_3a_6d_61_63_72_6f_2f_70:
; @macro ; protected
ret
__mzword_e_3b_3a_3a_6d_61_63_72_6f_2f_70:
; @end
__mzword_s_69_6e_6b_65_79_3a_3a_77_6f_72_64:
; @word inkey
ex de,hl
call __CALLKeyboard
ld l,a
ld h,0
ret
__mzword_e_69_6e_6b_65_79_3a_3a_77_6f_72_64:
; @end
__mzword_s_68_61_6c_74_3a_3a_77_6f_72_64:
; @word halt
HaltZ80:
di
halt
jr HaltZ80
__mzword_e_68_61_6c_74_3a_3a_77_6f_72_64:
; @end
__mzword_s_63_6f_70_79_3a_3a_77_6f_72_64:
; @word copy
ld a,b ; nothing to do.
or c
ret z
push bc
push de
push hl
xor a ; find direction.
sbc hl,de
ld a,h
add hl,de
bit 7,a ; if +ve use LDDR
jr z,__copy2
ex de,hl ; LDIR etc do (DE) <- (HL)
ldir
__copyExit:
pop hl
pop de
pop bc
ret
__copy2:
add hl,bc ; add length to HL,DE, swap as LDDR does (DE) <- (HL)
ex de,hl
add hl,bc
dec de ; -1 to point to last byte
dec hl
lddr
jr __copyExit
__mzword_e_63_6f_70_79_3a_3a_77_6f_72_64:
; @end
__mzword_s_66_69_6c_6c_3a_3a_77_6f_72_64:
; @word fill
ld a,b ; nothing to do.
or c
ret z
push bc
push hl
__fill1:ld (hl),e
inc hl
dec bc
ld a,b
or c
jr nz,__fill1
pop hl
pop bc
ret
__mzword_e_66_69_6c_6c_3a_3a_77_6f_72_64:
; @end
| 19.654034 | 89 | 0.578964 |
514c45600b053befd50eafdf8bfaba6437a7731e | 178 | asm | Assembly | test/asm/retn.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | test/asm/retn.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | test/asm/retn.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | IDEAL
SEGMENT image
ASSUME CS:image,DS:image,ES:image,SS:image
ORG 100h
start:
ret
retn
ret 30h
retn 30h
ENDS
END start
| 12.714286 | 47 | 0.533708 |
a4c281e582cf7efeca43cbd191b34a77a9bae8b3 | 754 | asm | Assembly | programs/oeis/167/A167821.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/167/A167821.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/167/A167821.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A167821: a(n) is the number of n-tosses having a run of 3 or more heads or a run of 3 or more tails for a fair coin (i.e., probability is a(n)/2^n).
; 0,0,2,6,16,38,86,188,402,846,1760,3630,7438,15164,30794,62342,125904,253782,510758,1026684,2061730,4136990,8295872,16627166,33311646,66716028,133582106,267406998,535206832,1071049286,2143127030,4287918140,8578528818,17161414254,34329877664,68671161102,137360777134,274751414972,549551145578,1099180467494,2198487426960,4397179522230,8794690204742,17589916238076,35180699465026,70362801747518,140727873301376,281459419226558,562924780883262,1125859176820476,2251733911125050,4503492994788150,9007026719598448
lpb $0
sub $0,1
add $1,$3
mul $1,2
add $2,1
add $4,$3
mov $3,$2
mov $2,$4
lpe
| 58 | 509 | 0.797082 |
ac5231bfe0ca0dd4f9ee1c5026843cfb223e873d | 40,911 | asm | Assembly | 7800openbios.asm | 7800-devtools/7800OpenBIOS | b8bc745a8744ae3e0d24cc151e63f669f6a87c24 | [
"CC0-1.0"
] | 1 | 2022-02-02T02:53:19.000Z | 2022-02-02T02:53:19.000Z | 7800openbios.asm | 7800-devtools/7800OpenBIOS | b8bc745a8744ae3e0d24cc151e63f669f6a87c24 | [
"CC0-1.0"
] | null | null | null | 7800openbios.asm | 7800-devtools/7800OpenBIOS | b8bc745a8744ae3e0d24cc151e63f669f6a87c24 | [
"CC0-1.0"
] | 1 | 2022-01-11T15:08:18.000Z | 2022-01-11T15:08:18.000Z | ; ** Atari 7800 OpenBIOS
; **********************************************************************
; ** Created by Bob DeCrescenzo and Michael Saarna, 2021
; **
; ** the BIOS source code is provided here under the CC0 license.
; ** https://creativecommons.org/publicdomain/zero/1.0/legalcode
; **
; ** The in-BIOS game is all-rights-reserved, and not covered under the
; ** CC0. Please contact the authors for terms before redistributing.
; **********************************************************************
processor 6502
; **********************************************************************
; ** BIOS TUNING
; **********************************************************************
DISPLAYTIME = 10 ; length of fuji display in half-second ticks
SKIPMODE = 0 ; 0=hold B+W skips fuji, 1=no B+W skips fuji
; **********************************************************************
; ** Register defines...
; **********************************************************************
; ** TIA/INPTCTRL 00-1F...
INPTCTRL = $01 ;Input control write-only
INPT0 = $08 ;Paddle Control Input 0 read-only
INPT1 = $09 ;Paddle Control Input 1 read-only
INPT2 = $0A ;Paddle Control Input 2 read-only
INPT3 = $0B ;Paddle Control Input 3 read-only
INPT4B = $08 ;Joystick 0 Fire 1 read-only
INPT4A = $09 ;Joystick 0 Fire 1 read-only
INPT5B = $0A ;Joystick 1 Fire 0 read-only
INPT5A = $0B ;Joystick 1 Fire 1 read-only
INPT4R = $08 ;Joystick 0 Fire 1 read-only
INPT4L = $09 ;Joystick 0 Fire 1 read-only
INPT5R = $0A ;Joystick 1 Fire 0 read-only
INPT5L = $0B ;Joystick 1 Fire 1 read-only
INPT4 = $0C ;Player 0 Fire Button Input read-only
INPT5 = $0D ;Player 1 Fire Button Input read-only
AUDC0 = $15 ;Audio Control Channel 0 write-only
AUDC1 = $16 ;Audio Control Channel 1 write-only
AUDF0 = $17 ;Audio Frequency Channel 0 write-only
AUDF1 = $18 ;Audio Frequency Channel 1 write-only
AUDV0 = $19 ;Audio Volume Channel 0 write-only
AUDV1 = $1A ;Audio Volume Channel 1 write-only
; MARIA 20-3F...
BACKGRND = $20 ;Background Color write-only
P0C1 = $21 ;Palette 0 - Color 1 write-only
P0C2 = $22 ;Palette 0 - Color 2 write-only
P0C3 = $23 ;Palette 0 - Color 3 write-only
WSYNC = $24 ;Wait For Sync write-only
P1C1 = $25 ;Palette 1 - Color 1 write-only
P1C2 = $26 ;Palette 1 - Color 2 write-only
P1C3 = $27 ;Palette 1 - Color 3 write-only
MSTAT = $28 ;Maria Status read-only
P2C1 = $29 ;Palette 2 - Color 1 write-only
P2C2 = $2A ;Palette 2 - Color 2 write-only
P2C3 = $2B ;Palette 2 - Color 3 write-only
DPPH = $2C ;Display List List Pointer High write-only
P3C1 = $2D ;Palette 3 - Color 1 write-only
P3C2 = $2E ;Palette 3 - Color 2 write-only
P3C3 = $2F ;Palette 3 - Color 3 write-only
DPPL = $30 ;Display List List Pointer Low write-only
P4C1 = $31 ;Palette 4 - Color 1 write-only
P4C2 = $32 ;Palette 4 - Color 2 write-only
P4C3 = $33 ;Palette 4 - Color 3 write-only
CHARBASE = $34 ;Character Base Address write-only
CHBASE = $34 ;Character Base Address write-only
P5C1 = $35 ;Palette 5 - Color 1 write-only
P5C2 = $36 ;Palette 5 - Color 2 write-only
P5C3 = $37 ;Palette 5 - Color 3 write-only
OFFSET = $38 ;Unused - Store zero here write-only
P6C1 = $39 ;Palette 6 - Color 1 write-only
P6C2 = $3A ;Palette 6 - Color 2 write-only
P6C3 = $3B ;Palette 6 - Color 3 write-only
CTRL = $3C ;Maria Control Register write-only
P7C1 = $3D ;Palette 7 - Color 1 write-only
P7C2 = $3E ;Palette 7 - Color 2 write-only
P7C3 = $3F ;Palette 7 - Color 3 write-only
; ** PIA 280-2FF...
SWCHA = $280 ;P0, P1 Joystick Directional Input read-write
SWCHB = $282 ;Console Switches read-write
CTLSWA = $281 ;I/O Control for SCHWA read-write
SWACNT = $281 ;VCS name for above read-write
CTLSWB = $283 ;I/O Control for SCHWB read-write
SWBCNT = $283 ;VCS name for above read-write
TIM1T = $294 ;Set 1 CLK Interval (838 nsec/interval) write-only
TIM8T = $295 ;Set 8 CLK Interval (6.7 usec/interval) write-only
TIM64T = $296 ;Set 64 CLK Interval (63.6 usec/interval) write-only
T1024T = $297 ;Set 1024 CLK Interval (858.2 usec/interval) write-only
TIM64TI = $29E ;Interrupt timer 64T write-only
SEG.U data
ORG $40
; **********************************************************************
; ** Zero page memory for the BIOS. The in-BIOS game can use any/all of
; ** the ZP memory.
; **********************************************************************
; ** frame counter
FrameCounter ds.b 1
; ** 32-frames counter
FrameCounter32 ds.b 1
; ** The color of the first line of the fuji colorbar
FujiColor ds.b 1
; ** The BIOS wipes the Fuji display in and out. This is the index to
; ** the wipe state.
WipeLevel ds.b 1
; ** our NMI pointer for "JMP (NMIRoutine)"
NMIRoutine ds.b 1
NMIRoutineHi ds.b 1
; ** temp memory pointers, currently only used for clearing memory
Temp1Lo ds.b 1
Temp1 = Temp1Lo
Temp1Hi ds.b 1
; ** type of Cart in the slot
CartTypeDetected ds.b 1
echo ""
echo " *****************************************************************"
echo " ** BIOS Build Info (non-game)"
echo " ** --------------------------"
echo " ** Zero Page bytes free: ",($FF-*)d
if (*>$FF)
echo "ABORT: Too many zero page locations defined!"
ERR
endif
; **********************************************************************
; ** Some BIOS specfic defines...
; **********************************************************************
DllRam = $2600 ; to 187F
DlRam = $2680 ; to 199f. 12 bytes each visible DL, plus 2 zeros
CartCheckRam = $2300 ; to 27FF
; **********************************************************************
; ** Start of the ROM...
; **********************************************************************
SEG ROM
ORG $C000,0 ; *************
; **********************************************************************
; ** Game graphics block or other data.
; ** Resides in 8k from C000 to DFFF
; **********************************************************************
incbin "kiloparsec.bl1"
; **********************************************************************
; ** Long section of fuji graphics data follows. Skip ahead to "Start"
; ** to get to the code.
; **********************************************************************
ORG $E000,0
fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
fuji03
HEX 001ffffc3fffffff0ffffe000000000000000000000000
fuji04
HEX 003ffff83fffffff07ffff000000000000000000000000
fuji05
HEX 007ffff83fffffff07ffff800000000000000000000000
fuji06
HEX 01fffff03fffffff03ffffe00000000000000000000000
fuji07
HEX 07ffffe03fffffff01fffff00000000000000000000000
fuji08
HEX 1fffffc03fffffff00fffffe0000000000000000000000
fuji09
HEX ffffff803fffffff007fffffc000000000000000000000
fuji10
HEX fffffe003fffffff001ffffff800000000000000000000
ORG $E100,0 ; *************
;fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji03
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji04
HEX 003ffff83fffffff07ffff000000000000000000000000
;fuji05
HEX 007ffff83fffffff07ffff800000000000000000000000
;fuji06
HEX 01fffff03fffffff03ffffc00000000000000000000000
;fuji07
HEX 07ffffe03fffffff01fffff00000000000000000000000
;fuji08
HEX 1fffffc03fffffff00fffffc0000000000000000000000
;fuji09
HEX 7fffff803fffffff007fffff8000000000000000000000
;fuji10
HEX fffffe003fffffff001ffffff800000000000000000000
ORG $E200,0 ; *************
;fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji03
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji04
HEX 003ffff83fffffff07ffff000000000000000000000000
;fuji05
HEX 007ffff83fffffff07ffff800000000000000000000000
;fuji06
HEX 01fffff03fffffff03ffffc00000000000000000000000
;fuji07
HEX 03ffffe03fffffff01fffff00000000000000000000000
;fuji08
HEX 1fffffc03fffffff00fffffc0000000000000000000000
;fuji09
HEX 7fffff803fffffff007fffff8000000000000000000000
;fuji10
HEX fffffe003fffffff001ffffff000000000000000000000
ORG $E300,0 ; *************
;fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji03
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji04
HEX 003ffffc3fffffff0fffff000000000000000000000000
;fuji05
HEX 007ffff83fffffff07ffff800000000000000000000000
;fuji06
HEX 00fffff03fffffff03ffffc00000000000000000000000
;fuji07
HEX 03ffffe03fffffff01fffff00000000000000000000000
;fuji08
HEX 0fffffc03fffffff00fffffc0000000000000000000000
;fuji09
HEX 7fffff803fffffff007fffff8000000000000000000000
;fuji10
HEX ffffff003fffffff003ffffff000000000000000000000
ORG $E400,0 ; *************
;fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji03
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji04
HEX 003ffffc3fffffff0fffff000000000000000000000000
;fuji05
HEX 007ffff83fffffff07ffff800000000000000000000000
;fuji06
HEX 00fffff83fffffff07ffffc00000000000000000000000
;fuji07
HEX 03fffff03fffffff03ffffe00000000000000000000000
;fuji08
HEX 0fffffe03fffffff01fffffc0000000000000000000000
;fuji09
HEX 3fffff803fffffff007fffff0000000000000000000000
;fuji10
HEX ffffff003fffffff003fffffe000000000000000000000
ORG $E500,0 ; *************
;fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji03
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji04
HEX 003ffffc3fffffff0fffff000000000000000000000000
;fuji05
HEX 007ffff83fffffff07ffff800000000000000000000000
;fuji06
HEX 00fffff83fffffff07ffffc00000000000000000000000
;fuji07
HEX 03fffff03fffffff03ffffe00000000000000000000000
;fuji08
HEX 0fffffe03fffffff01fffff80000000000000000000000
;fuji09
HEX 3fffff803fffffff007fffff0000000000000000000000
;fuji10
HEX ffffff003fffffff003fffffe000000000000000000000
ORG $E600,0 ; *************
;fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji03
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji04
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji05
HEX 003ffff83fffffff07ffff000000000000000000000000
;fuji06
HEX 00fffff83fffffff07ffff800000000000000000000000
;fuji07
HEX 03fffff03fffffff03ffffe00000000000000000000000
;fuji08
HEX 0fffffe03fffffff01fffff80000000000000000000000
;fuji09
HEX 3fffffc03fffffff00fffffe0000000000000000000000
;fuji10
HEX ffffff003fffffff003fffffe000000000000000000000
ORG $E700,0 ; *************
;fuji00
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji01
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji02
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji03
HEX 000ffffc3fffffff0ffffc000000000000000000000000
;fuji04
HEX 001ffffc3fffffff0ffffe000000000000000000000000
;fuji05
HEX 003ffff83fffffff07ffff000000000000000000000000
;fuji06
HEX 00fffff83fffffff07ffff800000000000000000000000
;fuji07
HEX 01fffff03fffffff03ffffe00000000000000000000000
;fuji08
HEX 07ffffe03fffffff01fffff80000000000000000000000
;fuji09
HEX 1fffffc03fffffff00fffffe0000000000000000000000
;fuji10
HEX ffffff003fffffff003fffffc000000000000000000000
ORG $E800,0 ; *************
fuji11
HEX fffff0003fffffff0003ffffffc0000000000000000000
fuji12
HEX ffffc0003fffffff0000fffffffe000000000000000000
fuji13
HEX fffc00003fffffff00000ffffffff80000000000000000
fuji14
HEX ffc000003fffffff000000fffffffff000000000000000
fuji15
HEX f80000003fffffff00000007fffffffff8000000000000
fuji16
HEX 000000003fffffff000000001fffffffffff8000000000
fuji17
HEX 000000003fffffff00000000003fffffffffffff000000
fuji18
HEX 000000003fffffff0000000000003ffffffffffffffffc
fuji19
HEX 000000003fffffff000000000000001ffffffffffffffc
text00
HEX 0000ffff0fffffffff0ffff00003fffffffc07fe
text01
HEX 0003ffffc0007fe0003ffffc0003fe0001ff87fe
ORG $E900,0 ; *************
;fuji11
HEX fffff8003fffffff0007ffffff80000000000000000000
;fuji12
HEX ffffc0003fffffff0000fffffffc000000000000000000
;fuji13
HEX fffe00003fffffff00001ffffffff00000000000000000
;fuji14
HEX ffc000003fffffff000000ffffffffe000000000000000
;fuji15
HEX f80000003fffffff00000007fffffffff0000000000000
;fuji16
HEX 000000003fffffff000000003ffffffffffe0000000000
;fuji17
HEX 000000003fffffff00000000007ffffffffffffc000000
;fuji18
HEX 000000003fffffff0000000000007fffffffffffffffe0
;fuji19
HEX 000000003fffffff000000000000003ffffffffffffffc
;text00
HEX 00007ffe0fffffffff07ffe00003fffffff807fe
;text01
HEX 0003ffffc0007fe0003ffffc0003fe0003ff87fe
ORG $EA00,0 ; *************
;fuji11
HEX fffff8003fffffff0007ffffff00000000000000000000
;fuji12
HEX ffffc0003fffffff0000fffffff8000000000000000000
;fuji13
HEX fffe00003fffffff00001fffffffe00000000000000000
;fuji14
HEX ffe000003fffffff000001ffffffffc000000000000000
;fuji15
HEX fc0000003fffffff0000000fffffffffe0000000000000
;fuji16
HEX 800000003fffffff000000007ffffffffff80000000000
;fuji17
HEX 000000003fffffff0000000000fffffffffffff0000000
;fuji18
HEX 000000003fffffff000000000000fffffffffffffffe00
;fuji19
HEX 000000003fffffff00000000000000fffffffffffffffc
;text00
HEX 00007ffe0fffffffff07ffe00003fffffff007fe
;text01
HEX 0001ffff80007fe0001ffff80003fe0003ff87fe
ORG $EB00,0 ; *************
;fuji11
HEX fffffc003fffffff000fffffff00000000000000000000
;fuji12
HEX ffffe0003fffffff0001fffffff8000000000000000000
;fuji13
HEX fffe00003fffffff00001fffffffc00000000000000000
;fuji14
HEX ffe000003fffffff000001ffffffff8000000000000000
;fuji15
HEX fe0000003fffffff0000001fffffffffc0000000000000
;fuji16
HEX 800000003fffffff000000007ffffffffff00000000000
;fuji17
HEX 000000003fffffff0000000001ffffffffffffc0000000
;fuji18
HEX 000000003fffffff000000000001ffffffffffffffe000
;fuji19
HEX 000000003fffffff00000000000001fffffffffffffffc
;text00
HEX 00007ffe0fffffffff07ffe00003ffffffe007fe
;text01
HEX 0001ffff80007fe0001ffff80003fe0007ff07fe
ORG $EC00,0 ; *************
;fuji11
HEX fffffc003fffffff000ffffffe00000000000000000000
;fuji12
HEX ffffe0003fffffff0001fffffff0000000000000000000
;fuji13
HEX ffff00003fffffff00003fffffffc00000000000000000
;fuji14
HEX fff000003fffffff000003ffffffff0000000000000000
;fuji15
HEX fe0000003fffffff0000001fffffffff00000000000000
;fuji16
HEX c00000003fffffff00000000ffffffffffe00000000000
;fuji17
HEX 000000003fffffff0000000003ffffffffffff00000000
;fuji18
HEX 000000003fffffff000000000003ffffffffffffff8000
;fuji19
HEX 000000003fffffff00000000000003fffffffffffffffc
;text00
HEX 00003ffc0fffffffff03ffc00003ffffffc007fe
;text01
HEX 0001ffff80007fe0001ffff80003fe000fff07fe
ORG $ED00,0 ; *************
;fuji11
HEX fffffc003fffffff000ffffffe00000000000000000000
;fuji12
HEX fffff0003fffffff0003ffffffe0000000000000000000
;fuji13
HEX ffff80003fffffff00007fffffff800000000000000000
;fuji14
HEX fff800003fffffff000007fffffffe0000000000000000
;fuji15
HEX ff0000003fffffff0000003ffffffffe00000000000000
;fuji16
HEX e00000003fffffff00000001ffffffffff800000000000
;fuji17
HEX 000000003fffffff0000000007fffffffffffc00000000
;fuji18
HEX 000000003fffffff000000000007fffffffffffffc0000
;fuji19
HEX 000000003fffffff00000000000007fffffffffffffffc
;text00
HEX 00003ffc0fffffffff03ffc00001ffffff8007fe
;text01
HEX 0001ffff80007fe0001ffff80003fe001fff07fe
ORG $EE00,0 ; *************
;fuji11
HEX fffffc003fffffff000ffffffc00000000000000000000
;fuji12
HEX fffff0003fffffff0003ffffffe0000000000000000000
;fuji13
HEX ffff80003fffffff00007fffffff000000000000000000
;fuji14
HEX fff800003fffffff000007fffffffe0000000000000000
;fuji15
HEX ff0000003fffffff0000007ffffffffc00000000000000
;fuji16
HEX e00000003fffffff00000001ffffffffff000000000000
;fuji17
HEX 000000003fffffff0000000007fffffffffff000000000
;fuji18
HEX 000000003fffffff00000000000ffffffffffffff00000
;fuji19
HEX 000000003fffffff0000000000000ffffffffffffffffc
;text00
HEX 00001ff80fffffffff01ff800000fffffe0007fe
;text01
HEX 0000ffff00007fe0000ffff00003fe007ffe07fe
ORG $EF00,0 ; *************
;fuji11
HEX fffffc003fffffff000ffffffc00000000000000000000
;fuji12
HEX fffff0003fffffff0003ffffffc0000000000000000000
;fuji13
HEX ffff80003fffffff00007ffffffe000000000000000000
;fuji14
HEX fff800003fffffff000007fffffffc0000000000000000
;fuji15
HEX ff8000003fffffff0000007ffffffff800000000000000
;fuji16
HEX f00000003fffffff00000003fffffffffc000000000000
;fuji17
HEX 000000003fffffff000000000fffffffffffc000000000
;fuji18
HEX 000000003fffffff00000000001fffffffffffffc00000
;fuji19
HEX 000000003fffffff0000000000001ffffffffffffffffc
;text00
HEX 00000ff00fffffffff00ff0000003ffff00007fe
;text01
HEX 0000ffff0fffffffff0ffff00003fffffffe07fe
ORG $F000,0 ; *************
text02
HEX 000ffc3ff0007fe000ffc3ff0003fe0007ff07fe
text03
HEX 007ff00ffe007fe007ff00ffe003fe3fffe007fe
text04
HEX 01ffffffff807fe01ffffffff803fe0ffc0007fe
text05
HEX 0ffe00007ff07fe0ffe00007ff03fe007fe007fe
text06
HEX 3ff000000ffc7fe3ff000000ffc3fe0003ff07fe
text07
HEX 0000000000000000000000000000000000000000
text08
HEX 0ffffff87fc1ff0007ffe1fff80000fffc3fff00
text09
HEX 00007f00fe003f81fc0000000fe03f80000001fc
text10
HEX 000ff0003ffffe07f000000003f8fe000000007f
text11
HEX 00fe0003f8000fe3f800000007f07f00000000fe
text12
HEX 1fe00001fc001fc01ff80007fe0003ff0000ffc0
text13
HEX 3c000000007f00000000ffc0000000001ff80000
ORG $F100,0 ; *************
;text02
HEX 000ffc3ff0007fe000ffc3ff0003fe0003ff07fe
;text03
HEX 003ff00ffc007fe003ff00ffc003fe1ffff007fe
;text04
HEX 01ffffffff807fe01ffffffff803fe0ff80007fe
;text05
HEX 0ffe00007ff07fe0ffe00007ff03fe00ffc007fe
;text06
HEX 3ff800001ffc7fe3ff800001ffc3fe0007ff07fe
;text07
HEX 0000000000000000000000000000000000000000
;text08
HEX 3ffffff83ffffe0003fffffff000007ffffffe00
;text09
HEX 00007f80fc001f80fe0000001fc01fc0000003f8
;text10
HEX 0007f0001ffffc07f000000003f8fe000000007f
;text11
HEX 00ff0003f8000fe3f800000007f07f00000000fe
;text12
HEX 0fe00001fc001fc03fe00001ff0007fc00003fe0
;text13
HEX 7e00000003ffe000000ffffc00000001ffff8000
ORG $F200,0 ; *************
;text02
HEX 000ffc3ff0007fe000ffc3ff0003fe0003ff87fe
;text03
HEX 003ff00ffc007fe003ff00ffc003fe0ffff807fe
;text04
HEX 00ffffffff007fe00ffffffff003fe1ff00007fe
;text05
HEX 07ffffffffe07fe07ffffffffe03fe01ffc007fe
;text06
HEX 3ff800001ffc7fe3ff800001ffc3fe000ffe07fe
;text07
HEX 0000000000000000000000000000000000000000
;text08
HEX 7ffffffc3ffffe0001ffffffe000003ffffffc00
;text09
HEX 00003f80fc001f80ff0000003fc01fe0000007f8
;text10
HEX 0007f8001ffffc07f000000003f8fe000000007f
;text11
HEX 007f0003fc001fe3f800000007f07f00000000fe
;text12
HEX 0ff00001f8000fc07fc00000ff800ff800001ff0
;text13
HEX fe0000000ffff800003fffff00000007ffffe000
ORG $F300,0 ; *************
;text02
HEX 0007fe7fe0007fe0007fe7fe0003fe0001ff87fe
;text03
HEX 003ff00ffc007fe003ff00ffc003fe03fffc07fe
;text04
HEX 00ffc003ff007fe00ffc003ff003fe1ff00007fe
;text05
HEX 07ffffffffe07fe07ffffffffe03fe01ff8007fe
;text06
HEX 1ff800001ff87fe1ff800001ff83fe000ffc07fe
;text07
HEX 0000000000000000000000000000000000000000
;text08
HEX 7ffffffc1ffffc00007fffff8000000ffffff000
;text09
HEX 00003fc0fc001f807f8000007f800ff000000ff0
;text10
HEX 0003f8003ffffe03f000000003f07e000000007e
;text11
HEX 007f8001fc001fc3f000000003f07e000000007e
;text12
HEX 07f00003f8000fe07f8000007f800ff000000ff0
;text13
HEX ff0000001ffffc00007fffff8000000ffffff000
ORG $F400,0 ; *************
;text02
HEX 0007fe7fe0007fe0007fe7fe0003fe0001ff87fe
;text03
HEX 001ff81ff8007fe001ff81ff8003fe00fffc07fe
;text04
HEX 00ffc003ff007fe00ffc003ff003fe3ff80007fe
;text05
HEX 03ffffffffc07fe03ffffffffc03fe03ff0007fe
;text06
HEX 1ffc00003ff87fe1ffc00003ff83fe001ffc07fe
;text07
HEX 7fe0000007fe7fe7fe0000007fe3fe0000ffe7fe
;text08
HEX 7ffffffc0ffff800003fffff00000007ffffe000
;text09
HEX 00001fe0fc001f807fc00000ff800ff800001ff0
;text10
HEX 0003fc003ffffe03f800000007f07f00000000fe
;text11
HEX 003f8001fe003fc7f000000003f8fe000000007f
;text12
HEX 07f80003f8000fe0ff0000003fc01fe0000007f8
;text13
HEX 7f0000003ffffe0001ffffffe000003ffffffc00
ORG $F500,0 ; *************
;text02
HEX 0007fe7fe0007fe0007fe7fe0003fe0001ff87fe
;text03
HEX 001ff81ff8007fe001ff81ff8003fe003ffe07fe
;text04
HEX 007fe007fe007fe007fe007fe003fe3ffe0007fe
;text05
HEX 03ffffffffc07fe03ffffffffc03fe03ff0007fe
;text06
HEX 1ffc00003ff87fe1ffc00003ff83fe003ff807fe
;text07
HEX 7fe0000007fe7fe7fe0000007fe3fe0001ffc7fe
;text08
HEX 3ffffff803ffe000000ffffc00000001ffff8000
;text09
HEX 00001fe0fc001f803fe00001ff0007fc00003fe0
;text10
HEX 0001fe007fc1ff03f800000007f07f00000000fe
;text11
HEX 001fc000ff80ff87f000000003f8fe000000007f
;text12
HEX 03f80003f8000fe0fe0000001fc01fc0000003f8
;text13
HEX 7f8000007fffff0003fffffff000007ffffffe00
ORG $F600,0 ; *************
;text02
HEX 0003fe7fc0007fe0003fe7fc0003fe0001ff87fe
;text03
HEX 001ff81ff8007fe001ff81ff8003fe001ffe07fe
;text04
HEX 007fe007fe007fe007fe007fe003fe3fff8007fe
;text05
HEX 03ffffffffc07fe03ffffffffc03fe07fe0007fe
;text06
HEX 0ffc00003ff07fe0ffc00003ff03fe003ff007fe
;text07
HEX 7ff000000ffe7fe7ff000000ffe3fe0001ffc7fe
;text08
HEX 0ffffff000ff80000000ffc0000000001ff80000
;text09
HEX 00000ff0fe003f801ff80007fe0003ff0000ffc0
;text10
HEX 0000fe007f007f03f800000007f07f00000000fe
;text11
HEX 001fe000ffffff87f000000003f8fe000000007f
;text12
HEX 01fc0003f8000fe1fc0000000fe03f80000001fc
;text13
HEX 3f800000ffc1ff8007ffe1fff80000fffc3fff00
ORG $F700,0 ; *************
;text02
HEX 0003ffffc0007fe0003ffffc0003fe0001ff87fe
;text03
HEX 001ffc3ff8007fe001ffc3ff8003fe000fff07fe
;text04
HEX 007fe007fe007fe007fe007fe003fe3fffc007fe
;text05
HEX 01ffffffff807fe01ffffffff803fe07fc0007fe
;text06
HEX 0ffc00003ff07fe0ffc00003ff03fe007ff007fe
;text07
HEX 3ff000000ffc7fe3ff000000ffc3fe0003ff87fe
;text08
HEX 0000000000000000000000000000000000000000
;text09
HEX 00000ff07f007f000ffe001ffc0001ffc003ff80
;text10
HEX 0000ff00fe003f81fc0000000fe03f80000001fc
;text11
HEX 000fe0007fffff07f000000003f8fe000000007f
;text12
HEX 01fe0003f8000fe1fc0000000fe03f80000001fc
;text13
HEX 1fc00000fe003f800ffe001ffc0001ffc003ff80
; **********************************************************************
; ** Bios code start
; **********************************************************************
ORG $F800
RESET
Start
lda #$00 ; Make sure volume is off. Also INPTCTRL=0 because INPTCTRL
sta AUDV0 ; listens to all TIA locations until locked.
sta AUDV1
; Initialize the hardware
sei
cld
lda #$02
sta INPTCTRL ; enable BIOS+Maria
ldx #$FF
txs ; setup the 6502 stack
lda #$7F
sta CTRL ; disable DMA
lda #$00
sta BACKGRND ; black background
; ** Before we clear memory, here are some notes about handling RAM+ROM
; ** when BIOS mode is enabled...
; **
; ** The BIOS ROM and Cart-ROM are banked via INPTCTRL. When INPTCTRL is
; ** set to BIOS-enabled, the Cart doesn't see the address lines
; ** A12+A14+A15.
; **
; ** This forces many high addresses to appear very-low to the cart, but
; ** also has side-effects:
; **
; ** -the BIOS can't access RAM below $2000 without bus-conflict with
; ** VCS carts and the CC2. If the VCS carts are ARM based, the conflicts
; ** seem to cause the ARM to crash.
; **
; ** -the 6502 can't access BIOS ROM from Cxxx or Dxxx while a cart is
; ** plugged-in, or else the cart will see it as a request for 0xxx.
; ** This isn't a big for a ROM-based cart, but it will bus conflict with
; ** any carts that respond to 0xxx. I'm looking at you, CC2, but it could
; ** could also mess with homebrew devices in the 450-45F range.
; ** Clear 2000-27FF, pg0+pg1 memory.
ClearMemPages
lda #0
tay ; y=0
sta Temp1Lo
ldx #$20
ClearMemPagesLoop
stx Temp1Hi ; needed here for when we step on ZP memory
sta (Temp1Lo),y ;Store data
iny ;Next byte
bne ClearMemPagesLoop
inx
cpx #$28
bne ClearMemPagesLoop
; ** Copy the 2600 Bootstrap to RIOT RAM
ldx #$7F
Copy2600CodeLoop
lda Start2600,x
sta $0480,x
dex
bpl Copy2600CodeLoop
; ** Setup the in-memory cart-check and in-memory 7800 cart-execute
ldy #0
SetupCartCheckLoop
lda CartCheckRom,y
sta CartCheckRam,y
dey
bne SetupCartCheckLoop
; ** Clear TIA+MARIA registers
lda #$00
tax
Load7800CartClearLoop
sta $01,x
inx
cpx #$2C
bne Load7800CartClearLoop
; ** Re-set INPTCTRL, because the TIA register clear also hit INPTCTRL
lda #$02
sta INPTCTRL
lda #$FF
ldx #$3F
Load7800CartClearLoop2
sta $2000,x
sta $2100,x
dex
bpl Load7800CartClearLoop2
; ** Check the underlying cart and set CartTypeDetected
jmp CartCheckRam
CartReturnFromRam
; ** Check if a 2600 cart is inserted. If so, run it right away, no fuji
lda CartTypeDetected
cmp #1
bne skipGoto2600mode
jmp Goto2600mode
skipGoto2600mode
; ** setup the BIOS NMI pointer while DMA is still off.
lda #<BIOSNMI
sta NMIRoutine
lda #>BIOSNMI
sta NMIRoutineHi
; ** copy DL objects from ROM into RAM
ldy #0
CopyDLRom
lda DLROM,y
sta DlRam+24,y
iny
cpy #(DLROMEND-DLROM)
bne CopyDLRom
; ** copy DLL from ROM into RAM, but keep the logo hidden for the wipe
lda #12
sta WipeLevel
jsr UpdateDLLRom
; **********************************************************************
; ** Start the display, and do the main loop.
; **********************************************************************
jsr WaitForVblankEnd
jsr WaitForVblankStart
lda #>DllRam
sta DPPH
lda #<DllRam
sta DPPL
lda #%01000011 ; enable DMA, RM=320A/C
sta CTRL
lda #$0f
sta P0C2
sta P1C2
Main
MainLoop
; ** We're at the top of vblank, so we can modify the DL to perform the
; ** wipe.
ldy #0 ; fade-in
lda FrameCounter32
beq contWipeUpdate
ldy #1 ; fade-out
cmp #(DISPLAYTIME-1)
beq contWipeUpdate
jmp skipWipeUpdate
contWipeUpdate
lda FrameCounter
lsr
bcs skipWipeUpdate
and #15
eor WipeDirTable,y
sta WipeLevel
jsr UpdateDLLRom
skipWipeUpdate
LeaveLoaderCheck
; ** react to B+W to skip the fuji
lda SWCHB
and #%00001000
bne CheckFrameCounter
jmp LeaveLoader
CheckFrameCounter
; ** Check if the display time has expired...
lda FrameCounter32
cmp #DISPLAYTIME
bne skipLeaveLoader
jmp LeaveLoader
skipLeaveLoader
jsr WaitForVblankEnd
; *** We're at the top of the visible screen
; *** ...but we have nothing to do here.
jsr WaitForVblankStart
jmp MainLoop
WipeDirTable
.byte 15,0
; ** Utility routines
LeaveLoader
; ** Leave the loader and launch the cart or BIOS game,
; ** depending on CartTypeDetected
lda #$60
sta CTRL
sta WSYNC
lda CartTypeDetected
bne skipGameStart
sta $8000
; If we're here, no cart is inserted.
jmp GameStart
skipGameStart
; If we're here, a 7800 cart is inserted
jmp Load7800CartRam
Load7800CartRam = (Load7800CartRom - CartCheckRom + CartCheckRam)
; The ROM routine we use to check the underlying cart type.
; Don't use JMP or JSR in here, except to exit back to ROM.
CartCheckRom
lda #$06
sta INPTCTRL ; switch to cart rom
lda #$00
sta CartTypeDetected
; Do Rom checks and set CartTypeDetected:
; 0 = no cart
; 1 = 2600
; 2 = 7800
; ** Start with this 2600 test first. The others seem to reliably crash
; ** ARM based carts...
lda $1BEA ; see if the 4k mirror ROM is interfering with Maria RAM
eor #$FF
sta $1BEA
tay
cpy $1BEA
bne Set2600CartMode
; ** Then move on to empty cart tests...
ldy #$FF ;Compare FE00-FE7F with FE80-FEFF
ldx #$7F ;if they aren't the same start internal game
CompareMemoryLoop
lda $FE00,x ; first iteration is $FE7F ($FE00 + $7F)
cmp $FD80,y ; first iteration is $FE7F ($FD80 + $FF)
bne CartCheckRomReturn
dey ;
dex ;
bpl CompareMemoryLoop
lda $FFFC ;If reset vector contains $FFFF
and $FFFD ;start internal game
cmp #$FF ;
beq CartCheckRomReturn
lda $FFFC ;If reset vectore contains $0000
ora $FFFD ;start internal game
beq CartCheckRomReturn
; ** Then back to the 2600 tests...
lda $FFF8 ;Check region verification
ora #$FE
cmp #$FF
bne Set2600CartMode
lda $FFF8
eor #$F0
and #$F0
bne Set2600CartMode
lda $FFF9 ;Check ROM start
and #$0B
cmp #$03
bne Set2600CartMode
lda $FFF9 ;If ROM start page <4 branch
and #$F0 ;
cmp #$40 ;
bcc Set2600CartMode ;Start 2600 mode?
sbc #$01
cmp $FFFD
bcs Set2600CartMode ;Start 2600 mode?
ldx #$05
CompareMemoryLoop2
lda $FFFA,x
cmp $DFFA,x ; If it's a 2600 cart, the 6502 vectors.
bne Set7800CartMode ; will match at FFFx, DFFx, BFFx, etc..
cmp $BFFA,x ; Checking multiple mirrors may seem
bne Set7800CartMode ; excessive, but Galaga has a copy of
cmp $9FFA,x ; it's cart vectors at DFFx.
bne Set7800CartMode
cmp $7FFA,x
bne Set7800CartMode
cmp $5FFA,x
bne Set7800CartMode
dex
bpl CompareMemoryLoop2
bmi Set2600CartMode ; always taken
Set7800CartMode
inc CartTypeDetected
Set2600CartMode
inc CartTypeDetected
CartCheckRomReturn
lda #$02 ; switch back to BIOS rom
sta INPTCTRL ; switch to cart rom
jmp CartReturnFromRam
Load7800CartRom
; We set the 6502 state similar to when leaving the NTSC BIOS.
lda #$FF
sta $40
sta $41
sta $42
sta $43
sta $44
sta $45
sta $46
sta $47
sta $48
lda #$60
sta CTRL
Load7800CartWait
bit MSTAT
bpl Load7800CartWait
ldx #$06 ; both the NTSC and PAL BIOS do the rather odd init below.
stx INPTCTRL
ldx #$FF
txs
cld
jmp ($FFFC)
Goto2600mode
lda #$02
sta $01
jmp $0480 ;Execute 2600 Cart
WaitForVblankEnd
bit MSTAT
bmi WaitForVblankEnd
rts
WaitForVblankStart
bit MSTAT
bpl WaitForVblankStart
rts
UpdateDLLRom
ldy #(DLLROMEND-DLLROM-1)
CopyDLLRom
lda DLLROM,y
sta DllRam,y
dey
bpl CopyDLLRom
; ** Routine to blank the DLs for wipe reveal. WipeLevel ranges from 0
; ** to 12
BlankDLRom
ldy #0
ldx #(22*3)
lda WipeLevel
asl
adc WipeLevel
sta Temp1 ; Temp1 = WipeLevel * 3
BlankDLRomLoop
cpy Temp1
beq BlankEnd
lda #>BLANKDL
sta DllRam+VISIBLEOFFSET+1,y
sta DllRam+VISIBLEOFFSET-2,x
lda #<BLANKDL
sta DllRam+VISIBLEOFFSET+2,y
sta DllRam+VISIBLEOFFSET-1,x
dex
dex
dex
iny
iny
iny
jmp BlankDLRomLoop
BlankEnd
rts
; ************** DLL data ******
DLLROM
; Overscan lines: 25
.byte $0F ; 16 lines
.byte >BLANKDL
.byte <BLANKDL
.byte $07 ; 8 lines
.byte >BLANKDL
.byte <BLANKDL
.byte $80 ; 1 line, with NMI
.byte >BLANKDL
.byte <BLANKDL
VISIBLEStart
VISIBLEOFFSET = (VISIBLEStart-DLLROM)
; Visible lines: 192
DLMEMVAL SET DlRam
BLANKDL = DLMEMVAL + 10 ; first visible DL terminator used for blank zones
echo " ** DL Memory Start: ",(DLMEMVAL)
REPEAT 24
.byte $07 ; 8 lines
.byte >DLMEMVAL
.byte <DLMEMVAL
DLMEMVAL SET DLMEMVAL + 12 ; 12 = 2x5-byte objects + 2-byte terminator
REPEND
echo " ** DL Memory End: ",(DLMEMVAL-1)
echo " ** DL Memory Size: ",(DLMEMVAL-1-DlRam)
VISIBLEEND
VISIBLESIZE = (VISIBLEEND-VISIBLEStart)
; More overscan lines: 80
REPEAT 5
.byte $0F ; 16 lines
.byte >BLANKDL
.byte <BLANKDL
REPEND
; Total provided lines = 25 + 192 + 80 = 297
; Required, NTSC:243, PAL:293
DLLROMEND
echo " ** DLL ROM Start: ",(DLLROM)
echo " ** DLL ROM End: ",(DLLROMEND)
echo " ** DLL ROM Size: ",(DLLROMEND-DLLROM)d
DLROM
; zone 0
.byte <fuji00,$40,>fuji00,$09,$04
.byte $00,$00,$00,$00,$00
.byte $00,$00
; zone 1
.byte <fuji01,$40,>fuji01,$09,$04
.byte $00,$00,$00,$00,$00
.byte $00,$00
; zone 2
.byte <fuji02,$40,>fuji02,$09,$04
.byte <text00,$40,>text00,$2c,$4c
.byte $00,$00
; zone 3
.byte <fuji03,$40,>fuji03,$09,$04
.byte <text01,$40,>text01,$2c,$4c
.byte $00,$00
; zone 4
.byte <fuji04,$40,>fuji04,$09,$04
.byte <text02,$40,>text02,$2c,$4c
.byte $00,$00
; zone 5
.byte <fuji05,$40,>fuji05,$09,$04
.byte <text03,$40,>text03,$2c,$4c
.byte $00,$00
; zone 6
.byte <fuji06,$40,>fuji06,$09,$04
.byte <text04,$40,>text04,$2c,$4c
.byte $00,$00
; zone 7
.byte <fuji07,$40,>fuji07,$09,$04
.byte <text05,$40,>text05,$2c,$4c
.byte $00,$00
; zone 8
.byte <fuji08,$40,>fuji08,$09,$04
.byte <text06,$40,>text06,$2c,$4c
.byte $00,$00
; zone 9
.byte <fuji09,$40,>fuji09,$09,$04
.byte <text07,$40,>text07,$2c,$4c
.byte $00,$00
; zone 10
.byte <fuji10,$40,>fuji10,$09,$04
.byte <text08,$40,>text08,$2c,$4c
.byte $00,$00
; zone 11
.byte <fuji11,$40,>fuji11,$09,$04
.byte <text09,$40,>text09,$2c,$4c
.byte $00,$00
; zone 12
.byte <fuji12,$40,>fuji12,$09,$04
.byte <text10,$40,>text10,$2c,$4c
.byte $00,$00
; zone 13
.byte <fuji13,$40,>fuji13,$09,$04
.byte <text11,$40,>text11,$2c,$4c
.byte $00,$00
; zone 14
.byte <fuji14,$40,>fuji14,$09,$04
.byte <text12,$40,>text12,$2c,$4c
.byte $00,$00
; zone 15
.byte <fuji15,$40,>fuji15,$09,$04
.byte <text13,$40,>text13,$2c,$4c
.byte $00,$00
; zone 16
.byte <fuji16,$40,>fuji16,$09,$04
.byte $00,$00,$00,$00,$00
.byte $00,$00
; zone 17
.byte <fuji17,$40,>fuji17,$09,$04
.byte $00,$00,$00,$00,$00
.byte $00,$00
; zone 18
.byte <fuji18,$40,>fuji18,$09,$04
.byte $00,$00,$00,$00,$00
.byte $00,$00
; zone 19
.byte <fuji19,$40,>fuji19,$09,$04
.byte $00,$00,$00,$00,$00
.byte $00,$00
DLROMEND
NMI
jmp (NMIRoutine)
BIOSNMI
pha
tya
pha
txa
pha
cld
inc FrameCounter
lda FrameCounter
and #31
bne SkipFrameCounter32Update
inc FrameCounter32
SkipFrameCounter32Update
lda FrameCounter
and #3
bne SkipFujiColorIncrement
inc FujiColor
SkipFujiColorIncrement
ldy #192
ldx FujiColor
FujiColorsLoop
stx WSYNC
stx P0C2
inx
dey
bne FujiColorsLoop
; restore the registers
pla
tax
pla
tay
pla
rti
IRQ
RTI
; **********************************************************************
; *** The 2600 Boot Loader. Actually runs from $480.
; **********************************************************************
Start2600
lda #$00
tax
sta $01 ;Turn off MARIA
Start2600_LOOPCLEARTIA
sta $03,x ;Clear TIA registers
inx ;
cpx #$2A ;
bne Start2600_LOOPCLEARTIA
sta $02 ;WSYNC
lda #$04
nop
bmi Start2600_BRANCH2
ldx #$04
Start2600_LOOP2
dex
bpl Start2600_LOOP2
txs
sta $0110
jsr $04CB
jsr $04CB
sta $11
sta $1B
sta $1C
sta $0F
nop
sta $02
lda #$00
nop
bmi Start2600_BRANCH2
bit $03
bmi Start2600_BRANCH3
Start2600_BRANCH2
lda #$02
sta $09
sta $F112
bne Start2600_BRANCH4
Start2600_BRANCH3
bit $02
bmi Start2600_BRANCH5
lda #$02
sta $06
sta $F118
sta $F460
bne Start2600_BRANCH4
Start2600_BRANCH5
sta $2C
lda #$08
sta $1B
jsr $04CB
nop
bit $02
bmi Start2600_BRANCH2
Start2600_BRANCH4
lda #$FD
sta $08
jmp ($FFFC)
jsr $F444
lda $82
bpl Start2600_BRANCH6
lda #$00
Start2600_BRANCH6
asl
asl
clc
adc $83
sta $55
lda #$01
rts
;END OF CODE AT $480
ORG $FC00
; **********************************************************************
; ** Second game block. There's just under 1k of extra game data that
; ** can go here. If your 8k game doesn't need it, you can skip it.
; **********************************************************************
incbin "kiloparsec.bl2"
GameStart
; Starts Internal Game
LDA #$13 ;LOCK IN MARIA MODE
STA INPTCTRL
jsr GameStart_SCREENOF
GameStart_01
bit MSTAT
bmi GameStart_01
jmp $CBCC ;Entry Point of Game
GameStart_SCREENOF
BIT MSTAT ;IS VBLANK ENDED YET?
BMI GameStart_SCREENOF
GameStart_SCREENON
BIT MSTAT ;IS VBLANK STARTED YET?
BPL GameStart_SCREENON
RTS
echo " **",($FFF7-*)d,"bytes of BIOS ROM free."
echo " *****************************************************************"
; ** 7800 bytes and 6502 vectors
ORG $FFF8
.byte $FF ;Region verification
.byte $F7 ;ROM checksum $f000-$ffff
.word NMI
.word RESET
.word IRQ
| 27.292195 | 79 | 0.651218 |
4df4605b25ddeaa39667d0b01f57256e19393a87 | 395 | asm | Assembly | libsrc/z80_crt0s/z80/sccz80/l_plong.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | libsrc/z80_crt0s/z80/sccz80/l_plong.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | libsrc/z80_crt0s/z80/sccz80/l_plong.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | ; Z88 Small C+ Run Time Library
; Long functions
;
SECTION code_crt0_sccz80
PUBLIC l_plong
.l_plong
ld a,l
ld (bc),a
inc bc
ld a,h
ld (bc),a
inc bc
ld a,e
ld (bc),a
inc bc
ld a,d
ld (bc),a
ret
| 17.173913 | 42 | 0.336709 |
19e2d3c78c8bb30d01f304ab1a628af6e14cdfef | 3,232 | asm | Assembly | src/main.asm | Fabian-Schneider01/Virtual-Piano | aa232b4fc4fa09fa43643db8ae10414406166df5 | [
"MIT"
] | 1 | 2021-10-30T19:03:41.000Z | 2021-10-30T19:03:41.000Z | src/main.asm | Fabian-Schneider01/Virtual-Piano | aa232b4fc4fa09fa43643db8ae10414406166df5 | [
"MIT"
] | null | null | null | src/main.asm | Fabian-Schneider01/Virtual-Piano | aa232b4fc4fa09fa43643db8ae10414406166df5 | [
"MIT"
] | null | null | null | #SETUP FOR THE MINI-GAME (memory game)
#open the bitmap bisplay and the virtual piano in the tool section
#press the game button in the virtual piano tool
#select 32 for "unit width in pixels" and "unit height in pixels"
#select 512 for "display width in pixels" and 256 for "display height in pixels"
#select 0x10040000(heap) for "base address for display
########################
#GAME INFORMATION (Rules of the memory game)
#1)Run the program
#2)Select a difficulty by typing to the console (easy = 1 / medium = 2 / difficult = 3)
#3)Get ready in countdown phase
#4)You have to memorize the pattern of color pieces dropping down
#5)After all colored pieces dropped down, next step is to press the piano keys in the same sequence as the colored pieces dropped down
#6)If a green bar appears on the right, you pressed the correct key. A red bar appears if you pressed the wrong key
#7)After all correct keys have been pressed, your score will appear in the console
#INFO: If you want to change the melody for each difficulty, you're able to do so by changing pitch values in draw_pieces.asm.
#Pay attention to not assign more values than written
##########################
#USE OF REGISTERS THROUGHOUT THE PROGRAM
#a0: reserved for ecall
#a1: reserved for ecall
#a2: reserved for ecall
#a3: reserved for ecall
#a4: difficulty of minigame (selected by the user)
#a5: address of the song (depending on difficulty)
#a6: /
#a7: reserved for ecall
#t0: heap base address
#t1: used for comparisons
#t2: counter for loops
#t3: maximum counter value for loops
#t4: loads each color value in color array
#t5: loads each pitch value in song array
#t6: used for jal
#s2: compare value for returning to utest
#s3: compare vlaue for returning to utest
#########################
#strings which are printed to console to show the achieved score
.data
print_score: .string "score of player: "
print_max_score_easy: .string " / 50"
print_max_score_medium: .string " / 80"
print_max_score_difficult: .string " / 110"
.text
main:
#the user gets asked for the difficulty
jal set_difficulty
#5 seconds countdown before starting the game
jal t6, countdown_setup
#reset pointer
li t6, 0
#start the game session
jal t6, draw_top
#show score and end game
j show_score
show_score:
#print to console
li a7, 4
la a0, print_score
ecall
#print final score to console
li a7, 1
li a0, 0
mv a0, a6
ecall
#chooses the correct strong for each difficulty
score_condition:
li t1, 1
beq a4, t1, easy_highscore
li t1, 2
beq a4, t1, medium_highscore
li t1, 3
beq a4, t1, difficult_highscore
#prints the maximum score string depending on difficulty
easy_highscore:
li a7, 4
#print score before exiting game
la a0, print_max_score_easy
ecall
j program_exit
medium_highscore:
li a7, 4
#print score before exiting game
la a0, print_max_score_medium
ecall
j program_exit
difficult_highscore:
li a7, 4
#print score before exiting game
la a0, print_max_score_difficult
ecall
j program_exit
.include "song_difficulties.asm"
.include "draw_countdown.asm"
.include "draw_pieces.asm"
#needed for accessing utest_highscore.asm
exit_utest:
ret
#exit game
program_exit:
li s2, 1
beq s2, s3, exit_utest
addi zero, zero, 0
| 28.350877 | 134 | 0.745359 |
1fca9bf14de869adc7ef58edd5c1bb00aa9f9324 | 182 | asm | Assembly | data/pokemon/dex_entries/bellrun.asm | AtmaBuster/pokeplat-gen2 | fa83b2e75575949b8f72cb2c48f7a1042e97f70f | [
"blessing"
] | 6 | 2021-06-19T06:41:19.000Z | 2022-02-15T17:12:33.000Z | data/pokemon/dex_entries/bellrun.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | null | null | null | data/pokemon/dex_entries/bellrun.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | 3 | 2021-01-15T18:45:40.000Z | 2021-10-16T03:35:27.000Z | db "LOUDCAT@" ; species name
db "Each clan has its"
next "own distinctive"
next "pitch to their"
page "bell chime. They"
next "communicate using"
next "chime sequences.@"
| 18.2 | 29 | 0.686813 |
5d8fac0f3271e21389458754e91050f045db4941 | 1,851 | asm | Assembly | src/05.protection_kernel.asm | myyrakle/os | f0ec2cc5eba58c67ff24e4cf8a05f49e0f9943c4 | [
"MIT"
] | null | null | null | src/05.protection_kernel.asm | myyrakle/os | f0ec2cc5eba58c67ff24e4cf8a05f49e0f9943c4 | [
"MIT"
] | null | null | null | src/05.protection_kernel.asm | myyrakle/os | f0ec2cc5eba58c67ff24e4cf8a05f49e0f9943c4 | [
"MIT"
] | null | null | null | org 0x8000
; 밑의 :gdtr 레이블을 GDT로 등록
xor ax, ax
lgdt [gdtr] ; gdt 로드 명령
cli ; 인터럽트 막음. 전환중에 인터럽트가 걸리면 죽을수도 있음.
; 32비트 보호모드 스위치
mov eax, cr0
or eax, 1
mov cr0, eax
; 파이프라이닝으로 남아있을 수 있는 16비트 크기의 명령어 정리
jmp $+2
nop
nop
; 실질적인 로직인 Entry32 부분으로 점프
jmp codeDescriptor:Entry32
; 32비트 엔트리
[bits 32]
Entry32:
; 세그먼트 레지스터 초기화
mov bx, dataDescriptor
mov ds, bx
mov es, bx
mov fs, bx
mov gs, bx
mov ss, bx
xor esp, esp
mov esp, 0x9FFFF
; es 레지스터에 비디오 디스크립터 저장
mov ax, videoDescriptor
mov es, ax
; 문자 출력
mov ah, 0x09; 색깔
mov al, 'P'
mov [es:0x0000], ax
mov al, 'R'
mov [es:0x0002], ax
mov al, 'O'
mov [es:0x0004], ax
mov al, 'T'
mov [es:0x0006], ax
mov al, 'E'
mov [es:0x0008], ax
mov al, 'C'
mov [es:0x000A], ax
mov al, 'T'
mov [es:0x000C], ax
jmp $
; GDT 정의
gdtr:
dw gdt_end - gdt - 1 ; GDT의 limit
dd gdt ; GDT의 베이스 어드레스
gdt:
; NULL 디스크립터
nullDescriptor equ 0x00
dw 0
dw 0
db 0
db 0
db 0
db 0
; 코드 디스크립터
codeDescriptor equ 0x08
dw 0xFFFF ; limit:0xFFFF
dw 0x0000 ; base 0~15 : 0
db 0x00 ; base 16~23: 0
db 0x9A ; P:1, DPL:0, Code, non-conforming, readable
db 0xCF ; G:1, D:1, limit:0xF
db 0x00 ; base 24~32: 0
; 데이터 디스크립터
dataDescriptor equ 0x10
dw 0xFFFF ; limit 0xFFFF
dw 0x0000 ; base 0~15 : 0
db 0x00 ; base 16~23: 0
db 0x92 ; P:1, DPL:0, data, readable, writable
db 0xCF ; G:1, D:1, limit:0xF
db 0x00 ; base 24~32: 0
; 비디오 디스크립터
videoDescriptor equ 0x18
dw 0xFFFF ; limit 0xFFFF
dw 0x8000 ; base 0~15 : 0x8000
db 0x0B ; base 16~23: 0x0B
db 0x92 ; P:1, DPL:0, data, readable, writable
db 0xCF ; G:1, D:1, limit:0xF
db 0x00 ; base 24~32: 0
gdt_end:
times 512-($-$$) db 0x00
| 18.69697 | 59 | 0.570502 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.