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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4ecccce6d09d321a4f274b6b759324a078e3064f | 707 | asm | Assembly | oeis/078/A078005.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/078/A078005.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/078/A078005.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A078005: Expansion of (1-x)/(1-2*x+2*x^2+2*x^3).
; Submitted by Jamie Morken(s2)
; 1,1,0,-4,-10,-12,4,52,120,128,-88,-672,-1424,-1328,1536,8576,16736,13248,-24128,-108224,-194688,-124672,356480,1351680,2239744,1063168,-5056512,-16718848,-25451008,-7351296,69637120,204878848,285186048,21340160,-937449472,-2487951360,-3143684096,563433472,12390137856,29940776960,33974411264,-16713007104,-161256390656,-357035589632,-358132383744,320319193088,2070974332928,4217575047168,3652563042304,-5271972675584,-26284221530112,-49329623793664,-35546859175936,80133972295680,330020910530560
mov $4,1
lpb $0
sub $0,1
add $2,$4
mov $1,$2
mov $2,$4
add $3,$4
sub $4,$3
add $3,$1
add $4,$1
lpe
mov $0,$4
| 41.588235 | 497 | 0.742574 |
dc8d6a2cc199850e0ae6c8ecce9b890e889db898 | 2,159 | asm | Assembly | V1/src/ASH/cport/main.asm | anjennings/Tom80 | 99b58b32b923068c26e8781912ad825978b10f37 | [
"MIT"
] | 55 | 2021-01-16T16:18:45.000Z | 2022-03-28T17:58:05.000Z | V1/src/ASH/cport/main.asm | anjennings/Z80-Computer | 99b58b32b923068c26e8781912ad825978b10f37 | [
"MIT"
] | 1 | 2021-03-19T13:38:28.000Z | 2021-03-19T14:04:13.000Z | V1/src/ASH/cport/main.asm | anjennings/Z80-Computer | 99b58b32b923068c26e8781912ad825978b10f37 | [
"MIT"
] | 8 | 2021-02-07T18:52:32.000Z | 2022-01-18T07:00:45.000Z | ;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.2.1 Wed May 05 19:53:51 2021
;--------------------------------------------------------
.module main
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _main
;--------------------------------------------------------
; Externals used
;--------------------------------------------------------
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
.area _DATA
;--------------------------------------------------------
; overlayable items in internal ram
;--------------------------------------------------------
.area _OVERLAY
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
.area _ISEG
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
.area _BSEG
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
.area _XSEG
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area _GSINIT
.area _GSFINAL
.area _GSINIT
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area _CODE
; main.c 2
; genLabel
; genFunction
; ---------------------------------
; Function main
; ---------------------------------
___main_start:
_main:
push bc
; main.c 4
; genLabel
00101$:
; genEndFunction
pop bc
ret
___main_end:
.area _CODE
| 31.75 | 57 | 0.238536 |
9897b617575f7731f9ec39662de27ba41f975772 | 726 | asm | Assembly | oeis/086/A086285.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/086/A086285.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/086/A086285.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A086285: Numbers k such that 1 + 2k + 3k^2 is prime.
; Submitted by Jamie Morken(w4)
; 2,12,14,18,24,26,32,38,44,56,62,68,90,92,98,114,120,126,128,144,150,158,164,168,170,176,180,186,192,200,210,212,216,230,246,254,260,266,276,278,282,290,300,318,332,344,354,362,366,378,396,398,408,420,432,434,450,452,456,474,476,480,482,486,494,500,510,516,518,524,528,542,548,572,584,588,594,606,618,626,638,660,674,684,686,698,702,708,720,746,762,780,792,810,824,828,830,858,860,872
mov $2,332202
lpb $2
mov $3,$6
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,24
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,18
sub $5,8
add $5,$1
mov $6,$5
lpe
mov $0,$1
div $0,12
| 33 | 385 | 0.666667 |
2d56330b67580349c53f6aed30a2ca6742bc33cd | 1,630 | asm | Assembly | src/Vendor.asm | issalig/amstrad-diagnostics | ed069cc45436549bd3d11b976361988a23661088 | [
"MIT"
] | null | null | null | src/Vendor.asm | issalig/amstrad-diagnostics | ed069cc45436549bd3d11b976361988a23661088 | [
"MIT"
] | null | null | null | src/Vendor.asm | issalig/amstrad-diagnostics | ed069cc45436549bd3d11b976361988a23661088 | [
"MIT"
] | null | null | null | MODULE VENDOR
;; www.cpcwiki.eu/index.php/LK-selectable_Brand_Names
;; www.cpcwiki.eu/index.php/LK_Links
;; LK1,LK2,LK3 are optional links on the CPC mainboard, connected to PPI Port B, Bit1-3.
;; The links select the distributor name (which is displayed by the BIOS in the boot message).
;; www.cpcwiki.eu/index.php/8255#PPI_Port_B
;; LK4 default 50Hz screen refresh
; ALL in UPPERCASE, we do not have lowercase chars in this ROM!!!
@VendorNames:
TxtAmstrad: db "AMSTRAD",0
TxtOrion: db "ORION",0
TxtSchneider: db "SCHNEIDER",0
TxtAwa: db "AWA",0
TxtSolavox: db "SOLAVOX",0
TxtSaisho: db "SAISHO",0
TxtTriumph: db "TRIUMPH",0
TxtIsp: db "ISP",0
@VendorTableOffset:
db 0
db TxtOrion - TxtAmstrad
db TxtSchneider - TxtAmstrad
db TxtAwa - TxtAmstrad
db TxtSolavox - TxtAmstrad
db TxtSaisho - TxtAmstrad
db TxtTriumph - TxtAmstrad
db TxtIsp - TxtAmstrad
@RefreshNames:
Txt50HZ: db "50Hz",0
Txt60HZ: db "60Hz",0
@RefreshTableOffset:
db 0
db Txt60HZ - Txt50HZ
;; OUT: (Vendor) - vendor from LK3-1 configuration
@DetectVendor:
ld b,#f5 ; PPI port B.
in a,(c) ; Addressing, B in top half, C in bottom half (ignored)
cpl ; invert bits
and %00001110 ; Links LK3-LK1 define machine
rrca ; get rid of bit0
ld (VendorName),a
ret
;; OUT: (Frequency) - frequency from LK4 configuration
@DetectFrequency:
ld b,#f5 ; PPI port B input
in a,(c) ;
and %00010000 ; LK4 50/60 Hz &10/&00
ld (RefreshFrequency),a
ret
ENDMODULE
| 27.627119 | 95 | 0.641104 |
436737cee53f517c16fa2122aa2f86e1b1c15fba | 1,038 | asm | Assembly | programs/oeis/219/A219651.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/219/A219651.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/219/A219651.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A219651: a(n) = n minus (sum of digits in factorial base expansion of n).
; 0,0,1,1,2,2,5,5,6,6,7,7,10,10,11,11,12,12,15,15,16,16,17,17,23,23,24,24,25,25,28,28,29,29,30,30,33,33,34,34,35,35,38,38,39,39,40,40,46,46,47,47,48,48,51,51,52,52,53,53,56,56,57,57,58,58,61,61,62,62,63,63,69,69,70,70,71,71,74,74,75,75,76,76,79,79,80,80,81,81,84,84,85,85,86,86,92,92,93,93,94,94,97,97,98,98,99,99,102,102,103,103,104,104,107,107,108,108,109,109,119,119,120,120,121,121,124,124,125,125,126,126,129,129,130,130,131,131,134,134,135,135,136,136,142,142,143,143,144,144,147,147,148,148,149,149,152,152,153,153,154,154,157,157,158,158,159,159,165,165,166,166,167,167,170,170,171,171,172,172,175,175,176,176,177,177,180,180,181,181,182,182,188,188,189,189,190,190,193,193,194,194,195,195,198,198,199,199,200,200,203,203,204,204,205,205,211,211,212,212,213,213,216,216,217,217,218,218,221,221,222,222,223,223,226,226,227,227,228,228,238,238,239,239,240,240,243,243,244,244
mov $1,$0
cal $0,34968 ; Minimal number of factorials that add to n.
sub $1,$0
| 148.285714 | 881 | 0.710019 |
43b767d6417231c58c62d1b02dd6dc7ad8cb3912 | 812 | asm | Assembly | oeis/142/A142021.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142021.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142021.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142021: Primes congruent to 17 mod 31.
; Submitted by Jon Maiga
; 17,79,389,761,823,947,1009,1319,1381,1567,1753,1877,2063,2311,2621,2683,3613,3923,4357,4481,4729,5039,5101,5659,5783,6217,6899,6961,7333,7457,7643,7829,8263,8387,8573,8821,9007,9689,10061,10247,10433,10867,11177,11239,11549,12107,12479,12541,13037,13099,13781,13967,14029,14153,14401,14897,15083,15269,15331,15641,15889,16447,16633,16943,17191,17377,17749,18059,18121,18307,18493,18617,18679,18803,19051,19237,19423,19609,19919,20353,20477,20663,20849,21221,21283,21407,21841,22027,22709,23081,23143
mov $2,$0
add $2,6
pow $2,2
lpb $2
mov $3,$4
add $3,16
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,62
lpe
mov $0,$4
add $0,17
| 36.909091 | 501 | 0.731527 |
54920d4d209442c2f3521d3a7c3efb6b7f7c505d | 210 | asm | Assembly | programs/oeis/295/A295774.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/295/A295774.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/295/A295774.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A295774: a(n) is the minimum size of a restricted planar additive basis for the square [0,2n]^2.
; 1,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92
mul $0,4
pow $1,$0
add $1,$0
mov $0,$1
| 26.25 | 98 | 0.657143 |
108a321fa2df5017ab8cb3d678180c063c2ee3f4 | 1,503 | asm | Assembly | ASMFiles/procedures in Assembly.asm | Undeadtaker/Assembly | 34d44d1869eeb27ef957e1e5f28cdf849c6bb610 | [
"Apache-2.0"
] | null | null | null | ASMFiles/procedures in Assembly.asm | Undeadtaker/Assembly | 34d44d1869eeb27ef957e1e5f28cdf849c6bb610 | [
"Apache-2.0"
] | null | null | null | ASMFiles/procedures in Assembly.asm | Undeadtaker/Assembly | 34d44d1869eeb27ef957e1e5f28cdf849c6bb610 | [
"Apache-2.0"
] | null | null | null | .model small
.data
.code
first proc ; every process should begin with its name, after that have the name proc that signals the beginning of the process
mov dl, 51 ; the first procedure changes the value of the dl reg to 51 (hex 3)
; jmp jump ; this would be an illegal statement. We can't jump from one process to another ones' label.
ret ; every process should have a ret word in it (return), except the main process
first endp ; we end the process with its name and the word endp
main proc ; the word proc actually means procedure and this is the main procedure where the code is executed.
; the concept of procedures is actually somewhat similar to methods, where this main proc is the main method
mov dl, 53
mov ah, 02h
int 21h
call first ; How we actually call the procedure,
int 21h ; print to screen again
hlt ; command to halt the CPU cycle
; label:
; label:: ; the jump label is now global, meaning it can be accessed from everywhere. BUT IT IS NOT RECOMMENDED AT ALL!!!
endp ; the endp means that we end the main process, not the whole program! If we want to write more processes
; we should write them after endp and before endmain
end main
| 35.785714 | 140 | 0.586826 |
11fc310a9b3a9f369470d8b95bf50c41274ac744 | 67 | asm | Assembly | asm/shift.asm | YikeZhou/lipsi | 1db35fa43fb89b186a203cacd731690601634e1e | [
"BSD-2-Clause"
] | null | null | null | asm/shift.asm | YikeZhou/lipsi | 1db35fa43fb89b186a203cacd731690601634e1e | [
"BSD-2-Clause"
] | null | null | null | asm/shift.asm | YikeZhou/lipsi | 1db35fa43fb89b186a203cacd731690601634e1e | [
"BSD-2-Clause"
] | null | null | null | #
# shift test program
#
ldi 0x7f
sll
srl
sll
sra
subi 0xff
exit | 5.153846 | 20 | 0.701493 |
99b7a3cf497c64f3f3399ba8fbf86c58abd7a281 | 1,006 | asm | Assembly | src/examples/06_print_int/print_int.asm | vladimir-kazan/asm | 1233961934ea95fc9b1a246a2e42f8a24d84528b | [
"Apache-2.0"
] | null | null | null | src/examples/06_print_int/print_int.asm | vladimir-kazan/asm | 1233961934ea95fc9b1a246a2e42f8a24d84528b | [
"Apache-2.0"
] | null | null | null | src/examples/06_print_int/print_int.asm | vladimir-kazan/asm | 1233961934ea95fc9b1a246a2e42f8a24d84528b | [
"Apache-2.0"
] | null | null | null | %include '../../lib/syscall.asm'
%include '../../lib/functions.asm'
SECTION .text
global start
default rel
start:
lea rdi, [msg]
call sprintLF
mov rcx, 0 ; counter of how many bytes we need to print in the end
; divideLoop:
; inc rcx
xor rdx, rdx
mov rax, 250
mov rdi, 100
idiv rdi ; value in rax, and the remainder in rdx
; iprint
mov rax, 731
mov rcx, 0 ; counter
divideLoop:
inc rcx
mov rdx, 0 ; empty rdx before division operations
mov rsi, 0Ah ; divide by 10
idiv rsi
add rdx, 30h ; 48 or '0' or 30h
push rdx
cmp rax, 0
jnz divideLoop
printLoop:
dec rcx
mov rdi, rsp
push rcx
call sprint
pop rcx
pop rax
cmp rcx, 0
jnz printLoop
mov rdi, 0Ah
call printChar
mov rdi, 0
call exit
SECTION .data
msg db 'Print integers:', 0h
| 19.72549 | 80 | 0.521869 |
a951133f60369bb038759fc251fb3a27cac55cc7 | 2,877 | asm | Assembly | test/expimp.asm | bitwiseworks/nasm-os2 | ef78e4ee1ca3220ac3b60a61b084a693b8032ab6 | [
"BSD-2-Clause"
] | 3 | 2015-03-21T07:35:15.000Z | 2018-01-12T01:24:02.000Z | 3rdParties/src/nasm/nasm-2.15.02/travis/test/expimp.asm | blue3k/StormForge | 1557e699a673ae9adcc8f987868139f601ec0887 | [
"Apache-2.0"
] | 1 | 2020-03-26T19:58:54.000Z | 2020-04-24T08:58:04.000Z | test/expimp.asm | bitwiseworks/nasm-os2 | ef78e4ee1ca3220ac3b60a61b084a693b8032ab6 | [
"BSD-2-Clause"
] | 5 | 2015-03-21T07:35:21.000Z | 2021-01-14T10:54:46.000Z | ;Testname=O0; Arguments=-O0 -fbin -oexpimp.bin; Files=stdout stderr expimp.bin
;Testname=O1; Arguments=-O1 -fbin -oexpimp.bin; Files=stdout stderr expimp.bin
;Testname=Ox; Arguments=-Ox -fbin -oexpimp.bin; Files=stdout stderr expimp.bin
;Testname=error-O0; Arguments=-O0 -fbin -oexpimp.bin -DERROR; Files=stdout stderr expimp.bin
;Testname=error-Ox; Arguments=-Ox -fbin -oexpimp.bin -DERROR; Files=stdout stderr expimp.bin
;
; Test of explicitly and implicitly sized operands
;
BITS 32
add esi,2 ; Implicit
add esi,123456h ; Implicit
add esi,byte 2 ; Explicit
add esi,dword 2 ; Explicit
add esi,dword 123456h ; Explicit
add esi,byte 123456h ; Explicit Truncation
add esi,strict 2 ; Implicit Strict
add esi,strict 123456h ; Implicit Strict
add esi,strict byte 2 ; Explicit Strict
add esi,strict dword 2 ; Explicit Strict
add esi,strict dword 123456h ; Explicit Strict
add esi,strict byte 123456h ; Explicit Strict Truncation
add eax,2 ; Implicit
add eax,123456h ; Implicit
add eax,byte 2 ; Explicit
add eax,dword 2 ; Explicit
add eax,dword 123456h ; Explicit
add eax,byte 123456h ; Explicit Truncation
add eax,strict 2 ; Implicit Strict
add eax,strict 123456h ; Implicit Strict
add eax,strict byte 2 ; Explicit Strict
add eax,strict dword 2 ; Explicit Strict
add eax,strict dword 123456h ; Explicit Strict
add eax,strict byte 123456h ; Explicit Strict Truncation
imul dx,3 ; Implicit
imul dx,byte 3 ; Explicit
imul dx,word 3 ; Explicit
imul dx,strict byte 3 ; Explicit Strict
imul dx,strict word 3 ; Explicit Strict
;
; Same thing with branches
;
start:
jmp short start ; Explicit
jmp near start ; Explicit
jmp word start ; Explicit
jmp dword start ; Explicit
jmp short forward ; Explicit
jmp near forward ; Explicit
jmp word forward ; Explicit
jmp dword forward ; Explicit
%ifdef ERROR
jmp short faraway ; Explicit (ERROR)
%endif
jmp near faraway ; Explicit
jmp word faraway ; Explicit
jmp dword faraway ; Explicit
jmp start ; Implicit
jmp forward ; Implicit
jmp faraway ; Implicit
jmp strict short start ; Explicit Strict
jmp strict near start ; Explicit Strict
jmp strict word start ; Explicit Strict
jmp strict dword start ; Explicit Strict
jmp strict short forward ; Explicit Strict
jmp strict near forward ; Explicit Strict
jmp strict word forward ; Explicit Strict
jmp strict dword forward ; Explicit Strict
%ifdef ERROR
jmp strict short faraway ; Explicit (ERROR)
%endif
jmp strict near faraway ; Explicit Strict
jmp strict word faraway ; Explicit Strict
jmp strict dword faraway ; Explicit Strict
jmp strict start ; Implicit Strict
jmp strict forward ; Implicit Strict
jmp strict faraway ; Implicit Strict
forward:
times 256 nop
faraway:
| 31.615385 | 93 | 0.719847 |
f540152e8bec0cd5025fa5f8e4e49ad403eb8756 | 683 | asm | Assembly | src/util/strg/appc.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/strg/appc.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/strg/appc.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | ; append a character after a string 06/01-92 O.Fink
section string
include win1_keys_err
xdef st_appc ; append a character
;+++
; append a character after a string (there must be enough space!)
; abcdef -> append 1 -> abcdef1
;
; Entry Exit
; d1.b character preserved
; a0 ptr to string preserved
;
; error codes: none
; condition codes set
;---
st_appc
move.w (a0),d0
addq.w #1,d0
move.w d0,(a0)
move.b d1,1(a0,d0.w)
moveq #0,d0
rts
end
| 23.551724 | 71 | 0.456808 |
80c9fad9699d06f9cc6e255cfc7ab9ccb89f7384 | 363 | asm | Assembly | programs/oeis/281/A281482.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/281/A281482.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/281/A281482.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A281482: a(n) = 2^(n + 1) * (2^n + 1) - 1.
; 3,11,39,143,543,2111,8319,33023,131583,525311,2099199,8392703,33562623,134234111,536903679,2147549183,8590065663,34360000511,137439477759,549756862463,2199025352703,8796097216511,35184380477439,140737505132543,562949986975743,2251799880794111,9007199388958719
mov $1,2
pow $1,$0
add $1,1
bin $1,2
mul $1,4
sub $1,1
| 36.3 | 261 | 0.768595 |
073141a27e14769f828fe517ef35a2694feefb86 | 234 | asm | Assembly | src/test_include/test4.asm | hra1129/zma | c2bfc79df45e1d4d01c6faa1b69216245a4e1d2c | [
"MIT"
] | 8 | 2021-03-19T23:44:14.000Z | 2022-03-22T07:29:02.000Z | src/test_include/test4.asm | hra1129/zma | c2bfc79df45e1d4d01c6faa1b69216245a4e1d2c | [
"MIT"
] | null | null | null | src/test_include/test4.asm | hra1129/zma | c2bfc79df45e1d4d01c6faa1b69216245a4e1d2c | [
"MIT"
] | 1 | 2021-11-27T22:37:24.000Z | 2021-11-27T22:37:24.000Z | ; -----------------------------------------------------------------------------
; test program
; -----------------------------------------------------------------------------
include "sub_repeat_macro.asm"
defb 1, 2
PAGE_ALIGN
| 23.4 | 79 | 0.226496 |
5d1c2c530164b95e448d26fb56a82f1f0157851d | 1,668 | asm | Assembly | programs/oeis/108/A108928.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/108/A108928.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/108/A108928.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A108928: a(n) = 8*n^2 - 3.
; 5,29,69,125,197,285,389,509,645,797,965,1149,1349,1565,1797,2045,2309,2589,2885,3197,3525,3869,4229,4605,4997,5405,5829,6269,6725,7197,7685,8189,8709,9245,9797,10365,10949,11549,12165,12797,13445,14109,14789,15485,16197,16925,17669,18429,19205,19997,20805,21629,22469,23325,24197,25085,25989,26909,27845,28797,29765,30749,31749,32765,33797,34845,35909,36989,38085,39197,40325,41469,42629,43805,44997,46205,47429,48669,49925,51197,52485,53789,55109,56445,57797,59165,60549,61949,63365,64797,66245,67709,69189,70685,72197,73725,75269,76829,78405,79997,81605,83229,84869,86525,88197,89885,91589,93309,95045,96797,98565,100349,102149,103965,105797,107645,109509,111389,113285,115197,117125,119069,121029,123005,124997,127005,129029,131069,133125,135197,137285,139389,141509,143645,145797,147965,150149,152349,154565,156797,159045,161309,163589,165885,168197,170525,172869,175229,177605,179997,182405,184829,187269,189725,192197,194685,197189,199709,202245,204797,207365,209949,212549,215165,217797,220445,223109,225789,228485,231197,233925,236669,239429,242205,244997,247805,250629,253469,256325,259197,262085,264989,267909,270845,273797,276765,279749,282749,285765,288797,291845,294909,297989,301085,304197,307325,310469,313629,316805,319997,323205,326429,329669,332925,336197,339485,342789,346109,349445,352797,356165,359549,362949,366365,369797,373245,376709,380189,383685,387197,390725,394269,397829,401405,404997,408605,412229,415869,419525,423197,426885,430589,434309,438045,441797,445565,449349,453149,456965,460797,464645,468509,472389,476285,480197,484125,488069,492029,496005,499997
mov $1,2
add $1,$0
mul $1,$0
mul $1,8
add $1,5
| 185.333333 | 1,590 | 0.82554 |
fded1360b34b8df5993d7272576a203755371251 | 1,043 | asm | Assembly | Examples/ch17/Speaker.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | Examples/ch17/Speaker.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | Examples/ch17/Speaker.asm | satadriver/LiunuxOS | 693174ac2b3e503d72782fc7a14f18c8a4f2756c | [
"Apache-2.0"
] | null | null | null | TITLE Speaker Demo Program (Speaker.asm)
; This program plays a series of ascending notes on
; the PC speaker.
; Last update: 10/8/01
INCLUDE Irvine16.inc ; 16-bit Real mode program
speaker = 61h ; address of speaker port
timer = 42h ; address of timer port
delay1 = 500
delay2 = 0D000h ; delay between notes
startPitch = 60
.code
main PROC
in al,speaker ; get speaker status
push ax ; save status
or al,00000011b ; set lowest 2 bits
out speaker,al ; turn speaker on
mov al,startPitch ; starting pitch
L2:
out timer,al ; timer port: pulses speaker
; Create a delay loop between pitches:
mov cx,delay1
L3: push cx ; outer loop
mov cx,delay2
L3a: ; inner loop
loop L3a
pop cx
loop L3
sub al,1 ; raise pitch
jnz L2 ; play another note
pop ax ; get original status
and al,11111100b ; clear lowest 2 bits
out speaker,al ; turn speaker off
exit
main ENDP
END main | 24.833333 | 55 | 0.619367 |
7f78876a4cdd9b4b11ecf36336ad3e7bf81b252e | 710 | asm | Assembly | _maps/Title Screen Sonic.asm | derpguy125/SnorcRomHack-Master | 649ec7bdd595d4752a9968367e516a3c32cd2566 | [
"Unlicense"
] | null | null | null | _maps/Title Screen Sonic.asm | derpguy125/SnorcRomHack-Master | 649ec7bdd595d4752a9968367e516a3c32cd2566 | [
"Unlicense"
] | null | null | null | _maps/Title Screen Sonic.asm | derpguy125/SnorcRomHack-Master | 649ec7bdd595d4752a9968367e516a3c32cd2566 | [
"Unlicense"
] | null | null | null | ; ================================================================================
; Sprite Mappings - generated by Flex 2 Tue Oct 27 2020 17:13:24 GMT-0400 (Eastern Daylight Time)
; ================================================================================
DATAP9PEFRMP2X:
dc.w DATAP9PEFRMP2X_0-DATAP9PEFRMP2X
DATAP9PEFRMP2X_0: dc.b $D
dc.b $10, $F, $0, $0, $13
dc.b $10, $B, $0, $10, $33
dc.b $18, $3, $0, $1C, $B
dc.b $18, $5, $0, $20, $4B
dc.b $28, $3, $0, $24, $3
dc.b $30, $F, $0, $28, $13
dc.b $30, $F, $0, $38, $33
dc.b $30, $1, $0, $48, $53
dc.b $38, $1, $0, $4A, $B
dc.b $48, $0, $0, $4C, $53
dc.b $50, $E, $0, $4D, $13
dc.b $50, $A, $0, $59, $33
dc.b $68, $4, $0, $62, $1B
even | 33.809524 | 97 | 0.4 |
8cfa060d5fb02cab2bf161cb896ba93d726130cd | 320 | asm | Assembly | programs/oeis/194/A194599.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/194/A194599.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/194/A194599.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A194599: Units' digits of the nonzero hexagonal numbers.
; 1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0,1,6,5,8,5,6,1,0,3,0
mov $2,8
mul $2,$0
sub $2,1
add $0,$2
mul $0,$2
mod $0,10
| 32 | 201 | 0.553125 |
233909cd5ffe14fdcae4bf64fd04dcc62a5f9674 | 631 | asm | Assembly | programs/oeis/066/A066368.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/066/A066368.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/066/A066368.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A066368: a(n) = (n+2)*2^(n-1) - 2*n.
; 1,1,4,14,40,102,244,562,1264,2798,6124,13290,28648,61414,131044,278498,589792,1245150,2621404,5504986,11534296,24117206,50331604,104857554,218103760,452984782,939524044,1946157002,4026531784,8321499078,17179869124,35433480130,73014443968,150323855294,309237645244,635655159738,1305670057912,2680059592630,5497558138804,11269994184626,23089744183216,47278999994286,96757023244204,197912092999594,404620279021480,826832744087462,1688849860263844,3448068464705442,7036874417766304
sub $0,1
mov $1,1
lpb $0
add $2,2
mov $3,$0
sub $0,1
add $3,$2
add $1,$3
add $3,$2
mov $2,$3
lpe
| 42.066667 | 479 | 0.787639 |
93f1b9bd741002def138ccb9c7c9777242fa4de8 | 8,337 | asm | Assembly | src/rx-map.asm | staskevich/UMR2 | 276b7c27abec076960ecc621c9fbc3bd59f32fc0 | [
"CC-BY-4.0"
] | 27 | 2017-12-31T12:32:21.000Z | 2022-03-31T16:00:49.000Z | src/rx-map.asm | staskevich/UMR2 | 276b7c27abec076960ecc621c9fbc3bd59f32fc0 | [
"CC-BY-4.0"
] | null | null | null | src/rx-map.asm | staskevich/UMR2 | 276b7c27abec076960ecc621c9fbc3bd59f32fc0 | [
"CC-BY-4.0"
] | 4 | 2017-10-11T11:00:10.000Z | 2020-06-28T17:05:34.000Z | ; UMR2
; copyright John Staskevich, 2017
; john@codeandcopper.com
;
; This work is licensed under a Creative Commons Attribution 4.0 International License.
; http://creativecommons.org/licenses/by/4.0/
;
; rx-map.asm
;
; Map incoming MIDI notes to matrix keys
;
note_map_low code 0x3D00
; rx note map: select address and data bit for each MIDI note.
; used to trigger keys from MIDI input.
;0
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 10
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 20
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 30
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 40
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 50
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 60
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 70
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 80
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 90
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 100
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 110
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 120
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
note_map_high code 0x3E00
; note map: key bit address high byte
; 0
data 0x22 ; 0x00 : 000
data 0x22 ; 0x01 : 001
data 0x22 ; 0x02 : 002
data 0x22 ; 0x03 : 003
data 0x22 ; 0x04 : 004
data 0x22 ; 0x05 : 005
data 0x22 ; 0x06 : 006
data 0x22 ; 0x07 : 007
data 0x22 ; 0x08 : 008
data 0x22 ; 0x09 : 009
; 10
data 0x22 ; 0x0A : 010
data 0x22 ; 0x0B : 011
data 0x22 ; 0x0C : 012
data 0x22 ; 0x0D : 013
data 0x22 ; 0x0E : 014
data 0x22 ; 0x0F : 015
data 0x22 ; 0x10 : 016
data 0x22 ; 0x11 : 017
data 0x22 ; 0x12 : 018
data 0x22 ; 0x13 : 019
; 20
data 0x22 ; 0x14 : 020
data 0x22 ; 0x15 : 021
data 0x22 ; 0x16 : 022
data 0x22 ; 0x17 : 023
data 0x22 ; 0x18 : 024
data 0x22 ; 0x19 : 025
data 0x22 ; 0x1A : 026
data 0x22 ; 0x1B : 027
data 0x22 ; 0x1C : 028
data 0x22 ; 0x1D : 029
; 30
data 0x22 ; 0x1E : 030
data 0x22 ; 0x1F : 031
data 0x22 ; 0x20 : 032
data 0x22 ; 0x21 : 033
data 0x22 ; 0x22 : 034
data 0x22 ; 0x23 : 035
data 0x22 ; 0x24 : 036
data 0x22 ; 0x25 : 037
data 0x22 ; 0x26 : 038
data 0x22 ; 0x27 : 039
; 40
data 0x22 ; 0x28 : 040
data 0x22 ; 0x29 : 041
data 0x22 ; 0x2A : 042
data 0x22 ; 0x2B : 043
data 0x22 ; 0x2C : 044
data 0x22 ; 0x2D : 045
data 0x22 ; 0x2E : 046
data 0x22 ; 0x2F : 047
data 0x22 ; 0x30 : 048
data 0x22 ; 0x31 : 049
; 50
data 0x22 ; 0x32 : 050
data 0x22 ; 0x33 : 051
data 0x22 ; 0x34 : 052
data 0x22 ; 0x35 : 053
data 0x22 ; 0x36 : 054
data 0x22 ; 0x37 : 055
data 0x22 ; 0x38 : 056
data 0x22 ; 0x39 : 057
data 0x22 ; 0x3A : 058
data 0x22 ; 0x3B : 059
; 60
data 0x22 ; 0x3C : 060
data 0x22 ; 0x3D : 061
data 0x22 ; 0x3E : 062
data 0x22 ; 0x3F : 063
data 0x22 ; 0x40 : 064
data 0x22 ; 0x41 : 065
data 0x22 ; 0x42 : 066
data 0x22 ; 0x43 : 067
data 0x22 ; 0x44 : 068
data 0x22 ; 0x45 : 069
; 70
data 0x22 ; 0x46 : 070
data 0x22 ; 0x47 : 071
data 0x22 ; 0x48 : 072
data 0x22 ; 0x49 : 073
data 0x22 ; 0x4A : 074
data 0x22 ; 0x4B : 075
data 0x22 ; 0x4C : 076
data 0x22 ; 0x4D : 077
data 0x22 ; 0x4E : 078
data 0x22 ; 0x4F : 079
; 80
data 0x22 ; 0x50 : 080
data 0x22 ; 0x51 : 081
data 0x22 ; 0x52 : 082
data 0x22 ; 0x53 : 083
data 0x22 ; 0x54 : 084
data 0x22 ; 0x55 : 085
data 0x22 ; 0x56 : 086
data 0x22 ; 0x57 : 087
data 0x22 ; 0x58 : 088
data 0x22 ; 0x59 : 089
; 90
data 0x22 ; 0x5A : 090
data 0x22 ; 0x5B : 091
data 0x22 ; 0x5C : 092
data 0x22 ; 0x5D : 093
data 0x22 ; 0x5E : 094
data 0x22 ; 0x5F : 095
data 0x22 ; 0x60 : 096
data 0x22 ; 0x61 : 097
data 0x22 ; 0x62 : 098
data 0x22 ; 0x63 : 099
; 100
data 0x22 ; 0x64 : 100
data 0x22 ; 0x65 : 101
data 0x22 ; 0x66 : 102
data 0x22 ; 0x67 : 103
data 0x22 ; 0x68 : 104
data 0x22 ; 0x69 : 105
data 0x22 ; 0x6A : 106
data 0x22 ; 0x6B : 107
data 0x22 ; 0x6C : 108
data 0x22 ; 0x6D : 109
; 110
data 0x22 ; 0x6E : 110
data 0x22 ; 0x6F : 111
data 0x22 ; 0x70 : 112
data 0x22 ; 0x71 : 113
data 0x22 ; 0x72 : 114
data 0x22 ; 0x73 : 115
data 0x22 ; 0x74 : 116
data 0x22 ; 0x75 : 117
data 0x22 ; 0x76 : 118
data 0x22 ; 0x77 : 119
; 120
data 0x22 ; 0x78 : 120
data 0x22 ; 0x79 : 121
data 0x22 ; 0x7A : 122
data 0x22 ; 0x7B : 123
data 0x22 ; 0x7C : 124
data 0x22 ; 0x7D : 125
data 0x22 ; 0x7E : 126
data 0x22 ; 0x7F : 127
note_map_bitmask code 0x3F00
; note map: key bitmask
; 0
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 10
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 20
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 30
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 40
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 50
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 60
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 70
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 80
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 90
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 100
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 110
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
; 120
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
data 0x00
end
| 18.526667 | 88 | 0.533165 |
eb478c90c47c3a412ccbb4160c557c5536ddea70 | 1,742 | asm | Assembly | 1571/64tass/scrtch.asm | silverdr/assembly | c2851f7033223e089285dce22443b7e219ed4f61 | [
"Unlicense"
] | 23 | 2015-03-23T15:16:57.000Z | 2022-03-18T12:43:42.000Z | 1571/64tass/scrtch.asm | silverdr/assembly | c2851f7033223e089285dce22443b7e219ed4f61 | [
"Unlicense"
] | null | null | null | 1571/64tass/scrtch.asm | silverdr/assembly | c2851f7033223e089285dce22443b7e219ed4f61 | [
"Unlicense"
] | 8 | 2016-04-13T11:19:35.000Z | 2021-12-22T07:39:00.000Z | ; scratch file(s)
scrtch jsr fs1set ; set up for 1 stream
jsr alldrs
jsr optsch
lda #0
sta r0 ; used as file count
jsr ffst
bmi sc30
sc15 jsr tstchn ; is it active ?
bcc sc25 ; yes - don't scratch
ldy #0
lda (dirbuf),y
and #$40 ; lock bit
bne sc25 ; it's locked
jsr deldir ; delete directory
ldy #19 ; is this a relative ?
lda (dirbuf),y ; has a ss ?
beq sc17 ; no
sta track ; yes - save track
iny
lda (dirbuf),y ; get sector
sta sector
jsr delfil ; delete by links
sc17 ldx entfnd
lda #$20
and pattyp,x
bne sc20 ; created, not closed
lda filtrk,x ; delete by links
sta track
lda filsec,x
sta sector
jsr delfil
sc20 inc r0
sc25 jsr ffre
bpl sc15
sc30 lda r0 ; finished, set
sta track ; file count
lda #1
ldy #0
jmp scrend ; end of scratch
delfil jsr frets ; delete file by links
jsr opnird ; update bam
jsr bam2x
lda buf0,x
cmp #$ff
beq del1
lda wbam
ora #$40
sta wbam
del1 lda #0
jsr setpnt
jsr rdbyt
sta track
jsr rdbyt
sta sector
lda track
bne del2
jsr mapout
jmp frechn
del2 jsr frets
jsr nxtbuf
jmp del1
deldir ldy #0 ; delete dir entry
tya
sta (dirbuf),y
jsr wrtout
jmp watjob
| 21.506173 | 46 | 0.454076 |
7056da15288d14065964b71fcc6a8eb518be4c49 | 9,261 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1522.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1522.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1522.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x16681, %rsi
lea addresses_WT_ht+0x5961, %rdi
nop
nop
cmp $15466, %rbx
mov $44, %rcx
rep movsb
nop
nop
sub $25991, %r15
lea addresses_D_ht+0x18a1, %rbp
clflush (%rbp)
nop
nop
nop
sub %rax, %rax
mov (%rbp), %rbx
nop
add $26474, %rbp
lea addresses_normal_ht+0x1e735, %r15
clflush (%r15)
cmp %rdi, %rdi
movb $0x61, (%r15)
nop
nop
nop
nop
cmp %rbx, %rbx
lea addresses_UC_ht+0x15f21, %r15
nop
sub $19985, %rbx
movl $0x61626364, (%r15)
nop
nop
nop
nop
mfence
lea addresses_WT_ht+0x1bf21, %rax
nop
nop
nop
nop
inc %rbp
movl $0x61626364, (%rax)
nop
xor $21559, %rdi
lea addresses_normal_ht+0xfd2f, %rcx
nop
nop
nop
nop
xor %rax, %rax
movups (%rcx), %xmm2
vpextrq $0, %xmm2, %rsi
nop
nop
and $19568, %r15
lea addresses_WC_ht+0x5d21, %rax
nop
sub $5109, %r15
movb $0x61, (%rax)
nop
nop
nop
nop
nop
inc %r15
lea addresses_WC_ht+0x2de1, %rsi
lea addresses_D_ht+0xe721, %rdi
nop
nop
nop
sub $10238, %r14
mov $25, %rcx
rep movsb
nop
nop
nop
nop
nop
add $11407, %rsi
lea addresses_WC_ht+0x6ec1, %rsi
lea addresses_UC_ht+0xcf21, %rdi
clflush (%rsi)
nop
xor %rbp, %rbp
mov $31, %rcx
rep movsb
nop
nop
nop
nop
nop
mfence
lea addresses_D_ht+0x8269, %rsi
lea addresses_A_ht+0x7e01, %rdi
clflush (%rdi)
nop
nop
nop
dec %r14
mov $31, %rcx
rep movsb
nop
sub %rcx, %rcx
lea addresses_UC_ht+0x99ad, %rsi
lea addresses_WC_ht+0xae21, %rdi
nop
nop
add $25041, %r14
mov $52, %rcx
rep movsl
nop
nop
and $29342, %rax
lea addresses_WC_ht+0x166fb, %rax
nop
nop
nop
xor %rbp, %rbp
mov (%rax), %cx
nop
nop
and %rbp, %rbp
lea addresses_D_ht+0x11b21, %rbx
nop
nop
nop
nop
nop
sub %rax, %rax
movb (%rbx), %r15b
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_A_ht+0x2421, %rsi
lea addresses_A_ht+0x1000, %rdi
add $33444, %r14
mov $16, %rcx
rep movsq
nop
nop
inc %rdi
lea addresses_WT_ht+0x1a721, %rbx
clflush (%rbx)
nop
add $42805, %r15
mov $0x6162636465666768, %rbp
movq %rbp, %xmm1
vmovups %ymm1, (%rbx)
nop
nop
nop
nop
nop
dec %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r8
push %rax
push %rbp
push %rdi
push %rsi
// Store
lea addresses_RW+0x917b, %r13
dec %r10
mov $0x5152535455565758, %rax
movq %rax, %xmm3
movups %xmm3, (%r13)
nop
nop
nop
xor $48399, %rdi
// Store
lea addresses_WC+0x116e1, %rsi
and %r10, %r10
mov $0x5152535455565758, %rbp
movq %rbp, %xmm5
movups %xmm5, (%rsi)
nop
xor $30182, %rbp
// Store
lea addresses_A+0x1bea1, %r13
nop
nop
cmp %r8, %r8
movl $0x51525354, (%r13)
nop
nop
and %rbp, %rbp
// Load
lea addresses_WT+0x2721, %rbp
nop
xor %r8, %r8
movb (%rbp), %r13b
nop
sub %r8, %r8
// Store
mov $0x95d, %rbp
nop
add $12656, %r10
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
movups %xmm0, (%rbp)
nop
nop
sub $46805, %r13
// Load
lea addresses_RW+0x63e1, %rdi
cmp %r13, %r13
mov (%rdi), %rbp
nop
nop
nop
nop
add %rax, %rax
// Faulty Load
lea addresses_RW+0xef21, %rbp
nop
nop
nop
inc %rdi
mov (%rbp), %eax
lea oracles, %rsi
and $0xff, %rax
shlq $12, %rax
mov (%rsi,%rax,1), %rax
pop %rsi
pop %rdi
pop %rbp
pop %rax
pop %r8
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_RW'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC'}}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_A'}}
{'src': {'congruent': 11, 'AVXalign': True, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_P'}}
{'src': {'congruent': 5, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 3, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': True, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 30.973244 | 2,999 | 0.652737 |
1be8b0ef6b97ee06d168de8621db0238dfeb0ff3 | 6,558 | asm | Assembly | sbsext/ext/wild.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | sbsext/ext/wild.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | sbsext/ext/wild.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | * Wild card operations V1.1 1985 Tony Tebby QJUMP
*
section exten
*
* DIR [#channel,] [wildname] drive status and directo
* WDIR [#channel,] [wildname] directory listing
* WSTAT [#channel,] [wildname] statistics of files
* WDEL [#channel,] [wildname] delete files
* WCOPY [#channel,] [wildname [,wildname]] copy files
* WREN [#channel,] [wildname [,wildname]] rename files
*
xdef dir
xdef wdir
xdef wstat
xdef wdel
xdef wcopy
xdef wren
*
xref wc_look1 look for one filename
xref wc_look2 look for two filenames
xref dec_cstrg convert long integer to decimal
xref stat_do write out statistics
xref ut_chan0 open channel (default #0)
xref ut_winset open channel and check window
xref ut_winchk check window
xref ut_mswq message for wild, one name and query
xref ut_msw2q message for wild, 2 names and query
xref ut_mswoq message for wild, overwrite query
xref ut_fhead read file header
xref ut_wrtst write string of bytes
xref ut_wrtnl write newline
xref ut_trp3r trap #3 relative
xref ut_copy1 copy files (with header type>=1)
xref ut_fclos close file
xref ut_errms write error message (set d0=0)
*
include dev8_sbsext_ext_keys
*
fr_dchan equ $14 position of directory channel in frame
wild_rts
rts
*
* Wild copy action
*
wi_copy
beq.s wild_rts ... ignore directory
bsr.l ut_msw2q and ask if OK to do
bne.s wi_rts.1
moveq #io.share,d3 try to open source
move.l a3,a0
bsr.l wi_open
bne.s wi_mess ... oops
move.l a0,a3 save source ID
bsr.s wi_openn try to open new destination
beq.s wic_copy ... ok, carry on
bsr.s wi_overq check if overwrite existing file
bne.s wi_cls ... no, close source
moveq #io.overw,d3 try to open destination overwrite
bsr.s wi_open4
beq.s wic_copy ... good
moveq #err.ex,d4
cmp.l d4,d0 was it already exists?
bne.s wi_derr ... no, write message and close source
bsr.s wi_del4n ... yes, delete and try again
bne.s wi_derr ... ... oops
wic_copy
bra.l ut_copy1 copy (header optional)
*
* Wild rename action
*
wi_ren
bsr.l ut_msw2q request
wi_rts.1
bne.s wi_rts
moveq #io.old,d3 open read/write
move.l a3,a0
bsr.s wi_open
bne.s wi_mess ... oops, send message and continue
move.l a0,a3 save channel ID
bsr.s wir_ren rename file
beq.s wi_cls ... done, close the source
bsr.s wi_overq and request overwrite
bne.s wi_cls ... no, close the source
bsr.s wi_del4 delete the destination
move.l a3,a0
bsr.s wir_ren try rename again
bra.s wi_derr and close up
*
wir_ren
moveq #fs.renam,d0 rename
move.l a4,a1
bra.l ut_trp3r
*
* Query overwrite
*
wi_overq
moveq #err.ex,d4 check if destination exists
cmp.l d4,d0
bne.s wi_derr4 ... no, other destination error
swap d7 get overwrite continue
move.l a5,a0
bsr.l ut_mswoq ask for overwrite
sne d4 save status
swap d7
tst.b d4 was it OK
rts
page
*
* destination error
*
wi_derr4
addq.l #4,sp remove return
wi_derr
beq.s wi_cls no error
bsr.s wi_mess ... not good, write out error
*
* close source
*
wi_cls
move.l a3,a0
bra.l ut_fclos and close source file
*
* write error message
*
wi_mess
clr.w d7 reset continue flag
wi_messc
move.l a5,a0 set screen channel
bra.l ut_errms ... and write error message
*
* delete file and reopen
*
wi_del4
move.l a4,a0 destination file-name
wi_del0
moveq #io.delet,d0 to be deleted
bra.s wi_trap2
wi_del4n
bsr.s wi_del4 delete destination
bne.s wi_rts ... oops
wi_openn
moveq #io.new,d3 open a new file
wi_open4
move.l a4,a0 a4 points to name
wi_open
moveq #io.open,d0 open a file
wi_trap2
moveq #myself,d1 for me
trap #4
trap #2
tst.l d0 check error return
wi_rts
rts
page
*
* DIR/WDIR action
*
wi_dir
sne d5 directory flag
bsr.l ut_winchk check the window
move.l a3,a1 pointer to file name
move.w (a6,a1.l),d2 number of characters
addq.l #2,a1 start of name
wi_dnams
addq.l #1,a1 skip the drive name
subq.w #1,d2
cmp.b #'_',-1(a6,a1.l) is previous '_'?
bne.s wi_dnams ... no, skip another
tst.b d5 directory?
bne.s wi_send ... no, write the file name
add.w d2,a1 ... yes, add ' ->'
move.b #' ',(a6,a1.l)
move.b #'-',1(a6,a1.l)
move.b #'>',2(a6,a1.l)
sub.w d2,a1
addq.w #3,d2
bra.s wi_send write the directory name
*
* WSTAT action
*
wi_stat
bsr.s wi_dir write filename
bne.s wi_rts ... oops
tst.b d5 was it directory?
beq.s wi_rts ... yes
bsr.l ut_winchk check the window
moveq #io.share,d3 open
move.l a3,a0 source file
bsr.s wi_open
bne.s wi_messc ... oops, message and continue
move.l a0,a3 save file channel ID
bsr.l ut_fhead read header
bne.s wis_done ... oops
move.l md_deupd(a6,a1.l),-(sp) save the update date
move.l d7,-(sp) the continue flag
move.l d6,-(sp) and the window counter
move.l md_delen(a6,a1.l),d1 get file length
moveq #0,d4 positive no sign
moveq #0,d5 create a string of file length
moveq #10,d6 field of 10
moveq #$7f,d7 no commas
bsr.l dec_cstrg
moveq #10,d2 set count
move.l (sp)+,d6
move.l (sp)+,d7
move.l (sp)+,d1 get the update date
beq.s wis_send ... not there
add.w #32,a1 move to end
jsr cn..date*3+qlv.off convert date
move.w #' ',(a6,a1.l) put spaces instead of length
move.l bv_bfbas(a6),a1 set string pointer
moveq #32,d2 and length
wis_send
bsr.s wi_send send it
wis_done
bra.l wi_cls
*
wi_send
move.l a5,a0 get screen channel
bsr.l ut_wrtst write string
bne.s wis_done ... oops
bra.l ut_wrtnl and newline
*
* WDEL action
*
wi_del
move.l a3,a1 pointer to filename
bsr.l ut_mswq query it
bne.s wi_rts.2
move.l a3,a0 get source name
bsr.l wi_del0 and delete it
bra.l wi_messc send message and continue
page
*
* WCOPY entry
*
wcopy
lea wi_copy(pc),a4 set wild copy address
bra.s wcp_wren
*
* WREN entry
*
wren
lea wi_ren(pc),a4 set wild rename address
wcp_wren
moveq #0,d7 preset check flag
bsr.l ut_chan0 get channel ID
bne.s wi_rts.2 ... oops
bra.l wc_look2 and look for two filenames
*
* DIR / WDIR entry
*
dir
moveq #-1,d7 set check flag to get status
bra.s wdir_1
wdir
moveq #1,d7 preset check flag to all
wdir_1
lea wi_dir(pc),a4 set directory action
bra.s wdir_2
*
* WSTAT entry
*
wstat
moveq #1,d7 preset check flag to all
lea wi_stat(pc),a4 set statistics action
wdir_2
bsr.l ut_winset setup window checks
bne.s wi_rts.2
bra.s wild_l1
*
* WDEL entry
*
wdel
moveq #0,d7 preset check flag
lea wi_del(pc),a4 set delete action
bsr.l ut_chan0 and get channel
wild_l1
bne.s wi_rts.2
bra.l wc_look1 look for one filename
wi_rts.2
rts
end
| 23.091549 | 57 | 0.704788 |
0dbd40bfe13d7f0a7db7f7c4706043e28e6ae8c7 | 5,027 | asm | Assembly | Transynther/x86/_processed/NC/_ht_st_zr_un_/i7-7700_9_0x48_notsx.log_3079_649.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_ht_st_zr_un_/i7-7700_9_0x48_notsx.log_3079_649.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_ht_st_zr_un_/i7-7700_9_0x48_notsx.log_3079_649.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 %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x15488, %rsi
lea addresses_A_ht+0x7808, %rdi
nop
nop
cmp $42610, %rdx
mov $72, %rcx
rep movsl
nop
nop
nop
sub $18440, %r10
lea addresses_A_ht+0x1e088, %rsi
lea addresses_WC_ht+0x18398, %rdi
nop
add $58715, %rax
mov $26, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_WC_ht+0x13e0, %rax
nop
nop
inc %rbp
movl $0x61626364, (%rax)
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_UC_ht+0x7662, %rsi
lea addresses_A_ht+0x6688, %rdi
nop
nop
nop
and %r8, %r8
mov $46, %rcx
rep movsw
add %rbp, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %rbp
push %rcx
push %rsi
// Faulty Load
mov $0x139d220000000888, %rcx
nop
dec %rbp
vmovups (%rcx), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $1, %xmm0, %r11
lea oracles, %rcx
and $0xff, %r11
shlq $12, %r11
mov (%rcx,%r11,1), %r11
pop %rsi
pop %rcx
pop %rbp
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC_ht', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}}
{'38': 63, '72': 11, '08': 12, '49': 186, '00': 2807}
00 00 00 00 00 00 00 49 49 00 00 00 00 00 00 49 49 00 00 38 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 49 00 00 00 00 08 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 49 00 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 49 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 49 49 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 49 49 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 38 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 49 00 00 00 00 49 00 00 00 00 00 00 00 38 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 49 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 49 00 00 00 00 49 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 08 00 00 00 00 49 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 38 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 49 49 00 00 00 49 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00
*/
| 47.87619 | 2,999 | 0.661229 |
23cdc6413d9cf8950576527b864314371913ed87 | 1,183 | asm | Assembly | programs/oeis/277/A277723.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/277/A277723.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/277/A277723.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A277723: a(n) = floor(n*tau^3) where tau is the tribonacci constant (A058265).
; 0,6,12,18,24,31,37,43,49,56,62,68,74,80,87,93,99,105,112,118,124,130,136,143,149,155,161,168,174,180,186,192,199,205,211,217,224,230,236,242,248,255,261,267,273,280,286,292,298,304,311,317,323,329,336,342,348,354,360,367,373,379,385,392,398,404,410,416,423,429,435,441,448,454,460,466,472,479,485,491,497,504,510,516,522,528,535,541,547,553,560,566,572,578,584,591,597,603,609,616,622,628,634,640,647,653,659,665,672,678,684,690,696,703,709,715,721,728,734,740,746,752,759,765,771,777,784,790,796,802,808,815,821,827,833,840,846,852,858,864,871,877,883,889,896,902,908,914,920,927,933,939,945,952,958,964,970,976,983,989,995,1001,1008,1014,1020,1026,1032,1039,1045,1051,1057,1064,1070,1076,1082,1088,1095,1101,1107,1113,1120,1126,1132,1138,1144,1151,1157,1163,1169,1176,1182,1188,1194,1200,1207,1213,1219,1225,1232,1238,1244,1250,1256,1263,1269,1275,1281,1288,1294,1300,1306,1312,1319,1325,1331,1337,1344,1350,1356,1362,1368,1375,1381,1387,1393,1400,1406,1412,1418,1424,1431,1437,1443,1449,1456,1462,1468,1474,1480,1487,1493,1499,1505,1512,1518,1524,1530,1536,1543,1549
mov $1,56
mul $1,$0
div $1,9
| 169 | 1,071 | 0.754861 |
5db6a46cc91bffa9de4bcc6acf549927b5ea4323 | 2,441 | asm | Assembly | assembler/tests/t_f8/t_f8.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | assembler/tests/t_f8/t_f8.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | assembler/tests/t_f8/t_f8.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | cpu mk3870
page 0
adc
ai 55h
am
amd
as 5
asd 10
bc $
bf 10,$+1
bm $-2
bnc $+3
bno $-4
bnz $+5
bp $-6
br $+7
br7 $-8
bt 3,$+9
bz $-10
ci 55h
clr
cm
com
dci 55aah
di
ds s
ei
in 07h
inc
ins 4
jmp 55aah
li 88h
lis 5
lisl 4
lisu 6
lm
lnk
lr a,ku
lr a,kl
lr a,qu
lr a,ql
lr ku,a
lr kl,a
lr qu,a
lr ql,a
lr k,p
lr p,k
lr a,is
lr is,a
lr p0,q
lr q,dc
lr dc,q
lr h,dc
lr dc,h
lr w,j
lr j,w
lr a,10
lr i,a
ni 0feh
nm
nop
ns i
oi 01h
om
out 55h
outs 7
pi 55aah
pk
pop
sl
sl 1
sl 4
sr
sr 1
sr 4
st
xdc
xi 0ffh
xm
xs d
; ---- sample memcpy() from F8 Programmer's Manual
BUFA equ 800h ; SET THE VALUE OF SYMBOL BUFA
BUFB equ 8a0h ; SET THE VALUE OF SYMBOL BUFB
org 100h
one: dci BUFA ; SET DCO TO BUFA STARTING ADDRESS
two: xdc ; STORE IN DC1
three: dci BUFB ; SET DCO TO BUFB STARTING ADDRESS
four: li 80h ; LOAD BUFFER LENGTH INTO ACCUMULATOR
five: lr 1,a ; SAVE BUFFER LENGTH IN SCRATCHPAD BYTE 1
loop: lm ; LOAD CONTENTS OF MEMORY BYTE ADDRESSED BY DCO
six: xdc ; EXCHANGE DCO AND DC1
seven: st ; STORE ACCUMULATOR IN MEMORY BYTE ADDRESSED BY DCO
eight: xdc ; EXCHANGE DCO AND DC 1
nine: ds 1 ; DECREMENT SCRATCHPAD BYTE 1
ten: bnz loop ; SCRATCHPAD BYTE 1 IS NOT ZERO. RETURN TO LOOP
; ---- taken from https://www.chessprogramming.org/Fairchild_F8, with some
; ---- OCR mistakes fixed ('OD' -> '0D', 'LR AS' -> 'LR A,S')
; ANSWER-BACK PROGRAM FOR MOSTEK F8 EVALUATION KIT
; D. EDWARDS, ELECTRONICS AUSTRALIA 19/10/76
ORG 400h
INIT:
LI 0FFh ; LOAD AC WITH FF
LR IS,A ; INITIALIZE ISAR TO 3F
LR 4,A ; COPY AC INTO REG 4
DS 4 ; DECREMENT REG 4 TO FE
LR 6,A ; COPY AC INTO REG 6
LIS 01h ; LOAD AC WITH 01
OUTS 6 ; TRANSFER AC TO TIMER PORT TO ENABLE EXT INT
EI ; ENABLE I/O ROUTINES
START: PI 03F3h ; CALL TTYIN SUBROUTINE
LR A,S ; COPY CHAR INTO AC FROM RS
CI 0Dh ; COMPARE WITH CR
BZ MESSAGE ; JUMP TO MESSAGE IF CR
PI 035Dh ; SEND CHAR TO TTYOUT SUBROUTINE
BR START ; LOOP BACK TO START
MESSAGE:DCI MSG ; LOAD DC WITH MESSAGE ADDRESS
ANSWER: CLR ; CLEAR AC
AM ; ADD CHAR TO AC AND INC DC
BZ START ; LOOP BACK TO START
LR S,A ; COPY CHAR INTO RS
PI 035Dh ; SEND CHAR TO TTYOUT SUBROUTINE
BR ANSWER ; LOOP BACK TO ANSWER
MSG: db 0Dh, 47h, 4Fh ; START OF ANSWER BUFFER
db 20h, 41h, 57h
db 41h, 59h, 2Ch
db 20h, 49h, 27h
db 4Dh, 20h, 42h
db 55h, 53h, 59h
db 21h, 0Dh, 00h ; ANSWER MUST END WITH A ZERO BYTE
| 16.605442 | 74 | 0.662433 |
8559aa77d74733beeca3f6dd13e64876197d89e8 | 146 | asm | Assembly | libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_f_sync.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_f_sync.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_f_sync.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | ; unsigned char esx_f_sync(unsigned char handle)
SECTION code_esxdos
PUBLIC esx_f_sync
EXTERN asm_esx_f_sync
defc esx_f_sync = asm_esx_f_sync
| 14.6 | 48 | 0.835616 |
9b218eef62e588c4c86cc77c6830bfa5056d137c | 531 | asm | Assembly | HelloWorld/boot.asm | JonathanGzzBen/multithreaded_kernel | 98f7b6b4d099596c71ac9b57b1e78cf3b0e1ebb9 | [
"MIT"
] | null | null | null | HelloWorld/boot.asm | JonathanGzzBen/multithreaded_kernel | 98f7b6b4d099596c71ac9b57b1e78cf3b0e1ebb9 | [
"MIT"
] | null | null | null | HelloWorld/boot.asm | JonathanGzzBen/multithreaded_kernel | 98f7b6b4d099596c71ac9b57b1e78cf3b0e1ebb9 | [
"MIT"
] | null | null | null | org 0
bits 16
_start: ; Start BIOS Parameter Block
jmp short start
nop
times 33 db 0x0 ; Fake parameters
start:
jmp 0x7c0:step2
step2:
cli ; Clear Interrupts
mov ax, 0x7c0
mov ds, ax
mov es, ax
mov ax, 0x0
mov ss, ax
mov sp, 0x7c00
sti ; Enable Interrupts
mov si, message
call print
jmp $
print:
mov bx, 0x0
.loop:
lodsb
cmp al, 0x0
je .done
call print_char
jmp .loop
.done:
ret
print_char:
mov ah, 0eh
int 0x10
ret
message: db "Hello, world!", 0x01, 0x00
times 510-($ - $$) db 0
dw 0xAA55 | 12.348837 | 39 | 0.664783 |
007207e03d777c2c62cb32b228fedaa7ded954c6 | 6,826 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_299.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_299.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_299.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 %r15
push %r8
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x97c7, %rsi
lea addresses_normal_ht+0xdba3, %rdi
nop
nop
xor %r8, %r8
mov $100, %rcx
rep movsl
nop
nop
sub %rbx, %rbx
lea addresses_A_ht+0x13e5b, %r15
and %r9, %r9
movl $0x61626364, (%r15)
nop
nop
sub $2694, %r15
lea addresses_D_ht+0x1b243, %r15
clflush (%r15)
nop
nop
nop
nop
nop
xor %r8, %r8
mov $0x6162636465666768, %rsi
movq %rsi, %xmm5
movups %xmm5, (%r15)
inc %rbx
lea addresses_UC_ht+0xe761, %rcx
clflush (%rcx)
nop
nop
nop
xor %rdi, %rdi
mov $0x6162636465666768, %rbx
movq %rbx, (%rcx)
nop
nop
nop
nop
add $43461, %r8
lea addresses_WT_ht+0x12ed1, %rsi
lea addresses_WC_ht+0x136c3, %rdi
nop
nop
nop
nop
nop
add $54710, %rbx
mov $69, %rcx
rep movsb
nop
nop
nop
add $54512, %rcx
lea addresses_WT_ht+0x2643, %rsi
lea addresses_normal_ht+0x6ac3, %rdi
sub %rbx, %rbx
mov $1, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp %r9, %r9
lea addresses_UC_ht+0x52c3, %rsi
lea addresses_WC_ht+0x167ce, %rdi
add $57169, %rbp
mov $32, %rcx
rep movsw
nop
nop
nop
nop
dec %r8
lea addresses_normal_ht+0x1e8ef, %r8
nop
nop
nop
nop
nop
add $49476, %rdi
movl $0x61626364, (%r8)
add %r15, %r15
lea addresses_UC_ht+0x5ec3, %rsi
nop
nop
nop
nop
nop
cmp $7507, %r9
and $0xffffffffffffffc0, %rsi
movaps (%rsi), %xmm2
vpextrq $1, %xmm2, %rcx
nop
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_UC_ht+0xa9c3, %rbp
nop
nop
cmp %r9, %r9
movb $0x61, (%rbp)
nop
sub $3803, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r8
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %r15
push %rbx
push %rdx
// Store
lea addresses_normal+0x112c3, %r11
nop
and $34782, %r13
movb $0x51, (%r11)
nop
nop
and $19719, %r13
// Faulty Load
lea addresses_A+0xbac3, %r11
nop
nop
nop
cmp %r14, %r14
movups (%r11), %xmm4
vpextrq $1, %xmm4, %rbx
lea oracles, %r11
and $0xff, %rbx
shlq $12, %rbx
mov (%r11,%rbx,1), %rbx
pop %rdx
pop %rbx
pop %r15
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 36.308511 | 2,999 | 0.659684 |
4c1ecad42a13a31ebddf6df9a19372cffecf7c60 | 4,613 | asm | Assembly | os/src/os002/boot/setup.asm | ddosakura/pet-shop | 71eacee8c7030164370e4d8717a25b199992fb42 | [
"Apache-2.0"
] | null | null | null | os/src/os002/boot/setup.asm | ddosakura/pet-shop | 71eacee8c7030164370e4d8717a25b199992fb42 | [
"Apache-2.0"
] | null | null | null | os/src/os002/boot/setup.asm | ddosakura/pet-shop | 71eacee8c7030164370e4d8717a25b199992fb42 | [
"Apache-2.0"
] | null | null | null | %include 'config.inc'
%include 'pm.inc'
%include 'macro.inc'
offset equ 0
org offset
[BITS 16]
mov ax, cs
mov ds, ax
mov es, ax
mov ss, ax
mov sp, offset
; 设置回跳段地址
mov [LABEL_GO_BACK_TO_REAL+3], ax
jmp go_to_protect
;mov al, 0x13 ; 显示器模式
;mov ah, 0x00 ; BIOS中断-设置显示器模式
mov ax, 0x0013
int 0x10 ; BIOS中断
mov BYTE [VMODE], 8 ; 记录画面模式
mov WORD [SCRNX], 320
mov WORD [SCRNY], 200
mov DWORD [VRAM], 0x000a0000
; 取得键盘LED指示灯状态
mov ah, 0x02
int 0x16
mov [LEDS], al
go_to_protect:
; 进入保护模式
; 1. 准备 GDT (Global Descriptor Table 全局描述表)
; 用 lgdt指令 加载 gdtr寄存器
; 2. 关中断
; 打开 A20 (有多种方法)
; 3. 置 cr0 的 PE 位为 1
; 4. jmp
mov [SPValueInRealMode], sp
; 初始化 16 位代码段描述符
InitGDT LABEL_SEG_CODE16, LABEL_DESC_CODE16
; 初始化 32 位代码段描述符
InitGDT LABEL_SEG_CODE32, LABEL_DESC_CODE32
; 初始化测试调用门的32位代码段描述符
InitGDT LABEL_SEG_CODE_DEST, LABEL_DESC_CODE_DEST
; 初始化Ring3描述符
InitGDT LABEL_CODE_RING3, LABEL_DESC_CODE_RING3
; 初始化数据段描述符
InitGDT LABEL_DATA, LABEL_DESC_DATA
; 初始化堆栈段描述符
InitGDT LABEL_STACK, LABEL_DESC_STACK
; 初始化堆栈段描述符(ring3)
InitGDT LABEL_STACK3, LABEL_DESC_STACK3
; 初始化 TSS 描述符
InitGDT LABEL_TSS, LABEL_DESC_TSS
; 初始化 LDT 在 GDT 中的描述符
InitGDT LABEL_LDT, LABEL_DESC_LDT
; 初始化 LDT 中的描述符
InitGDT LABEL_CODE_A, LABEL_LDT_DESC_CODEA
; 为加载 GDTR 作准备 & 加载 GDTR & 关中断 & 打开 A20
LoadGDT LABEL_GDT, GdtPtr
EnableA20
; 准备切换到保护模式
mov eax, cr0
;and eax, 0x7fffffff ; 禁止分页(貌似默认就是禁止的)
or eax, 1 ; 保护模式开关
mov cr0, eax
; 进入保护模式
jmp dword SelectorCode32:0
; 从保护模式跳回到实模式就到了这里
LABEL_REAL_ENTRY:
mov ax, cs
mov ds, ax
mov es, ax
mov ss, ax
mov sp, [SPValueInRealMode]
DisableA20
LoopHLT
; 32 位代码段. 由实模式跳入.
[BITS 32]
LABEL_SEG_CODE32:
;jmp test_videoX
mov ax, SelectorData
mov ds, ax ; 数据段选择子
mov ax, SelectorTest
mov es, ax ; 测试段选择子
mov ax, SelectorVideo
mov gs, ax ; 视频段选择子
mov ax, SelectorStack
mov ss, ax ; 堆栈段选择子
mov esp, TopOfStack
; 下面显示一个字符串
mov ah, 0Ch ; 0000: 黑底 1100: 红字
xor esi, esi
xor edi, edi
mov esi, OffsetPMMessage ; 源数据偏移
mov edi, (80 * 10 + 0) * 2 ; 目的数据偏移。屏幕第 10 行, 第 0 列。
cld
.1:
lodsb
test al, al
jz .2
mov [gs:edi], ax
add edi, 2
jmp .1
.2: ; 显示完毕
call DispReturn
call TestRead
call TestWrite
call TestRead
; Load TSS
mov ax, SelectorTSS
ltr ax ; 在任务内发生特权级变换时要切换堆栈,而内层堆栈的指针存放在当前任务的TSS中,所以要设置任务状态段寄存器 TR
push SelectorStack3 ; 栈选择子
push TopOfStack3 ; 栈指针
push SelectorCodeRing3 ; 目标代码段
push 0
retf ; Ring0 -> Ring3
; 到此停止
; jmp SelectorCode16:0
TestRead:
xor esi, esi
mov ecx, 8
.loop:
mov al, [es:esi]
call DispAL
inc esi
loop .loop
call DispReturn
ret
TestWrite:
push esi
push edi
xor esi, esi
xor edi, edi
mov esi, OffsetStrTest ; 源数据偏移
cld
.1:
lodsb
test al, al
jz .2
mov [es:edi], al
inc edi
jmp .1
.2:
pop edi
pop esi
ret
DispAL:
push ecx
push edx
mov ah, 0Ch ; 0000: 黑底 1100: 红字
mov dl, al
shr al, 4
mov ecx, 2
.begin:
and al, 01111b
cmp al, 9
ja .1
add al, '0'
jmp .2
.1:
sub al, 0Ah
add al, 'A'
.2:
mov [gs:edi], ax
add edi, 2
mov al, dl
loop .begin
add edi, 2
pop edx
pop ecx
ret
DispReturn:
push eax
push ebx
mov eax, edi
mov bl, 160
div bl
and eax, 0FFh
inc eax
mov bl, 160
mul bl
mov edi, eax
pop ebx
pop eax
ret
test_videoX:
mov ax, SelectorVideoX
mov gs, ax
mov edi, 0x0
mov al, 0xf
print_loop:
mov [gs:edi], al
inc edi
cmp edi, 0x10000
jne print_loop
fin:
hlt
jmp fin
SegCode32Len equ $ - LABEL_SEG_CODE32
; 调用门目标段
[BITS 32]
LABEL_SEG_CODE_DEST:
printC 14, 0, 'C'
;retf
; Load LDT
mov ax, SelectorLDT
lldt ax
jmp SelectorLDTCodeA:0 ; 跳入局部任务 L
SegCodeDestLen equ $ - LABEL_SEG_CODE_DEST
; CodeRing3
ALIGN 32
[BITS 32]
LABEL_CODE_RING3:
printC 15, 0, '3'
; 测试调用门(有特权级变换)
call SelectorCallGateTest:0
; = call SelectorCodeDest:0
jmp $
SegCodeRing3Len equ $ - LABEL_CODE_RING3
; 16 位代码段. 由 32 位代码段跳入, 跳出后到实模式
ALIGN 32
[BITS 16]
LABEL_SEG_CODE16:
; 跳回实模式:
mov ax, SelectorNormal
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
mov eax, cr0
and al, 11111110b
mov cr0, eax
LABEL_GO_BACK_TO_REAL:
; 段地址会在程序开始处被设置成正确的值
jmp 0:LABEL_REAL_ENTRY
Code16Len equ $-LABEL_SEG_CODE16
%include "gdt.inc"
; LDT
ALIGN 32
[BITS 16]
; 段基址 段界限 属性
LABEL_LDT:
; Code, 32 位
LABEL_LDT_DESC_CODEA: Descriptor 0, CodeALen - 1, DA_C + DA_32
LDTLen equ $-LABEL_LDT
; LDT 选择子
SelectorLDTCodeA equ LABEL_LDT_DESC_CODEA - LABEL_LDT + SA_TIL
; CodeA (LDT, 32 位代码段)
ALIGN 32
[BITS 32]
LABEL_CODE_A:
printC 13, 0, 'L'
; 准备经由16位代码段跳回实模式
jmp SelectorCode16:0
CodeALen equ $-LABEL_CODE_A
| 15.075163 | 65 | 0.685454 |
96c27036b6dc1d8598c5966f3f1e590b08173bb4 | 887 | asm | Assembly | programs/oeis/260/A260033.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/260/A260033.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/260/A260033.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A260033: Number of configurations of the general monomer-dimer model for a 2 X 2n square lattice.
; 1,7,71,733,7573,78243,808395,8352217,86293865,891575391,9211624463,95173135221,983314691581,10159461285307,104966044432531,1084493574452273,11204826469232593,115766602184825143,1196083332322900695,12357755266727364237,127678491209925526885,1319155199774412146771,13629315514315782290523,140816062750262645695241,1454890636852453038760761,15031713881639460688792207,155305434302817158951084191,1604592670796364976679141413,16578413052521934091501758413,171285700316469537328716436843,1769698404784307736952047637795,18284260963464620279263010716257,188910267464937138450557500851105,1951792813774840488738243481986151,20165633340232150027246038806606183,208348327313594704016989279999616061
mul $0,2
seq $0,30186 ; a(n) = 3*a(n-1) + a(n-2) - a(n-3) for n >= 3, a(0)=1, a(1)=2, a(2)=7.
| 147.833333 | 691 | 0.871477 |
e01de5107038a15f8973d4334a154f0e91489392 | 144 | asm | Assembly | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/rundat.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/rundat.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/rundat.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | Name: rundat.asm
Type: file
Size: 15827
Last-Modified: '1992-02-13T07:48:31Z'
SHA-1: 7D6204216D619ED14841427B105E906FD5E92E4F
Description: null
| 20.571429 | 47 | 0.8125 |
a81a8bad6e236f8014275b1c2e49aca0b9c9bd9b | 9 | asm | Assembly | projects/05/test.asm | dragonator/nand2tetris | 99421c75ea017cf4f68d2ae32973d4ae06e9ea61 | [
"MIT"
] | null | null | null | projects/05/test.asm | dragonator/nand2tetris | 99421c75ea017cf4f68d2ae32973d4ae06e9ea61 | [
"MIT"
] | null | null | null | projects/05/test.asm | dragonator/nand2tetris | 99421c75ea017cf4f68d2ae32973d4ae06e9ea61 | [
"MIT"
] | null | null | null | @100
D=M
| 3 | 4 | 0.555556 |
eb2338bb48ef53923b8b9f4431e018231131bed4 | 5,701 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.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.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.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 %r12
push %r13
push %r14
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x10823, %rsi
lea addresses_UC_ht+0x12253, %rdi
cmp $40600, %r12
mov $20, %rcx
rep movsl
nop
inc %r10
lea addresses_D_ht+0x3513, %rdx
nop
nop
nop
nop
nop
xor %r14, %r14
movb (%rdx), %r12b
nop
nop
nop
nop
mfence
lea addresses_D_ht+0x1cee3, %rsi
lea addresses_WT_ht+0xe023, %rdi
nop
nop
nop
inc %r13
mov $94, %rcx
rep movsl
nop
nop
nop
sub $49957, %rcx
lea addresses_D_ht+0x2db, %rsi
cmp %rdx, %rdx
vmovups (%rsi), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %rdi
and %r10, %r10
lea addresses_normal_ht+0xa3a3, %r13
nop
xor %r10, %r10
and $0xffffffffffffffc0, %r13
movaps (%r13), %xmm0
vpextrq $1, %xmm0, %rcx
nop
nop
nop
nop
cmp $61501, %r10
lea addresses_UC_ht+0x1d823, %rdx
nop
nop
nop
nop
xor $44528, %rcx
movl $0x61626364, (%rdx)
nop
nop
nop
nop
nop
add %rcx, %rcx
lea addresses_D_ht+0x16023, %rdi
nop
nop
add %r12, %r12
movw $0x6162, (%rdi)
nop
xor %r14, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r14
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %r8
push %rcx
// Faulty Load
lea addresses_PSE+0x18823, %r13
nop
nop
nop
dec %r8
vmovups (%r13), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %r14
lea oracles, %r11
and $0xff, %r14
shlq $12, %r14
mov (%r11,%r14,1), %r14
pop %rcx
pop %r8
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': True, 'congruent': 6, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}}
{'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
*/
| 42.22963 | 2,999 | 0.66041 |
0630597fb54c8cf8f72ed36fda03e279cfba0239 | 136 | asm | Assembly | pkgs/tools/yasm/src/modules/parsers/nasm/tests/uscore.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/uscore.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/uscore.asm | manggoguy/parsec-modified | d14edfb62795805c84a4280d67b50cca175b95af | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | dq 0000_1111_2222_3333h
dq 0000111122223333h
dd 0x01_23_45_67
dd 0x01234567
dw 1_2_3_4q
dw 1234q
db 00_11_00_11b
db 00110011b
_0:
dw _0
| 12.363636 | 23 | 0.852941 |
98b3cc95076b2c6f93802de37c5234ca19cace75 | 94 | asm | Assembly | 8085_programming/8085 Programs/test10.asm | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | 8085_programming/8085 Programs/test10.asm | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | 8085_programming/8085 Programs/test10.asm | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | .ORG 0000H
LDA 2200H
SUB A
LXI H,2201H
BACK: ADD M
INX H
DCR C
JNZ BACK
STA 2300H
HLT | 9.4 | 12 | 0.670213 |
230550dfd0db393283e22ec492c97bdd0090f91b | 120,145 | asm | Assembly | bios/sysinit2.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | bios/sysinit2.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | bios/sysinit2.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | page ,160
;
; Microsoft Confidential
; Copyright (C) Microsoft Corporation 1981-1991
; All Rights Reserved.
;
title bios system initialization
;
; Multiple configuration block support Created 16-Mar-1992 by JeffPar
;
; Summary:
;
; The procedure "organize" crunches the in-memory copy of config.sys
; into lines delimited by CR/LF (sometimes no CR, but *always* an LF)
; with the leading "keyword=" replaced by single character codes (eg, B
; for BUFFERS, D for DEVICE, Z for any unrecognized keyword); see comtab
; and/or config.inc for the full list.
;
; [blockname] and INCLUDE are the major syntactical additions for multi-
; configuration support. blockname is either MENU, which contains one
; or more MENUITEM lines, an optional MENUDEFAULT (which includes optional
; time-out), or any user-defined keyword, such as NETWORK, CD-ROM, etc.
; INCLUDE allows the current block to name another block for inclusion
; during the processing phase of CONFIG.SYS. An INCLUDE is only honored
; once, precluding nasty infinite-loop scenarios. If blocks are present
; without a MENU block, then only lines inside COMMON blocks are processed.
;
; Example:
;
; [menu]
; menuitem=misc,Miscellaneous
; menuitem=network,Network Configuration
; menudefault=network,15
;
; [network]
; include misc
; device=foo
;
; [misc]
; device=bar
; include alternate
;
; [alternate]
; device=tar
;
;
; When the menu is displayed
;
; 1. Miscellaneous
; 2. Network Configuration
;
; #2 is highlighted as the default option, and will be automatically
; selected after 15 seconds. It will invoke the following lines in the
; following order:
;
; DEVICE=BAR
; DEVICE=TAR
; DEVICE=FOO
;
MULTI_CONFIG equ 1
.xlist
include version.inc ; set version build flags
include biosseg.inc ; establish bios segment structure
.list
lf equ 10
cr equ 13
tab equ 9
; the following depends on the positions of the various letters in switchlist
switchnum equ 11111000b ; which switches require number
.xlist
include bpb.inc
include syscall.inc
include doscntry.inc
include devsym.inc
include ioctl.inc
include devmark.inc
include config.inc
ifdef MULTI_CONFIG
include rombios.inc
endif
.list
stacksw equ true ; include switchable hardware stacks
if ibmjapver
noexec equ true
else
noexec equ false
endif
Bios_Data segment
extrn eot:byte
extrn ec35_flag: byte
Bios_Data ends
sysinitseg segment public
assume cs:sysinitseg,ds:nothing,es:nothing,ss:nothing
ifdef MULTI_CONFIG
MAX_MULTI_CONFIG equ 9 ; max # of multi-config menu items supported
extrn config_envlen:word
extrn config_wrkseg:word
extrn config_cmd:byte
extrn config_multi:byte
extrn OnOff:byte
extrn $PauseMsg:byte
extrn $CleanMsg:byte
extrn $InterMsg:byte
extrn $MenuHeader:byte
extrn $MenuPrmpt:byte
extrn $StatusLine:byte
extrn $InterPrmpt:byte
extrn $YES:byte
extrn $NO:byte
extrn $TimeOut:byte
extrn $AutoPrmpt:byte
extrn swit_n:byte, swit_f:byte
public newcmd,tmplate,commnd2,commnd3,commnd4
endif
IFDEF CONFIGPROC
extrn badopm:byte,badcom:byte,badblock:byte
extrn badsiz_pre:byte,
extrn error_line:near
extrn dosinfo:dword
extrn memory_size:word,fcbs:byte,keep:byte
extrn default_drive:byte,confbot:word
extrn buffers:word,zero:byte,sepchr:byte
extrn files:byte
extrn count:word,chrptr:word
extrn bufptr:byte,prmblk:byte
extrn ldoff:word,area:word,packet:byte,unitcount:byte,
extrn break_addr:dword,bpb_addr:dword,drivenumber:byte
extrn com_level:byte, cmmt:byte, cmmt1:byte, cmmt2:byte
extrn cmd_indicator:byte
extrn multdeviceflag:byte
extrn org_count:word
extrn getchr:near
extrn DevEntry:dword
insert_blank db 0 ; M051: indicates that blank has been
; M051: inserted
ENDIF ; CONFIGPROC
extrn memlo:word,memhi:word,alloclim:word
extrn devmark_addr:word,badmem:byte,crlfm:byte
extrn setdevmarkflag:byte,badld_pre:byte
extrn donotshownum:byte
extrn pararound:near
extrn stall:near
public int24,open_dev,mem_err,prndev,auxdev,condev
public commnd,command_line
public badfil,round,print
IFDEF CONFIGPROC
public organize,newline,calldev,badload
public config,getnum,prnerr
public delim
public setparms, parseline, diddleback
public setdoscountryinfo,set_country_path,move_asciiz
public cntry_drv,cntry_root,cntry_path
public pathstring
;
;----------------------------------------------------------------------------
;
; procedure : setparms
;
; the following set of routines is used to parse the drivparm = command in
; the config.sys file to change the default drive parameters.
;
;----------------------------------------------------------------------------
;
setparms proc near
push ds
push ax
push bx
push cx
push dx
push cs
pop ds
assume ds:sysinitseg
xor bx,bx
mov bl,byte ptr drive
inc bl ; get it correct for ioctl
; call (1=a,2=b...)
mov dx,offset deviceparameters
mov ah,ioctl
mov al,generic_ioctl
mov ch,rawio
mov cl,set_device_parameters
int 21h
mov ax,Bios_Data ; get Bios_Data segment
mov ds,ax ; set Bios_Data segment
assume ds:Bios_Data
test cs:word ptr switches, flagec35
jz not_ec35
mov cl,cs:byte ptr drive ; which drive was this for?
mov al,1 ; assume drive 0
shl al,cl ; set proper bit depending on drive
or ds:ec35_flag,al ; set the bit in the permanent flags
not_ec35:
; Now adjust the BIOS's EOT variable if our new drive has more
; sectors per track than any old ones.
mov al,cs:byte ptr deviceparameters.DP_BPB.BPB_SECTORSPERTRACK
cmp al,eot
jbe eot_ok
mov eot,al
eot_ok:
pop dx ; fix up all the registers
pop cx
pop bx
pop ax
pop ds
assume ds:nothing
ret
setparms endp
;
;----------------------------------------------------------------------------
;
; procedure : diddleback
;
; replace default values for further drivparm commands
;
;----------------------------------------------------------------------------
;
diddleback proc near
push ds
push cs
pop ds
assume ds:sysinitseg
mov word ptr deviceparameters.dp_cylinders,80
mov byte ptr deviceparameters.dp_devicetype, dev_3inch720kb
mov word ptr deviceparameters.dp_deviceattributes,0
mov word ptr switches,0 ; zero all switches
pop ds
assume ds:nothing
ret
diddleback endp
;
;----------------------------------------------------------------------------
;
; procedure : parseline
;
; entry point is parseline. al contains the first character in command line.
;
;----------------------------------------------------------------------------
;
parseline proc near
; don't get character first time
push ds
push cs
pop ds
assume ds:sysinitseg
nextswtch:
cmp al,cr ; carriage return?
jz done_line
cmp al,lf ; linefeed?
jz put_back ; put it back and done
; anything less or equal to a space is ignored.
cmp al,' ' ; space?
jbe get_next ; skip over space
cmp al,'/'
jz getparm
stc ; mark error invalid-character-in-input
jmp short exitpl
getparm:
call check_switch
mov word ptr switches,bx ; save switches read so far
jc swterr
get_next:
call getchr
jc done_line
jmp nextswtch
swterr:
jmp short exitpl ; exit if error
done_line:
test word ptr switches,flagdrive ; see if drive specified
jnz okay
stc ; mark error no-drive-specified
jmp short exitpl
okay:
mov ax,word ptr switches
and ax,0003h ; get flag bits for changeline and non-rem
mov word ptr deviceparameters.dp_deviceattributes,ax
mov word ptr deviceparameters.dp_tracktableentries, 0
clc ; everything is fine
call setdeviceparameters
exitpl:
pop ds
ret
put_back:
inc count ; one more char to scan
dec chrptr ; back up over linefeed
jmp short done_line
parseline endp
;
;----------------------------------------------------------------------------
;
; procedure : check_switch
;
; processes a switch in the input. it ensures that the switch is valid, and
; gets the number, if any required, following the switch. the switch and the
; number *must* be separated by a colon. carry is set if there is any kind of
; error.
;
;----------------------------------------------------------------------------
;
check_switch proc near
call getchr
jc err_check
and al,0dfh ; convert it to upper case
cmp al,'A'
jb err_check
cmp al,'Z'
ja err_check
push es
push cs
pop es
mov cl,byte ptr switchlist ; get number of valid switches
mov ch,0
mov di,1+offset switchlist ; point to string of valid switches
repne scasb
pop es
jnz err_check
mov ax,1
shl ax,cl ; set bit to indicate switch
mov bx,word ptr switches ; get switches so far
or bx,ax ; save this with other switches
mov cx,ax
test ax, switchnum ; test against switches that require number to follow
jz done_swtch
call getchr
jc err_swtch
cmp al,':'
jnz err_swtch
call getchr
push bx ; preserve switches
mov byte ptr cs:sepchr,' ' ; allow space separators
call getnum
mov byte ptr cs:sepchr,0
pop bx ; restore switches
; because getnum does not consider carriage-return or line-feed as ok, we do
; not check for carry set here. if there is an error, it will be detected
; further on (hopefully).
call process_num
done_swtch:
clc
ret
err_swtch:
xor bx,cx ; remove this switch from the records
err_check:
stc
ret
check_switch endp
;
;----------------------------------------------------------------------------
;
; procedure : process_num
;
; this routine takes the switch just input, and the number following (if any),
; and sets the value in the appropriate variable. if the number input is zero
; then it does nothing - it assumes the default value that is present in the
; variable at the beginning. zero is ok for form factor and drive, however.
;
;----------------------------------------------------------------------------
;
process_num proc near
test word ptr switches,cx ; if this switch has been done before,
jnz done_ret ; ignore this one.
test cx,flagdrive
jz try_f
mov byte ptr drive,al
jmp short done_ret
try_f:
test cx,flagff
jz try_t
; ensure that we do not get bogus form factors that are not supported
mov byte ptr deviceparameters.dp_devicetype,al
jmp short done_ret
try_t:
or ax,ax
jz done_ret ; if number entered was 0, assume default value
test cx,flagcyln
jz try_s
mov word ptr deviceparameters.dp_cylinders,ax
jmp short done_ret
try_s:
test cx,flagseclim
jz try_h
mov word ptr slim,ax
jmp short done_ret
; must be for number of heads
try_h:
mov word ptr hlim,ax
done_ret:
clc
ret
process_num endp
; M047 -- Begin modifications (too numerous to mark specifically)
;
;----------------------------------------------------------------------------
;
; procedure : setdeviceparameters
;
; setdeviceparameters sets up the recommended bpb in each bds in the
; system based on the form factor. it is assumed that the bpbs for the
; various form factors are present in the bpbtable. for hard files,
; the recommended bpb is the same as the bpb on the drive.
; no attempt is made to preserve registers since we are going to jump to
; sysinit straight after this routine.
;
; if we return carry, the DRIVPARM will be aborted, but presently
; we always return no carry
;
;
; note: there is a routine by the same name in msdioctl.asm
;
;----------------------------------------------------------------------------
;
setdeviceparameters proc near
push es
push cs
pop es
assume es:sysinitseg
xor bx,bx
mov bl,byte ptr deviceparameters.dp_devicetype
cmp bl,dev_5inch
jnz got_80
mov word ptr deviceparameters.dp_cylinders,40 ; 48 tpi=40 cyl
got_80:
shl bx,1 ; get index into bpb table
mov si,bpbtable[bx] ; get address of bpb
mov di,offset deviceparameters.dp_bpb ; es:di -> bpb
mov cx,size A_BPB
cld
repe movsb
pop es
assume es:nothing
test word ptr switches,flagseclim
jz see_heads
mov ax,word ptr slim
mov word ptr deviceparameters.dp_bpb.bpb_sectorspertrack,ax
see_heads:
test word ptr switches,flagheads
jz heads_not_altered
mov ax,word ptr hlim
mov word ptr deviceparameters.dp_bpb.bpb_heads,ax
heads_not_altered:
; set up correct media descriptor byte and sectors/cluster
; sectors/cluster is always 2 except for any one sided disk or 1.44M
mov byte ptr deviceparameters.dp_bpb.bpb_sectorspercluster,2
mov bl,0f0h ; get default mediabyte
; preload the mediadescriptor from the bpb into bh for convenient access
mov bh,byte ptr deviceparameters.dp_bpb.bpb_mediadescriptor
cmp word ptr deviceparameters.dp_bpb.bpb_heads,2 ; >2 heads?
ja got_correct_mediad ; just use default if heads>2
jnz only_one_head ; one head, do one head stuff
; two head drives will use the mediadescriptor from the bpb
mov bl,bh ; get mediadescriptor from bpb
; two sided drives have two special cases to look for. One is
; a 320K diskette (40 tracks, 8 secs per track). It uses
; a mediaid of 0fch. The other is 1.44M, which uses only
; one sector/cluster.
; any drive with 18secs/trk, 2 heads, 80 tracks, will be assumed
; to be a 1.44M and use only 1 sector per cluster. Any other
; type of 2 headed drive is all set.
cmp deviceparameters.dp_bpb.bpb_sectorspertrack,18
jnz not_144m
cmp deviceparameters.dp_cylinders,80
jnz not_144m
; We've got cyl=80, heads=2, secpertrack=18. Set cluster size to 1.
jmp short got_one_secperclus_drive
; check for 320K
not_144m:
cmp deviceparameters.dp_cylinders,40
jnz got_correct_mediad
cmp deviceparameters.dp_bpb.bpb_sectorspertrack,8
jnz got_correct_mediad
mov bl,0fch
jmp short got_correct_mediad
only_one_head:
; if we don't have a 360K drive, then just go use 0f0h as media descr.
cmp deviceparameters.dp_devicetype,dev_5inch
jnz got_one_secperclus_drive
; single sided 360K drive uses either 0fch or 0feh, depending on
; whether sectorspertrack is 8 or 9. For our purposes, anything
; besides 8 will be considered 0fch
mov bl,0fch ; single sided 9 sector media id
cmp word ptr deviceparameters.dp_bpb.bpb_sectorspertrack,8
jnz got_one_secperclus_drive ; okay if anything besides 8
mov bl,0feh ; 160K mediaid
; we've either got a one sided drive, or a 1.44M drive
; either case we'll use 1 sector per cluster instead of 2
got_one_secperclus_drive:
mov byte ptr deviceparameters.dp_bpb.bpb_sectorspercluster,1
got_correct_mediad:
mov byte ptr deviceparameters.dp_bpb.bpb_mediadescriptor,bl
; Calculate the correct number of Total Sectors on medium
;
mov ax,deviceparameters.dp_cylinders
mul word ptr deviceparameters.dp_bpb.bpb_heads
mul word ptr deviceparameters.dp_bpb.bpb_sectorspertrack
mov word ptr deviceparameters.dp_bpb.bpb_totalsectors,ax
clc ; we currently return no errors
ret
setdeviceparameters endp
; M047 -- end rewritten routine
;
;----------------------------------------------------------------------------
;
; procedure : organize
;
;----------------------------------------------------------------------------
;
assume ds:nothing, es:nothing
organize proc near
mov cx,[count]
jcxz nochar1
ifndef MULTI_CONFIG
;
; In MULTI_CONFIG, we map to upper case on a line-by-line basis,
; because we the case of values in SET commands preserved
;
call mapcase
endif
xor si,si
mov di,si
xor ax,ax
mov com_level, 0
org1:
call skip_comment
jz end_commd_line ; found a comment string and skipped.
call get2 ; not a comment string. then get a char.
cmp al, lf
je end_commd_line ; starts with a blank line.
cmp al, ' '
jbe org1 ; skip leading control characters
jmp short findit
end_commd_line:
stosb ; store line feed char in buffer for the linecount.
mov com_level, 0 ; reset the command level.
jmp org1
nochar1:
stc
ret
findit:
push cx
push si
push di
mov bp,si
dec bp
mov si,offset comtab ; prepare to search command table
mov ch,0
findcom:
mov di,bp
mov cl,[si]
inc si
jcxz nocom
ifdef MULTI_CONFIG
;
; Simplify future parsing by collapsing ";" onto "REM", and at the same
; time skip the upcoming delimiter test (since ";" need not be followed by
; anything in particular)
;
cmp byte ptr es:[di],CONFIG_SEMICOLON
je semicolon
loopcom:
mov al,es:[di]
inc di
and al,not 20h ; force upper case
inc si ; compare to byte @es:di
cmp al,ds:[si-1]
loope loopcom
else
repe cmpsb
endif
lahf
add si,cx ; bump to next position without affecting flags
sahf
lodsb ; get indicator letter
jnz findcom
cmp byte ptr es:[di], cr ; the next char might be cr,lf
je gotcom0 ; such as in "rem",cr,lf case.
cmp byte ptr es:[di], lf
je gotcom0
ifdef MULTI_CONFIG
;
; Skip the delimiter test for the BEGIN identifier (it doesn't have one).
;
cmp al,CONFIG_BEGIN
je gotcom0
endif
push ax
mov al, byte ptr es:[di] ; now the next char. should be a delim.
ifdef MULTI_CONFIG
;
; If keyword is *immediately* followed by a question mark (?), then
; set the high bit of the ASCII command code (CONFIG_OPTION_QUERY) that is
; stored in the CONFIG.SYS memory image.
;
cmp al,'?' ; explicit interactive command?
jne no_query ; no
pop ax ; yes, so retrieve the original code
or al,CONFIG_OPTION_QUERY ; and set the QUERY bit
jmp short gotcom0 ;
semicolon:
mov al,CONFIG_REM
jmp short gotcom0
no_query:
endif ;MULTI_CONFIG
call delim
no_delim:
pop ax
jnz findcom
gotcom0:
pop di
pop si
pop cx
jmp short gotcom
nocom:
pop di
pop si
pop cx
mov al,CONFIG_UNKNOWN
stosb ; save indicator char.
skipline:
call get2
cmp al, lf ; skip this bad command line
jne skipline
jmp end_commd_line ; handle next command line
gotcom:
stosb ; save indicator char in buffer
ifdef MULTI_CONFIG
;
; Don't pollute "cmd_indicator" with the CONFIG_OPTION_QUERY bit though;
; it screws up the direct comparisons below.
;
and al,NOT CONFIG_OPTION_QUERY
endif
mov cmd_indicator, al ; save it for the future use.
ifdef MULTI_CONFIG
;
; There is no whitespace/delimiter between the "begin block" character
; ([) and the name of block (eg, [menu]), therefore skip this delimiter
; skipping code
;
cmp al,CONFIG_BEGIN
je org31
cmp al,CONFIG_SUBMENU
je no_mapcase
cmp al,CONFIG_MENUITEM
je no_mapcase
cmp al,CONFIG_MENUDEFAULT
je no_mapcase
cmp al,CONFIG_INCLUDE
je no_mapcase
call mapcase ; map case of rest of line to UPPER
no_mapcase:
endif
org2: call get2 ; skip the command name until delimiter
cmp al, lf
je org21
cmp al, cr
je org21
cmp al, '/' ; T-RICHJ: Added to allow DEVHIGH/L:...
je org21 ; T-RICHJ: to be parsed properly.
call delim
jnz org2
jmp short org3
org21: ;if cr or lf then
dec si ; undo si, cx register
inc cx ; and continue
org3: cmp cmd_indicator, CONFIG_COMMENT
je get_cmt_token
cmp cmd_indicator, CONFIG_DEVICE
je org_file
cmp cmd_indicator, CONFIG_INSTALL
je org_file
cmp cmd_indicator, CONFIG_INSTALLHIGH
je org_file
cmp cmd_indicator, CONFIG_SHELL
je org_file
cmp cmd_indicator, CONFIG_SWITCHES
je org_switch
org31:
jmp org4
org_switch:
call skip_comment
jz end_commd_line_brdg
call get2
call org_delim
jz org_switch
stosb
jmp org5
org_file: ; get the filename and put 0 at end,
call skip_comment
jz org_put_zero
call get2 ; not a comment
call delim
jz org_file ; skip the possible delimeters
stosb ; copy the first non delim char found in buffer
org_copy_file:
call skip_comment ; comment char in the filename?
jz org_put_zero ; then stop copying filename at that point
call get2
cmp al, '/' ; a switch char? (device=filename/xxx)
je end_file_slash ; this will be the special case.
stosb ; save the char. in buffer
call delim
jz end_copy_file
cmp al, ' '
ja org_copy_file ; keep copying
jmp short end_copy_file ; otherwise, assume end of the filename.
get_cmt_token: ; get the token. just max. 2 char.
call get2
cmp al, ' ' ; skip white spaces or "=" char.
je get_cmt_token ; (we are allowing the other special
cmp al, tab ; charaters can used for comment id.
je get_cmt_token ; character.)
cmp al, '=' ; = is special in this case.
je get_cmt_token
cmp al, cr
je get_cmt_end ; cannot accept the carridge return
cmp al, lf
je get_cmt_end
mov cmmt1, al ; store it
mov cmmt, 1 ; 1 char. so far.
call get2
cmp al, ' '
je get_cmt_end
cmp al, tab
je get_cmt_end
cmp al, cr
je get_cmt_end
cmp al, lf
je end_commd_line_brdg
mov cmmt2, al
inc cmmt
get_cmt_end:
call get2
cmp al, lf
jne get_cmt_end ; skip it.
end_commd_line_brdg: jmp end_commd_line ; else jmp to end_commd_line
org_put_zero: ; make the filename in front of
mov byte ptr es:[di], 0 ; the comment string to be an asciiz.
inc di
jmp end_commd_line ; (maybe null if device=/*)
end_file_slash: ; al = "/" option char.
mov byte ptr es:[di],0 ; make a filename an asciiz
inc di ; and
stosb ; store "/" after that.
jmp short org5 ; continue with the rest of the line
end_copy_file:
mov byte ptr es:[di-1], 0 ; make it an asciiz and handle the next char.
cmp al, lf
je end_commd_line_brdg
jmp short org5
org4: ; org4 skips all delimiters after the command name except for '/'
call skip_comment
jz end_commd_line_brdg
call get2
call org_delim ; skip delimiters except '/' (mrw 4/88)
jz org4
jmp short org51
org5: ; rest of the line
call skip_comment ; comment?
jz end_commd_line_brdg
call get2 ; not a comment.
org51:
stosb ; copy the character
cmp al, '"' ; a quote ?
je at_quote
cmp al, ' '
ja org5
; M051 - Start
cmp cmd_indicator, CONFIG_DEVICEHIGH; Q: is this devicehigh
jne not_dh ; N:
cmp al, lf ; Q: is this line feed
je org_dhlf ; Y: stuff a blank before the lf
cmp al, cr ; Q: is this a cr
jne org5 ; N:
mov byte ptr es:[di-1], ' ' ; overwrite cr with blank
stosb ; put cr after blank
inc [insert_blank] ; indicate that blank has been
; inserted
jmp org5
not_dh: ; M051 - End
cmp al, lf ; line feed?
je org1_brdg ; handles the next command line.
jmp org5 ; handles next char in this line.
org_dhlf: ; M051 - Start
cmp [insert_blank], 1 ; Q:has a blank already been inserted
je org1_brdg ; Y:
mov byte ptr es:[di-1], ' ' ; overwrite lf with blank
stosb ; put lf after blank
; M051 - End
org1_brdg:
mov [insert_blank], 0 ; M051: clear blank indicator for
; M051: devicehigh
jmp org1
at_quote:
cmp com_level, 0
je up_level
mov com_level, 0 ; reset it.
jmp org5
up_level:
inc com_level ; set it.
jmp org5
organize endp
;
;----------------------------------------------------------------------------
;
; procedure : get2
;
;----------------------------------------------------------------------------
;
get2 proc near
jcxz noget
lods byte ptr es:[si]
dec cx
ret
noget:
pop cx
mov count,di
mov org_count, di
xor si,si
mov chrptr,si
ifndef MULTI_CONFIG
ret
else
;
; This was the rather kludgy way out of procedure "organize", but instead
; of returning to doconf, we now want to check config.sys BEGIN/END blocks
; and the new boot menu stuff...
;
mov cx,di
jmp menu_check
endif
get2 endp
;
;----------------------------------------------------------------------------
;
; procedure : skip_comment
;
;skip the commented string until lf, if current es:si-> a comment string.
;in) es:si-> sting
; cx -> length.
;out) zero flag not set if not found a comment string.
; zero flag set if found a comment string and skipped it. al will contain
; the line feed charater at this moment when return.
; ax register destroyed.
; if found, si, cx register adjusted accordingly.
;
;----------------------------------------------------------------------------
;
skip_comment proc near
jcxz noget ; get out of the organize routine.
cmp com_level, 0 ; only check it if parameter level is 0.
jne no_commt ; (not inside quotations)
cmp cmmt, 1
jb no_commt
mov al, es:[si]
cmp cmmt1, al
jne no_commt
cmp cmmt, 2
jne skip_cmmt
mov al, es:[si+1]
cmp cmmt2, al
jne no_commt
skip_cmmt:
jcxz noget ; get out of organize routine.
mov al, es:[si]
inc si
dec cx
cmp al, lf ; line feed?
jne skip_cmmt
no_commt:
ret
skip_comment endp
ifdef MULTI_CONFIG
assume ds:sysinitseg
;
;----------------------------------------------------------------------------
;
; kbd_read: wait for keystroke
;
; INPUT
; DS == CS == sysinitseg
;
; OUTPUT
; Carry SET to clean boot, CLEAR otherwise
;
; OTHER REGS USED
; All
;
; HISTORY
; Created 16-Nov-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public kbd_read
kbd_read proc near
test byte ptr [bDisableUI],2
jnz kbd_nodelay
push ds ; the bios timer tick count is incremented
sub ax,ax ; 18.2 times per second;
mov ds,ax ; watch the timer tick count for 37 transitions
mov dx,ds:[046Ch] ; get initial value
kbd_loop:
mov ah,1 ;
int 16h ; peek the keyboard
jnz kbd_loopdone ; something's there, get out
mov ah,2 ; peek the shift states
int 16h ;
test al,03h ; either right or left shift key bits set?
jnz kbd_loopdone ; yes
mov ax,ds:[046Ch] ;
sub ax,dx ; get difference
cmp al,37 ; reached limit?
jb kbd_loop ; not yet
kbd_loopdone:
pop ds ; delay complete!
kbd_nodelay:
sub bx,bx ; assume clean boot
mov ah,2 ; peek the shift states
int 16h ;
test al,03h ; either right or left shift key bits set?
jz kbd_notshift ; no
inc bx ; yes
inc bx ;
kbd_notshift: ;
mov ah,1 ; peek the keyboard
int 16h ;
jz kbd_test ; no key present
or al,al ; is it a function key?
jnz kbd_test ; no
cmp ah,3Fh ; F5 function key?
jne kbd_notf5 ; no
mov dx,offset $CleanMsg
call print ;
jmp short kbd_eat ; yes, clean boot selected
kbd_notf5:
cmp ah,42h ; F8 function key?
jne kbd_exit ; no
mov dx,offset $InterMsg
call print ;
mov bl,1 ; yes, interactive-boot option enabled
mov [bQueryOpt],bl ; change default setting
kbd_eat: ;
mov ah,0 ;
int 16h ; eat the key we assumed was a signal
mov byte ptr [secElapsed],-1
or bx,bx ;
jz kbd_clean ;
kbd_test: ;
cmp bl,2 ;
jb kbd_exit ;
kbd_clean: ;
call disable_autoexec; yes, tell COMMAND to skip autoexec.bat
stc ; set carry to indicate abort
ret ;
kbd_exit: ;
clc ; clear carry to indicate success
ret ;
kbd_read endp
;
;----------------------------------------------------------------------------
;
; set_numlock: set numlock LED
;
; INPUT
; ES:SI -> numlock setting (ie, "ON" or "OFF")
;
; OUTPUT
; None
;
; OTHER REGS USED
; None
;
; HISTORY
; Created 16-Nov-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public set_numlock
set_numlock proc near
push ax
push ds
sub ax,ax
mov ds,ax
mov ax,es:[si] ; get 1st 2 bytes of value (ON or OF)
cmp ax,word ptr cs:[OnOff+2]; should we turn it off?
jne not_off ; no
and byte ptr ds:[0417h],not 20h
jmp short set_done
not_off:
cmp ax,word ptr cs:[OnOff] ; should we turn it on?
stc
jne set_done ; no
or byte ptr ds:[0417h],20h
set_done:
pop ds
pop ax
ret
set_numlock endp
;
;----------------------------------------------------------------------------
;
; menu_check: check for presence of menu (and other) configuration blocks
;
; INPUT
; CX == "organized" config.sys memory image length
; ES:SI -> "organized" config.sys memory image
; DS == CS == sysinitseg
;
; OUTPUT
; Same as above; the idea is that menu_check simply transforms
; a block-structured config.sys image into a conventional image,
; based on the user's block selection and any other boot-time options
; the user may have employed...
;
; OTHER REGS USED
; All
;
; NOTES
; [count] and [org_count] are set to the new config.sys image length
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public menu_check
menu_check proc near
;
; Search for SWITCHES, determine if /N or /F are present; if so, then
; disable clean/interactive boot options
;
push cx ;
push si ;
sub bx,bx ; remains ZERO until first block
swchk_loop: ;
call get_char ; get first char of current line
jc swchk_end ; hit eof
cmp al,CONFIG_BEGIN ;
jne swchk_next1 ;
inc bx ; remember that we've seen a block
jmp short swchk_nextline
swchk_next1: ;
cmp al,CONFIG_NUMLOCK
jne swchk_next2 ;
or bx,bx ; only do NUMLOCK commands that exist
jnz swchk_nextline ; before the first block
call set_numlock ; REM it out so we don't act on it later, too
mov byte ptr es:[si-1],CONFIG_REM
jmp short swchk_nextline
swchk_next2: ;
cmp al,CONFIG_SWITCHES
jne swchk_nextline ; this line ain't it
swchk_scan: ;
call get_char ; look for /N or /F
swchk_scan1: ;
cmp al,LF ; end of line?
je swchk_nextline ; yes
cmp al,'/' ; switch-char?
jne swchk_scan ; no
call get_char ;
and al,not 20h ; convert to upper case
cmp al,byte ptr swit_n+1
jne swchk_scan2 ; no
or byte ptr [bDisableUI],1
jmp swchk_scan ; continue looking for switches of interest
swchk_scan2: ;
cmp al,byte ptr swit_f+1
jne swchk_scan1 ; no
or byte ptr [bDisableUI],2
jmp swchk_scan ; continue looking for switches of interest
swchk_nextline: ;
call skip_opt_line ;
jmp swchk_loop ;
swchk_end: ;
pop si ;
pop cx ;
;
; Do the keyboard tests for clean/interactive boot now, but only if
; the DisableUI flag is still clear
;
test byte ptr [bDisableUI],1
jnz menu_search
;
; Wait for 2 seconds first, UNLESS the /F bit was set in bDisableUI, or
; there is anything at all in the keyboard buffer
;
call kbd_read
jnc menu_search
jmp menu_abort
;
; Search for MENU block; it is allowed to be anywhere in config.sys
;
menu_search:
sub bx,bx ; if no MENU, default to zero for no_selection
mov di,offset szMenu;
call find_block ; find the MENU block
jnc menu_found ;
mov byte ptr [szBoot],0
jmp no_selection ; not found
;
; Process the requested menu color(s)
;
menu_color:
push cx ;
push dx ;
mov dx,0007h ; default color setting
call get_number ; get first number
and bl,00Fh ; first # is foreground color (for low nibble)
mov ch,bl ; save it in CH
and dl,0F0h ;
or dl,bl ;
call delim ; did we hit a delimiter
jne check_color ; no, all done
call get_number ; get next number
and bl,00Fh ; second # is background color (for high nibble)
mov dh,bl ; save it in DH
and dl,00Fh ;
mov cl,4 ;
shl bl,cl ;
or dl,bl ;
check_color: ;
cmp ch,dh ; are foreground/background the same?
jne set_color ; no
xor dl,08h ; yes, so modify the fgnd intensity
set_color:
mov [bMenuColor],dl ;
pop dx ;
pop cx ;
jmp menu_nextitem ;
;
; Back to our regularly scheduled program (the COLOR and other goop
; above is there simply to alleviate short jump problems)
;
menu_found:
mov byte ptr [bDefBlock],1
mov word ptr [offDefBlock],0
mov byte ptr [secTimeOut],-1
and byte ptr [bQueryOpt],not 2
call skip_opt_line ; skip to next line
sub dx,dx ; initialize total block count (0 => none yet)
;
; Process the menu block now
;
menu_process:
call get_char ; get first char of current line
jc to_menu_getdefault ; could happen if menu block at end (rare)
and al,NOT CONFIG_OPTION_QUERY
cmp al,CONFIG_BEGIN ; BEGIN implies END
je to_menu_getdefault
cmp al,CONFIG_SUBMENU
je menu_item ; go process sub-menu
cmp al,CONFIG_MENUITEM
je menu_item ; go process menu item
cmp al,CONFIG_MENUDEFAULT
je menu_default ; go process menu default
cmp al,CONFIG_MENUCOLOR
je menu_color ; go process menu color
cmp al,CONFIG_NUMLOCK
je menu_numlock ;
cmp al,CONFIG_REM ; allow remarks in menu block
je menu_nextitem ;
call any_delim ; allow blank lines and such
je menu_nextitem ;
stc ;
call print_error ; non-MENU command!
jmp short menu_nextitem
menu_numlock:
call set_numlock
jmp short menu_nextitem
to_menu_getdefault:
jmp short menu_getdefault
;
; Save the offset of the default block name, we'll need it later
;
menu_default:
mov [offDefBlock],si; save address of default block name
cmp byte ptr [secElapsed],0
jne timeout_skip ; secElapsed is only zero for the FIRST menu,
call skip_token ; and for subsequent menus IF nothing was typed;
jc menu_nextitem ; secElapsed becomes -1 forever as soon as
call skip_delim ; something is typed
jc menu_nextitem ;
mov si,bx ;
call get_number ; get number (of seconds for timeout)
cmp bl,90 ; limit it to a reasonable number
jb timeout_ok ; (besides, 99 is the largest # my simple
mov bl,90 ; display function can handle)
timeout_ok: ;
mov [secTimeOut],bl ;
timeout_skip:
jmp short menu_nextitem
;
; Verify that this is a valid menu item by searching for the named block
;
menu_item:
cmp dl,MAX_MULTI_CONFIG ; have we reached the max # of items yet?
jae menu_nextitem ;
mov di,si ; DS:DI -> block name to search for
call srch_block ;
je menu_itemfound ;
stc ;
call print_error ; print error and pause
jmp short menu_nextitem ; if not found, ignore this menu item
;
; srch_block, having succeeded, returns DI -> past the token that it
; just matched, which in this case should be a descriptive string; ES:SI
; and CX are unmodified
;
menu_itemfound:
inc dx ; otherwise, increment total block count
mov bx,dx ; and use it to index the arrays of offsets
mov abBlockType[bx],al
add bx,bx ; of recorded block names and descriptions
;
; There should be a description immediately following the block name on
; MENUITEM line; failing that, we'll just use the block name as the
; description...
;
mov aoffBlockName[bx],si
mov aoffBlockDesc[bx],si
mov di,bx ; skip_delim modifies BX, so stash it in DI
call skip_token ;
jc menu_nextitem ; hit eol/eof
call skip_delim ;
jc menu_nextitem ; hit eol/eof
xchg bx,di ;
mov aoffBlockDesc[bx],di
menu_nextitem:
call skip_opt_line ;
jmp menu_process ; go back for more lines
;
; Display menu items now, after determining which one is default
;
menu_getdefault:
or dl,dl ; where there any valid blocks at all?
jnz menu_valid ; yes
sub bx,bx ; no, so force autoselect of 0
jmp menu_autoselect ; (meaning: process common blocks only)
menu_valid:
sub bx,bx ;
mov [bMaxBlock],dl ; first, record how many blocks we found
mov di,[offDefBlock];
or di,di ; does a default block exist?
jz menu_nodefault ; no
inc bx ; yes, walk name table, looking for default
menu_chkdefault:
push bx ;
add bx,bx ;
mov si,aoffBlockName[bx]
mov cx,128 ; arbitrary maximum length of a name
push ds ;
push es ;
pop ds ;
call comp_names ; is this block the same as the default?
pop ds ;
pop bx ;
je menu_setdefault ; yes
inc bx ;
cmp bl,[bMaxBlock] ; all done searching?
jbe menu_chkdefault ; not yet
menu_nodefault:
mov bl,1 ; if no default, force default to #1
menu_setdefault:
mov [bDefBlock],bl ; yes, this will be the initial current block
;
; If the timeout was explicitly set to 0 (or technically, anything that
; failed to resolve to a number, like "NONE" or "EAT POTATOES"), then we're
; supposed to skip menu display and run with the specified default block;
; however, if the user hit Enter prior to boot, thereby requesting fully
; INTERACTIVE boot, then we shall display the menu block anyway (though still
; with no timeout)
;
cmp [secTimeOut],0 ; is timeout zero? (ie, assume default)
jne menu_display ; no
test byte ptr [bQueryOpt],1 ; yes, but was INTERACTIVE requested?
jnz menu_display ; yes, so *don't* assume default after all
jmp not_topmenu ;
;
; Reset the mode, so that we know screen is clean and cursor is home
;
menu_display:
mov ah,0Fh ; get current video mode
int 10h ;
mov ah,00h ; just re-select that mode
int 10h ;
push es ;
mov ax,40h ; reach down into the ROM BIOS data area
mov es,ax ; and save the current (default) video page
mov ax,es:[004Eh] ; start address and page #, in case the
mov [wCRTStart],ax ; undocumented QUIET option was enabled
mov al,es:[0062h] ;
mov [bCRTPage],al ;
mov ax,word ptr [bMenuPage] ; select new page for menu
int 10h ;
mov ax,0600h ; clear entire screen
mov bh,[bMenuColor] ; using this color
sub cx,cx ; upper left row/col
mov dl,byte ptr es:[CRT_Cols]
dec dl ;
mov dh,es:[CRT_Rows];
or dh,dh ; # of rows valid?
jnz menu_clear ; hopefully
mov dh,[bLastRow] ; no, use a default
menu_clear:
int 10h ; clear the screen using the req. attribute
pop es ;
mov [bLastRow],dh ; save DH
mov dx,offset $MenuHeader
call print ; cursor now on row 3 (numbered from 0)
test byte ptr [bDisableUI],1
jnz menu_nostatus ;
mov bh,[bMenuPage] ;
mov dh,[bLastRow] ; restore DH
mov dl,0 ; print the status line on row DH, col 0,
mov ah,02h ; now that we can trash the cursor position
int 10h ;
mov dx,offset $StatusLine
call print ;
mov ah,3 ; get cursor position
int 10h ;
sub dl,2 ;
mov [bLastCol],dl ; save column where status char will go
menu_nostatus:
mov bx,1 ; now prepare to display all the menu items
menu_disploop:
call print_item ; print item #BL
inc bx ; why "inc bx"? because it's a 1-byte opcode
cmp bl,[bMaxBlock] ; all done?
jbe menu_disploop ; not yet
;
; Set cursor position to just below the menu items
;
mov dl,0 ; select column
mov dh,bl ;
add dh,4 ; select row below menu
mov bh,[bMenuPage] ;
mov ah,02h ; set cursor position beneath the block list
int 10h ;
mov dx,offset $MenuPrmpt
call print ;
call select_item ; make a selection, return # in BX
mov dx,offset crlfm ;
call print ;
push word ptr [bDisableUI]
or byte ptr [bDisableUI],1
call show_status ; clear the status line now
pop word ptr [bDisableUI]
;
; Now begins the "re-organization" process...
;
menu_autoselect:
cmp bx,-1 ; clean boot requested?
jne normal_boot ; no
call disable_autoexec; basically, add a /D to the command.com line
menu_abort:
sub cx,cx ; then immediately exit with 0 config.sys image
jmp menu_exit ;
normal_boot:
cmp bx,-2 ; back to top-level menu?
jne not_topmenu ; no
mov cx,[count] ; yes, start all over
sub si,si ;
jmp menu_search
not_topmenu:
cmp abBlockType[bx],CONFIG_SUBMENU
jne not_submenu ;
add bx,bx ;
mov di,aoffBlockName[bx]
call srch_block ; THIS CANNOT FAIL!
mov si,di ;
mov cx,bx ; ES:SI and CX are ready for another round
jmp menu_found
not_submenu:
add bx,bx ; get BX -> name of selected block
mov bx,aoffBlockName[bx]
;
; BX should now either be ZERO (meaning no block has been selected) or
; the offset relative to ES of the block name to be processed (along with
; all the "common" lines of course)
;
no_selection:
mov [offDefBlock],bx; save selection
mov cx,[count] ; reset ES:SI and CX for reprocessing
sub si,si ;
push ds ;
mov ds,[config_wrkseg]; this is where we'll store new config.sys image
assume ds:nothing ;
sub di,di ;
;
; ES:SI-> config.sys, DS:DI -> new config.sys workspace
;
; Work our way through the config.sys image again, this time copying
; all lines that are (A) "common" lines outside any block or (B) lines
; within the requested block. Lines inside INCLUDEd blocks are transparently
; copied by copy_block in a recursive fashion; the amount of recursion is
; limited by the fact INCLUDE statements are REMed by copy_block as they are
; processed and by the number of unique INCLUDE stmts in config.sys...
;
; BUGBUG 20-Mar-1992 JeffPar: If we can figure out the lower bound of the
; stack we're running on, then we should check it inside copy_block
;
copyblock_loop:
push bx ; save selected block name
call copy_block ; process (named or common) block
pop bx ;
jc move_config ; hit eof
;
; copy_block can only return for two reasons: it hit eof or a new block
;
copyblock_begin:
push ax ;
push cx ;
push si ;
push di ; always do "common" blocks
mov di,offset szCommon
push ds ;
push cs ;
pop ds ;
call comp_names ;
pop ds ;
pop di ;
pop si ;
pop cx ;
pop ax ;
je copyblock_check ;
or bx,bx ; is there a block name to check?
jz copyblock_skip ; no
push di ;
mov di,bx ; check block against given block name
push ds ;
push es ;
pop ds ;
call comp_names ; is this the block we really want to do?
pop ds ;
pop di ;
copyblock_check:
jc move_config ; hit eof
jne copyblock_skip ;
call skip_opt_line ;
jmp copyblock_loop ;
copyblock_skip: ;
call skip_opt_line ; this ain't the block we wanted, so skip it
call get_char ;
jc move_config ; hit eof
and al,NOT CONFIG_OPTION_QUERY
cmp al,CONFIG_BEGIN ;
je copyblock_begin ;
jmp copyblock_skip ; anything else is just skipped
;
; To create as little risk to the rest of SysInit as little as possible,
; and to free the workspace at "config_wrkseg" for creating an environment,
; copy the new config.sys image to "confbot"
;
move_config:
mov cx,di ; now copy workspace at DS:DI to "confbot"
push cx ;
;
; But first, copy the CONFIG=<configuration><0> string to the workspace,
; since the configuration name only currently exists in the "confbot" area
;
mov cx,offset szMenu-offset szBoot-1
mov si,offset szBoot; first copy the CONFIG= part
inc di ; skip a byte, in case absolutely nothing
; was copied to the workspace, because we always
; zero the first byte of the workspace (below)
copy_boot: ;
lods byte ptr cs:[si];
mov [di],al ;
inc di ;
loop copy_boot ;
push es ; then copy the configuration name
mov cx,128-7 ; put an upper limit on the name, to be safe
mov si,cs:[offDefBlock]; ES:SI -> default block name
or si,si ; valid?
jnz l1 ; yes
push cs ;
pop es ;
mov si,offset szCommon
l1: mov al,es:[si] ;
call any_delim ;
je l2 ;
mov [di],al ;
inc si ;
inc di ;
loop l1 ;
l2: mov byte ptr [di],LF; terminate the configuration string
pop es ;
;
; Now we can copy "config_wrkseg" (DS) to "confbot" (ES)
;
sub di,di ;
mov [config_envlen],di
sub si,si ;
pop cx ; recover the size of "config_wrkseg"
push cx ;
rep movsb ; moved!
pop cx ;
mov ax,ds ;
pop ds ;
assume ds:sysinitseg ;
;
; Now that the config_wrkseg is available once again, we shall
; use it to create an environment. The first thing to go in will be
; the "CONFIG=configuration" thing. It is also important to zero
; the first byte of the workspace, so that copy_envvar knows the buffer
; is empty.
;
push es ;
mov es,ax ;
inc si ; ES:SI -> "CONFIG=configuration"
mov byte ptr es:[0],0;empty the environment block
call copy_envvar ; copy envvar at ES:SI to "config_wrkseg"
pop es
;
; Before returning, restore the default video page setting but do NOT
; do it using INT 10h's Set Active Page function, because if the menu was
; displayed on a different page, then it's because we don't want to see
; all the device driver/TSR goop (which goes to the default page)
;
menu_done:
cmp byte ptr [bMenuPage],0
je menu_exit ;
push es ;
mov ax,40h ;
mov es,ax ;
mov ax,[wCRTStart] ;
mov es:[004Eh],ax ;
mov al,[bCRTPage] ;
mov es:[0062h],al ;
pop es ;
menu_exit:
mov [count],cx ; set new counts
mov [org_count],cx ;
sub si,si ; always return ES:SI pointing to config.sys
ret
menu_check endp
;
;----------------------------------------------------------------------------
;
; copy_envvar: copy the envvar at ES:SI to "config_wrkseg"
;
; INPUT
; ES:SI -> environment variable (in the form "var=string<cr/lf>")
;
; OUTPUT
; config_envlen (ie, where to put next envvar) updated appropriately
; carry set if error (eg, missing =); clear otherwise
;
; OTHER REGS USED
; None
;
; NOTES
; None
;
; HISTORY
; Created 29-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public copy_envvar
assume ds:sysinitseg,es:nothing
copy_envvar proc near
push cx ;
push si ;
push ds ;
push es ;
push es ;
mov es,[config_wrkseg]; ES:DI to point to next available byte
pop ds ; DS:SI to point to envvar
assume ds:nothing ;
;
; Have to calculate the length of the variable name (and if we hit
; the end of the line before we hit '=', then it's curtains for this
; config.sys line)
;
; The check for NULL is important because copy_envvar is also used to copy
; the initial CONFIG= setting, which will have been zapped by a NULL if no
; menu block existed (in order to prevent the creation of an environment)
;
sub cx,cx ;
copy_varlen: ;
lodsb ;
or al,al ; NULL?
stc ;
jz copy_envexit ; yes, abort
cmp al,CR ;
stc ;
je copy_envexit ;
cmp al,LF ;
stc ;
je copy_envexit ;
inc cx ;
cmp al,'=' ;
jne copy_varlen ;
mov al,0 ;
mov ah,[si] ; save char after '='
sub si,cx ; back up to given varname
dec cx ; CX == # of bytes in varname
sub di,di ; start looking for DS:SI at ES:0
copy_varsrch:
cmp byte ptr es:[di],al
je copy_envprep ; search failed, just copy var
mov bx,di ; ES:BX -> start of this varname
push cx ;
push si ;
repe cmpsb ;
pop si ;
pop cx ;
jne copy_varnext ; no match, skip to next varname
cmp byte ptr es:[di],'='
jne copy_varnext ; no match, there's more characters
;
; Previous occurrence of variable has been found; determine the
; entire length and then destroy it
;
mov cx,-1 ;
repne scasb ; guaranteed to get null (since we put it there)
push si ;
mov si,di ;
mov di,bx ;
mov cx,[config_envlen]
sub cx,si ; destroy variable now
rep movs byte ptr es:[di],byte ptr es:[si]
pop si ;
copy_envprep:
cmp ah,CR ; if there is nothing after the '='
je copy_envdel ; then just exit with variable deleted
cmp ah,LF ;
je copy_envdel ;
jmp short copy_envloop
copy_varnext: ;
push cx ;
mov cx,-1 ;
repne scasb ;
pop cx ;
jmp copy_varsrch ;
copy_envloop: ;
lodsb ;
cmp al,CR ;
je copy_envdone ;
cmp al,LF ;
je copy_envdone ;
stosb ;
jmp copy_envloop ;
copy_envdone: ;
sub al,al ; do SUB to clear carry as well
stosb ; always null-terminate these puppies
copy_envdel: ;
mov es:[di],al ; and stick another null to terminate the env.
mov [config_envlen],di
copy_envexit: ;
pop es ;
pop ds ;
assume ds:sysinitseg ;
pop si ;
pop cx ;
ret ;
copy_envvar endp
;
;----------------------------------------------------------------------------
;
; copy_block: copy the current block to the new config.sys workspace
;
; INPUT
; CX == remaining bytes in "organized" config.sys memory image
; ES:SI -> remaining bytes in "organized" config.sys memory image
; DS:DI -> new config.sys workspace (equal in size to the original
; config.sys image) where the current block is to be copied
;
; OUTPUT
; Same as above
; AL also equals the last character read from the organized image
;
; OTHER REGS USED
; All
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public copy_block
copy_block proc near
call get_char ; check for include
jc copy_done ;
and al,NOT CONFIG_OPTION_QUERY
cmp al,CONFIG_BEGIN ; another BEGIN implies END as well
je copy_done ;
;
; BOOTCON relies on these things being in-memory (sigh)
;
; cmp al,CONFIG_REM ; don't bother copying this
; je copy_nextline ;
; cmp al,CONFIG_COMMENT;don't bother copying this either
; je copy_nextline ;
;
; This is being left out for old reporting of bad command lines;
; alternatively, we could report the error here and save the rest of
; sysinit from ever having to deal with bogus CONFIG.SYS stuff...
;
; cmp al,CONFIG_UNKNOWN;don't bother copying this either too
; je copy_nextline ;
;
cmp al,CONFIG_INCLUDE
mov al,ah ; AL == the original line code
jne copy_line ; not an "include" line
;
; We have hit an "INCLUDE" line; first, REM out the line so that we
; never try to include the block again (no infinite include loops please),
; then search for the named block and call copy_block again.
;
mov byte ptr es:[si-1],CONFIG_REM
push di ;
mov di,offset szMenu
call comp_names_safe ; don't allow INCLUDE MENU
je copy_skip ;
mov di,offset szCommon
call comp_names_safe ; don't allow INCLUDE COMMON
je copy_skip ;
mov di,si ; try to find the block
call srch_block ;
mov dx,di ;
pop di ;
jne copy_error ; no such block
push cx ;
mov cx,bx ;
push si ;
dec dx ;
mov si,dx ;
call skip_line ; skip the rest of the "block name" line
call copy_block ; and copy in the rest of that block
pop si ;
pop cx ;
sub al,al ; force skip_opt_line to skip...
jmp short copy_nextline
copy_skip:
pop di
copy_error:
clc ;
call print_error ; note that carry is clear, no pause
jmp short copy_nextline
;
; Copy the line at ES:SI to the current location at DS:DI
;
copy_line:
mov [di],al ;
inc di ;
cmp al,' ' ; is this is a "real" line with a "real" code?
jb copy_nextline ; no
cmp cs:[config_multi],0
je copy_loop ; not a multi-config config.sys, don't embed #s
call get_linenum ; BX == line # of line @ES:SI
mov [di],bx ; stash it immediately following the line code
inc di ;
inc di ;
jmp short copy_next ;
copy_loop: ;
call get_char ;
jc copy_done ; end of file
mov [di],al ;
inc di ;
copy_next:
cmp al,LF ; done with line?
jne copy_loop ; nope
copy_nextline:
call skip_opt_line ;
jmp copy_block ;
copy_done:
ret
copy_block endp
;
;----------------------------------------------------------------------------
;
; get_linenum: return line # (in BX) of current line (@ES:SI)
;
; INPUT
; ES:SI -> some line in the config.sys memory image
;
; OUTPUT
; BX == line # (relative to 1)
;
; OTHER REGS USED
; DX
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public get_linenum
get_linenum proc near
push ax ;
sub bx,bx ; BX == line # (to be returned)
push cx ;
mov dx,si ; DX == the offset we're looking for
push si ;
mov cx,cs:[count] ;
sub si,si ; prepare to scan entire file
get_linenum_loop: ;
call skip_line ;
jc get_linenum_done;
inc bx ;
cmp si,dx ; have we exceeded the desired offset yet?
jb get_linenum_loop; no
get_linenum_done: ;
pop si ;
pop cx ;
pop ax ;
ret ;
get_linenum endp
;
;----------------------------------------------------------------------------
;
; srch_block: searches entire config.sys for block name @ES:DI
;
; INPUT
; ES -> config.sys image
; ES:DI -> block name to find
;
; OUTPUT
; ZF flag set, if found
; ES:DI -> just past the name in the block heading, if found
; BX == # bytes remaining from that point, if found
;
; OTHER REGS USED
; None
;
; NOTES
; This differs from "find_block" in that it searches the ENTIRE
; config.sys image, not merely the remaining portion, and that it
; takes a pointer to block name that is *elsewhere* in the image
; (ie, ES) as opposed to some string constant in our own segment (DS).
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public srch_block
srch_block proc near ; returns BX -> named block in CONFIG.SYS
push ax ;
push cx ;
mov cx,cs:[count] ;
push si ;
sub si,si ;
push ds ;
push es ;
pop ds ;
call find_block ;
mov di,si ;
mov bx,cx ;
pop ds ;
pop si ;
pop cx ;
pop ax ;
ret ;
srch_block endp
;
;----------------------------------------------------------------------------
;
; find_block: searches rest of config.sys for block name @DS:DI
;
; INPUT
; DS:DI -> block name to find
; ES:SI -> remainder of config.sys image
; CX == remaining size of config.sys image
;
; OUTPUT
; ZF flag set, if found (also, CF set if EOF)
; ES:SI -> where the search stopped (at end of block name or EOF)
; CX == # bytes remaining from that point
;
; OTHER REGS USED
; AX
;
; NOTES
; This differs from "srch_block" in that it searches only the
; remaining portion of the config.sys image and leaves SI and CX
; pointing to where the search left off, and that it takes a pointer
; to search string in our own segment (DS:DI instead of ES:DI).
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public find_block
find_block proc near
call get_char ; get line code
jc find_exit ; end of file
and al,NOT CONFIG_OPTION_QUERY
cmp al,CONFIG_BEGIN ; beginning of a block?
je check_line ; no
cmp al,CONFIG_INCLUDE
jne next_line ;
or cs:[config_multi],1
jmp short next_line ;
check_line:
or cs:[config_multi],1
call comp_names ; compare block names
jbe find_exit ; end of file, or names matched
next_line:
call skip_opt_line ; no, so skip to next line
jmp find_block ;
find_exit:
ret
find_block endp
;
;----------------------------------------------------------------------------
;
; comp_names: compares keyword @DS:DI to position in config.sys @ES:SI
;
; INPUT
; DS:DI -> keyword to compare
; ES:SI -> position in config.sys
; CX == remaining bytes in config.sys
;
; OUTPUT
; ZF flag set, if match (also, CF set if EOF)
; ES:SI -> where the comparison stopped (at end of block name or EOF)
; CX == # bytes remaining from that point
;
; OTHER REGS USED
; AX
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public comp_names
comp_names proc near
push di ;
comp_loop: ;
call get_char ;
jc comp_exit ;
call any_delim ; is next character a delimiter?
mov ah,[di] ; (get next character we're supposed to match)
je comp_almost ; yes, it *could* be a match
inc di ;
and ax,not 2020h ; BUGBUG -- assumes both names are alphanumeric -JTP
cmp al,ah ; match?
je comp_loop ; yes, keep looking at the characters
clc ; prevent erroneous eof indication: clear carry
comp_exit: ;
pop di ;
ret ;
comp_almost: ;
xchg al,ah ; we don't know for sure if it's a match
call any_delim ; until we verify that the second string has
xchg al,ah ; been exhausted also...
jmp comp_exit ; if we are, this call to any_delim will tell...
comp_names endp
public comp_names_safe
comp_names_safe proc near
push ax
push cx
push si
push ds
push cs
pop ds
call comp_names
pop ds
pop si
pop cx
pop ax
ret
comp_names_safe endp
;
;----------------------------------------------------------------------------
;
; print_item: display menu item #BL
;
; INPUT
; BL == menu item # to display
;
; OUTPUT
; Menu item displayed, with appropriate highlighting if BL == bDefBlock
;
; OTHER REGS USED
; None
;
; NOTES
; This function saves/restores the current cursor position, so you
; needn't worry about it.
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public print_item
print_item proc near ; prints menu item #BL (1 to N)
push ax ;
push bx ;
push cx ;
push dx ;
push si ;
mov ah,03h ; get cursor position
mov bh,[bMenuPage] ; always page zero
int 10h ; DH/DL = row/column
push dx ; save it
mov ah,02h ; set cursor position
mov dh,bl ;
add dh,3 ;
mov dl,5 ;
int 10h ; set cursor position for correct row/col
mov al,bl ;
add al,'0' ; convert menu item # to ASCII digit
mov ah,[bMenuColor] ; normal attribute
cmp bl,[bDefBlock] ; are we printing the current block?
jne print_other ; no
or ah,70h ; yes, set bgnd color to white
mov ch,ah ;
mov cl,4 ;
rol ch,cl ;
cmp ch,ah ; are fgnd/bgnd the same?
jne print_other ; no
xor ah,08h ; yes, so modify the fgnd intensity
print_other: ;
mov bh,0 ;
add bx,bx ;
mov di,aoffBlockDesc[bx]
mov bl,ah ; put the attribute in the correct register now
mov bh,[bMenuPage] ; get correct video page #
mov ah,09h ; write char/attr
mov cx,1 ;
int 10h ;
inc dl ; increment column
mov ah,02h ;
int 10h ;
mov ax,0900h+'.' ;
int 10h ; display '.'
inc dl ; increment column
mov ah,02h ;
int 10h ;
mov ax,0900h+' ' ;
int 10h ; display ' '
inc dl ; increment column
mov ah,02h ;
int 10h ;
push es ;
print_loop: ;
mov al,es:[di] ; get a character of the description
inc di ;
cmp al,TAB ; substitute spaces for tabs
jne print_nontab ;
mov al,' ' ;
print_nontab: ;
cmp al,' ' ;
jb print_done ; stop at the 1st character < space
cmp al,'$' ;
je print_done ; also stop on $
mov ah,09h ; display function #
int 10h ;
inc dl ; increment column
cmp dl,78 ; far enough?
jae print_done ; yes
mov ah,02h ;
int 10h ;
jmp print_loop ;
print_done: ;
pop es ;
pop dx ;
mov ah,02h ;
int 10h ; restore previous row/col
pop si ;
pop dx ;
pop cx ;
pop bx ;
pop ax ;
ret ;
print_item endp
;
;----------------------------------------------------------------------------
;
; select_item: wait for user to select menu item, with time-out
;
; INPUT
; None
;
; OUTPUT
; BX == menu item # (1-N), or -1 for clean boot
; Selected menu item highlighted
; Cursor positioned beneath menu, ready for tty-style output now
;
; OTHER REGS USED
; None
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public select_item
select_item proc near ; returns digit value in BX (trashes AX/CX/DX)
mov bl,[bDefBlock] ; BL will be the default block #
mov al,bl ;
call disp_num ;
call show_status ; display current interactive status
cmp byte ptr [secTimeOut],-1
je input_key ; no time-out, just go to input
mov ah,Get_Time ;
int 21h ;
mov bh,dh ; BH = initial # of seconds
check_time:
mov al,[secTimeOut] ;
sub al,[secElapsed] ;
jae show_time ;
or byte ptr [bQueryOpt],2 ; disable all further prompting
mov byte ptr [secElapsed],0
jmp select_done ; time's up!
show_time:
push bx ;
mov bl,al ; save # in BL
mov bh,[bMenuPage] ;
mov ah,03h ; get cursor position
int 10h ;
push dx ;
add dl,8 ; move cursor to the right
mov ah,02h ; set cursor position
int 10h ;
mov dx,offset $TimeOut
call print ; print the "Time remaining: " prompt
mov al,bl ; recover # from BL
cbw ; this works because AL is always <= 90
mov cl,10 ;
div cl ; AL = tens digit, AH = ones digit
mov cl,ah ;
add al,'0' ;
mov ah,0Eh ;
int 10h ; write TTY tens digit
mov al,cl ;
add al,'0' ;
mov ah,0Eh ;
int 10h ; write TTY ones digit
pop dx
mov ah,02h ; set cursor position back to where it was
int 10h ;
pop bx ;
input_key:
mov ah,Raw_Con_IO ;
mov dl,0FFh ; input request
int 21h ;
jnz got_key ;
cmp byte ptr [secTimeOut],-1; is there a time-out?
je input_key ; no, just go back to input
mov ah,Get_Time ;
int 21h ; DH = seconds
mov ah,dh ;
sub dh,bh ; should generally be zero or one
mov bh,ah ;
jnc got_time ;
mov dh,1 ; it wrapped back to zero, so assume one
got_time:
or dh,dh ; any change?
jz input_key ; no
add [secElapsed],dh ;
jmp check_time ;
got_key:
push ax ;
mov ax,-1 ; zap both secTimeOut and secElapsed
xchg word ptr [secTimeOut],ax
cmp al,-1 ; was time-out already disabled?
je timeout_disabled; yes
push bx ; let's disable # seconds display
mov ax,0A20h ; write multiple spaces
mov bx,word ptr [bMenuColor]
mov cx,80 ; 80 of them, to be safe
int 10h ; to completely obliterate # seconds display
pop bx ;
timeout_disabled:
pop ax ;
or al,al ; extended key pressed?
jnz normal_key ; no
int 21h ; get the next part of the key then
jz input_key ; hmmm, what happened to the second part?
cmp al,48h ; up arrow?
jne not_up ; no
cmp bl,1 ; are we as up as up can get?
jbe input_key ; yes, ignore it
dec [bDefBlock] ;
call print_item ; re-print the current item
dec bl ; and then print the new current item
jmp short print1
not_up:
cmp al,50h ; down arrow?
jne not_down ; no
cmp bl,[bMaxBlock] ; are we as down as down can get?
jae to_input_key ; yes, ignore it
inc [bDefBlock] ;
call print_item ; re-print the current item
inc bx ; and then print the new current item
print1: mov al,bl ;
print2: call print_item ;
call disp_num ;
to_input_key:
jmp input_key ;
not_down:
test byte ptr [bDisableUI],1
jnz to_input_key ; don't allow F8 or F5
cmp al,42h ; F8 function key?
jne not_f8 ; no
xor byte ptr [bQueryOpt],1
call show_status ;
jmp input_key ;
not_f8:
cmp al,3Fh ; F5 function key?
jne to_input_key ; no
mov bx,-1 ; special return code (-1) indicating clean boot
mov al,' ' ; don't want to display anything really;
jmp short disp_input; just want to display the cr/lf sequence...
normal_key:
cmp al,0Dh ; Enter?
je select_done ; yes
cmp al,08h ; backspace?
jne not_backspace ; no
mov bx,-2 ; yes, special return code
ret ;
not_backspace:
sub al,'0' ; is greater than '0'?
jbe to_input_key ; no
cmp al,[bMaxBlock] ; is less than or equal to the maximum digit?
ja to_input_key ; no
mov [bDefBlock],al ;
call print_item ; redisplay the current selection
mov bl,al ; set new selection
jmp print2
select_done:
mov bh,0 ; return a full 16-bit value (for indexing)
mov al,bl ;
add al,'0' ; convert it into a digit, then display it
if2
.errnz disp_input-$ ; fall into disp_input
endif
select_item endp
;
;----------------------------------------------------------------------------
;
; disp_input: display a single character + cr/lf
;
; INPUT
; AL == character to display
;
; OUTPUT
; None
;
; OTHER REGS USED
; None
;
; NOTES
; This function is used not only for the menu input selection but
; also for the interactive line prompting (the y/n/a thing).
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public disp_input
disp_input proc near
push ax
cmp al,' '
jae disp_ok
mov al,' '
disp_ok:
mov dl,al
mov ah,Std_Con_Output
int 21h
mov dx,offset crlfm
call print
pop ax
ret
disp_input endp
disp_num proc near
push bx
add al,'0'
mov ah,0Ah
mov bx,word ptr [bMenuColor]
mov cx,1
int 10h
pop bx
ret
disp_num endp
;
;----------------------------------------------------------------------------
;
; show_status: display current interactive mode setting (on/off/none)
;
; INPUT
; None
;
; OUTPUT
; None
;
; OTHER REGS USED
; None
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public show_status
show_status proc near
push bx ; BL = video page #
mov bx,word ptr [bMenuColor]
mov ah,03h ; get cursor position
int 10h ;
push dx ; save it
mov ah,02h ; set cursor position
mov dx,word ptr [bLastCol] ; set correct row/col
test byte ptr [bDisableUI],1
jz show_onoff ; just show on/off
mov dl,0 ;
int 10h ;
mov ax,0A20h ; write multiple spaces
mov cx,80 ; 80 of them, to be exact
int 10h ; to obliterate the status line
jmp short show_done ;
show_onoff: ;
int 10h ;
mov al,$NO ; assume OFF
cmp byte ptr [bQueryOpt],1 ; is interactive mode on?
jne show_noton ; no
mov al,$YES ; yes
show_noton: ;
mov ah,0Eh ; write TTY
int 10h ;
show_done: ;
pop dx ;
mov ah,02h ;
int 10h ; restore original cursor position
pop bx ;
ret ;
show_status endp
;
;----------------------------------------------------------------------------
;
; skip_token: advances ES:SI/CX past the current token
;
; INPUT
; ES:SI -> position in config.sys
; CX == remaining bytes in config.sys
;
; OUTPUT
; CF set if EOL/EOF hit
; AL == 1st char of delimiter
; ES:SI -> just past the delimiter
; CX == # bytes remaining from that point
;
; OTHER REGS USED
; AX
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public skip_token
skip_token proc near
call get_char
jc skip_token_done
call any_delim
jne skip_token
skip_check_eol:
cmp al,CR
je skip_token_eol
cmp al,LF
je skip_token_eol
clc
jmp short skip_token_done
skip_token_eol:
stc
skip_token_done:
ret
skip_token endp
;
;----------------------------------------------------------------------------
;
; skip_delim: advances ES:SI/CX past the current delimiter
;
; INPUT
; ES:SI -> position in config.sys
; CX == remaining bytes in config.sys
;
; OUTPUT
; CF set if EOF hit
; AL == 1st char of token
; ES:SI -> just past the token
; CX == # bytes remaining from that point
; ES:BX -> new token (since ES:SI is already pointing 1 byte past token)
;
; OTHER REGS USED
; AX
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public skip_delim
skip_delim proc near ; returns carry set if eol/eof
call get_char ;
lea bx,[si-1] ; also returns BX -> next token
jc skip_token_done ;
call delim ;
je skip_delim ;
jmp skip_check_eol ;
skip_delim endp
;
;----------------------------------------------------------------------------
;
; skip_opt_line: same as skip_line provided AL != LF
;
; INPUT
; AL == last character read
; ES:SI -> position in config.sys
; CX == remaining bytes in config.sys
;
; OUTPUT
; CF set if EOF hit
; AL == 1st char of new line
; ES:SI -> just past 1st char of new line
; CX == # bytes remaining from that point
;
; OTHER REGS USED
; AX
;
; NOTES
; In other words, the purpose here is to skip to the next line,
; unless ES:SI is already sitting at the front of the next line (which
; it would be if the last character fetched -- AL -- was a linefeed)
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public skip_opt_line
skip_opt_line proc near
cmp al,LF
je skip_line_done
if2
.errnz skip_line-$ ; fall into skip_line
endif
skip_opt_line endp
;
;----------------------------------------------------------------------------
;
; skip_line: skip to the next line
;
; INPUT
; ES:SI -> position in config.sys
; CX == remaining bytes in config.sys
;
; OUTPUT
; CF set if EOF hit
; ES:SI -> just past 1st char of new line
; CX == # bytes remaining from that point
;
; OTHER REGS USED
; AX
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public skip_line
skip_line proc near
call get_char
jc skip_line_done
cmp al,LF
jne skip_line
skip_line_done:
ret
skip_line endp
;
;----------------------------------------------------------------------------
;
; get_number: return binary equivalent of numeric string
;
; INPUT
; ES:SI -> position in config.sys
; CX == remaining bytes in config.sys
;
; OUTPUT
; AL == non-digit encountered
; BX == binary #
; ES:SI -> just past 1st non-digit
; CX == # bytes remaining from that point
;
; OTHER REGS USED
; AX
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public get_number
get_number proc near
sub bx,bx ; BX = result
num_loop:
call get_char ;
jc num_done ;
cmp al,'0' ; convert to value
jb num_done ; no more number
cmp al,'9' ;
ja num_done ;
push ax ;
mov ax,10 ;
push dx ;
mul bx ;
pop dx ;
mov bx,ax ;
pop ax ;
sub al,'0' ;
cbw ;
add bx,ax ;
jmp num_loop ;
num_done:
ret
get_number endp
;
;----------------------------------------------------------------------------
;
; get_char: return next character, advance ES:SI, and decrement CX
;
; INPUT
; ES:SI -> position in config.sys
; CX == remaining bytes in config.sys
;
; OUTPUT
; AL == next character
; ES:SI -> just past next character
; CX == # bytes remaining from that point
;
; OTHER REGS USED
; AX
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public get_char
get_char proc near
sub cx,1 ; use SUB to set carry,zero
jb get_fail ; out of data
lods byte ptr es:[si];
mov ah,al ;
ret ;
get_fail: ; restore CX to zero
mov cx,0 ; leave carry set, zero not set
nearby_ret:
ret
get_char endp
;
;----------------------------------------------------------------------------
;
; query_user: ask user whether to execute current config.sys command
;
; INPUT
; AL == current command code
; ES:SI -> current command line in config.sys
; config_cmd == current command code, but with QUERY bit intact
; (00h used to generate "Process AUTOEXEC.BAT" prompt)
;
; OUTPUT
; CF set if command should be ignored (it is also REM'ed out)
;
; OTHER REGS USED
; BX, CX, DX, DI
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public query_user
query_user proc near
test byte ptr [bQueryOpt],4 ; answer no to everything?
jz @F ;
jmp skip_all ;
@@: test byte ptr [bQueryOpt],2 ; answer yes to everything?
jnz nearby_ret ; yes (and return carry clear!)
push ax ;
mov al,[config_cmd] ;
test byte ptr [bQueryOpt],1 ; query every command?
jnz query_all ; yes
test al,CONFIG_OPTION_QUERY ;
jnz query_all ;
jmp do_cmd ;
query_all:
;
; Search for the command code (AL) in "comtab", and then print
; out the corresponding keyword, followed by the rest of the actual
; line pointed to by ES:SI
;
push si ; save pointer to rest of CONFIG.SYS line
mov dx,offset $AutoPrmpt ;
and al,NOT CONFIG_OPTION_QUERY
jz generic_prompt ; config_cmd must have been 0
mov dh,al ; save config_cmd in DH
sub bx,bx ;
mov di,offset comtab ;
find_match: ;
mov bl,[di] ; get size of current keyword
or bl,bl ;
jz line_print ; end of table
inc di ;
cmp al,[di+bx] ; match?
je cmd_match ; yes
lea di,[di+bx+1] ; otherwise, skip this command code
jmp find_match ; loop
cmd_match: ;
mov cl,[di-1] ;
mov ch,0 ;
mov ah,Std_Con_Output
cmd_print: ;
mov al,[di] ;
inc di ;
mov dl,al ;
int 21h ;
loop cmd_print ;
mov dl,'=' ;
cmp dh,CONFIG_SET ; for SET commands, don't display a '='
jne cmd_notset ;
mov dl,' ' ;
cmd_notset:
int 21h ; '=' looks funny on SET commands
line_print: ;
lods byte ptr es:[si] ;
or al,al ;
jnz non_null ;
mov al,' ' ;
non_null: ;
cmp al,' ' ; control code?
jb prompt_user ; yes, assume end of line
jne non_space ;
cmp byte ptr es:[si],' ' ;
jb prompt_user ;
non_space: ;
mov dl,al ;
mov ah,Std_Con_Output ;
int 21h ;
jmp line_print ;
prompt_user: ;
mov dx,offset $InterPrmpt ;
generic_prompt:
call print ;
input_loop: ;
mov ah,0 ; read a key
int 16h ;
or al,al ; is it a function key?
jnz not_func ; no
cmp ah,3Fh ; F5 function key?
jne input_loop ; no
mov al,$NO ;
or byte ptr [bQueryOpt],4 ; no more queries
jmp short legal_char ;
not_func:
and al,not 20h ; converting to upper case
cmp al,$NO ; verify character is legal
je legal_char ;
cmp al,$YES ;
je legal_char ;
cmp [config_cmd],0 ;
je input_loop ; don't allow Esc on this query
cmp al,1Bh ; Esc?
jne input_loop ;
or byte ptr [bQueryOpt],2 ; no more interactive boot prompts
mov al,$YES
legal_char: ;
call disp_input ;
pop si ; restore pointer to rest of CONFIG.SYS line
cmp al,$NO ; process line?
je skip_cmd ; no
do_cmd:
pop ax ;
clc ; just do the command
ret
skip_cmd:
pop ax ;
skip_all:
mov ah,CONFIG_REM ; fake out the rest of sysinit's processing
stc
ret
query_user endp
;
;----------------------------------------------------------------------------
;
; print_error: displays multi-config error conditions
;
; INPUT
; Carry set to pause, clear to not
; ES:SI -> current command line in config.sys
;
; OUTPUT
; None
;
; OTHER REGS USED
; None
;
; NOTES
; None
;
; HISTORY
; Created 16-Mar-1992 by JeffPar
;
;----------------------------------------------------------------------------
;
public print_error
extrn error_line:near
extrn linecount:word
print_error proc near
push ax
push bx
push cx
push dx
push ds
push cs
pop ds
pushf
call get_linenum
mov [linecount],bx
call error_line
popf
jnc pe_ret
mov dx,offset $PauseMsg
call print
mov ax,0C07h ; flush input buffer, then wait for key
int 21h ; wait for a key
or al,al ; extended key?
jnz @F ; no
mov ah,07h ; yes
int 21h ; eat it too
@@: mov dx,offset crlfm
call print
pe_ret: pop ds
pop dx
pop cx
pop bx
pop ax
ret
print_error endp
;
; This function is very simple: it merely prepends a "/D" to the
; command-line for the shell; this (undocumented) switch disables
; AUTOEXEC.BAT processing and the date/time prompt that is usually
; displayed when there's no AUTOEXEC.BAT.
;
public disable_autoexec
disable_autoexec proc near
or byte ptr [bQueryOpt],2
mov al,[command_line-1] ; get default switchchar
or al,al ; anything there?
jz disable_exit ; no, disable_autoexec already called
mov bl,[command_line] ;
mov bh,0 ; BX == command-line length
mov cx,bx ;
add bl,3 ;
cmp bl,126 ;
ja disable_exit ;
mov [command_line],bl ; update length
add bx,offset command_line+1; make sure we move the NULL too
inc cx ; (just for consistency sake)
disable_loop: ;
mov ah,[bx-3] ;
mov [bx],ah ;
dec bx ;
loop disable_loop ;
mov [bx-2],al ;
mov word ptr [bx-1],' D' ; /D is stuffed into place now
mov byte ptr [command_line-1],0
disable_exit: ;
ret ;
disable_autoexec endp
assume ds:nothing
endif ;MULTI_CONFIG
;
;----------------------------------------------------------------------------
;
; procedure : delim
;
;----------------------------------------------------------------------------
;
ifdef MULTI_CONFIG
any_delim proc near
cmp al,CR
je delim_ret
cmp al,LF
je delim_ret
cmp al,'['
je delim_ret
cmp al,']'
je delim_ret
if2
.errnz delim-$
endif
any_delim endp
endif ;MULTI_CONFIG
delim proc near
cmp al,'/' ; ibm will assume "/" as an delimeter.
jz delim_ret
cmp al, 0 ; special case for sysinit!!!
jz delim_ret
org_delim: ; used by organize routine except for getting
cmp al,' ' ;the filename.
jz delim_ret
cmp al,TAB
jz delim_ret
cmp al,'='
jz delim_ret
cmp al,','
jz delim_ret
cmp al,';'
ifdef MULTI_CONFIG
;
; Make sure there's no chance of a false EOF indication
;
clc
endif
delim_ret:
ret
delim endp
;
;----------------------------------------------------------------------------
;
; procedure : newline
;
; newline returns with first character of next line
;
;----------------------------------------------------------------------------
;
newline proc near
call getchr ;skip non-control characters
jc nl_ret
cmp al,lf ;look for line feed
jnz newline
call getchr
nl_ret:
ret
newline endp
;
;----------------------------------------------------------------------------
;
; procedure : mapcase
;
;----------------------------------------------------------------------------
;
mapcase proc near
push cx
push si
push ds
push es
pop ds
ifdef MULTI_CONFIG
mov bl,al ; same cmd code this line
else
xor si,si
endif
convloop:
lodsb
ifdef DBCS
call testkanj
jz normconv ; if this is not lead byte
mov ah,al
lodsb ; get tail byte
cmp ax,DB_SPACE
jnz @f ; if this is not dbcs space
mov word ptr [si-2],' ' ; set 2 single space
@@:
dec cx
jcxz convdone ; just ignore 1/2 kanji error
jmp short noconv
;fall through, know al is not in 'a'-'z' range
normconv:
endif
cmp al,'a'
jb noconv
cmp al,'z'
ja noconv
sub al,20h
mov [si-1],al
noconv:
ifdef MULTI_CONFIG
;
; When MULTI_CONFIG enabled, "mapcase" is used to map everything to
; upper-case a line at a time, after we've been able to figure out whether
; the line is a SET command or not (since we don't want to upper-case
; anything after the "=" in a SET)
;
cmp bl,CONFIG_SET ; preserve case for part of the line?
jne check_eol ; no, just check for end-of-line
cmp al,'=' ; separator between SET var and value?
je convdone ; yes
check_eol:
cmp al,cr
je convdone
cmp al,lf
je convdone
endif
loop convloop
convdone:
pop ds
pop si
pop cx
ret
ifdef DBCS
public testkanj
testkanj:
push si
push ds
push ax
mov ax,6300h ; get dos dbcs vector
int 21h
pop ax
bdbcs_do:
cmp ds:word ptr [si],0 ; end of lead byte info?
jz bdbcs_notfound ; jump if so
cmp al,ds:[si] ; less than first byte character?
jb bdbcs_next ; jump if not
cmp al,ds:[si+1] ; grater than first byte character?
ja bdbcs_next
bdbcs_found:
push ax
xor ax,ax
inc ax ; reset zero flag
pop ax
bdbcs_exit:
pop ds
pop si
ret
bdbcs_notfound:
push ax
xor ax,ax ; set zero flag
pop ax
jmp short bdbcs_exit
bdbcs_next:
add si,2 ; points next lead byte table
jmp short bdbcs_do
endif ; DBCS
mapcase endp
ENDIF ; CONFIGPROC
;
;----------------------------------------------------------------------------
;
; procedure : round
;
; round the values in memlo and memhi to paragraph boundary.
; perform bounds check.
;
;----------------------------------------------------------------------------
;
round proc near
push ax
mov ax,[memlo]
call pararound ; para round up
add [memhi],ax
mov [memlo],0
mov ax,memhi ; ax = new memhi
cmp ax,[alloclim] ; if new memhi >= alloclim, error
jae mem_err
test cs:[setdevmarkflag], for_devmark
jz skip_set_devmarksize
push es
push si
mov si, cs:[devmark_addr]
mov es, si
sub ax, si
dec ax
mov es:[devmark_size], ax ; paragraph
and cs:[setdevmarkflag], not_for_devmark
pop si
pop es
skip_set_devmarksize:
pop ax
clc ;clear carry
ret
mem_err:
mov dx,offset badmem
push cs
pop ds
call print
jmp stall
round endp
IFDEF CONFIGPROC
;
;----------------------------------------------------------------------------
;
; procedure : calldev
;
;----------------------------------------------------------------------------
;
calldev proc near
mov ds,word ptr cs:[DevEntry+2]
add bx,word ptr cs:[DevEntry] ;do a little relocation
mov ax,ds:[bx]
push word ptr cs:[DevEntry]
mov word ptr cs:[DevEntry],ax
mov bx,offset packet
call [DevEntry]
pop word ptr cs:[DevEntry]
ret
calldev endp
;
;----------------------------------------------------------------------------
;
; procedure : todigit
;
;----------------------------------------------------------------------------
;
todigit proc near
sub al,'0'
jb notdig
cmp al,9
ja notdig
clc
ret
notdig:
stc
ret
todigit endp
;
;----------------------------------------------------------------------------
;
; procedure : getnum
;
; getnum parses a decimal number.
; returns it in ax, sets zero flag if ax = 0 (may be considered an
; error), if number is bad carry is set, zero is set, ax=0.
;
;----------------------------------------------------------------------------
;
getnum proc near
push bx
xor bx,bx ; running count is zero
b2:
call todigit ; do we have a digit
jc badnum ; no, bomb
xchg ax,bx ; put total in ax
push bx ; save digit
mov bx,10 ; base of arithmetic
mul bx ; shift by one decimal di...
pop bx ; get back digit
add al,bl ; get total
adc ah,0 ; make that 16 bits
jc badnum ; too big a number
xchg ax,bx ; stash total
call getchr ;get next digit
jc b1 ; no more characters
cmp al, ' ' ; space?
jz b15 ; then end of digits
cmp al, ',' ; ',' is a seperator!!!
jz b15 ; then end of digits.
cmp al, tab ; tab
jz b15
cmp al,sepchr ; allow 0 or special separators
jz b15
cmp al,'/' ; see if another switch follows
nop ; cas - remnant of old bad code
nop
jz b15
cmp al,lf ; line-feed?
jz b15
cmp al,cr ; carriage return?
jz b15
or al,al ; end of line separator?
jnz b2 ; no, try as a valid char...
b15:
inc count ; one more character to s...
dec chrptr ; back up over separator
b1:
mov ax,bx ; get proper count
or ax,ax ; clears carry, sets zero accordingly
pop bx
ret
badnum:
mov sepchr,0
xor ax,ax ; set zero flag, and ax = 0
pop bx
stc ; and carry set
ret
getnum endp
;*****************************************************************
setdoscountryinfo proc near
;input: es:di -> pointer to dos_country_cdpg_info
; ds:0 -> buffer.
; si = 0
; ax = country id
; dx = code page id. (if 0, then use ccsyscodepage as a default.)
; bx = file handle
; this routine can handle maxium 438 country_data entries.
;
;output: dos_country_cdpg_info set.
; carry set if any file read failure or wrong information in the file.
; carry set and cx = -1 if cannot find the matching country_id, codepage
; _id in the file.
push di
push ax
push dx
xor cx,cx
xor dx,dx
mov ax,512 ;read 512 bytes
call readincontrolbuffer ;read the file header
jc setdosdata_fail
push es
push si
push cs
pop es
mov di,offset country_file_signature
mov cx,8 ;length of the signature
repz cmpsb
pop si
pop es
jnz setdosdata_fail ;signature mismatch
add si,18 ;si -> county info type
cmp byte ptr ds:[si],1 ;only accept type 1 (currently only 1 header type)
jne setdosdata_fail ;cannot proceed. error return
inc si ;si -> file offset
mov dx,word ptr ds:[si] ;get the info file offset.
mov cx,word ptr ds:[si+2]
mov ax,6144 ;read 6144 bytes.
call readincontrolbuffer ;read info
jc setdosdata_fail
mov cx, word ptr ds:[si] ;get the # of country, codepage combination entries
cmp cx, 438 ;cannot handle more than 438 entries.
;
ja setdosdata_fail
inc si
inc si ;si -> entry information packet
pop dx ;restore code page id
pop ax ;restore country id
pop di
setdoscntry_find: ;search for desired country_id,codepage_id.
cmp ax, word ptr ds:[si+2] ;compare country_id
jne setdoscntry_next
cmp dx, 0 ;no user specified code page ?
je setdoscntry_any_codepage;then no need to match code page id.
cmp dx, word ptr ds:[si+4] ;compare code page id
je setdoscntry_got_it
setdoscntry_next:
add si, word ptr ds:[si] ;next entry
inc si
inc si ;take a word for size of entry itself
loop setdoscntry_find
mov cx, -1 ;signals that bad country id entered.
setdoscntry_fail:
stc
ret
setdosdata_fail:
pop si
pop cx
pop di
jmp short setdoscntry_fail
setdoscntry_any_codepage: ;use the code_page_id of the country_id found.
mov dx, word ptr ds:[si+4]
setdoscntry_got_it: ;found the matching entry
mov cs:cntrycodepage_id, dx ;save code page id for this country.
mov dx, word ptr ds:[si+10] ;get the file offset of country data
mov cx, word ptr ds:[si+12]
mov ax, 512 ;read 512 bytes
call readincontrolbuffer
jc setdoscntry_fail
mov cx, word ptr ds:[si] ;get the number of entries to handle.
inc si
inc si ;si -> first entry
setdoscntry_data:
push di ;es:di -> dos_country_cdpg_info
push cx ;save # of entry left
push si ;si -> current entry in control buffer
mov al, byte ptr ds:[si+2] ;get data entry id
call getcountrydestination ;get the address of destination in es:di
jc setdoscntry_data_next ;no matching data entry id in dos
mov dx, word ptr ds:[si+4] ;get offset of data
mov cx, word ptr ds:[si+6]
mov ax,4200h
stc
int 21h ;move pointer
jc setdosdata_fail
mov dx,512 ;start of data buffer
mov cx,20 ;read 20 bytes only. we only need to
mov ah,3fh ;look at the length of the data in the file.
stc
int 21h ;read the country.sys data
jc setdosdata_fail ;read failure
cmp ax,cx
jne setdosdata_fail
mov dx,word ptr ds:[si+4] ;get offset of data again.
mov cx,word ptr ds:[si+6]
mov ax,4200h
stc
int 21h ;move pointer back again
jc setdosdata_fail
push si
mov si,(512+8) ;get length of the data from the file
mov cx,word ptr ds:[si]
pop si
mov dx,512 ;start of data buffer
add cx,10 ;signature + a word for the length itself
mov ah,3fh ;read the data from the file.
stc
int 21h
jc setdosdata_fail
cmp ax, cx
jne setdosdata_fail
mov al,byte ptr ds:[si+2] ;save data id for future use.
mov si,(512+8) ;si-> data buffer + id tag field
mov cx,word ptr ds:[si] ;get the length of the file
inc cx ;take care of a word for lenght of tab
inc cx ;itself.
cmp cx,(2048 - 512 - 8) ;fit into the buffer?
ja setdosdata_fail
if bugfix
call setdbcs_before_copy
endif
cmp al, setcountryinfo ;is the data for setcountryinfo table?
jne setdoscntry_mov ;no, don't worry
push word ptr es:[di+ccmono_ptr-cccountryinfolen] ;cannot destroy ccmono_ptr address. save them.
push word ptr es:[di+ccmono_ptr-cccountryinfolen+2] ;at this time di -> cccountryinfolen
push di ;save di
push ax
mov ax,cs:cntrycodepage_id ;do not use the code page info in country_info
mov ds:[si+4], ax ;use the saved one for this !!!!
pop ax
setdoscntry_mov:
rep movsb ;copy the table into dos
cmp al, setcountryinfo ;was the ccmono_ptr saved?
jne setdoscntry_data_next
pop di ;restore di
pop word ptr es:[di+ccmono_ptr-cccountryinfolen+2] ;restore
pop word ptr es:[di+ccmono_ptr-cccountryinfolen]
setdoscntry_data_next:
pop si ;restore control buffer pointer
pop cx ;restore # of entries left
pop di ;restore pointer to dso_country_cdpg
add si, word ptr ds:[si] ;try to get the next entry
inc si
inc si ;take a word of entry length itself
dec cx
cmp cx,0
je setdoscntry_ok
jmp setdoscntry_data
setdoscntry_ok:
ret
setdoscountryinfo endp
if bugfix
setdbcs_before_copy proc near
cmp al,setdbcs ; dbcs vector set?
jnz @f ; jump if not
cmp word ptr es:[di], 0 ; zero byte data block?
jz @f ; jump if so
push di
push ax
push cx
mov cx,es:[di] ; load block length
add di,2 ; points actual data
xor al,al ; fill bytes
rep stosb ; clear data block
pop cx
pop ax
pop di
@@:
ret
setdbcs_before_copy endp
endif
getcountrydestination proc near
;get the destination address in the dos country info table.
;input: al - data id
; es:di -> dos_country_cdpg_info
;on return:
; es:di -> destination address of the matching data id
; carry set if no matching data id found in dos.
push cx
add di,ccnumber_of_entries ;skip the reserved area, syscodepage etc.
mov cx,word ptr es:[di] ;get the number of entries
inc di
inc di ;si -> the first start entry id
getcntrydest:
cmp byte ptr es:[di],al
je getcntrydest_ok
cmp byte ptr es:[di],setcountryinfo ;was it setcountryinfo entry?
je getcntrydest_1
add di,5 ;next data id
jmp short getcntrydest_loop
getcntrydest_1:
add di,new_country_size + 3 ;next data id
getcntrydest_loop:
loop getcntrydest
stc
jmp short getcntrydest_exit
getcntrydest_ok:
cmp al,setcountryinfo ;select country info?
jne getcntrydest_ok1
inc di ;now di -> cccountryinfolen
jmp short getcntrydest_exit
getcntrydest_ok1:
les di,dword ptr es:[di+1] ;get the destination in es:di
getcntrydest_exit:
pop cx
ret
getcountrydestination endp
readincontrolbuffer proc near
;move file pointer to cx:dx
;read ax bytes into the control buffer. (should be less than 2 kb)
;si will be set to 0 hence ds:si points to the control buffer.
;entry: cx,dx offset from the start of the file where the read/write pointer
; be moved.
; ax - # of bytes to read
; bx - file handle
; ds - buffer seg.
;return: the control data information is read into ds:0 - ds:0200.
; cx,dx value destroyed.
; carry set if error in reading file.
push ax ;# of bytes to read
mov ax, 4200h
stc
int 21h ;move pointer
pop cx ;# of bytes to read
jc ricb_exit
xor dx,dx ;ds:dx -> control buffer
xor si,si
mov ah,3fh ;read into the buffer
stc
int 21h ;should be less than 1024 bytes.
ricb_exit:
ret
readincontrolbuffer endp
set_country_path proc near
;in: ds - sysinitseg, es - confbot, si -> start of the asciiz path string
; dosinfo_ext, cntry_drv, cntry_root, cntry_path
; assumes current directory is the root directory.
;out: ds:di -> full path (cntry_drv).
; set the cntry_drv string from the country=,,path command.
; ds, es, si value saved.
push si
push ds ;switch ds, es
push es
pop ds
pop es ;now ds -> confbot, es -> sysinitseg
call chk_drive_letter ;current ds:[si] is a drive letter?
jc scp_default_drv ;no, use current default drive.
mov al, byte ptr ds:[si]
inc si
inc si ;si -> next char after ":"
jmp short scp_setdrv
scp_default_drv:
mov ah, 19h
int 21h
add al, "A" ;convert it to a character.
scp_setdrv:
mov cs:cntry_drv, al ;set the drive letter.
mov di, offset cntry_path
mov al, byte ptr ds:[si]
cmp al, "\"
je scp_root_dir
cmp al,"/" ;let's accept "/" as an directory delim
je scp_root_dir
jmp short scp_path
scp_root_dir:
dec di ;di -> cntry_root
scp_path:
call move_asciiz ;copy it
mov di, offset cntry_drv
scpath_exit:
push ds ;switch ds, es
push es
pop ds
pop es ;ds, es value restored
pop si
ret
set_country_path endp
chk_drive_letter proc near
;check if ds:[si] is a drive letter followed by ":".
;assume that every alpha charater is already converted to upper case.
;carry set if not.
push ax
cmp byte ptr ds:[si], "A"
jb cdletter_no
cmp byte ptr ds:[si], "Z"
ja cdletter_no
cmp byte ptr ds:[si+1], ":"
jne cdletter_no
jmp short cdletter_exit
cdletter_no:
stc
cdletter_exit:
pop ax
ret
chk_drive_letter endp
move_asciiz proc near
;in: ds:si -> source es:di -> target
;out: copy the string until 0.
;assumes there exists a 0.
masciiz_loop:
movsb
cmp byte ptr ds:[si-1],0 ;was it 0?
jne masciiz_loop
ret
move_asciiz endp
ENDIF ; CONFIGPROC
;
; ds:dx points to string to output (asciz)
;
; prints <badld_pre> <string> <badld_post>
badfil:
push cs
pop es
mov si,dx
badload:
mov dx,offset badld_pre ;want to print config error
mov bx, offset crlfm
prnerr:
push cs
pop ds
call print
prn1:
mov dl,es:[si]
or dl,dl
jz prn2
mov ah,std_con_output
int 21h
inc si
jmp prn1
prn2:
mov dx,bx
call print
IFDEF CONFIGPROC
cmp donotshownum,1 ; suppress line number when handling command.com
je prnexit
call error_line
ENDIF ; CONFIGPROC
prnexit:
ret
print:
mov ah,std_con_string_output
int 21h
ret
if noexec
; load non exe file called [ds:dx] at memory location es:bx
ldfil:
push ax
push bx
push cx
push dx
push si
push ds
push bx
xor ax,ax ;open the file
mov ah,open
stc ;in case of int 24
int 21h
pop dx ;clean stack in case jump
jc ldret
push dx
mov bx,ax ;handle in bx
xor cx,cx
xor dx,dx
mov ax,(lseek shl 8) or 2
stc ;in case of int 24
int 21h ; get file size in dx:ax
jc ldclsp
or dx,dx
jnz lderrp ; file >64k
pop dx
push dx
mov cx,es ; cx:dx is xaddr
add dx,ax ; add file size to xaddr
jnc dosize
add cx,1000h ; ripple carry
dosize:
mov ax,dx
call pararound
mov dx,ax
add cx,dx
cmp cx,[alloclim]
jb okld
jmp mem_err
okld:
xor cx,cx
xor dx,dx
mov ax,lseek shl 8 ;reset pointer to beginning of file
stc ;in case of int 24
int 21h
jc ldclsp
pop dx
push es ;read the file in
pop ds ;trans addr is ds:dx
mov cx,0ff00h ; .com files arn't any bigger than
; 64k-100h
mov ah,read
stc ;in case of int 24
int 21h
jc ldcls
mov si,dx ;check for exe file
cmp word ptr [si],"ZM"
clc ; assume ok
jnz ldcls ; only know how to do .com files
stc
jmp short ldcls
lderrp:
stc
ldclsp:
pop dx ;clean stack
ldcls:
pushf
mov ah,close ;close the file
stc
int 21h
popf
ldret: pop ds
pop si
pop dx
pop cx
pop bx
pop ax
ret
endif
;
; open device pointed to by dx, al has access code
; if unable to open do a device open null device instead
;
open_dev:
call open_file
jnc open_dev3
open_dev1:
mov dx,offset nuldev
call open_file
of_ret:
ret
open_dev3:
mov bx,ax ; handle from open to bx
xor ax,ax ; get device info
mov ah,ioctl
int 21h
test dl,10000000b
jnz of_ret
mov ah,close
int 21h
jmp open_dev1
open_file:
mov ah,open
stc
int 21h
ret
; test int24. return back to dos with the fake user response of "fail"
int24:
mov al, 3 ; fail the system call
iret ; return back to dos.
include copyrigh.inc ; copyright statement
nuldev db "NUL",0
condev db "CON",0
auxdev db "AUX",0
prndev db "PRN",0
IFDEF CONFIGPROC
config db "\CONFIG.SYS",0
cntry_drv db "A:"
cntry_root db "\"
cntry_path db "COUNTRY.SYS",0
db 52 dup (0)
country_file_signature db 0ffh,'COUNTRY'
cntrycodepage_id dw ?
ENDIF ; CONFIGPROC
ifdef MULTI_CONFIG
newcmd db 0 ; non-zero if non-std shell specified
tmplate db 64 ; must precede commnd
endif
ifdef ROMEXEC
db 7 ; size of commnd line (excl. null)
commnd db "COMMAND",0
db 56 dup (0)
else
db 12 ; size of commnd line (excl. null)
commnd db "\COMMAND.COM",0
db 51 dup (0)
endif
ifdef MULTI_CONFIG
commnd2 db "\COMMAND.COM",0 ; alternate commands to exec,
db 2,"/P",0 ; followed by their respective alternate
commnd3 db "\MSDOS\COMMAND.COM",0 ; command lines
db 11,"A:\MSDOS /P",0 ;(the drive letter are dynamically replaced)
commnd4 db "\DOS\COMMAND.COM",0 ;
db 9,"A:\DOS /P",0 ;
db 0 ; default switchchar (referenced as command_line-1)
endif
command_line db 2,"/P" ; default command.com args
db 125 dup (0)
IFDEF CONFIGPROC
pathstring db 64 dup (0)
ifdef MULTI_CONFIG
;
; Beware of byte pairs accessed as words (see all "KEEP AFTER" notes below)
;
bMenuColor db 07h ;1Fh ; default fgnd/bgnd color
bMenuPage db 0 ; menu video page (KEEP AFTER bMenuColor)
db 5 ; video page function # (KEEP AFTER bMenuPage)
bLastCol db ? ; ending column on status line
bLastRow db 24 ; row # of status line (KEEP AFTER bLastCol)
bDisableUI db 0 ; 1=disable clean/interactive
; 2=disable default 2-second delay
bCRTPage db ? ; value saved from BIOS data area
wCRTStart dw ? ; value saved from BIOS data area
bQueryOpt db 0 ; 0=off, 1=prompt all, 2=prompt none, 4=skip all
bDefBlock db 1 ; default block #
bMaxBlock db ? ; maxmimum block #
offDefBlock dw 0 ; offset of name of default block (if any)
secTimeOut db -1 ; # of seconds for timeout (-1 == indefinite)
secElapsed db 0 ; # of seconds elapsed so far (KEEP AFTER secTimeOut)
abBlockType db MAX_MULTI_CONFIG+1 dup(?) ; array of block types
aoffBlockName dw MAX_MULTI_CONFIG+1 dup(?) ; array of offsets of block names
aoffBlockDesc dw MAX_MULTI_CONFIG+1 dup(?) ; array of offsets of block descriptions
szBoot db "CONFIG=",0
szMenu db "MENU",0
szCommon db "COMMON",0
endif ;MULTI_CONFIG
comtab label byte
; cmd len command cmd code
; ------- ------- --------
;
ifdef MULTI_CONFIG
db 1, "[", CONFIG_BEGIN
endif
db 5, "BREAK", CONFIG_BREAK
db 7, "BUFFERS", CONFIG_BUFFERS
db 7, "COMMENT", CONFIG_COMMENT
db 7, "COUNTRY", CONFIG_COUNTRY
db 6, "DEVICE", CONFIG_DEVICE
db 10, "DEVICEHIGH", CONFIG_DEVICEHIGH
db 3, "DOS", CONFIG_DOS
db 8, "DRIVPARM", CONFIG_DRIVPARM
db 4, "FCBS", CONFIG_FCBS
db 5, "FILES", CONFIG_FILES
ifdef MULTI_CONFIG
db 7, "INCLUDE", CONFIG_INCLUDE
endif
db 7, "INSTALL", CONFIG_INSTALL
db 11, "INSTALLHIGH", CONFIG_INSTALLHIGH
db 9, "LASTDRIVE", CONFIG_LASTDRIVE
ifdef MULTI_CONFIG
db 7, "SUBMENU", CONFIG_SUBMENU
db 9, "MENUCOLOR", CONFIG_MENUCOLOR
db 11, "MENUDEFAULT", CONFIG_MENUDEFAULT
db 8, "MENUITEM", CONFIG_MENUITEM
endif
db 10, "MULTITRACK", CONFIG_MULTITRACK
ifdef MULTI_CONFIG
db 7, "NUMLOCK", CONFIG_NUMLOCK
endif
db 3, "REM", CONFIG_REM
ifdef MULTI_CONFIG
db 3, "SET", CONFIG_SET
endif
db 5, "SHELL", CONFIG_SHELL
if STACKSW
db 6, "STACKS", CONFIG_STACKS
endif
db 8, "SWITCHES", CONFIG_SWITCHES
db 0
ENDIF ;CONFIGPROC
public deviceparameters
deviceparameters a_deviceparameters <0,dev_3inch720kb,0,80>
IFDEF CONFIGPROC
hlim dw 2
slim dw 9
public drive
drive db ?
public switches
switches dw 0
; the following are the recommended bpbs for the media that we know of so
; far.
; 48 tpi diskettes
bpb48t dw 512
db 2
dw 1
db 2
dw 112
dw 2*9*40
db 0fdh
dw 2
dw 9
dw 2
dd 0
dd 0
; 96tpi diskettes
bpb96t dw 512
db 1
dw 1
db 2
dw 224
dw 2*15*80
db 0f9h
dw 7
dw 15
dw 2
dd 0
dd 0
; 3 1/2 inch diskette bpb
bpb35 dw 512
db 2
dw 1
db 2
dw 70h
dw 2*9*80
db 0f9h
dw 3
dw 9
dw 2
dd 0
dd 0
bpb35h dw 0200h
db 01h
dw 0001h
db 02h
dw 0e0h
dw 0b40h
db 0f0h
dw 0009h
dw 0012h
dw 0002h
dd 0
dd 0
;
; m037 - BEGIN
;
bpb288 dw 0200h
db 02h
dw 0001h
db 02h
dw 240
dw 2*36*80
db 0f0h
dw 0009h
dw 36
dw 0002h
dd 0
dd 0
;
; m037 - END
;
bpbtable dw bpb48t ; 48tpi drives
dw bpb96t ; 96tpi drives
dw bpb35 ; 3.5" drives
; the following are not supported, so default to 3.5" media layout
dw bpb35 ; not used - 8" drives
dw bpb35 ; not used - 8" drives
dw bpb35 ; not used - hard files
dw bpb35 ; not used - tape drives
dw bpb35h ; 3-1/2" 1.44mb drive
dw bpb35 ; ERIMO m037
dw bpb288 ; 2.88 MB diskette drives m037
switchlist db 8,"FHSTDICN" ; preserve the positions of n and c.
; the following depend on the positions of the various letters in switchlist
;switchnum equ 11111000b ; which switches require number
flagec35 equ 00000100b ; electrically compatible 3.5 inch disk drive
flagdrive equ 00001000b
flagcyln equ 00010000b
flagseclim equ 00100000b
flagheads equ 01000000b
flagff equ 10000000b
ENDIF ; CONFIGPROC
sysinitseg ends
end
| 28.038506 | 97 | 0.532715 |
779c5b80d81ea26e4624065ec57c0551a461f333 | 2,196 | asm | Assembly | programs/oeis/011/A011851.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/011/A011851.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/011/A011851.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A011851: a(n) = floor(binomial(n,5)/5).
; 0,0,0,0,0,0,1,4,11,25,50,92,158,257,400,600,873,1237,1713,2325,3100,4069,5266,6729,8500,10626,13156,16146,19656,23751,28501,33982,40275,47467,55651,64926,75398,87179,100388,115151,131601,149879,170133,192519,217201,244351,274150,306787,342460,381376,423752,469812,519792,573937,632502,695752,763963,837421,916423,1001277,1092302,1189829,1294200,1405769,1524902,1651977,1787385,1931529,2084825,2247702,2420602,2603981,2798308,3004066,3221752,3451878,3694968,3951563,4222218,4507503,4808003,5124319,5457067,5806879,6174403,6560303,6965260,7389971,7835150,8301528,8789853,9300891,9835425,10394256,10978203,11588103,12224812,12889204,13582172,14304628,15057504,15841749,16658334,17508249,18392504,19312129,20268175,21261713,22293835,23365654,24478304,25632941,26830742,28072906,29360654,30695229,32077897,33509946,34992687,36527454,38115604,39758518,41457600,43214278,45030004,46906255,48844530,50846355,52913280,55046880,57248755,59520531,61863859,64280416,66771905,69340055,71986622,74713388,77522162,80414780,83393105,86459028,89614467,92861368,96201705,99637480,103170724,106803496,110537884,114376005,118320006,122372061,126534376,130809186,135198756,139705381,144331387,149079130,153950997,158949406,164076806,169335678,174728534,180257918,185926406,191736606,197691159,203792738,210044049,216447831,223006856,229723930,236601892,243643615,250852006,258230007,265780592,273506772,281411592,289498132,297769507,306228868,314879401,323724328,332766907,342010432,351458234,361113680,370980174,381061157,391360107,401880540,412626009,423600105,434806457,446248732,457930636,469855913,482028346,494451757,507130008,520066998,533266668,546732998,560470008,574481758,588772349,603345922,618206659,633358783,648806558,664554290,680606326,696967055,713640908,730632358,747945921,765586155,783557661,801865083,820513108,839506467,858849934,878548327,898606508,919029384,939821904,960989064,982535904,1004467509,1026789009,1049505580,1072622443,1096144865,1120078159,1144427684,1169198846,1194397097,1220027936,1246096909,1272609609,1299571677,1326988801,1354866717,1383211209,1412028109,1441323298,1471102705,1501372308,1532138134
mov $1,$0
bin $1,5
div $1,5
| 313.714286 | 2,124 | 0.871129 |
ebba246b181803cda852b69e24130972dddaaab0 | 581 | asm | Assembly | programs/oeis/140/A140805.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/140/A140805.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/140/A140805.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A140805: Positive triangular sequence of coefficients inspired by the Belyi transform: x'->(m + n)^(n + m)*x^m*(1 - x)^n/(m^m*n^n): t(n,m)=Binomial[n, m]^Binomial[n, m].
; 1,1,1,1,4,1,1,27,27,1,1,256,46656,256,1,1,3125,10000000000,10000000000,3125,1,1,46656,437893890380859375,104857600000000000000000000,437893890380859375,46656,1,1,823543,5842587018385982521381124421
seq $0,206735 ; Triangle T(n,k), read by rows, given by (0, 2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
pow $0,$0
| 96.833333 | 199 | 0.672978 |
10fbb4ac6ad99ba181a986297ebbf792a3dcc8b1 | 814 | nasm | Assembly | ControlFlow/ControlFlow.nasm | TheRavehorn/Assembly_x86-SLAE | 3a9f72e5eb82d2d13a131a953329b8b9cc986678 | [
"MIT"
] | null | null | null | ControlFlow/ControlFlow.nasm | TheRavehorn/Assembly_x86-SLAE | 3a9f72e5eb82d2d13a131a953329b8b9cc986678 | [
"MIT"
] | null | null | null | ControlFlow/ControlFlow.nasm | TheRavehorn/Assembly_x86-SLAE | 3a9f72e5eb82d2d13a131a953329b8b9cc986678 | [
"MIT"
] | null | null | null | ; ControlFlow.nasm
; Author: Ravehorn
global _start
section .text
_start:
; compares two predefined variables
mov eax, 0x0
mov al, [var1]
mov ah, [var2]
cmp al, ah
je TrueFunc
jne FalseFunc
TrueFunc:
; prints success
mov eax, 0x4
mov ebx, 0x1
lea ecx, [success]
lea edx, [successlen]
int 0x80
jmp ExitFunc
FalseFunc:
; prints failure
mov eax, 0x4
mov ebx, 0x1
lea ecx, [failure]
lea edx, [failurelen]
int 0x80
jmp ExitFunc
ExitFunc:
; exits the program
mov eax, 0x1
mov ebx, 0x0
int 0x80
section .data
var1: db 0x8
var1len: equ $-var1
var2: db 0x8
var2len: equ $-var2
success: db "Success!"
successlen: equ $-success
failure: db "Failure!"
failurelen: equ $-failure | 13.79661 | 39 | 0.60688 |
2a8665394d8550f3a78b37a985247198b1025ce1 | 8,407 | asm | Assembly | Transynther/x86/_processed/NC/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_478.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_478.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_478.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x1ef2b, %r9
clflush (%r9)
lfence
mov $0x6162636465666768, %rdi
movq %rdi, (%r9)
nop
nop
nop
nop
xor $1669, %rax
lea addresses_normal_ht+0x17bdb, %r12
nop
nop
dec %rax
mov (%r12), %r8
nop
nop
nop
sub $63904, %r9
lea addresses_normal_ht+0x1492b, %r9
nop
nop
nop
nop
nop
add $64195, %r14
movb $0x61, (%r9)
nop
nop
nop
nop
sub $15743, %r9
lea addresses_WT_ht+0x1aa0b, %r11
cmp $54607, %r9
mov (%r11), %ax
nop
nop
nop
nop
nop
and $17854, %r11
lea addresses_normal_ht+0x15dab, %rax
nop
nop
nop
nop
sub $41560, %r8
mov (%rax), %r14
nop
nop
nop
add %rax, %rax
lea addresses_UC_ht+0x1cf2b, %r8
nop
nop
nop
nop
dec %r11
mov $0x6162636465666768, %r12
movq %r12, %xmm3
vmovups %ymm3, (%r8)
sub $42002, %r9
lea addresses_WC_ht+0xb67d, %rsi
lea addresses_A_ht+0x14173, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
and %r14, %r14
mov $82, %rcx
rep movsq
and %rcx, %rcx
lea addresses_WC_ht+0x1b123, %rsi
lea addresses_normal_ht+0x1a9, %rdi
nop
cmp %r11, %r11
mov $96, %rcx
rep movsb
nop
xor %rdi, %rdi
lea addresses_UC_ht+0xd01b, %rsi
lea addresses_normal_ht+0x1352b, %rdi
nop
nop
nop
nop
nop
add $41325, %r9
mov $77, %rcx
rep movsb
nop
nop
nop
nop
nop
dec %rsi
lea addresses_normal_ht+0x15f2b, %rsi
lea addresses_WT_ht+0x15d2b, %rdi
nop
nop
cmp %r8, %r8
mov $3, %rcx
rep movsl
nop
and $7614, %r14
lea addresses_WT_ht+0x1607c, %rsi
lea addresses_D_ht+0x772b, %rdi
nop
dec %r8
mov $107, %rcx
rep movsl
nop
and %r14, %r14
lea addresses_normal_ht+0x1bdab, %rcx
inc %r11
mov (%rcx), %esi
nop
nop
nop
nop
dec %r9
lea addresses_UC_ht+0x7d35, %rax
nop
nop
nop
xor $9755, %r11
mov (%rax), %edi
nop
nop
nop
nop
nop
add $22401, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r8
push %r9
push %rax
push %rbx
push %rdx
// Store
lea addresses_WT+0xa0c4, %rdx
nop
nop
nop
xor %r12, %r12
mov $0x5152535455565758, %rbx
movq %rbx, (%rdx)
nop
nop
nop
nop
and $43971, %r8
// Load
lea addresses_US+0x162b, %r9
nop
nop
nop
nop
nop
add %rax, %rax
mov (%r9), %r8d
add $11608, %r10
// Store
lea addresses_PSE+0xc2cb, %r10
nop
nop
nop
nop
sub $56863, %rdx
mov $0x5152535455565758, %r12
movq %r12, %xmm6
movntdq %xmm6, (%r10)
nop
add $13593, %r12
// Store
lea addresses_UC+0x1e393, %rbx
nop
and %rax, %rax
mov $0x5152535455565758, %r10
movq %r10, %xmm0
vmovaps %ymm0, (%rbx)
nop
sub %r8, %r8
// Faulty Load
mov $0x66578c0000000f2b, %r8
nop
nop
and $11262, %rdx
vmovups (%r8), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rbx
lea oracles, %r8
and $0xff, %rbx
shlq $12, %rbx
mov (%r8,%rbx,1), %rbx
pop %rdx
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 8}}
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_US', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 5, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC', 'AVXalign': True, 'size': 32}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}}
{'src': {'NT': True, 'same': True, 'congruent': 2, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1}}
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}}
{'src': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}}
{'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}}
{'src': {'same': True, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'48': 16725, '72': 1, '00': 5103}
00 48 00 48 48 48 48 48 00 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 00 48 48 00 48 48 48 00 00 48 48 00 48 48 00 00 48 00 00 48 48 48 00 48 00 48 48 48 48 48 00 48 48 48 48 48 00 00 48 48 00 48 48 48 48 48 48 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 48 48 00 48 48 48 48 00 48 48 00 48 48 48 48 48 48 48 00 00 48 48 00 48 00 00 48 00 48 48 00 00 48 48 00 48 48 48 48 00 00 48 48 48 00 00 48 00 48 48 48 48 48 48 48 00 00 48 48 48 48 48 00 48 48 00 48 00 00 48 00 48 48 48 48 48 00 48 48 48 48 48 48 48 00 00 48 48 48 00 48 48 48 48 00 48 48 00 48 48 48 48 48 00 48 48 48 48 48 00 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 00 48 00 48 00 48 48 00 00 48 00 00 48 00 00 48 48 48 48 48 48 48 00 48 00 48 00 48 48 48 48 00 48 48 48 48 00 00 48 00 00 48 48 48 48 00 48 00 00 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 00 48 48 48 48 48 48 00 00 48 00 00 48 00 48 00 00 48 48 48 00 00 48 00 48 48 00 48 00 48 48 00 48 48 48 00 48 48 48 00 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 48 00 00 48 48 00 48 48 48 00 48 00 48 48 48 48 00 48 48 48 48 48 48 00 48 48 48 48 48 48 48 00 00 48 48 48 48 48 00 48 00 00 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 00 48 00 00 48 00 48 48 48 48 00 00 48 48 48 48 48 00 00 48 00 00 48 00 00 48 48 48 48 48 00 00 48 00 00 48 00 48 48 48 48 00 48 00 00 48 48 48 48 48 00 48 48 00 48 48 00 48 48 00 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 00 00 48 00 00 48 48 00 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 00 48 48 00 48 48 00 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 00 48 48 00 48 48 48 48 00 00 48 48 48 00 00 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 00 48 48 48 00 00 48 48 00 48 48 48 48 00 48 48 48 00 48 48 48 48 48 00 48 48 00 00 48 48 00 48 48 00 48 00 48 48 00 48 00 48 48 00 48 48 48 48 48 00 48 48 48 48 48 48 48 00 00 48 00 00 48 48 48 00 48 00 48 48 00 48 48 48 48 48 00 48 48 48 00 48 48 00 48 48 48 48 48 00 48 48 48 48 48 48 00 00 48 48 48 48 00 48 48 48 48 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 00 48 00 48 00 48 48 48 48 48 00 48 00 48 48 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 00 48 48 48 48 48 48 48 48 00 48 48 00 00 48 00 48 48 48 48 00 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 00 48 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 00 48 48 48 48 00 00 48 48 00 48 48 48 00 48 00 00 48 00 48 48 00 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 00 48 00 00 48 00 00 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 00 48 00 00 48 00 00 48 48 48 48 48 48 00 48 00 00 48 00 00 48 48 00 48 00 48 00
*/
| 31.844697 | 2,999 | 0.656596 |
500461665eeb1bc950cfe315251d02e72fd83428 | 1,286 | asm | Assembly | programs/oeis/209/A209726.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/209/A209726.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/209/A209726.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A209726: 1/4 the number of (n+1) X 8 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences.
; 16,17,18,20,22,26,30,38,46,62,78,110,142,206,270,398,526,782,1038,1550,2062,3086,4110,6158,8206,12302,16398,24590,32782,49166,65550,98318,131086,196622,262158,393230,524302,786446,1048590,1572878,2097166,3145742,4194318,6291470,8388622,12582926,16777230,25165838,33554446,50331662,67108878,100663310,134217742,201326606,268435470,402653198,536870926,805306382,1073741838,1610612750,2147483662,3221225486,4294967310,6442450958,8589934606,12884901902,17179869198,25769803790,34359738382,51539607566,68719476750,103079215118,137438953486,206158430222,274877906958,412316860430,549755813902,824633720846,1099511627790,1649267441678,2199023255566,3298534883342,4398046511118,6597069766670,8796093022222,13194139533326,17592186044430,26388279066638,35184372088846,52776558133262,70368744177678,105553116266510,140737488355342,211106232533006,281474976710670,422212465065998,562949953421326,844424930131982,1125899906842638,1688849860263950,2251799813685262,3377699720527886,4503599627370510,6755399441055758,9007199254741006
mov $2,$0
mod $0,2
mul $2,2
add $2,4
mov $3,$0
mov $0,$2
add $0,15
lpb $0
sub $0,4
mov $1,$3
mul $3,2
add $3,2
lpe
div $1,16
add $1,15
| 67.684211 | 1,020 | 0.839036 |
f65035c27a1fdb52e0cce911d7a3328bf23434d5 | 3,915 | asm | Assembly | data/phone/text/chad_caller.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | data/phone/text/chad_caller.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | data/phone/text/chad_caller.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | ChadObservingWildText:
text "I recently began"
line "observing wild"
cont "@"
text_ram wStringBuffer4
text "."
para "I've been learning"
line "all sorts of new"
para "things through my"
line "observations."
para "I wish I could"
line "become a #MON"
para "researcher like"
line "PROF.OAK soon."
done
UnknownText_0x65318:
text "Oh yes, I managed"
line "to knock out a"
para "wild @"
text_ram wStringBuffer4
text " a"
line "while back."
para "Well, considering"
line "all the studying I"
para "do every day, it"
line "was inevitable."
done
UnknownText_0x65399:
text "Oh yes, I came"
line "close to catching"
para "a wild @"
text_ram wStringBuffer4
text ","
line "but it got away."
para "For the longest"
line "time, I've been"
para "wanting to observe"
line "@"
text_ram wStringBuffer4
text ". Rats…"
done
UnknownText_0x65419:
text "Want to battle?"
line "I have to battle"
para "every so often to"
line "avoid rusting out."
para "I'll be on"
line "@"
text_ram wStringBuffer5
text "!"
done
UnknownText_0x65471:
text "See you later!"
done
ChadBlueGossipText:
text "Do you know BLUE?"
para "He's PROF.OAK's"
line "grandson and a"
para "former #MON"
line "LEAGUE CHAMPION!"
para "He's one super"
line "#MON trainer!"
done
ChadDaisyGossipText:
text "PROF.OAK has a"
line "granddaughter"
cont "named DAISY."
para "When she's around,"
line "even the most"
para "ferocious #MON"
line "calm right down."
done
ChadProfElmGossipText:
text "Everyone's talking"
line "about PROF.ELM."
para "He used to be an"
line "assistant to the"
cont "great PROF.OAK!"
para "That is so cool!"
line "I envy him!"
done
ChadDreamGossipText:
text "PROF.OAK's dream"
line "is to compile a"
para "comprehensive"
line "#DEX."
para "I envy you for"
line "taking part in"
cont "that project…"
done
ChadKurtGossipText:
text "Do you know KURT,"
line "the BALL creator?"
para "He and PROF.OAK go"
line "back a long way."
para "I guess great"
line "people attract one"
cont "another!"
done
ChadLeagueGossipText:
text "#MON LEAGUE is"
line "the great gather-"
cont "ing place for all"
para "trainers who wish"
line "to become CHAMP."
para "PROF.OAK acts as"
line "an advisor to the"
para "#MON LEAGUE's"
line "headquarters."
para "He really is a"
line "great man."
done
ChadRadioShowGossipText:
text "PROF.OAK'S #MON"
line "TALK is a popular"
cont "radio show, right?"
para "Did you know that"
line "he was going to"
para "turn down the show"
line "at first?"
para "But MARY's energy"
line "and persistence"
cont "wore him down."
para "So we have MARY to"
line "thank for it!"
done
ChadBattlingGossipText:
text "PROF.OAK used to"
line "be a trainer a"
cont "long time ago."
para "But rather than"
line "battling, he found"
para "#MON themselves"
line "to be interesting."
para "So he abandoned"
line "his training to"
para "focus on becoming"
line "a researcher."
done
ChadDaisyTeaGossipText:
text "PROF.OAK has a"
line "granddaughter"
cont "named DAISY."
para "She has tea every"
line "day for an hour"
para "from three in the"
line "afternoon."
para "I wish I could"
line "join her for tea"
para "and chat about"
line "PROF.OAK."
done
ChadTravelGossipText:
text "Did you know?"
line "PROF.OAK traveled"
para "all over the world"
line "when he was young."
para "While traveling,"
line "he must've learned"
para "about #MON"
line "naturally."
para "I envy him…"
line "I'd like to travel"
para "and learn about"
line "things too…"
done
UnknownText_0x65a23:
text "I'm going to study"
line "hard so PROF.OAK"
para "will make me his"
line "assistant!"
done
UnknownText_0x65a63:
text "Do you remember"
line "about our battle?"
para "The place is"
line "@"
text_ram wStringBuffer5
text "."
para "Hurry over--I'm"
line "waiting."
done
| 15.914634 | 26 | 0.689144 |
f3cbcbc6382b8c1fd488849ab4bcf7c899c2be12 | 511 | asm | Assembly | programs/oeis/295/A295314.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/295/A295314.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/295/A295314.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A295314: a(n) = sigma(n) / gcd(sigma(n), phi(sigma(n))).
; 1,3,2,7,3,3,2,15,13,3,3,7,7,3,3,31,3,13,5,7,2,3,3,15,31,7,5,7,15,3,2,7,3,3,3,91,19,15,7,15,7,3,11,7,13,3,3,31,19,31,3,7,3,15,3,15,5,15,15,7,31,3,13,127,7,3,17,7,3,3,3,65,37,19,31,35,3,7,5,31,11,7,7,7,3,33,15,15,15,13,7,7,2,3,15,7,7,19,13,217
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
sub $0,1
seq $0,109395 ; Denominator of phi(n)/n = Product_{p|n} (1 - 1/p); phi(n)=A000010(n), the Euler totient function.
| 73 | 243 | 0.608611 |
3603ab367f75c8f0aa865cab1ddb44c417ac0284 | 1,396 | asm | Assembly | programs/oeis/188/A188383.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/188/A188383.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/188/A188383.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A188383: Positions of 1 in the zero-one sequence [nr+3r]-[nr]-[3r], where r=1/sqrt(2).
; 7,14,24,31,41,48,55,65,72,82,89,96,106,113,123,130,140,147,154,164,171,181,188,195,205,212,222,229,239,246,253,263,270,280,287,294,304,311,321,328,335,345,352,362,369,379,386,393,403,410,420,427,434,444,451,461,468,478,485,492,502,509,519,526,533,543,550,560,567,574,584,591,601,608,618,625,632,642,649,659,666,673,683,690,700,707,717,724,731,741,748,758,765,772,782,789,799,806,816,823,830,840,847,857,864,871,881,888,898,905,912,922,929,939,946,956,963,970,980,987,997,1004,1011,1021,1028,1038,1045,1055,1062,1069,1079,1086,1096,1103,1110,1120,1127,1137,1144,1151,1161,1168,1178,1185,1195,1202,1209,1219,1226,1236,1243,1250,1260,1267,1277,1284,1294,1301,1308,1318,1325,1335,1342,1349,1359,1366,1376,1383,1393,1400,1407,1417,1424,1434,1441,1448,1458,1465,1475,1482,1489,1499,1506,1516,1523,1533,1540,1547,1557,1564,1574,1581,1588,1598,1605,1615,1622,1632,1639,1646,1656,1663,1673,1680,1687,1697,1704,1714,1721,1728,1738,1745,1755,1762,1772,1779,1786,1796,1803,1813,1820,1827,1837,1844,1854,1861,1871,1878,1885,1895,1902,1912,1919,1926,1936,1943,1953,1960,1967,1977,1984,1994,2001,2011,2018,2025,2035,2042,2052,2059
mov $4,$0
mov $5,$0
add $0,1
pow $0,2
mul $0,2
lpb $0,1
add $3,2
sub $0,$3
trn $0,1
lpe
mov $1,$3
add $1,1
mov $2,$4
mul $2,2
add $1,$2
sub $1,3
div $1,2
mul $1,3
add $1,7
add $1,$5
| 58.166667 | 1,117 | 0.732808 |
044ad79913f398698291b497749aaddef10eb229 | 10,199 | asm | Assembly | Library/Text/UI/uiTextRuler.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Text/UI/uiTextRuler.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Text/UI/uiTextRuler.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: Text Library
FILE: uiTextRulerControl.asm
ROUTINES:
Name Description
---- -----------
GLB TextRulerControlClass Style menu object
REVISION HISTORY:
Name Date Description
---- ---- -----------
Doug 7/91 Initial version
DESCRIPTION:
This file contains routines to implement TextRulerControlClass
$Id: uiTextRuler.asm,v 1.1 97/04/07 11:17:16 newdeal Exp $
-------------------------------------------------------------------------------@
;---------------------------------------------------
TextClassStructures segment resource
TextRulerControlClass ;declare the class record
TextClassStructures ends
;---------------------------------------------------
if not NO_CONTROLLERS
TextControlCommon segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: TextRulerControlGetInfo --
MSG_GEN_CONTROL_GET_INFO for TextRulerControlClass
DESCRIPTION: Return group
PASS:
*ds:si - instance data
es - segment of TextRulerControlClass
ax - The message
cx:dx - GenControlBuildInfo structure to fill in
RETURN:
none
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 10/31/91 Initial version
------------------------------------------------------------------------------@
TextRulerControlGetInfo method dynamic TextRulerControlClass,
MSG_GEN_CONTROL_GET_INFO
mov si, offset TRCC_dupInfo
GOTO CopyDupInfoCommon
TextRulerControlGetInfo endm
TRCC_dupInfo GenControlBuildInfo <
mask GCBF_IS_ON_ACTIVE_LIST, ; GCBI_flags
TRCC_IniFileKey, ; GCBI_initFileKey
0, ; GCBI_gcnList
0, ; GCBI_gcnCount
0, ; GCBI_notificationList
0, ; GCBI_notificationCount
TRCCName, ; GCBI_controllerName
handle TextRulerControlUI, ; GCBI_dupBlock
TRCC_childList, ; GCBI_childList
length TRCC_childList, ; GCBI_childCount
TRCC_featuresList, ; GCBI_featuresList
length TRCC_featuresList, ; GCBI_featuresCount
TRCC_DEFAULT_FEATURES, ; GCBI_features
0, ; GCBI_toolBlock
0, ; GCBI_toolList
0, ; GCBI_toolCount
0, ; GCBI_toolFeaturesList
0, ; GCBI_toolFeaturesCount
TRCC_DEFAULT_TOOLBOX_FEATURES> ; GCBI_toolFeatures
if FULL_EXECUTE_IN_PLACE
ControlInfoXIP segment resource
endif
TRCC_IniFileKey char "textRulerOptions", 0
;---
TRCC_childList GenControlChildInfo \
<offset TextRulerAttrList, mask TRCCF_ROUND or \
mask TRCCF_IGNORE_ORIGIN, 0>
; Careful, this table is in the *opposite* order as the record which
; it corresponds to.
TRCC_featuresList GenControlFeaturesInfo \
<offset IgnoreOriginEntry, IgnoreName, 0>,
<offset RoundEntry, RoundName, 0>
if FULL_EXECUTE_IN_PLACE
ControlInfoXIP ends
endif
TextControlCommon ends
;---
TextControlCode segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: TextRulerControlSetState -- MSG_TRCC_CHANGE_STATE
for TextRulerControlClass
DESCRIPTION: Handle change in the ruler state
PASS:
*ds:si - instance data
es - segment of TextRulerControlClass
ax - The message
cx - selected booleans
bp - changed booleans
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 10/31/91 Initial version
------------------------------------------------------------------------------@
TextRulerControlSetState method dynamic TextRulerControlClass,
MSG_TRCC_CHANGE_STATE
mov ds:[di].TRCI_attrs, cx
call UpdateAllRulers
mov ax, MSG_GEN_APPLICATION_OPTIONS_CHANGED
call UserCallApplication
ret
TextRulerControlSetState endm
COMMENT @----------------------------------------------------------------------
MESSAGE: TextRulerControlGenerateUI -- MSG_GEN_CONTROL_GENERATE_UI
for TextRulerControlClass
DESCRIPTION: Generate the UI for the text ruler control
PASS:
*ds:si - instance data
es - segment of TextRulerControlClass
ax - The message
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 5/21/92 Initial version
------------------------------------------------------------------------------@
TextRulerControlGenerateUI method dynamic TextRulerControlClass,
MSG_GEN_CONTROL_GENERATE_UI
push ds:[di].TRCI_attrs
mov di, offset TextRulerControlClass
call ObjCallSuperNoLock
pop cx
call GetFeaturesAndChildBlock
test ax, mask TRCCF_ROUND or mask TRCCF_IGNORE_ORIGIN
jz done
mov si, offset TextRulerAttrList
clr dx
call SendListSetViaData
done:
ret
TextRulerControlGenerateUI endm
TextControlCode ends
;---
TextControlInit segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: TextRulerControlLoadOptions -- MSG_META_LOAD_OPTIONS for
TextRulerControlClass
DESCRIPTION: Load options from .ini file
PASS:
*ds:si - instance data
es - segment of TextRulerControlClass
ax - The message
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 3/ 3/92 Initial version
------------------------------------------------------------------------------@
TextRulerControlLoadOptions method dynamic TextRulerControlClass,
MSG_META_LOAD_OPTIONS
sub sp, INI_CATEGORY_BUFFER_SIZE
mov bp, sp
push ax
push ds:[LMBH_handle], es, si
call PrepForOptions
call InitFileReadInteger
pop bx, es, si
call MemDerefDS
jc noData
mov di, ds:[si]
add di, ds:[di].Gen_offset
mov ds:[di].TRCI_attrs, ax
noData:
pop ax
add sp, INI_CATEGORY_BUFFER_SIZE
mov di, offset TextRulerControlClass
GOTO ObjCallSuperNoLock
TextRulerControlLoadOptions endm
COMMENT @----------------------------------------------------------------------
MESSAGE: TextRulerControlSaveOptions -- MSG_META_SAVE_OPTIONS for
TextRulerControlClass
DESCRIPTION: Save options from .ini file
PASS:
*ds:si - instance data
es - segment of TextRulerControlClass
ax - The message
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 3/ 3/92 Initial version
------------------------------------------------------------------------------@
TextRulerControlSaveOptions method dynamic TextRulerControlClass,
MSG_META_SAVE_OPTIONS
sub sp, INI_CATEGORY_BUFFER_SIZE
mov bp, sp
push ax, ds:[LMBH_handle], es, si
push ds:[di].TRCI_attrs
call PrepForOptions
pop bp
call InitFileWriteInteger
pop ax, bx, es, si
call MemDerefDS
add sp, INI_CATEGORY_BUFFER_SIZE
mov di, offset TextRulerControlClass
GOTO ObjCallSuperNoLock
TextRulerControlSaveOptions endm
COMMENT @----------------------------------------------------------------------
FUNCTION: PrepForOptions
DESCRIPTION: Prepare for load/save options
CALLED BY: INTERNAL
PASS: *ds:si - object
ss:bp - buffer for category
RETURN:
category - loaded
ds:si - pointing at category
cx:dx - pointing at key
DESTROYED:
ax, bx, di
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 12/30/92 Initial version
------------------------------------------------------------------------------@
PrepForOptions proc near
mov cx, ss
mov dx, bp
call UserGetInitFileCategory
mov ds, cx
mov si, dx
mov cx, cs
mov dx, offset textRulerControlKey ;cx:dx = key
ret
PrepForOptions endp
textRulerControlKey char "textRulerAttrs", 0
COMMENT @----------------------------------------------------------------------
MESSAGE: TextRulerControlAttach -- MSG_META_ATTACH
for TextRulerControlClass
DESCRIPTION: ...
PASS:
*ds:si - instance data
es - segment of TextRulerControlClass
ax - The message
cx, dx, bp - attach data
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 5/22/92 Initial version
------------------------------------------------------------------------------@
TextRulerControlAttach method dynamic TextRulerControlClass, MSG_META_ATTACH
mov di, offset TextRulerControlClass
call ObjCallSuperNoLock
FALL_THRU UpdateAllRulers
TextRulerControlAttach endm
;---
UpdateAllRulers proc far
class TextRulerControlClass
mov di, ds:[si]
add di, ds:[di].Gen_offset
mov cx, ds:[di].TRCI_attrs
push si
mov bx, segment TextRulerClass
mov si, offset TextRulerClass
mov ax, MSG_TEXT_RULER_SET_CONTROLLED_ATTRS
mov di, mask MF_RECORD
call ObjMessage
pop si
sub sp, size GCNListMessageParams
mov bp, sp
mov ss:[bp].GCNLMP_ID.GCNLT_manuf, MANUFACTURER_ID_GEOWORKS
mov ss:[bp].GCNLMP_ID.GCNLT_type, GAGCNLT_TEXT_RULER_OBJECTS
mov ss:[bp].GCNLMP_block, 0
mov ss:[bp].GCNLMP_event, di
mov ss:[bp].GCNLMP_flags, mask GCNLSF_SET_STATUS
clr bx
call GeodeGetAppObject
mov dx, size GCNListMessageParams
mov ax, MSG_META_GCN_LIST_SEND
mov di, mask MF_STACK
call ObjMessage
add sp, size GCNListMessageParams
ret
UpdateAllRulers endp
TextControlInit ends
endif ; not NO_CONTROLLERS
| 21.8394 | 81 | 0.630356 |
1134c38cb3a11de846e301da4e2d3181af567fd3 | 6,554 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_266.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_266.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_266.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x12698, %rdx
nop
nop
nop
nop
sub %r15, %r15
mov $0x6162636465666768, %r8
movq %r8, %xmm0
movups %xmm0, (%rdx)
and %r9, %r9
lea addresses_WT_ht+0xdfb8, %rcx
nop
sub $23214, %rax
mov $0x6162636465666768, %r14
movq %r14, %xmm5
and $0xffffffffffffffc0, %rcx
movntdq %xmm5, (%rcx)
nop
nop
nop
nop
nop
xor $52531, %r15
lea addresses_WT_ht+0x15b8, %rdx
nop
nop
nop
cmp %rax, %rax
movups (%rdx), %xmm5
vpextrq $1, %xmm5, %r9
nop
nop
nop
nop
nop
add %r15, %r15
lea addresses_WC_ht+0x1b1e8, %r8
nop
sub $2392, %r9
vmovups (%r8), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %r14
xor %r9, %r9
lea addresses_A_ht+0x148b8, %r14
nop
nop
xor %rcx, %rcx
movb (%r14), %al
nop
nop
nop
add %r9, %r9
lea addresses_UC_ht+0xada0, %rdx
clflush (%rdx)
nop
nop
nop
nop
nop
cmp $5680, %r9
movb $0x61, (%rdx)
nop
nop
nop
and $10267, %rdx
lea addresses_normal_ht+0xdbb8, %r14
nop
nop
nop
nop
nop
xor $39423, %r9
movups (%r14), %xmm4
vpextrq $1, %xmm4, %rcx
nop
nop
nop
nop
nop
sub $23360, %rcx
lea addresses_D_ht+0x2df8, %rsi
lea addresses_D_ht+0x11bb8, %rdi
nop
nop
nop
nop
and $46811, %r9
mov $103, %rcx
rep movsb
nop
xor $38251, %r8
lea addresses_UC_ht+0x1d3f8, %r8
nop
nop
nop
cmp $64331, %rcx
movw $0x6162, (%r8)
nop
nop
nop
and $4493, %r8
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %rax
push %rcx
push %rsi
// Store
lea addresses_PSE+0x1a338, %rsi
clflush (%rsi)
nop
nop
add %r12, %r12
mov $0x5152535455565758, %r14
movq %r14, %xmm6
movups %xmm6, (%rsi)
nop
nop
nop
and $4771, %rcx
// Faulty Load
lea addresses_PSE+0x1c7b8, %r12
and %r10, %r10
mov (%r12), %eax
lea oracles, %r10
and $0xff, %rax
shlq $12, %rax
mov (%r10,%rax,1), %rax
pop %rsi
pop %rcx
pop %rax
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'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
*/
| 35.814208 | 2,999 | 0.656851 |
701981273df8936685682414f84403a18142bfde | 286 | asm | Assembly | programs/oeis/109/A109768.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/109/A109768.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/109/A109768.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A109768: a(n) = gcd(3^n-2,2^n-3).
; 1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1,1,1,5,1
gcd $0,4
gcd $1,$0
add $1,3
gcd $1,5
mov $0,$1
| 31.777778 | 201 | 0.5 |
cb6e75b258b7bc9a59b1844e0add73627ec89daa | 491 | asm | Assembly | libsrc/graphics/gray/cpc/grpage.asm | andydansby/z88dk-mk2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | 1 | 2020-09-15T08:35:49.000Z | 2020-09-15T08:35:49.000Z | libsrc/graphics/gray/cpc/grpage.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | libsrc/graphics/gray/cpc/grpage.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | ;
; Amstrad CPC pseudo-Gray Library Functions
;
; Written by Stefano Bodrato - June 2004
;
; $Id: grpage.asm,v 1.1 2004/06/30 12:50:57 stefano Exp $
;
;
; A trick to be used with the dafault graph functions
;
; IN: A=Page Number (0/1)
; all registers are saved
XLIB graypage
XREF base_graphics
XREF grayaltpage
.graypage
and a
jr nz,flippage
ld a,0 ; NOP
ld (grayaltpage),a
ret
.flippage
ld a,$17 ; RLA
ld (grayaltpage),a
ret
| 15.83871 | 57 | 0.625255 |
6e7d9a5623dea7d635a88d37e9415cfeb000ba4e | 5,375 | asm | Assembly | decompressors/ZX7 decompressor.asm | maxim-zhao/bmp2tilecompressors | 1d0e475820731359165deb198aa834f8b177048a | [
"MIT"
] | 12 | 2016-04-20T06:08:11.000Z | 2021-10-12T10:43:39.000Z | decompressors/ZX7 decompressor.asm | maxim-zhao/bmp2tilecompressors | 1d0e475820731359165deb198aa834f8b177048a | [
"MIT"
] | 3 | 2016-09-21T14:39:11.000Z | 2021-04-12T16:54:40.000Z | decompressors/ZX7 decompressor.asm | maxim-zhao/bmp2tilecompressors | 1d0e475820731359165deb198aa834f8b177048a | [
"MIT"
] | null | null | null | ; ===============================================================
; Dec 2012 by Einar Saukas, Antonio Villena & Metalbrain
; "Standard" version (70 bytes)
; modified for sms vram by aralbrec
; modified for asm by Maxim :)
; ===============================================================
;
; Usage:
; ld hl, <source>
; ld de, <destination>
; call zx7_decompress
;
; Note:
; - Define ZX7ToVRAM before including to output to VRAM.
; Destination address must then be ORed with $4000.
; - Define ZX7ToVRAMScreenOn in addition to make it
; interrupt-safe (di and ei around VRAM access),
; not assume the VRAM state is stable,
; and access VRAM slower so it can run while the screen is on.
; - If you do not specify interrupt safety then you must
; make sure any interrupts do not alter the VDP VRAM state
; (i.e. do not read or write anything) and that the screen
; is off (or in VBlank if your data is really small).
; - Define ZX7NoUndocumented to avoid use of undocumented opcodes.
; This is for compatibility with some clone Z80s.
;
; This version only supports match lengths up to 255. This enables
; it to be smaller and faster, but it is not 100% compatible with
; the standard ZX7 compressor. However, in most cases it is because
; match lengths greater than that are very unlikely for most data.
;
; Uses af, bc, de, hl
; ===============================================================
zx7_decompress:
.ifdef ZX7ToVRAM
.ifndef ZX7ToVRAMScreenOn
; Set VRAM address
ld c,$bf
out (c),e
out (c),d
dec c ; data port
; interruptable version sets the address later
.endif
.endif
ld a, 1<<7 ; Signal bit for flags byte
; This is a trick whereby we can cycle a flags byte in a through the carry flag,
; and a will never be zero until it is time to read a new flags byte because we
; shift a bit to the right of the data to keep it non-zero until they are all
; consumed.
; Each time we want a bit, we do:
; add a, a ; get MSB into carry
; jr z, _nextFlagsByte ; get new flags byte if necessary (and shift it into carry)
; <use the bit in carry>
-:; First byte is always literal
.ifdef ZX7ToVRAM
.ifdef ZX7ToVRAMScreenOn
di
; Set VRAM address
ld c,$bf
out (c),e
out (c),d
dec c ; data port
.endif
outi ; increments hl
inc de
.else
ldi
.endif
--: ; Main loop
.ifdef ZX7ToVRAMScreenOn
ei
.endif
add a, a
call z, _nextFlagsByte
jr nc, - ; next bit indicates either literal or sequence
; 0 bit = literal byte
; 1 bit = sequence:
; - length is encoded using a variable number of flags bits, encoding
; the number of bits and the value
; length 2 is encoded as %1
; ^--- indicates 0 bit number, value 0
; length 3 is encoded as %011
; ^^-- indicates 1 bit number, value 1
; length 4 is encoded as %00110
; ^^^- indicates 2 bit number, value 2
; ...etc
; - offsets are encoded as either 7 or 11 bits plus a flag:
; - 0oooooooo for offset ooooooo
; - 1oooooooo plus bitstream bits abcd for offset abcdooooooo
push de
; determine number of bits used for length (Elias gamma coding)
ld b, 1 ; length result
ld d, 0 ; d = 0
-: ; Count how many 0 bits we have in the flags sequence
inc d
add a, a
call z, _nextFlagsByte
jr nc, -
jp +
; determine length
-: add a, a
call z, _nextFlagsByte
rl b
jp c, _done ; check end marker
+: dec d
jr nz, -
inc b ; adjust length
; determine offset
ld e, (hl) ; load offset flag (1 bit) + offset value (7 bits)
inc hl
.ifdef ZX7NoUndocumented
sla e
inc e
.else
sll e ; Undocumented instruction! Shifts into carry, inserts 1 in LSB
.endif
jr nc, + ; if offset flag is set, load 4 extra bits
add a, a
call z, _nextFlagsByte
rl d
add a, a
call z, _nextFlagsByte
rl d
add a, a
call z, _nextFlagsByte
rl d
add a, a
call z, _nextFlagsByte
ccf
jr c, +
inc d
+: rr e ; insert inverted fourth bit into E
; copy previous sequence
ex (sp), hl ; store source, restore destination
push hl ; store destination
sbc hl, de ; HL = destination - offset - 1
pop de ; DE = destination
.ifdef ZX7ToVRAM
; ldir vram -> vram
push af ; need to preserve carry
; Make hl a read address
res 6, h
inc c ; ld c, $bf
.ifdef ZX7ToVRAMScreenOn
di
.endif
-: out (c),l
out (c),h
inc hl ; 6 cycles
.ifdef ZX7ToVRAMScreenOn
; We want to waste 20 cycles, in as few bytes as possible, with no bad side ffects
add a,(hl) ; 1/7 - a is not needed
sub (hl) ; 1/7
inc hl ; 1/6 - undone later
.endif
in a,($be)
; no delay needed here
out (c),e
out (c),d
inc de ; 6 cycles
.ifdef ZX7ToVRAMScreenOn
; See above
add a,(hl) ; 1/7 - a needs to be restored
sub (hl) ; 1/7 - ...here
dec hl ; 1/6 - undoing extra inc
.endif
out ($be),a
djnz -
pop af
dec c ; ld c, $be ; restore VRAM write port
.else
ldir
.endif
pop hl ; restore source address (compressed data)
jp nc, --
_nextFlagsByte:
ld a, (hl) ; Else load the next byte
inc hl
rla ; And push that into the carry bit
ret
_done:
pop hl
ret
| 26.348039 | 88 | 0.606884 |
40f92319eb070cc2bfd0d2c2325f4a42432f20a2 | 2,537 | asm | Assembly | src/lib/diff_a.asm | sgblasi/hevcasm | 30ac79f7d49628a31ead29bb0a0426c48de33a21 | [
"0BSD"
] | 9 | 2015-07-28T13:18:11.000Z | 2020-12-11T10:13:38.000Z | src/lib/diff_a.asm | sgblasi/hevcasm | 30ac79f7d49628a31ead29bb0a0426c48de33a21 | [
"0BSD"
] | null | null | null | src/lib/diff_a.asm | sgblasi/hevcasm | 30ac79f7d49628a31ead29bb0a0426c48de33a21 | [
"0BSD"
] | 4 | 2015-11-18T15:32:18.000Z | 2020-01-22T14:59:01.000Z | ; The copyright in this software is being made available under the BSD
; License, included below. This software may be subject to other third party
; and contributor rights, including patent rights, and no such rights are
; granted under this license.
;
;
; Copyright(c) 2011 - 2014, Parabola Research Limited
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met :
;
; * Redistributions of source code must retain the above copyright notice,
; this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright notice,
; this list of conditions and the following disclaimer in the documentation
; and / or other materials provided with the distribution.
; * Neither the name of the copyright holder nor the names of its contributors may
; be used to endorse or promote products derived from this software without
; specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
; ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
; CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
; CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE)
; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
; THE POSSIBILITY OF SUCH DAMAGE.
%define private_prefix hevcasm
%include "x86inc.asm"
%define ORDER(a, b, c, d) ((a << 6) | (b << 4) | (c << 2) | d)
; Sum of square differences
; extern "C" int ssd_linear(const uint8_t *p1, const uint8_t *p2, int n)
INIT_XMM avx
cglobal ssd_linear, 3, 3, 8
shr r2, 4
pxor m0, m0
pxor m7, m7
.loop:
mova m1, [r0]
mova m2, [r1]
punpckhbw m3, m1, m7
punpckhbw m4, m2, m7
punpcklbw m1, m7
punpcklbw m2, m7
psubw m1, m2
psubw m3, m4
pmaddwd m1, m1
pmaddwd m3, m3
paddd m0, m1
paddd m0, m3
add r0, mmsize
add r1, mmsize
dec r2
jg .loop
pshufd m1, m0, ORDER(3, 2, 3, 2)
paddd m0, m1 ; Review: phaddd might be better here
pshufd m1, m0, ORDER(3, 2, 0, 1)
paddd m0, m1
movd eax, m0
RET
| 35.236111 | 82 | 0.741427 |
36c90e2365c6a946ccb6520e46719a62fdd86781 | 3,208 | asm | Assembly | externals/mpir-3.0.0/mpn/x86_64/nehalem/divrem_hensel_qr_1_2.asm | JaminChan/eos_win | c03e57151cfe152d0d3120abb13226f4df74f37e | [
"MIT"
] | 12 | 2021-09-29T14:50:06.000Z | 2022-03-31T15:01:21.000Z | externals/mpir-3.0.0/mpn/x86_64/nehalem/divrem_hensel_qr_1_2.asm | JaminChan/eos_win | c03e57151cfe152d0d3120abb13226f4df74f37e | [
"MIT"
] | 15 | 2021-12-24T22:53:49.000Z | 2021-12-25T10:03:13.000Z | LibSource/mpir/mpn/x86_64/k8/divrem_hensel_qr_1_2.asm | ekzyis/CrypTool-2 | 1af234b4f74486fbfeb3b3c49228cc36533a8c89 | [
"Apache-2.0"
] | 10 | 2021-10-17T19:46:51.000Z | 2022-03-18T02:57:57.000Z | dnl X86_64 mpn_divrem_hensel_qr_1_2
dnl Copyright 2009 Jason Moxham
dnl This file is part of the MPIR Library.
dnl The MPIR Library is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU Lesser General Public License as published
dnl by the Free Software Foundation; either version 2.1 of the License, or (at
dnl your option) any later version.
dnl The MPIR Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
dnl License for more details.
dnl You should have received a copy of the GNU Lesser General Public License
dnl along with the MPIR Library; see the file COPYING.LIB. If not, write
dnl to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
dnl Boston, MA 02110-1301, USA.
include(`../config.m4')
C (rdi,rdx)=(rsi,rdx) / rcx rdx>=1
C rax=hensel remainder from div
C This is divrem_hensel_1 with shifting on the output of the quotient
C On k8/k10 the shifting comes for free so no need to have different
C fn for that. And on K8/K10 this runs at 10c/l which is optimal
C This function "replaces" divexact_1 and modexact_1_odd
C This is same as the shifting version but with no shifting
ASM_START()
PROLOGUE(mpn_divrem_hensel_qr_1_2)
mov $1,%r9
sub %rdx,%r9
lea -8(%rdi,%rdx,8),%rdi
lea -8(%rsi,%rdx,8),%rsi
push %r12
push %r13
push %r14
mov %rcx,%rdx
C // rdx is 3 bit inverse
mov %rdx,%rax
imul %ecx,%edx
mov $2,%r11
sub %rdx,%r11
imul %eax,%r11d
C //r11 has 4 bits
mov %r11,%rax
imul %ecx,%r11d
mov $2,%rdx
sub %r11,%rdx
imul %eax,%edx
C //rdx has 8 bits
mov %rdx,%rax
imul %ecx,%edx
mov $2,%r11
sub %rdx,%r11
imul %eax,%r11d
C //r11 has 16 bits
mov %r11,%rax
imul %ecx,%r11d
mov $2,%rdx
sub %r11,%rdx
imul %eax,%edx
C // rdx has 32 bits
mov %rdx,%rax
imul %rcx,%rdx
mov $2,%r11
sub %rdx,%r11
imul %rax,%r11
C //r11 has 64 bits
mov %r11,%rax
mov %r11,%r12
mul %rcx
neg %rdx
imul %rdx,%r12
C // r12,r11 has 128 bits
mov %r11,%r13
mov %r12,%r14
mov (%rsi,%r9,8),%r11
mov 8(%rsi,%r9,8),%r12
mov $0,%r10
add $2,%r9
jc skiplp
ALIGN(16)
lp:
mov %r12,%r8
mov %r13,%rax
mul %r11
mov %rax,-16(%rdi,%r9,8)
imul %r14,%r11
imul %r13,%r12
add %r11,%rdx
add %r12,%rdx
mov (%rsi,%r9,8),%r11
mov 8(%rsi,%r9,8),%r12
mov %rdx,-8(%rdi,%r9,8)
mov %rcx,%rax
mul %rdx
add %r10,%r10
sbb $0,%r11
sbb $0,%r12
sbb %r10,%r10
cmp %rax,%r8
sbb %rdx,%r11
sbb $0,%r12
sbb $0,%r10
add $2,%r9
jnc lp
skiplp:
mov %r12,%r8
mov %r13,%rax
mul %r11
mov %rax,-16(%rdi,%r9,8)
imul %r14,%r11
imul %r13,%r12
add %r11,%rdx
add %r12,%rdx
cmp $0,%r9
jne case0
case1:
mov (%rsi,%r9,8),%r11
mov %rdx,-8(%rdi,%r9,8)
mov %rcx,%rax
mul %rdx
add %r10,%r10
sbb $0,%r11
sbb %r10,%r10
cmp %rax,%r8
sbb %rdx,%r11
sbb $0,%r10
mov %r11,%rax
imul %r13,%rax
mov %rax,(%rdi,%r9,8)
mul %rcx
add %r10,%r10
mov $0,%rax
adc %rdx,%rax
pop %r14
pop %r13
pop %r12
ret
case0:
mov %rdx,-8(%rdi,%r9,8)
mov %rcx,%rax
mul %rdx
cmp %rax,%r8
mov $0,%rax
adc %rdx,%rax
sub %r10,%rax
pop %r14
pop %r13
pop %r12
ret
EPILOGUE()
| 19.095238 | 79 | 0.672693 |
6152ad3088a5333cdaf2158b707cdc5bf3d20eb3 | 557 | asm | Assembly | src/kernel.asm | travisbale/CardinalOS | 8dd6d87816b386c1d2a1fc9d7182066b3cf8f365 | [
"MIT"
] | null | null | null | src/kernel.asm | travisbale/CardinalOS | 8dd6d87816b386c1d2a1fc9d7182066b3cf8f365 | [
"MIT"
] | null | null | null | src/kernel.asm | travisbale/CardinalOS | 8dd6d87816b386c1d2a1fc9d7182066b3cf8f365 | [
"MIT"
] | null | null | null | BITS 32
global _start
extern kernel_main
PROT_MODE_DATA_SEG equ 0x10 ; Kernel data segment selector
_start:
; Setup the protected mode segment registers
mov ax, PROT_MODE_DATA_SEG
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
; Enable the A20 line using the Fast A20 Gate
in al, 0x92
or al, 0x2
out 0x92, al
call kernel_main
; kernel_main should never return but if it does, just loop
jmp $
; Align the assembly to 16 bytes so the C code is properly aligned
times 512 - ($ - $$) db 0
| 18.566667 | 66 | 0.669659 |
125a138ad1245f5fac7a6561fbfdc117c823d7b1 | 328 | asm | Assembly | programs/oeis/120/A120174.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/120/A120174.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/120/A120174.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A120174: a(1)=5; a(n)=floor((29+sum(a(1) to a(n-1)))/5).
; 5,6,8,9,11,13,16,19,23,27,33,39,47,57,68,82,98,118,141,169,203,244,293,351,421,506,607,728,874,1049,1258,1510,1812,2174,2609,3131,3757,4509,5410,6492
add $0,1
mov $2,3
lpb $0
sub $0,1
add $2,$1
mov $1,6
add $1,$2
div $1,5
add $2,4
lpe
add $1,4
mov $0,$1
| 20.5 | 151 | 0.60061 |
8600d0a38e23862fcca82615dbbc58a8f08923a9 | 84 | asm | Assembly | src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuxx.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuxx.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/pwuz1_derefidx_vbuyy=pwuz1_derefidx_vbuyy_plus_pwuc1_derefidx_vbuxx.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | lda ({z1}),y
clc
adc {c1},x
sta ({z1}),y
iny
lda ({z1}),y
adc {c1}+1,x
sta ({z1}),y
| 9.333333 | 12 | 0.511905 |
2ebea1c6442e0d7442e217bd41b0dfc1ba452bd4 | 331 | asm | Assembly | programs/oeis/156/A156778.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/156/A156778.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/156/A156778.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A156778: n*A007504(n)/2 = n*(sum of first n primes)/2
; 0,1,5,15,34,70,123,203,308,450,645,880,1182,1547,1967,2460,3048,3740,4509,5396,6390,7476,8701,10051,11556,13250,15093,17064,19194,21460,23895,26660,29616,32802,36159,39830,43686,47804,52193,56823,61740
mov $1,$0
seq $1,7504 ; Sum of the first n primes.
mul $0,$1
div $0,2
| 41.375 | 203 | 0.725076 |
2a114e73adafbd33262cd203e845010bf91bb8c2 | 318 | asm | Assembly | examenes/examenpracticas/ejercicios/eje6_b.asm | ajah1/EC | 9b796b616bf4dcac95cdea98114a8e0599a5393f | [
"MIT"
] | null | null | null | examenes/examenpracticas/ejercicios/eje6_b.asm | ajah1/EC | 9b796b616bf4dcac95cdea98114a8e0599a5393f | [
"MIT"
] | null | null | null | examenes/examenpracticas/ejercicios/eje6_b.asm | ajah1/EC | 9b796b616bf4dcac95cdea98114a8e0599a5393f | [
"MIT"
] | null | null | null | # programa que muestra por pantalla el vector que se encuentra en la etiqueta vector
# y que acaba en -1.
.data
vector:
.byte 4, 3, 1, 3, -1
.text
li $t0, 0
inicio_bucle:
lb $t1, vector($t0) # t1 = 4
beq $t1, -1, fin_bucle
li $v0, 1
move $a0, $t1
syscall
addi $t0, $t0, 1 # t0++
j inicio_bucle
fin_bucle:
| 17.666667 | 84 | 0.641509 |
5dcb65f69b1f7ffaac04b7ff121ca3e88c4ba4f5 | 3,172 | asm | Assembly | src/textscript.asm | Xkeeper0/tcrf-birthday | 122945985d98b31984ac9299c8086603dbf416ff | [
"MIT"
] | 10 | 2019-10-27T23:16:43.000Z | 2019-11-14T13:53:55.000Z | src/textscript.asm | Xkeeper0/tcrf-birthday | 122945985d98b31984ac9299c8086603dbf416ff | [
"MIT"
] | null | null | null | src/textscript.asm | Xkeeper0/tcrf-birthday | 122945985d98b31984ac9299c8086603dbf416ff | [
"MIT"
] | null | null | null |
DoTextScript:
; TextScriptLo/Hi: Current read address of script
; TextScriptPPULo/Hi: Current address to write to in PPU mem
; TextScriptSpeed: Frames to wait between commands
; TextScriptDelay: Frames left until next command
; Get command
JSR DoTextScript_GetNextByte
; Based on A, do things
; @TODO this would probably make for a nice
; jump table in the future, since it's a little. oof. yikes.
CMP #TextScript_End ; If the next byte is terminating, done
BEQ DoTextScript_End
CMP #TextScript_NewAddress ; New PPU address to write to
BEQ DoTextScript_NewAddress
CMP #TextScript_ChangeSpeed ; New speed to use
BEQ DoTextScript_ChangeSpeed
CMP #TextScript_DoDelay ; Wait some frames before continuing
BEQ DoTextScript_DoDelay
CMP #TextScript_AdvanceLine ; Advance one line downwards
BEQ DoTextScript_AdvanceLine
CMP #TextScript_Scroll ; Time to scroll down some
BEQ DoTextScript_Scroll
; Nothing, guess we're drawing another character.
STA TextScriptPPUChar
LDA #<TextScriptPPUHi
STA PPUBufferLo
LDA #>TextScriptPPUHi
STA PPUBufferHi
LDA #$2
STA PPUBufferReady
LDX TextScriptSpeed ; Wait frames as required
JSR WaitXFrames
INC TextScriptPPULo ; Advance PPU pointer
BNE +
INC TextScriptPPUHi ; and its high byte, if needed
+ JMP DoTextScript
DoTextScript_End:
RTS ; Laters.
DoTextScript_NewAddress:
JSR DoTextScript_GetNextByte ; Get the next PPU address...
STA TextScriptPPUBaseHi ; ...and store it
STA TextScriptPPUHi ; ...and store it
JSR DoTextScript_GetNextByte ; Get the low byte, too...
STA TextScriptPPUBaseLo ; ...and store that too.
STA TextScriptPPULo ; ...and store that too.
LDA #$01 ; Mark PPU buffer as having one char...
STA TextScriptPPULen
LDA #$00 ; ...and ensure it ends properly.
STA TextScriptPPUEnd
JMP DoTextScript ; Resume
DoTextScript_ChangeSpeed:
JSR DoTextScript_GetNextByte ; Get the next byte, our delay
STA TextScriptSpeed ; Set it as our new delay
JMP DoTextScript ; Resume
DoTextScript_DoDelay:
JSR DoTextScript_GetNextByte ; Get number of frames to wait
TAX
JSR WaitXFrames ; Wait for some frames!
JMP DoTextScript
DoTextScript_AdvanceLine:
CLC
LDA TextScriptPPUBaseLo ; Get the old startind area
ADC #$20 ; Bump it down one line
STA TextScriptPPUBaseLo ; Store it to our new place
STA TextScriptPPULo ; As well as the current address
BCC +
INC TextScriptPPUBaseHi ; Bump up the high byte if needed too
LDA TextScriptPPUBaseHi ; Get the new address
STA TextScriptPPUHi ; and store it to the current one too
+ JMP DoTextScript
DoTextScript_GetNextByte:
LDY #$00 ; Get the current byte of the script...
LDA (TextScriptLo), Y
INC TextScriptLo ; Increment read address by one
BNE +
INC TextScriptHi ; Update high byte if overflow
+ RTS
DoTextScript_Scroll:
; Scroll 8 pixels ...
LDX #$08 ; Scroll up for 8 frames, one pixel/fr
STX FramesToWait
- JSR WaitForNMI
INC PPUScrollY
DEC FramesToWait
BNE -
JSR DoTextScript_GetNextByte ; Assume next byte = line to clear
LDX #$00 ; then clear that line
JSR ClearOneTileRow
JSR WaitForNMI
JMP DoTextScript
| 27.344828 | 64 | 0.751261 |
f2f614856d246cb3fd37c84fcd10932db2b4a4b1 | 408 | asm | Assembly | programs/oeis/137/A137823.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/137/A137823.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/137/A137823.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A137823: Numbers occurring in A137822 : first differences of numbers n such that 3 | sum( Catalan(k), k=1..2n).
; 1,2,3,7,8,21,61,62,183,547,548,1641,4921,4922,14763,44287,44288,132861,398581,398582,1195743,3587227,3587228,10761681,32285041,32285042,96855123,290565367,290565368,871696101,2615088301,2615088302
mul $0,2
mov $1,$0
lpb $1
sub $0,$1
mul $0,3
add $0,$1
sub $1,3
lpe
div $0,2
add $0,1
| 29.142857 | 198 | 0.720588 |
3e3c77d77b1571d1969fa91291aea31527a4d148 | 2,154 | asm | Assembly | src/kernel/sys/arch/isrs.asm | notYuriy/ricerca | 4717c7210fb6f4d158ef259c686d92e7e7194b17 | [
"0BSD"
] | 9 | 2021-06-07T17:09:35.000Z | 2021-06-25T12:00:57.000Z | src/kernel/sys/arch/isrs.asm | notYuriy/ricerca | 4717c7210fb6f4d158ef259c686d92e7e7194b17 | [
"0BSD"
] | null | null | null | src/kernel/sys/arch/isrs.asm | notYuriy/ricerca | 4717c7210fb6f4d158ef259c686d92e7e7194b17 | [
"0BSD"
] | 1 | 2021-09-07T01:28:21.000Z | 2021-09-07T01:28:21.000Z | format ELF64
extrn interrupt_handle
public interrupt_raw_callbacks
; Define interrupt handler with no error code
macro int_no_err_code name, intno {
name:
sub rsp, 8
push qword intno
jmp interrupts_common
}
; Define interrupt handler with error code
macro int_err_code name, intno {
name:
push qword intno
jmp interrupts_common
}
; GS and FS hidden MSRs
IA32_FS_MSR = 0xC0000100
IA32_GS_MSR = 0xC0000101
; 64-bit kernel data selector
DATA64 = 0x30
; Common interrupt stub
section '.text' executable
interrupts_common:
; Save GPRs
push rax
push rbx
push rcx
push rdx
push rdi
push rsi
push rbp
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
; Save pointer to the frame in rdi
mov rdi, rsp
; Check if fault originated from kernel with CS and only do swapgs when it has not
test byte [rsp + 0x90], 11b
jz .kernel
swapgs
.kernel:
; Set rbp to 0
xor rbp, rbp
; Call generic interrupt handling routine
call interrupt_handle
; Check if fault originated from kernel with CS and only do swapgs when it has not
test byte [rsp + 0x90], 11b
jz .kernel_leave
swapgs
.kernel_leave:
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rbp
pop rsi
pop rdi
pop rdx
pop rcx
pop rbx
pop rax
add rsp, 16
iretq
; Define raw handlers for all interrupt vectors
int_no_err_code isr0, 0
int_no_err_code isr1, 1
int_no_err_code isr2, 2
int_no_err_code isr3, 3
int_no_err_code isr4, 4
int_no_err_code isr5, 5
int_no_err_code isr6, 6
int_no_err_code isr7, 7
int_err_code isr8, 8
int_no_err_code isr9, 9
int_err_code isr10, 10
int_err_code isr11, 11
int_err_code isr12, 12
int_err_code isr13, 13
int_err_code isr14, 14
int_no_err_code isr15, 15
int_no_err_code isr16, 16
int_err_code isr17, 17
int_no_err_code isr18, 18
int_no_err_code isr19, 19
int_no_err_code isr20, 20
int_err_code isr21, 21
; rept starts indexes from 1
rept 234 i {
int_no_err_code isr_free##i, 21 + i
}
section '.rodata'
; Define table with all raw interrupt callbacks
interrupt_raw_callbacks:
dq isr0
rept 21 i {
dq isr##i
}
rept 234 i {
dq isr_free##i
}
| 17.095238 | 83 | 0.746054 |
35d50e22a8f09b718076346d1b617c385ee1a2ba | 613 | asm | Assembly | oeis/080/A080141.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/080/A080141.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/080/A080141.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A080141: (3^(n-1))*(n!)^2.
; 1,12,324,15552,1166400,125971200,18517766400,3555411148800,863964909158400,259189472747520000,94085778607349760000,40645056358375096320000,20607043573696173834240000,12116941621333350214533120000,8178935594400011394809856000000,6281422536499208751213969408000000,5445993339144813987302511476736000000,5293505525648759195658041155387392000000,5732866484277606208897658571284545536000000,6879439781133127450677190285541454643200000000,9101498830439127617245922747771344492953600000000
add $0,1
mov $4,$0
lpb $0
sub $0,1
mov $1,$4
add $2,6
add $3,$2
mul $4,$3
lpe
mov $0,$1
| 43.785714 | 484 | 0.849918 |
9afc3ef4b4693f9bc9764a0a5729df54e9b1373b | 453 | asm | Assembly | tests/devices/Issue144_disp_crash.asm | fengjixuchui/sjasmplus | df0fabd2411bf89e23637fce46d273f52dafbe16 | [
"BSD-3-Clause"
] | 220 | 2016-10-22T19:44:39.000Z | 2022-03-29T20:57:04.000Z | tests/devices/Issue144_disp_crash.asm | ped7g/sjasmplus | 487635c8057cd5594c372d9b70bc00a3f3a1ecc4 | [
"BSD-3-Clause"
] | 153 | 2018-05-07T10:31:23.000Z | 2022-03-30T04:35:59.000Z | tests/devices/Issue144_disp_crash.asm | ped7g/sjasmplus | 487635c8057cd5594c372d9b70bc00a3f3a1ecc4 | [
"BSD-3-Clause"
] | 51 | 2016-05-12T21:27:36.000Z | 2022-03-27T15:16:16.000Z | ; reported by Busy
DEVICE ZXSPECTRUM48
org #4000
disp #10000-this1+zac1
zac1
nop
this1
ENT
org #4000+this1-zac1
disp #0000
nop
ENT
; test the warnings about cropping invalid ORG and DISP arguments
ORG -1
DISP -2
ENT
; no device mode
DEVICE NONE
org #4000
disp #10000-this2+zac2
zac2
nop
this2
ENT
org #4000+this2-zac2
disp #0000
nop
ENT
; test the warnings about cropping invalid ORG and DISP arguments
ORG -1
DISP -2
ENT
| 12.243243 | 66 | 0.719647 |
a5981db04ecf6ea84b6744f622730e30c6f89f81 | 704 | asm | Assembly | programs/oeis/158/A158740.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/158/A158740.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/158/A158740.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A158740: a(n) = 72*n^2 + 1.
; 1,73,289,649,1153,1801,2593,3529,4609,5833,7201,8713,10369,12169,14113,16201,18433,20809,23329,25993,28801,31753,34849,38089,41473,45001,48673,52489,56449,60553,64801,69193,73729,78409,83233,88201,93313,98569,103969,109513,115201,121033,127009,133129,139393,145801,152353,159049,165889,172873,180001,187273,194689,202249,209953,217801,225793,233929,242209,250633,259201,267913,276769,285769,294913,304201,313633,323209,332929,342793,352801,362953,373249,383689,394273,405001,415873,426889,438049,449353,460801,472393,484129,496009,508033,520201,532513,544969,557569,570313,583201,596233,609409,622729,636193,649801,663553,677449,691489,705673
pow $0,2
mul $0,72
add $0,1
| 100.571429 | 644 | 0.81392 |
3833efe5fa404ddad3edf753662b7304840edd4c | 460 | asm | Assembly | tests/assembly/ASL.asm | danecreekphotography/6502ts | 85716cf12f879d7c16c297de3251888c32abba6a | [
"MIT"
] | null | null | null | tests/assembly/ASL.asm | danecreekphotography/6502ts | 85716cf12f879d7c16c297de3251888c32abba6a | [
"MIT"
] | null | null | null | tests/assembly/ASL.asm | danecreekphotography/6502ts | 85716cf12f879d7c16c297de3251888c32abba6a | [
"MIT"
] | null | null | null | ; Verifies ASL
.segment "VECTORS"
.word $eaea
.word init
.word $eaea
.segment "ZEROPAGE"
zp:
.byte %00100000
.byte %00100000
.code
init:
asl ; A will be %00100000
asl ; A will be %01000000 from last instruction
asl ; A will be %10000000 from last instruction
asl zp
asl zp,x ; X will be $01
asl data
asl data,x ; X will be $01
.segment "DATA"
data:
.byte %00100000
.byte %00100000 | 15.333333 | 59 | 0.593478 |
84c9508736a91e502e649e926c463c58c2fee4f1 | 177 | asm | Assembly | data/pokemon/dex_entries/stantler.asm | AtmaBuster/pokeplat-gen2 | fa83b2e75575949b8f72cb2c48f7a1042e97f70f | [
"blessing"
] | 6 | 2021-06-19T06:41:19.000Z | 2022-02-15T17:12:33.000Z | data/pokemon/dex_entries/stantler.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | null | null | null | data/pokemon/dex_entries/stantler.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | 3 | 2021-01-15T18:45:40.000Z | 2021-10-16T03:35:27.000Z | db "BIG HORN@" ; species name
db "The round balls"
next "found on the"
next "fallen antlers can"
page "be ground into a"
next "powder that aids"
next "in sleeping.@"
| 17.7 | 30 | 0.666667 |
5250a40bb717a2319b0c2c38ee7eedb2aac5ab44 | 15,584 | asm | Assembly | Kernel/src/video.asm | royprocell/GoldOS16 | ebce72ff9fcfad474bb67d8c117046ce260927ec | [
"BSD-3-Clause"
] | 4 | 2016-02-28T20:22:24.000Z | 2016-07-08T07:28:27.000Z | Kernel/src/video.asm | royprocell/GoldOS16 | ebce72ff9fcfad474bb67d8c117046ce260927ec | [
"BSD-3-Clause"
] | null | null | null | Kernel/src/video.asm | royprocell/GoldOS16 | ebce72ff9fcfad474bb67d8c117046ce260927ec | [
"BSD-3-Clause"
] | null | null | null | ;==============================
;GoldElfOS: Mk II
;
;Roy Procell
;21 April 2015
;
;Updated 7/14/2015 for GoldOS Mk IV
;
;Video System Calls
;Video.asm
;
;Features:
;Video:
;os_set_video_mode (done!)
;os_move_cursor (done!)
;os_get_cursor (done!)
;os_set_cursor_visible (done!)
;os_set_cursor_invisible (done!)
;os_clear_screen (done!)
;os_set_background (done!)
;os_print_string (done!)
;os_print_char (done!)
;os_print_new_line (done!)
;os_draw_pixel (done!)
;os_get_pixel (done!)
;os_draw_border (done!)
;os_draw_bar (done!)
;os_get_video_mode (done!)
;os_draw_box (done!)
;os_set_cursor_full (done!)
;os_set_cursor_bar (done!)
;
;os_disable_blinking (done!)
;os_enable_blinking (done!)
;
;os_set_vga_font
;os_draw_icon (done!)
;
;os_draw_box_gfx (done!)
;os_clear_screen_gfx (done!)
;
;os_draw_rect_gfx (done!)
;os_draw_triangle_gfx (done!)
;os_draw_line_gfx (done!)
;==============================
;==================
;os_set_video_mode
;Sets the current video mode
;IN: AL=video mode
;OUT: Nothing
;==================
os_set_video_mode:
pusha
mov ah, 0
int 10h
popa
ret
;==================
;os_move_cursor
;Sets the location of the cursor
;IN: DH: row, DL: column
;OUT: Nothing
;==================
os_move_cursor:
pusha
mov ah, 02h
mov bh, 0
int 10h
popa
ret
;==================
;os_get_cursor
;Gets the cursor position
;IN: Nothing
;OUT: DH: row, DL: column
;==================
os_get_cursor:
pusha
mov ah, 03h
mov bh, 0
int 10h
popa
ret
;==================
;os_set_cursor_visible
;Sets the cursor type to visible
;IN: Nothing
;OUT: Nothing
;==================
os_set_cursor_visible:
pusha
mov ch, 6
mov cl, 7
mov ah, 1
mov al, 3
int 10h
popa
ret
;==================
;os_set_cursor_invisible
;Sets the cursor type to invisible
;IN: Nothing
;OUT: Nothing
;==================
os_set_cursor_invisible:
pusha
mov ch, 32
mov ah, 1
mov al, 3
int 10h
popa
ret
;==================
;os_clear_screen
;Clears the screen of text
;IN: BL: color IGNORE:(BH: background color)
;OUT: Nothing
;==================
os_clear_screen:
pusha
;checks to see if the system can support 16 colors, or only 8 colors and blinking.
;if the system can only support 8 colors and blinking, os_gfx_var will be set to 1
;and colors will be reduced so that no unintentional blinking occurs.
cmp byte [os_gfx_var], 1
je .color_filter
jmp .interrupt
.color_filter:
call os_clear_blinking_bit_bl;h
.interrupt:
mov dh, 0
mov cx, 25
.loop:
call os_draw_border
inc dh
loop .loop
;mov ah, 06h
;mov ch, 0
;mov cl, 0
;mov dh, 24
;mov dl, 79
;int 10h
popa
ret
;==================
;os_set_background
;Sets the background color
;IN: BL: background color
;OUT: Nothing
;==================
os_set_background:
pusha
;checks to see if the system can support 16 colors, or only 8 colors and blinking.
;if the system can only support 8 colors and blinking, os_gfx_var will be set to 1
;and colors will be reduced so that no unintentional blinking occurs.
cmp byte [os_gfx_var], 1
je .color_filter
jmp .interrupt
.color_filter:
call os_clear_blinking_bit_bl
.interrupt:
mov ah, 0Bh
mov bh, 0
int 10h
popa
ret
;==================
;os_print_string
;Prints strings
;IN: SI: string address, DS: string segment
;OUT: Nothing. Resets DS to 2000h.
;==================
os_print_string:
pusha
;mov ds, ax
mov ah, 0Eh
.repeat:
lodsb
cmp al, 0
je .done
int 10h
jmp .repeat
.done:
mov ax, 2000h
mov ds, ax
popa
ret
;==================
;os_print_char
;Prints a single char
;IN: AL: desired char
;OUT: Nothing
;==================
os_print_char:
pusha
mov ah, 0Eh
mov bh, 0
int 10h
popa
ret
;==================
;os_print_new_line
;Prints a new line char and moves the cursor down.
;IN: Nothing
;OUT: Nothing
;==================
os_print_new_line:
pusha
mov ah, 0Eh
mov al, 13
int 10h
mov al, 10
int 10h
popa
ret
;==================
;os_draw_pixel
;For use in graphics modes only!
;IN: AX: pixel row, BX: pixel column, CL: pixel color
;OUT: Nothing
;==================
os_draw_pixel:
pusha
mov dx, 0xA000
mov es, dx
mov di, 0
xchg ax, bx
mov dx, 320
mul dx
add di, ax
add di, bx
mov byte [es:di], cl
mov ax, 2000h
mov es, ax
popa
ret
;==================
;os_get_pixel
;Gets pixel data at a certain x and y. For use in graphics modes only!
;IN: AX: pixel row, BX: pixel column
;OUT: CL: pixel color
;==================
os_get_pixel:
pusha
mov dx, 0xA000
mov es, dx
mov di, 0
xchg ax, bx
mov dx, 320
mul dx
add di, ax
add di, bx
mov cl, byte [es:di]
mov byte [.tmp], cl
mov ax, 2000h
mov es, ax
popa
mov cl, byte [.tmp]
ret
.tmp db 0
;==================
;os_draw_border
;Draws a border at the cursor's row
;IN: BL: color, DH: cursor's row
;OUT: Nothing
;==================
os_draw_border:
pusha
mov dl, 0
call os_move_cursor
;checks to see if the system can support 16 colors, or only 8 colors and blinking.
;if the system can only support 8 colors and blinking, os_gfx_var will be set to 1
;and colors will be reduced so that no unintentional blinking occurs.
cmp byte [os_gfx_var], 1
je .color_filter
jmp .interrupt
.color_filter:
call os_clear_blinking_bit_bl
.interrupt:
mov ah, 09h
mov al, ' '
mov bh, 0
mov cx, 80
int 10h
popa
ret
;==================
;os_draw_bar
;Draws a bar at the cursor's row and column
;IN: BL: color, DH: cursor's row, DL: cursor's column, CX: number of columns
;OUT: Nothing
;==================
os_draw_bar:
pusha
mov word [.tmp], cx
call os_move_cursor
mov cx, word [.tmp]
;checks to see if the system can support 16 colors, or only 8 colors and blinking.
;if the system can only support 8 colors and blinking, os_gfx_var will be set to 1
;and colors will be reduced so that no unintentional blinking occurs.
cmp byte [os_gfx_var], 1
je .color_filter
jmp .interrupt
.color_filter:
call os_clear_blinking_bit_bl
.interrupt:
mov ah, 09h
mov al, ' '
mov bh, 0
int 10h
popa
ret
.tmp dw 0
;==================
;os_get_video_mode
;Gets the current video mode.
;IN: Nothing
;OUT: AL: video mode, AH: character columns, BH: active page
;==================
os_get_video_mode:
mov ah, 0Fh
int 10h
ret
;==================
;os_draw_box
;Draws a box
;IN: BL: color, DH: cursor's row, DL: cursor's column, CX: number of columns, AX: number of rows
;OUT: Nothing
;==================
os_draw_box:
mov word [.tmp], ax
sub dh, 1
.loop:
cmp word [.tmp], 0
je .done
inc dh
call os_draw_bar
dec word [.tmp]
jmp .loop
.done:
ret
.tmp dw 0
;==================
;os_set_cursor_full
;Sets the cursor to a full box
;IN: Nothing
;OUT: Nothing
;==================
os_set_cursor_full:
pusha
mov cx, 0007h
call os_get_video_mode
mov ah, 1
int 10h
popa
ret
;==================
;os_set_cursor_bar
;Sets the cursor to the default bar
;IN: Nothing
;OUT: Nothing
;==================
os_set_cursor_bar:
pusha
mov cx, 0607h
call os_get_video_mode
mov ah, 1
int 10h
popa
ret
;==================
;os_draw_box_gfx
;Draws a box in graphics mode.
;IN: BX: starting column, CX: starting row, DX: number of columns, SI: number of rows, AL: color
;OUT: Nothing
;==================
os_draw_box_gfx:
pusha
mov byte [.color], al
mov word [.x_coord], bx
mov word [.y_coord], cx
mov word [.dx_coord], dx
mov word [.dy_coord], si
mov ax, 0xA000
mov es, ax
mov ax, word [.y_coord]
mov bx, 320
mul bx
add ax, word [.x_coord]
mov word [.first_pixel], ax
mov di, ax
mov cx, word [.dx_coord]
mov al, byte [.color]
.x_loop:
cmp cx, 0
je .post_x_loop
;cmp di, 0x7FFF
;jge .done
mov byte [es:di], al
inc di
dec cx
jmp .x_loop
.post_x_loop:
dec word [.dy_coord]
cmp word [.dy_coord], 0
je .done
add word [.first_pixel], 320
mov di, word [.first_pixel]
mov cx, word [.dx_coord]
jmp .x_loop
.done:
mov ax, 2000h
mov es, ax
popa
ret
.color db 0
.x_coord dw 0
.y_coord dw 0
.dx_coord dw 0
.dy_coord dw 0
.first_pixel dw 0
;==================
;os_clear_screen_gfx
;Clears the screen in graphics mode 13h.
;IN: BL: color
;OUT: Nothing
;==================
os_clear_screen_gfx:
pusha
mov cx, 64000
mov ax, 0xA000
mov es, ax
mov di, 0
.loop:
cmp cx, 0
je .done
mov byte [es:di], bl
inc di
dec cx
jmp .loop
.done:
mov ax, 2000h
mov ds, ax
popa
ret
;==================
;os_draw_icon
;Draws an icon at the specified coordinates
;IN: AX: x, BX: y, GS: icon segment, SI: icon address
;OUT: Nothing
;==================
os_draw_icon:
mov word [.ax], ax
mov al, byte [gs:si]
mov byte [.counter], al
mov byte [.counter_backup], al
inc si
mov al, byte [gs:si]
dec al
mov byte [.post_counter], al
inc si
mov ax, word [.ax]
dec ax
.loop:
cmp byte [.counter], 0
je .post_loop
mov cl, byte [gs:si]
inc ax
call os_draw_pixel
inc si
dec byte [.counter]
jmp .loop
.post_loop:
cmp byte [.post_counter], 0
je .done
inc bx
dec byte [.post_counter]
mov al, byte [.counter_backup]
mov byte [.counter], al
mov ax, word [.ax]
dec ax
jmp .loop
.done:
ret
.counter db 0
.counter_backup db 0
.post_counter db 0
.ax dw 0
;==================
;os_disable_blinking
;Disables blinking text.
;IN: Nothing
;OUT: Nothing
;==================
os_disable_blinking:
pusha
mov ax, 1003h
mov bx, 0
int 10h
popa
ret
;==================
;os_enable_blinking
;Enables blinking text.
;IN: Nothing
;OUT: Nothing
;==================
os_enable_blinking:
pusha
mov ax, 1003h
mov bl, 1
mov bh, 0
int 10h
popa
ret
;==================
;os_draw_line_gfx
;Draws a line in graphics mode.
;IN: AX: x1, BX: y1, SI: x2, DX: y2, CL: color
;OUT: Nothing
;==================
os_draw_line_gfx:
mov word [.x1], ax
mov word [.y1], bx
mov word [.x2], si
mov word [.y2], dx
mov byte [.color], cl
;calculate dx and dy
sub si, ax
mov word [.dx], si
sub dx, bx
mov word [.dy], dx
;calculate b
mov ax, word [.dy]
mov bx, [.x1]
imul bx
mov bx, word [.dx]
;before we div by bx, make sure it isn't zero!
cmp bx, 0
je .zero_draw_loop
idiv bx
mov word [.m1], ax
mov ax, word [.y1]
mov bx, word [.m1]
sub ax, bx
mov word [.b], ax
;if dy is bigger than dx,
;it is better to draw with (y-b)/m = x
mov dx, word [.dy]
mov si, word [.dx]
cmp dx, 0
jl .dx_neg
cmp si, 0
jl .si_neg
jmp .neg_cont
.dx_neg:
neg dx
cmp si, 0
jl .si_neg
jmp .neg_cont
.si_neg:
neg si
jmp .neg_cont
.neg_cont:
cmp dx, si
jge .x_calc_choose
mov cx, word [.dx]
cmp word [.dx], 0
jl .backward_draw_loop
.forward_draw_loop:
mov ax, word [.x1]
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
inc word [.x1]
call .calc_y
loop .forward_draw_loop
jmp .done
.backward_draw_loop:
neg cx
.backward_draw_loop_run:
mov ax, word [.x1]
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
dec word [.x1]
call .calc_y
loop .backward_draw_loop_run
jmp .done
.zero_draw_loop:
mov cx, word [.dy]
mov ax, word [.x1]
cmp word [.dy], 0
jl .zero_draw_loop_run_neg_pre
.zero_draw_loop_run_pos:
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
inc word [.y1]
loop .zero_draw_loop_run_pos
jmp .done
.zero_draw_loop_run_neg_pre:
neg cx
.zero_draw_loop_run_neg:
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
dec word [.y1]
loop .zero_draw_loop_run_neg
jmp .done
.done:
ret
.x_calc_choose:
mov bx, word [.dy]
;before we div by bx, make sure it isn't zero!
cmp bx, 0
je .zero_draw_loop_x
mov cx, word [.dy]
cmp word [.dy], 0
jl .backward_draw_loop_x
.forward_draw_loop_x:
mov ax, word [.x1]
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
inc word [.y1]
call .calc_x
loop .forward_draw_loop_x
jmp .done
.zero_draw_loop_x:
mov cx, word [.dx]
mov bx, word [.y1]
cmp word [.dx], 0
jl .zero_draw_loop_run_neg_x_pre
.zero_draw_loop_run_pos_x:
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
inc word [.y1]
loop .zero_draw_loop_run_pos_x
jmp .done
.zero_draw_loop_run_neg_x_pre:
neg cx
.zero_draw_loop_run_neg_x:
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
dec word [.y1]
loop .zero_draw_loop_run_neg_x
jmp .done
.backward_draw_loop_x:
neg cx
.backward_draw_loop_run_x:
mov ax, word [.x1]
mov bx, word [.y1]
mov word [.cx_tmp], cx
mov cl, byte [.color]
call os_draw_pixel
mov cx, word [.cx_tmp]
dec word [.y1]
call .calc_x
loop .backward_draw_loop_run_x
jmp .done
.calc_y:
mov ax, word [.dy]
mov bx, [.x1]
imul bx
mov bx, word [.dx]
idiv bx
add ax, word [.b]
mov word [.y1], ax
ret
.calc_x:
mov ax, word [.y1]
sub ax, word [.b]
mov bx, word [.dx]
imul bx
mov bx, word [.dy]
idiv bx
mov word [.x1], ax
ret
.cx_tmp dw 0
.m1 dw 0
.b dw 0
.d dw 0
.dx dw 0
.dy dw 0
.x1 dw 0
.y1 dw 0
.x2 dw 0
.y2 dw 0
.color db 0
;==================
;os_draw_triangle_gfx
;Draws a triangle in graphics mode.
;Data format:
;2 bytes: x1
;2 bytes: y1
;2 bytes: x2
;2 bytes: y2
;2 bytes: x3
;2 bytes: y3
;TOTAL: 12 byte packet
;IN: AX: segment to point data, BX: location of point data, CL: color
;OUT: Nothing
;==================
os_draw_triangle_gfx:
pusha
mov es, ax
mov si, bx
mov byte [.cl], cl
mov ax, word [es:si]
mov word [.x1], ax
inc si
inc si
mov ax, word [es:si]
mov word [.y1], ax
inc si
inc si
mov ax, word [es:si]
mov word [.x2], ax
inc si
inc si
mov ax, word [es:si]
mov word [.y2], ax
inc si
inc si
mov ax, word [es:si]
mov word [.x3], ax
inc si
inc si
mov ax, word [es:si]
mov word [.y3], ax
mov ax, word [.x1]
mov bx, word [.y1]
mov si, word [.x2]
mov dx, word [.y2]
mov cl, byte [.cl]
call os_draw_line_gfx
mov ax, word [.x2]
mov bx, word [.y2]
mov si, word [.x3]
mov dx, word [.y3]
mov cl, byte [.cl]
call os_draw_line_gfx
mov ax, word [.x3]
mov bx, word [.y3]
mov si, word [.x1]
mov dx, word [.y1]
mov cl, byte [.cl]
call os_draw_line_gfx
mov ax, 2000h
mov es, ax
popa
ret
.cl db 0
.x1 dw 0
.y1 dw 0
.x2 dw 0
.y2 dw 0
.x3 dw 0
.y3 dw 0
;==================
;os_draw_rect_gfx
;Draws a rectangle in graphics mode.
;Data format:
;2 bytes: x1
;2 bytes: y1
;2 bytes: x2
;2 bytes: y2
;2 bytes: x3
;2 bytes: y3
;2 bytes: x4
;2 bytes: y4
;TOTAL: 16 byte packet
;IN: AX: segment to point data, BX: location of point data, CL: color
;OUT: Nothing
;==================
os_draw_rect_gfx:
pusha
mov es, ax
mov si, bx
mov byte [.cl], cl
mov ax, word [es:si]
mov word [.x1], ax
inc si
inc si
mov ax, word [es:si]
mov word [.y1], ax
inc si
inc si
mov ax, word [es:si]
mov word [.x2], ax
inc si
inc si
mov ax, word [es:si]
mov word [.y2], ax
inc si
inc si
mov ax, word [es:si]
mov word [.x3], ax
inc si
inc si
mov ax, word [es:si]
mov word [.y3], ax
inc si
inc si
mov ax, word [es:si]
mov word [.x4], ax
inc si
inc si
mov ax, word [es:si]
mov word [.y4], ax
mov ax, word [.x1]
mov bx, word [.y1]
mov si, word [.x2]
mov dx, word [.y2]
mov cl, byte [.cl]
call os_draw_line_gfx
mov ax, word [.x2]
mov bx, word [.y2]
mov si, word [.x3]
mov dx, word [.y3]
mov cl, byte [.cl]
call os_draw_line_gfx
mov ax, word [.x3]
mov bx, word [.y3]
mov si, word [.x1]
mov dx, word [.y1]
mov cl, byte [.cl]
call os_draw_line_gfx
mov ax, 2000h
mov es, ax
popa
ret
.cl db 0
.x1 dw 0
.y1 dw 0
.x2 dw 0
.y2 dw 0
.x3 dw 0
.y3 dw 0
.x4 dw 0
.y4 dw 0 | 16.032922 | 96 | 0.633278 |
b1e72c39c803c98955c862209b0c7c22ca9b7609 | 124,614 | asm | Assembly | bank21.asm | alexsteb/zelda_gb_disassembly | 0efeb3d9b26108c73fb3ace43b6b0a4a8520b179 | [
"MIT"
] | 3 | 2018-06-28T06:59:28.000Z | 2019-09-06T05:49:00.000Z | bank21.asm | alexsteb/zelda_gb_disassembly | 0efeb3d9b26108c73fb3ace43b6b0a4a8520b179 | [
"MIT"
] | null | null | null | bank21.asm | alexsteb/zelda_gb_disassembly | 0efeb3d9b26108c73fb3ace43b6b0a4a8520b179 | [
"MIT"
] | null | null | null | call func_3daf
ld hl, $c330
add hl, bc
ld [hl], b
ld hl, $c260
add hl, bc
ld [hl], b
ld hl, $c270
add hl, bc
ld [hl], b
ld hl, $c320
add hl, bc
ld [hl], b
ld hl, $c290
add hl, bc
ld [hl], b
ld hl, $c2a0
add hl, bc
ld [hl], b
ld hl, $c2b0
add hl, bc
ld [hl], b
ld hl, $c2c0
add hl, bc
ld [hl], b
ld hl, $c2d0
add hl, bc
ld [hl], b
ld hl, $c440
add hl, bc
ld [hl], b
ld hl, $c390
add hl, bc
ld [hl], b
ld hl, $c2e0
add hl, bc
ld [hl], b
ld hl, $c2f0
add hl, bc
ld [hl], b
ld hl, $c300
add hl, bc
ld [hl], b
ld hl, $c310
add hl, bc
ld [hl], b
ld hl, $c380
add hl, bc
ld [hl], b
xor a
call func_3b87
ld hl, $c3d0
add hl, bc
ld [hl], b
ld hl, $c360
add hl, bc
ld [hl], b
ld hl, $c410
add hl, bc
ld [hl], b
ld hl, $c220
add hl, bc
ld [hl], b
ld hl, $c230
add hl, bc
ld [hl], b
ld hl, $c470
add hl, bc
ld [hl], b
ld hl, $c450
add hl, bc
ld [hl], b
ld hl, $c480
add hl, bc
ld [hl], b
ld hl, $c490
add hl, bc
ld [hl], b
ld hl, $c420
add hl, bc
ld [hl], b
ld hl, $c4e0
add hl, bc
ld [hl], b
ld hl, $c4f0
add hl, bc
ld [hl], b
ld hl, $c5d0
add hl, bc
ld [hl], $ff
ret
ldh a, [$ff00 + $f8]
and $20
jp nz, $7c35
call func_7b20
ldh a, [$ff00 + $f0]
rst 0
xor l
ld b, b
cp h
ld b, b
jp nc, .l_fa40
set 0, c
and a
jr z, 0.l_40bb
call func_3b8d
call func_0891
ld [hl], $20
ret
ld a, $02
ldh [$ff00 + $a1], a
ld [$c167], a
call func_0891
jr nz, 0.l_40d1
ld [hl], $30
ld a, $11
ldh [$ff00 + $f4], a
call func_3b8d
ret
ld a, $02
ldh [$ff00 + $a1], a
call func_0891
jr nz, 0.l_40ec
ld [$c167], a
ld [$c155], a
ld a, $39
call func_2197
call func_7ce4
jp $7c35
ld e, $01
and $04
jr z, 0.l_40f4
ld e, $ff
ld a, e
ld [$c155], a
ret
ldhl sp, d
stop
ld a, [$1110]
ld sp, hl
ld b, b
call func_3c3b
call func_7b20
xor a
ldh [$ff00 + $e8], a
ldh a, [$ff00 + $f0]
rst 0
stop
ld b, c
inc h
ld b, c
ld hl, $c210
add hl, bc
ld a, [hl]
ld hl, $c2c0
add hl, bc
ld [hl], a
add a, $10
ld hl, $c2b0
add hl, bc
ld [hl], a
jp $3b8d
ldh a, [$ff00 + $ba]
cp $02
jr z, $5416c
and a
jr z, 0.l_414a
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, [hl]
cp $0a
jr c, 0.l_4149
ld [hl], b
ld a, $11
ldh [$ff00 + $f4], a
ld hl, $c2c0
add hl, bc
ld a, [hl]
ld hl, $c210
add hl, bc
cp [hl]
jr z, 0.l_4149
dec [hl]
ret
ld hl, $c2b0
add hl, bc
ld a, [hl]
ld hl, $c210
add hl, bc
cp [hl]
jr z, 0.l_4168
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc [hl]
cp $0d
jr c, $5416c
ld [hl], b
ld hl, $c210
add hl, bc
inc [hl]
jr $5416c
ld hl, $ffe8
inc [hl]
call func_3dba
call func_7bdf
add a, $0c
cp $18
jr nc, 0.l_41c6
call func_7bef
add a, $10
cp $1c
jr nc, 0.l_41c6
call func_0942
call func_1495
call func_7c0e
ld a, e
cp $00
jr nz, 0.l_4196
ldh a, [$ff00 + $ee]
add a, $0c
ldh [$ff00 + $98], a
ret
cp $01
jr nz, 0.l_41a1
ldh a, [$ff00 + $ee]
add a, $f4
ldh [$ff00 + $98], a
ret
cp $02
jr nz, 0.l_41b6
ldh a, [$ff00 + $eb]
cp $47
jr nz, 0.l_41af
ldh a, [$ff00 + $e8]
and a
ret nz
ldh a, [$ff00 + $ec]
add a, $f0
ldh [$ff00 + $99], a
ret
ldh a, [$ff00 + $eb]
cp $46
jr nz, 0.l_41c0
ldh a, [$ff00 + $e8]
and a
ret nz
ldh a, [$ff00 + $ec]
add a, $0c
ldh [$ff00 + $99], a
ret
ld de, $40f9
call func_3c3b
call func_7b20
xor a
ldh [$ff00 + $e8], a
ldh a, [$ff00 + $f0]
rst 0
jp c, .l_ee41
ld b, c
ld hl, $c210
add hl, bc
ld a, [hl]
ld hl, $c2c0
add hl, bc
ld [hl], a
sub a, $10
ld hl, $c2b0
add hl, bc
ld [hl], a
jp $3b8d
ldh a, [$ff00 + $ba]
cp $02
jr z, 0.l_4236
and a
jr z, 0.l_4214
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, [hl]
cp $0a
jr c, 0.l_4213
ld [hl], b
ld a, $11
ldh [$ff00 + $f4], a
ld hl, $c2c0
add hl, bc
ld a, [hl]
ld hl, $c210
add hl, bc
cp [hl]
jr z, 0.l_4213
inc [hl]
ret
ld hl, $c2b0
add hl, bc
ld a, [hl]
ld hl, $c210
add hl, bc
cp [hl]
jr z, 0.l_4232
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc [hl]
cp $0d
jr c, 0.l_4236
ld [hl], b
ld hl, $c210
add hl, bc
dec [hl]
jr 0.l_4236
ld hl, $ffe8
inc [hl]
call func_416c
ret
ld de, $40f9
call func_3c3b
call func_7b20
xor a
ldh [$ff00 + $e8], a
ldh a, [$ff00 + $f0]
rst 0
ld c, l
ld b, d
ld h, c
ld b, d
ld hl, $c200
add hl, bc
ld a, [hl]
ld hl, $c2c0
add hl, bc
ld [hl], a
add a, $10
ld hl, $c2b0
add hl, bc
ld [hl], a
jp $3b8d
ldh a, [$ff00 + $ba]
cp $02
jr z, 0.l_42a9
and a
jr z, 0.l_4287
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, [hl]
cp $0a
jr c, 0.l_4286
ld [hl], b
ld a, $11
ldh [$ff00 + $f4], a
ld hl, $c2c0
add hl, bc
ld a, [hl]
ld hl, $c200
add hl, bc
cp [hl]
jr z, 0.l_4286
dec [hl]
ret
ld hl, $c2b0
add hl, bc
ld a, [hl]
ld hl, $c200
add hl, bc
cp [hl]
jr z, 0.l_42a5
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc [hl]
cp $0d
jr c, 0.l_42a9
ld [hl], b
ld hl, $c200
add hl, bc
inc [hl]
jr 0.l_42a9
ld hl, $ffe8
inc [hl]
call func_416c
ret
ld de, $40f9
call func_3c3b
call func_7b20
xor a
ldh [$ff00 + $e8], a
ldh a, [$ff00 + $f0]
rst 0
ret nz
ld b, d
call nc, func_2142
nop
jp nz, .l_7e09
ld hl, $c2c0
add hl, bc
ld [hl], a
sub a, $10
ld hl, $c2b0
add hl, bc
ld [hl], a
jp $3b8d
ldh a, [$ff00 + $ba]
cp $02
jr z, 0.l_431c
and a
jr z, 0.l_42fa
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, [hl]
cp $0a
jr c, 0.l_42f9
ld [hl], b
ld a, $11
ldh [$ff00 + $f4], a
ld hl, $c2c0
add hl, bc
ld a, [hl]
ld hl, $c200
add hl, bc
cp [hl]
jr z, 0.l_42f9
inc [hl]
ret
ld hl, $c2b0
add hl, bc
ld a, [hl]
ld hl, $c200
add hl, bc
cp [hl]
jr z, 0.l_4318
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc [hl]
cp $0d
jr c, 0.l_431c
ld [hl], b
ld hl, $c200
add hl, bc
dec [hl]
jr 0.l_431c
ld hl, $ffe8
inc [hl]
call func_416c
ret
ld e, b
nop
ld e, b
jr nz, 0.l_4346
ld h, b
jp .l_3609
rst 38
call func_0891
rl a
and $10
ldh [$ff00 + $ed], a
ld de, $4320
call func_3c3b
call func_7b20
call func_08e2
call func_3beb
call func_7a85
call func_3b9e
ld hl, $c420
add hl, bc
ld a, [hl]
and a
jr z, 0.l_4364
ld [hl], b
ld a, [$d6f8]
and a
jr nz, 0.l_4364
ld a, $01
ld [$d6f8], a
call func_0891
ld [hl], $18
ld a, $0e
ldh [$ff00 + $f3], a
ret
ldh a, [$ff00 + $f0]
and a
jp nz, .l_43ca
call func_7b20
call func_0891
jr nz, 0.l_43ad
call func_27ed
and $3f
add a, $30
ld [hl], a
ldh a, [$ff00 + $99]
cp $18
ret c
ld a, $45
call func_3c01
ret c
call func_27ed
rl a
rl a
rl a
rl a
and $70
add a, $18
ld hl, $c200
add hl, de
ld [hl], a
ld hl, $c210
add hl, de
ld [hl], $10
ld hl, $c340
add hl, de
ld [hl], $12
ld hl, $c350
add hl, de
set 7, [hl]
ld hl, $c290
add hl, de
inc [hl]
ret
ld e, h
nop
ld e, [hl]
nop
ld e, [hl]
jr nz, 0.l_4411
jr nz, 0.l_4415
ld h, b
ld e, h
ld h, b
ld e, h
ld b, b
ld e, [hl]
ld b, b
inc c
<error>
dec b
ei
ld [$060a], sp
inc c
jr 0.l_43e8
inc e
jr z, 0.l_43dc
xor [hl]
ld b, e
call func_3c3b
call func_7b20
call func_08e2
call func_3bb4
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $03
call func_3b87
call func_7b8c
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_4430
ld [hl], b
call func_27ed
and $03
ld e, a
ld d, b
ld hl, $43be
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
call func_27ed
and $03
ld e, a
ld d, b
ld hl, $43c2
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
call func_27ed
and $03
ld e, a
ld d, b
ld hl, $43c6
add hl, de
ld a, [hl]
ld hl, $c320
add hl, bc
ld [hl], a
ld a, $20
ldh [$ff00 + $f2], a
ldh a, [$ff00 + $ee]
cp $a8
jp nc, $7c35
ldh a, [$ff00 + $ec]
cp $84
jp nc, $7c35
ret
call func_7b20
ld e, $0f
ld d, b
ld hl, $c280
add hl, de
ld a, [hl]
cp $05
jr nz, 0.l_448d
ld hl, $c3a0
add hl, de
ld a, [hl]
cp $08
jr nz, 0.l_448d
ld hl, $c2e0
add hl, de
ld a, [hl]
cp $08
jr nz, 0.l_448d
ld hl, $c200
add hl, de
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $08
cp $10
jr nc, 0.l_448d
ld hl, $c210
add hl, de
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $08
cp $10
jr nc, 0.l_448d
ldh a, [$ff00 + $f6]
cp $df
ld a, $92
jr z, 0.l_4489
ld a, [$db79]
and a
ret nz
ld a, $43
call func_2197
ret
dec e
ld a, e
cp $ff
jr nz, 0.l_4445
ret
call func_7b20
call func_7ad3
ret nc
ld a, $12
call func_2197
ret
rst 38
nop
rst 38
nop
ld d, h
nop
ld d, [hl]
nop
ld e, b
nop
ld e, d
nop
ld d, [hl]
jr nz, 0.l_4504
jr nz, 0.l_450c
jr nz, 0.l_450c
jr nz, 0.l_4512
nop
ld e, h
jr nz, 0.l_4518
nop
ld e, [hl]
nop
ldh a, [$ff00 + $f1]
cp $ff
jr z, 0.l_44d9
cp $05
jr c, 0.l_44d3
sub a, $05
ldh [$ff00 + $f1], a
ld de, $44b5
call func_3cd0
jr 0.l_44d9
ld de, $44a1
call func_3c3b
call func_7b20
call func_7b42
call func_7b8c
call func_3b9e
ldh a, [$ff00 + $f0]
rst 0
xor $44
ld [bc], a
ld b, l
ld d, a
ld b, l
ld hl, $c240
add hl, bc
ld [hl], $08
call func_0891
call func_27ed
and $7f
add a, $40
ld [hl], a
jp $3b8d
call func_3bbf
call func_0891
jr nz, 0.l_4533
ld hl, $c340
add hl, bc
ld [hl], $12
ld hl, $c320
add hl, bc
ld [hl], $18
call func_3b8d
ld hl, $c240
add hl, bc
sla [hl]
ld a, $0e
ldh [$ff00 + $f2], a
ldh a, [$ff00 + $ee]
ldh [$ff00 + $d7], a
ldh a, [$ff00 + $ec]
add a, $00
ldh [$ff00 + $d8], a
ld a, $01
call func_0953
ret
ld hl, $c2a0
add hl, bc
ld a, [hl]
and $03
jr z, 0.l_4544
ld hl, $c240
add hl, bc
ld a, [hl]
cpl
inc a
ld [hl], a
ld hl, $c240
add hl, bc
ld e, $06
ld a, [hl]
and $80
jr z, 0.l_4551
ld e, $05
ld a, e
call func_3b87
ret
ret
call func_3bb4
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_458c
ld [hl], b
call func_451f
call func_0891
call func_27ed
and $7f
add a, $50
ld [hl], a
ld hl, $c240
add hl, bc
sra [hl]
ld hl, $c340
add hl, bc
ld [hl], $52
call func_3b8d
ld [hl], $01
ret
ld e, $01
ld hl, $c240
add hl, bc
ld a, [hl]
and $80
jr nz, 0.l_4599
ld e, $03
ld hl, $c320
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_45a3
inc e
ld a, e
call func_3b87
ret
nop
nop
ld b, [hl]
nop
nop
ld [$007e], sp
ldh a, [$ff00 + $00]
ld b, [hl]
nop
ldh a, [$ff00 + $08]
ld a, [hl]
nop
ldh [$ff00 + $00], a
ld b, [hl]
nop
ldh [$ff00 + $08], a
ld a, [hl]
nop
ret nc
nop
ld b, [hl]
nop
ret nc
ld [$007e], sp
ret nz
nop
ld b, [hl]
nop
ret nz
ld [$007e], sp
ld hl, $c3d0
add hl, bc
ld a, [hl]
add a, $01
sla a
ld c, a
ld hl, $45a8
call func_3d26
ld a, $0a
call func_3dd0
call func_7b20
ld a, [$db95]
cp $01
ret z
ldh a, [$ff00 + $f0]
rst 0
ei
ld b, l
inc bc
ld b, [hl]
inc l
ld b, [hl]
ld b, l
ld b, [hl]
ld l, b
ld b, [hl]
call func_0891
ld [hl], $c0
jp $3b8d
call func_0891
cp $40
jr nz, 0.l_4610
dec [hl]
ld a, $d7
jp $2197
and a
ret nz
ld a, $50
dec a
ldh [$ff00 + $d7], a
ld a, $30
ldh [$ff00 + $d8], a
ld a, $02
call func_0953
ld a, $2f
ldh [$ff00 + $f2], a
ld a, $00
call func_3b87
jp $3b8d
ldh a, [$ff00 + $98]
sub a, $50
add a, $08
cp $10
jr nc, 0.l_4641
ldh a, [$ff00 + $99]
sub a, $30
add a, $08
cp $10
jr nc, 0.l_4641
ret
call func_3b8d
ret
ldh a, [$ff00 + $98]
sub a, $50
add a, $08
cp $10
jr nc, 0.l_4667
ldh a, [$ff00 + $99]
sub a, $30
add a, $08
cp $10
jr nc, 0.l_4667
ld a, [$c146]
and a
ret nz
call func_3b8d
ld hl, $c2b0
add hl, bc
ld [hl], $30
ret
ld a, $02
ldh [$ff00 + $a1], a
ld [$c167], a
ld hl, $c2b0
add hl, bc
ld a, [hl]
ldh [$ff00 + $99], a
ld a, $50
ldh [$ff00 + $98], a
ldh a, [$ff00 + $e7]
and $07
jr nz, 0.l_468a
ld hl, $c3d0
add hl, bc
ld a, [hl]
cp $04
jr z, 0.l_468a
inc [hl]
ldh a, [$ff00 + $e7]
and $03
jr nz, 0.l_46a4
ld hl, $c2b0
add hl, bc
dec [hl]
ld a, [hl]
cp $12
jr nc, 0.l_46a4
xor a
ld [$db96], a
ld a, $01
ld [$db95], a
ret
ld a, $02
ldh [$ff00 + $9e], a
ldh a, [$ff00 + $e7]
and $08
ld [$c120], a
push bc
call func_087c
pop bc
call func_093b
ld [$c137], a
ld [$c16a], a
ret
ld a, [$db56]
cp $80
jp nz, $7c35
ld hl, $c380
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_46d8
ldh a, [$ff00 + $f1]
cp $0c
jr nc, 0.l_46d8
add a, $06
ldh [$ff00 + $f1], a
call func_4adb
ldh a, [$ff00 + $ea]
cp $01
jr nz, 0.l_46e9
ld a, $0c
call func_48c6
jp .l_7c3b
call func_380e
call func_7b20
call func_7b42
call func_3bb4
ld hl, $c430
add hl, bc
set 6, [hl]
ld hl, $c340
add hl, bc
res 7, [hl]
call func_7b8c
call func_3b9e
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
ldh [$ff00 + $e8], a
jr z, 0.l_4722
ld [hl], b
ld hl, $c320
add hl, bc
ld [hl], b
ld hl, $c290
add hl, bc
ld a, [hl]
rst 0
inc a
ld b, a
ld e, b
ld b, a
adc a, e
ld b, a
ld c, h
ld c, b
add a, d
ld c, b
rst 18
ld c, b
ld e, h
ld c, c
adc a, b
ld c, c
xor l
ld c, c
<error>
ld c, c
call func_0891
ld [hl], $20
xor a
ld [$d228], a
call func_3b87
call func_3b8d
call func_7bdf
ld a, e
ld [$d227], a
ld hl, $c380
add hl, bc
ld [hl], a
ret
call func_0891
jr nz, 0.l_4780
ld a, $91
call func_2185
ld hl, $c19f
res 7, [hl]
call func_3b8d
call func_0887
ld [hl], $30
ld hl, $c430
add hl, bc
ld [hl], $84
ld a, $01
ld [$d228], a
ld a, $01
call func_3b87
ret
ret
ld [$fcf8], sp
<error>
jr nz, 0.l_4767
nop
nop
ret nc
jr nc, 0.l_4759
adc a, h
ld [$5f28], sp
cp $0c
jr nz, 0.l_47dc
ld a, $0c
call func_3c01
jr c, 0.l_47dc
ld a, $0a
ldh [$ff00 + $f4], a
push bc
ldh a, [$ff00 + $d9]
ld c, a
ld hl, $4781
add hl, bc
ldh a, [$ff00 + $d7]
add a, [hl]
ld hl, $c200
add hl, de
ld [hl], a
ld hl, $4783
add hl, bc
ldh a, [$ff00 + $d8]
add a, [hl]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $4785
add hl, bc
ld a, [hl]
ld hl, $c240
add hl, de
ld [hl], a
ld hl, $4787
add hl, bc
ld a, [hl]
ld hl, $c250
add hl, de
ld [hl], a
ldh a, [$ff00 + $d9]
ld hl, $c3b0
add hl, de
ld [hl], a
ld hl, $c380
add hl, de
ld [hl], a
pop bc
call func_088c
ld e, $00
cp $0c
jr c, 0.l_47e7
ld e, $02
ld a, e
call func_3b87
call func_3daf
ret
call func_0887
jr nz, 0.l_4800
call func_0891
ld [hl], $30
call func_3daf
call func_3b8d
ret
ldh a, [$ff00 + $e8]
and a
jr z, 0.l_4823
ldh a, [$ff00 + $98]
push af
call func_7bdf
ld d, b
ld hl, $4789
add hl, de
ldh a, [$ff00 + $98]
add a, [hl]
ldh [$ff00 + $98], a
ld a, $0c
call func_3c25
pop af
ldh [$ff00 + $98], a
ld hl, $c320
add hl, bc
ld [hl], $10
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
rr a
and $01
call func_3b87
ld [$d228], a
call func_474b
ld hl, $c300
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_4849
call func_27ed
and $3f
add a, $30
ld [hl], a
call func_088c
ld [hl], $18
ret
jr z, 0.l_4824
call func_0891
jr nz, 0.l_486a
ld [hl], $22
call func_3daf
ld hl, $c380
add hl, bc
ld e, [hl]
ld d, b
ld hl, $484a
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
call func_3b8d
ret
and $07
jr nz, 0.l_4872
ld a, $09
ldh [$ff00 + $f2], a
call func_3daf
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
add a, $02
call func_3b87
ret
call func_0891
jr nz, 0.l_488e
call func_3b8d
call func_3b8d
ret
ld hl, $c2a0
add hl, bc
ld a, [hl]
and $03
jr z, 0.l_48be
xor a
ld [$c158], a
ld a, $20
ld [$c157], a
ld a, $0b
ldh [$ff00 + $f2], a
ld hl, $c240
add hl, bc
sra [hl]
sra [hl]
ld a, [hl]
cpl
inc a
ld [hl], a
ld hl, $c320
add hl, bc
ld [hl], $28
call func_3b8d
call func_0891
ld [hl], $60
ldh a, [$ff00 + $e7]
rr a
rr a
and $01
add a, $04
call func_3b87
ld a, $ff
ld [$d228], a
ret
nop
cp $fd
cp $00
ld [bc], a
inc bc
ld [bc], a
nop
inc b
ld [$100c], sp
inc c
ld [$2104], sp
jr nc, 0.l_48a6
add hl, bc
res 6, [hl]
ld hl, $c340
add hl, bc
set 7, [hl]
call func_0891
jr nz, 0.l_4900
ld [hl], $40
call func_3b8d
call func_3b8d
ld a, $00
ld [$d228], a
jp $3b87
ldh a, [$ff00 + $e8]
and a
jr z, 0.l_4908
call func_3daf
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
add a, $0c
call func_3b87
ld a, [$c3c0]
ld e, a
ld d, b
ld hl, $c030
add hl, de
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $07
call func_492c
ld a, $02
jp $3dd0
call func_4938
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
add a, $04
and $07
push bc
push hl
ld e, a
ld d, $00
ld hl, $48cf
add hl, de
ld b, [hl]
ld hl, $48d7
add hl, de
ld c, [hl]
pop hl
ldh a, [$ff00 + $ec]
add a, b
add a, $f6
ldi [hl], a
ldh a, [$ff00 + $ee]
add a, c
add a, $fc
ldi [hl], a
ld [hl], $24
inc hl
ld [hl], $00
inc hl
pop bc
ret
ld hl, $c240
add hl, bc
ld a, [hl]
and $fe
jr nz, 0.l_4970
call func_3daf
call func_0891
ld [hl], $40
jp $3b8d
ld hl, $c240
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_497d
inc [hl]
inc [hl]
inc [hl]
inc [hl]
dec [hl]
dec [hl]
ld a, $00
ld [$d228], a
call func_3b87
ret
call func_3daf
call func_0891
jr nz, 0.l_49a1
call func_0887
call func_27ed
and $1f
add a, $20
ld [hl], a
call func_3b8d
ld [hl], $02
ret
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
rr a
and $01
ld [$d227], a
ret
call func_3b8d
call func_0891
ld [hl], $60
ld hl, $c240
add hl, bc
ld a, [hl]
ldh [$ff00 + $9a], a
ld a, $28
ld [$c13e], a
ld a, $40
ld [$dbc7], a
ld a, [$db94]
add a, $08
ld [$db94], a
ld a, $0b
ldh [$ff00 + $f2], a
ret
call func_3daf
call func_0891
jr nz, 0.l_49de
jp .l_4990
cp $40
ld a, $00
jr nc, 0.l_49ed
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
rr a
rr a
and $01
call func_3b87
ld [$d228], a
call func_474b
ret
ldhl sp, d
<error>
ld d, h
jr nz, 0.l_49f4
inc b
ld d, d
jr nz, 0.l_49f8
inc c
ld d, b
jr nz, 0.l_49fb
<error>
ld d, h
jr nz, 0.l_49ff
inc b
ld d, d
jr nz, 0.l_4a03
inc c
ld d, b
jr nz, 0.l_4a08
<error>
ld d, b
nop
ldhl sp, d
inc b
ld d, d
nop
ldhl sp, d
inc c
ld d, h
nop
rst 30
<error>
ld d, b
nop
rst 30
inc b
ld d, d
nop
rst 30
inc c
ld d, h
nop
nop
<error>
ld d, [hl]
nop
nop
inc b
ld e, b
nop
nop
inc c
ld e, d
nop
nop
<error>
ld e, h
nop
nop
inc b
ld e, b
nop
nop
inc c
ld e, [hl]
nop
nop
<error>
ld e, h
nop
nop
inc b
ld e, b
nop
nop
inc c
ld e, d
nop
nop
<error>
ld d, [hl]
nop
nop
inc b
ld e, b
nop
nop
inc c
ld e, [hl]
nop
nop
<error>
ld [hl], b
nop
nop
inc b
ld [hl], d
nop
nop
inc c
ld [hl], h
nop
ld bc, $70fc
nop
nop
inc b
halt
nop
nop
inc c
ld a, b
nop
nop
<error>
ld e, d
jr nz, 0.l_4a74
inc b
ld e, b
jr nz, 0.l_4a78
inc c
ld d, [hl]
jr nz, 0.l_4a7c
<error>
ld e, [hl]
jr nz, 0.l_4a80
inc b
ld e, b
jr nz, 0.l_4a84
inc c
ld e, h
jr nz, 0.l_4a88
<error>
ld e, d
jr nz, 0.l_4a8c
inc b
ld e, b
jr nz, 0.l_4a90
inc c
ld e, h
jr nz, 0.l_4a94
<error>
ld e, [hl]
jr nz, 0.l_4a98
inc b
ld e, b
jr nz, 0.l_4a9c
inc c
ld d, [hl]
jr nz, 0.l_4aa0
<error>
ld [hl], h
jr nz, 0.l_4aa4
inc b
ld [hl], d
jr nz, 0.l_4aa8
inc c
ld [hl], b
jr nz, 0.l_4aac
<error>
ld a, b
jr nz, 0.l_4ab0
inc b
halt
jr nz, 0.l_4ab5
inc c
ld [hl], b
jr nz, 0.l_4ab8
<error>
ld a, d
nop
nop
inc b
ld a, h
nop
nop
inc c
ld a, [hl]
nop
nop
<error>
ld a, [hl]
jr nz, 0.l_4ac8
inc b
ld a, h
jr nz, 0.l_4acc
inc c
ld a, d
jr nz, 0.l_4adc
rst 38
ld h, $00
inc c
inc b
ld h, $00
inc c
add hl, bc
ld h, $00
ld a, [$d227]
sla a
ld e, a
ld a, [$d228]
cp $ff
jr z, 0.l_4afd
add a, e
rl a
rl a
and $fc
ld e, a
rl a
and $f8
add a, e
ld e, a
ld d, b
ld hl, $49f7
add hl, de
ld c, $03
call func_3d26
ldh a, [$ff00 + $f1]
rl a
rl a
and $fc
ld e, a
rl a
and $f8
add a, e
ld e, a
ld d, b
ld hl, $4a27
add hl, de
ld c, $03
call func_3d26
ld hl, $c310
add hl, bc
ld a, [hl]
and a
jr z, 0.l_4b2a
ldh a, [$ff00 + $ef]
ldh [$ff00 + $ec], a
ld hl, $4acf
ld c, $03
call func_3d26
call func_3dba
ret
add sp, d
cp $74
nop
add sp, d
ld b, $74
jr nz, 0.l_4b28
ld bc, $0076
<error>
add hl, bc
halt
jr nz, 0.l_4b3c
nop
halt
nop
nop
ld [$2076], sp
add sp, d
nop
ld [hl], h
nop
add sp, d
ld [$2074], sp
<error>
nop
halt
nop
<error>
ld [$2076], sp
nop
nop
halt
nop
nop
ld [$2076], sp
add sp, d
ld [bc], a
ld [hl], h
nop
add sp, d
ld a, [bc]
ld [hl], h
jr nz, 0.l_4b58
rst 38
halt
nop
<error>
rlc a
halt
jr nz, 0.l_4b6c
nop
halt
nop
nop
ld [$2076], sp
add sp, d
nop
ld [hl], h
nop
add sp, d
ld [$2074], sp
<error>
nop
halt
nop
<error>
ld [$2076], sp
nop
nop
halt
nop
nop
ld [$2076], sp
<error>
rst 38
ld [hl], h
nop
<error>
rlc a
ld [hl], h
jr nz, 0.l_4b94
nop
halt
nop
nop
ld [$2076], sp
<error>
nop
ld [hl], h
nop
<error>
ld [$2074], sp
nop
nop
halt
nop
nop
ld [$2076], sp
<error>
ld bc, $0074
<error>
add hl, bc
ld [hl], h
jr nz, 0.l_4bb4
nop
halt
nop
nop
ld [$2076], sp
<error>
nop
ld [hl], h
nop
<error>
ld [$2074], sp
nop
nop
halt
nop
nop
ld [$2076], sp
nop
rst 38
ld [hl], h
nop
nop
rlc a
ld [hl], h
jr nz, 0.l_4bd4
nop
ld [hl], h
nop
nop
ld [$2074], sp
nop
ld bc, $0074
nop
add hl, bc
ld [hl], h
jr nz, 0.l_4be4
nop
ld [hl], h
nop
nop
ld [$2074], sp
ld a, [$00fc]
inc b
ld b, $04
nop
<error>
ld a, [$21fc]
or b
jp nz, .l_7e09
and a
jp nz, .l_4cee
call func_4c9a
call func_7b20
ld hl, $c3d0
add hl, bc
ld a, [hl]
cp $02
jr nc, 0.l_4c5d
ld hl, $c360
add hl, bc
ld [hl], $02
ld hl, $c420
add hl, bc
ld a, [hl]
cp $14
jr nz, 0.l_4c5d
dec [hl]
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, $e3
call func_3c01
jr c, 0.l_4c5d
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $c2b0
add hl, de
inc [hl]
push bc
push de
pop bc
ld a, $20
call func_3c30
ldh a, [$ff00 + $d8]
cpl
inc a
ld hl, $c240
add hl, bc
ld [hl], a
ldh a, [$ff00 + $d7]
cpl
inc a
ld hl, $c250
add hl, bc
ld [hl], a
ld hl, $c2e0
add hl, bc
ld [hl], $18
pop bc
call func_08e2
call func_3bb4
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
nop
and $03
call func_3b87
call func_0891
jr nz, 0.l_4c93
call func_27ed
and $3f
add a, $30
ld [hl], a
and $07
ld e, a
ld d, b
ld hl, $4bed
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
ld hl, $4beb
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
call func_7b8c
call func_3b9e
ret
ld d, b
ld hl, $c3d0
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_4cbe
ldh a, [$ff00 + $f1]
rl a
rl a
rl a
and $f8
ld e, a
rl a
and $f0
add a, e
ld e, a
ld hl, $4b2b
add hl, de
ld c, $06
call func_3d26
ld a, $04
jp $3dd0
cp $02
jr z, 0.l_4cd9
ldh a, [$ff00 + $f1]
rl a
rl a
rl a
rl a
and $f0
ld e, a
ld hl, $4b8b
add hl, de
ld c, $04
call func_3d26
ld a, $02
jp $3dd0
ldh a, [$ff00 + $f1]
rl a
rl a
rl a
and $f8
ld e, a
ld hl, $4bcb
add hl, de
ld c, $02
jp $3d26
halt
nop
halt
jr nz, 0.l_4d00
ld [$cd4c], a
dec sp
inc a
call func_7b20
call func_7b42
call func_0891
jr nz, 0.l_4d02
call func_3bb4
call func_7b8c
call func_3b9e
ld hl, $c2a0
add hl, bc
ld a, [hl]
and $03
jr z, 0.l_4d18
ld hl, $c240
call func_4d24
ret c
ld hl, $c2a0
add hl, bc
ld a, [hl]
and $0c
jr z, 0.l_4d4e
ld hl, $c250
add hl, bc
ld a, [hl]
cpl
inc a
ld [hl], a
ld a, $09
ldh [$ff00 + $f2], a
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc a
ld [hl], a
cp $03
jr c, 0.l_4d4e
ldh a, [$ff00 + $ee]
ldh [$ff00 + $d7], a
ldh a, [$ff00 + $ec]
ldh [$ff00 + $d8], a
ld a, $02
call func_0953
ld a, $2f
ldh [$ff00 + $f2], a
call func_7c35
scf
ret
and a
ret
ld [hl], b
nop
ld [hl], b
jr nz, 0.l_4dc7
nop
ld [hl], d
jr nz, 0.l_4d7a
or b
jp nz, .l_7e09
and a
jp nz, .l_4dca
ld de, $4d50
call func_3c3b
call func_088c
ld e, $00
and a
jr z, 0.l_4d70
inc e
ld a, e
call func_3b87
call func_7b20
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, [hl]
and $0f
jr nz, 0.l_4db1
call func_088c
ld [hl], $08
ld a, $e2
call func_3c01
ret c
ld a, $12
ldh [$ff00 + $f4], a
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
add a, $04
ld [hl], a
ld hl, $c2b0
add hl, de
inc [hl]
ld hl, $c250
add hl, de
ld [hl], $10
ld hl, $c2e0
add hl, de
ld [hl], $30
ret
ld a, b
nop
ld a, b
jr nz, 0.l_4e2d
nop
halt
jr nz, 0.l_4e2f
nop
ld [hl], h
jr nz, 0.l_4e39
nop
ld a, h
nop
ld a, h
jr nz, 0.l_4e3f
jr nz, 0.l_4dc3
inc b
<error>
inc c
cp $02
jp z, .l_4e77
ldh a, [$ff00 + $e7]
rl a
rl a
and $10
ldh [$ff00 + $ed], a
ld de, $4db2
call func_3c3b
call func_7b20
call func_08e2
call func_3beb
ld a, [$dbc7]
push af
call func_3bd5
pop af
ld e, a
ld a, [$dbc7]
cp e
jr z, 0.l_4e07
cp $20
jr c, 0.l_4e07
ld a, $1f
ld [$dbc7], a
ld a, $30
call func_3c30
ldh a, [$ff00 + $d7]
ldh [$ff00 + $9b], a
call func_7b8f
ldh a, [$ff00 + $f0]
and a
jr z, 0.l_4e5e
xor a
ldh [$ff00 + $e8], a
ld a, $e2
call func_3c01
jr c, 0.l_4e5b
ld hl, $c2b0
add hl, de
ld [hl], $02
push bc
ldh a, [$ff00 + $e8]
ld c, a
ld hl, $c3b0
add hl, de
ld [hl], a
ld hl, $4dc6
add hl, bc
ldh a, [$ff00 + $d7]
add a, [hl]
ld hl, $c200
add hl, de
ld [hl], a
ld hl, $4dc8
add hl, bc
ld a, [hl]
ld hl, $c240
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
add a, $00
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $c250
add hl, de
ld [hl], $0c
ld hl, $c2e0
add hl, de
ld [hl], $20
pop bc
ldh a, [$ff00 + $e8]
inc a
cp $02
jr c, 0.l_4e10
jp $7c35
call func_0891
jp z, $7c35
ld hl, $c3b0
add hl, bc
cp $10
jr z, 0.l_4e70
cp $20
jr nz, 0.l_4e76
ld a, [hl]
cp $02
jr z, 0.l_4e76
inc [hl]
ret
ldh a, [$ff00 + $e7]
rl a
rl a
and $10
ldh [$ff00 + $ed], a
ld de, $4dbe
call func_3c3b
call func_7b20
call func_7b8c
call func_0891
jp z, $7c35
ret
ld c, d
nop
ld c, h
nop
ld c, h
jr nz, 0.l_4ee3
jr nz, 0.l_4ee9
nop
ld c, [hl]
jr nz, 0.l_4e9f
ld b, $fa
ld a, [$4806]
nop
ld c, b
ld h, b
ld c, b
ld b, b
ld c, b
jr nz, 0.l_4ecd
or b
jp nz, .l_7e09
and a
jr z, 0.l_4f03
ld de, $4ea3
call func_3c3b
call func_7b20
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
call func_3b87
call func_7b8c
call func_3b9e
ld hl, $c2a0
add hl, bc
ld a, [hl]
and a
jp nz, .l_4ee0
call func_3bb4
ld hl, $c410
add hl, bc
ld a, [hl]
and a
jr z, 0.l_4ef4
ldh a, [$ff00 + $ee]
ldh [$ff00 + $d7], a
ldh a, [$ff00 + $ec]
ldh [$ff00 + $d8], a
ld a, $07
ldh [$ff00 + $f2], a
ld a, $05
call func_0953
jp $7c35
ldh a, [$ff00 + $ee]
cp $a8
jp nc, $7c35
ldh a, [$ff00 + $ec]
cp $84
jp nc, $7c35
ret
ld de, $4e92
call func_3c3b
call func_7b20
call func_7b42
call func_0891
jr nz, 0.l_4f17
call func_3bb4
call func_088c
cp $01
jr nz, 0.l_4f65
ldh a, [$ff00 + $f7]
cp $03
ret c
ld a, $1e
call func_3c01
ret c
ld a, $0a
ldh [$ff00 + $f4], a
ld hl, $c410
add hl, de
ld [hl], b
ld hl, $c340
add hl, de
set 6, [hl]
set 4, [hl]
ld hl, $c430
add hl, de
set 1, [hl]
set 4, [hl]
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ldh a, [$ff00 + $da]
ld hl, $c310
add hl, de
ld [hl], a
ld hl, $c2b0
add hl, de
inc [hl]
push bc
push de
pop bc
ld a, $18
call func_3c25
pop bc
ld hl, $c3d0
add hl, bc
ld a, [hl]
rst 0
ld l, a
ld c, a
jr nc, 0.l_4fbf
call func_7b8c
call func_3b9e
ldh a, [$ff00 + $cc]
and $30
jr z, 0.l_4fc3
call func_7bdf
add a, $24
cp $48
jr nc, 0.l_4fc3
call func_7bef
add a, $24
cp $48
jr nc, 0.l_4fc3
call func_0891
ld [hl], $08
call func_088c
ld [hl], b
ld hl, $c3d0
add hl, bc
inc [hl]
ld hl, $c320
add hl, bc
ld [hl], $15
ld a, $24
ldh [$ff00 + $f2], a
ld a, $12
call func_3c30
ldh a, [$ff00 + $d7]
cpl
inc a
ld hl, $c250
add hl, bc
ld [hl], a
ldh a, [$ff00 + $d8]
cpl
inc a
ld hl, $c240
add hl, bc
ld [hl], a
ld hl, $c3b0
add hl, bc
ld [hl], $02
ret
ld hl, $c2a0
add hl, bc
ld a, [hl]
and $03
jr nz, 0.l_4fdb
ld a, [hl]
and $0c
jr z, 0.l_4fe3
ld hl, $c250
add hl, bc
ld a, [hl]
xor $f0
ld [hl], a
jr 0.l_4fe3
ld hl, $c240
add hl, bc
ld a, [hl]
xor $f0
ld [hl], a
ld hl, $c290
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_4ff2
call func_27ed
and $2f
jr nz, 0.l_501f
xor a
ld hl, $c250
add hl, bc
ld [hl], a
call func_27ed
and $03
ld e, a
ld d, b
ld hl, $4e9e
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
and a
jr nz, 0.l_501f
call func_27ed
and $01
add a, $03
ld e, a
ld d, b
ld hl, $4e9e
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
ld hl, $c290
add hl, bc
xor a
ld [hl], a
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
call func_3b87
ret
call func_7b8c
ld hl, $c410
add hl, bc
ld a, [hl]
push hl
ld [hl], $01
call func_3b9e
pop hl
ld [hl], b
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_506d
ld [hl], b
ld hl, $c320
add hl, bc
ld [hl], b
ld hl, $c250
add hl, bc
ld [hl], $08
ld hl, $c240
add hl, bc
ld [hl], $08
ld hl, $c3d0
add hl, bc
ld [hl], b
call func_088c
ld [hl], $10
ret
ld [$eaeb], a
<error>
<error>
<error>
xor $ef
ldh a, [$ff00 + $f1]
<error>
di
ld a, [$d219]
rl a
and $fe
ld e, a
ld d, b
ld hl, $506e
add hl, de
ldi a, [hl]
ld [$c195], a
ld a, [hl]
ld [$c196], a
ld a, $01
ldh [$ff00 + $91], a
ld [$c10e], a
ret
ld a, [$c124]
and a
jr nz, 0.l_50a9
ld a, [$c116]
and a
jr nz, 0.l_50a9
inc a
ld [$c116], a
call func_507a
ld hl, $c390
add hl, bc
ld a, [hl]
cp $02
jp z, .l_45d0
and a
jp nz, .l_54d0
ld a, [$d219]
rst 0
rst 0
ld d, b
cp $51
ld b, c
ld d, a
<error>
ld e, a
ret c
ld h, e
ld c, d
ld l, [hl]
ldh a, [$ff00 + $f0]
rst 0
ret c
ld d, b
dec [hl]
ld d, c
ld d, b
ld d, c
ld l, h
ld d, c
adc a, c
ld d, c
xor l
ld d, c
<error>
ld d, c
ld a, [$c146]
and a
jr nz, 0.l_5134
ld a, $5d
ld [$d368], a
ld hl, $da74
set 6, [hl]
ld a, $f5
call func_2197
call func_0891
ld [hl], $50
ldh a, [$ff00 + $98]
ld hl, $c200
add hl, bc
ld [hl], a
ld e, $80
ld hl, $d000
ldi [hl], a
dec e
jr nz, 0.l_50fe
ldh a, [$ff00 + $99]
ld hl, $c210
add hl, bc
ld [hl], a
ld e, $80
ld hl, $d100
ldi [hl], a
dec e
jr nz, 0.l_510e
xor a
ld [$d21a], a
ld [$d21b], a
ld [$d21c], a
ld [$d21d], a
ld [$d21e], a
ld [$d21f], a
ld [$d220], a
ld [$d221], a
ld [$d222], a
ld [$d223], a
call func_3b8d
ret
call func_562d
call func_0891
jr nz, 0.l_5145
call func_3b8d
ld a, $35
ldh [$ff00 + $f2], a
ret
cp $30
jr nz, 0.l_514f
dec [hl]
ld a, $23
ld [$d368], a
ret
call func_562d
call func_7b20
ld hl, $c250
add hl, bc
dec [hl]
ld a, [hl]
cp $e8
jr nz, 0.l_5168
call func_0891
ld [hl], $08
call func_3b8d
call func_7b8f
ret
call func_562d
call func_7b20
call func_7b8f
call func_0891
ret nz
ld hl, $c250
add hl, bc
inc [hl]
jr nz, 0.l_5188
call func_0891
ld [hl], $80
call func_3b8d
ret
call func_562d
call func_0891
jr z, 0.l_519f
and $07
jr nz, 0.l_519f
ld hl, $c3b0
add hl, bc
ld a, [hl]
cp $05
jr z, 0.l_51a0
inc [hl]
ret
call func_0891
ld [hl], $c0
call func_3b8d
ret
ld b, $05
rlc a
dec b
call func_569b
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
rr a
and $03
ld e, a
ld d, b
ld hl, $51a9
add hl, de
ld a, [hl]
call func_3b87
call func_0891
jr nz, 0.l_51cc
ld [hl], $2f
call func_3b8d
ret
ld [$0100], sp
ld [bc], a
inc bc
inc b
call func_569b
call func_0891
jr nz, 0.l_51ee
ld hl, $d219
inc [hl]
xor a
call func_3b87
call func_3b8d
ld [hl], b
ld hl, $c340
add hl, bc
res 7, [hl]
ret
rr a
rr a
rr a
and $0f
ld e, a
ld d, b
ld hl, $51cd
add hl, de
ld a, [hl]
call func_3b87
ret
call func_5728
call func_7b20
call func_08e2
ldh a, [$ff00 + $f0]
rst 0
ld e, $52
dec hl
ld d, d
ld c, a
ld d, d
xor [hl]
ld d, d
rst 8
ld d, d
<error>
ld d, d
sbc a, d
ld d, e
dec bc
ld d, h
ld b, b
ld d, e
ld e, d
ld d, e
call func_0891
ld [hl], $80
ld hl, $c3d0
add hl, bc
ld [hl], b
jp $3b8d
call func_0891
jr nz, 0.l_524e
ldh a, [$ff00 + $e7]
and $07
jr nz, 0.l_524e
ld hl, $c3b0
add hl, bc
inc [hl]
ld a, [hl]
cp $03
jr nz, 0.l_524e
ld hl, $c320
add hl, bc
ld [hl], $28
ld a, $08
call func_3c25
call func_3b8d
ret
call func_545f
call func_3bb4
call func_7b8c
call func_3b9e
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_529d
ld [hl], b
ld hl, $c320
add hl, bc
ld [hl], b
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc a
ld [hl], a
and $01
jr nz, 0.l_5291
call func_27ed
and $01
jr nz, 0.l_5291
call func_0891
ld [hl], $1f
call func_3b8d
ld [hl], $08
jr 0.l_529d
ld a, $20
ldh [$ff00 + $f2], a
call func_0891
ld [hl], $30
call func_3b8d
ld e, $03
ld hl, $c310
add hl, bc
ld a, [hl]
cp $0c
jr c, 0.l_52a9
inc e
ld a, e
call func_3b87
ret
ld a, $05
call func_3b87
call func_0891
jr nz, 0.l_52c8
ld a, $0c
call func_3c25
ld hl, $c320
add hl, bc
ld [hl], $20
call func_3b8d
dec [hl]
dec [hl]
call func_545f
call func_3bb4
ret
call func_0891
jr nz, 0.l_52d7
jp .l_535f
ret
ld a, $23
ldh [$ff00 + $f3], a
ret
call func_0891
jr nz, 0.l_5326
ld a, [$d219]
inc a
ld [$d219], a
call func_507a
xor a
ld [$d221], a
ld [$d222], a
ld [$d223], a
ld [$d220], a
ld hl, $c310
add hl, bc
ld [hl], b
ld hl, $c340
add hl, bc
ld [hl], $c0
ld a, $02
ld [$c197], a
inc a
ld [$c10d], a
ld a, $ff
call func_3b87
call func_0891
ld [hl], $40
ld hl, $c2b0
add hl, bc
ld [hl], b
call func_3b8d
ld [hl], b
ld a, $01
ld [$d21a], a
ret
cp $18
jr nc, 0.l_533b
cp $17
jr nz, 0.l_5333
ld hl, $fff2
ld [hl], $35
rr a
rr a
rr a
and $03
call func_3b87
ret
rst 38
nop
ld bc, $cd02
sub a, c
ld [$0520], sp
ld [hl], $80
jp $3b8d
rr a
rr a
rr a
and $03
ld e, a
ld d, b
ld hl, $533c
add hl, de
ld a, [hl]
call func_3b87
ret
call func_0891
jr nz, 0.l_537f
call func_27ed
and $07
ld e, a
ld d, b
ld hl, $5913
add hl, de
ld a, [hl]
ld hl, $c200
add hl, bc
ld [hl], a
ld hl, $591b
add hl, de
ld a, [hl]
ld hl, $c210
add hl, bc
ld [hl], a
call func_3b8d
ld [hl], $01
ret
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
jr 0.l_53b3
jr 0.l_5395
add sp, d
ldh [$ff00 + $e8], a
nop
jr 0.l_53d9
rst 38
call func_3b87
call func_0891
ld [hl], $80
call func_3b8d
ld [hl], $04
ld a, $21
ldh [$ff00 + $f3], a
xor a
ldh [$ff00 + $e8], a
ld a, $e6
call func_3c01
ret c
push bc
ldh a, [$ff00 + $e8]
ld c, a
ldh a, [$ff00 + $d7]
ld hl, $5380
add hl, bc
add a, [hl]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $5388
add hl, bc
add a, [hl]
ld hl, $c210
add hl, de
ld [hl], a
ldh a, [$ff00 + $da]
ld hl, $c310
add hl, de
ld [hl], a
ld hl, $5392
add hl, bc
ld a, [hl]
ld hl, $c240
add hl, de
ld [hl], a
ld hl, $5390
add hl, bc
ld a, [hl]
ld hl, $c250
add hl, de
ld [hl], a
ld hl, $c2e0
add hl, de
ld [hl], $2f
ld hl, $c340
add hl, de
ld [hl], $c2
ld hl, $c390
add hl, de
inc [hl]
pop bc
ldh a, [$ff00 + $e8]
inc a
cp $08
jr nz, 0.l_53ae
ret
dec b
inc bc
inc b
inc bc
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_5423
ld [hl], b
ld hl, $c320
add hl, bc
ld [hl], b
call func_0891
jr z, 0.l_5438
rr a
nop
nop
nop
and $03
ld e, a
ld d, b
ld hl, $5407
add hl, de
ld a, [hl]
jp $3b87
ld a, [$d220]
inc a
ld [$d220], a
cp $03
jr nc, 0.l_5449
call func_3b8d
ld [hl], $02
ret
ld a, $06
call func_3b87
call func_0891
ld [hl], $80
call func_3b8d
ld [hl], $05
ld a, $37
ldh [$ff00 + $f4], a
jp $53ad
ld e, $0f
ld d, b
ld hl, $c280
add hl, de
ld a, [hl]
cp $05
jr nz, 0.l_54b1
ld hl, $c3a0
add hl, de
ld a, [hl]
cp $08
jr nz, 0.l_54b1
ld hl, $c2e0
add hl, de
ld a, [hl]
cp $08
jr nz, 0.l_54b1
ld hl, $c200
add hl, de
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $0c
cp $18
jr nc, 0.l_54b1
ld hl, $c210
add hl, de
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $0c
cp $18
jr nc, 0.l_54b1
ld hl, $c420
add hl, bc
ld [hl], $14
ld a, $07
ldh [$ff00 + $f3], a
ld a, $37
ldh [$ff00 + $f2], a
call func_3b8d
ld [hl], $07
call func_0891
ld [hl], $80
pop af
ret
dec e
ld a, e
cp $ff
jr nz, 0.l_5462
ret
ld c, [hl]
nop
ld c, [hl]
jr nz, 0.l_5509
nop
ld c, h
jr nz, 0.l_550b
nop
ld c, d
jr nz, 0.l_54c7
ld [bc], a
ld [bc], a
ld bc, $0001
rrc a
rlc a
inc bc
ld bc, $0000
ld de, $54b8
call func_3c3b
call func_7b20
call func_0891
jp z, $7c35
rr a
rr a
rr a
and $07
ld e, a
ld d, b
ld hl, $54c4
add hl, de
push de
ld a, [hl]
call func_3b87
pop de
ld hl, $54ca
add hl, de
ldh a, [$ff00 + $e7]
and [hl]
jr nz, 0.l_54fc
call func_7b8c
ret
nop
nop
ld c, h
nop
nop
ld [$204c], sp
nop
ld [$20ff], sp
nop
stop
rst 38
jr nz, 0.l_550e
ldhl sp, d
rst 38
ld b, b
nop
nop
rst 38
ld b, b
nop
ld [$60ff], sp
nop
stop
rst 38
ld h, b
nop
nop
ld c, [hl]
nop
nop
ld [$204e], sp
nop
ld [$20ff], sp
nop
stop
rst 38
jr nz, 0.l_552e
ldhl sp, d
rst 38
ld b, b
nop
nop
rst 38
ld b, b
nop
ld [$60ff], sp
nop
stop
rst 38
ld h, b
ldhl sp, d
ldhl sp, d
ld a, d
nop
ldhl sp, d
nop
ld a, h
nop
ldhl sp, d
ld [$207c], sp
ldhl sp, d
stop
ld a, d
jr nz, 0.l_5556
ldhl sp, d
ld a, d
ld b, b
ld [$7c00], sp
ld b, b
ld [$7c08], sp
ld h, b
ld [$7a10], sp
ld h, b
ldhl sp, d
ldhl sp, d
halt
nop
ldhl sp, d
nop
ld a, b
nop
ldhl sp, d
ld [$2078], sp
ldhl sp, d
stop
halt
jr nz, 0.l_5576
ldhl sp, d
halt
ld b, b
ld [$7800], sp
ld b, b
ld [$7808], sp
ld h, b
ld [$7610], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld [hl], d
nop
ldhl sp, d
nop
ld [hl], h
nop
ldhl sp, d
ld [$2074], sp
ldhl sp, d
stop
ld [hl], d
jr nz, 0.l_5596
ldhl sp, d
ld [hl], d
ld b, b
ld [$7400], sp
ld b, b
ld [$7408], sp
ld h, b
ld [$7210], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld h, [hl]
nop
ldhl sp, d
nop
ld l, b
nop
ldhl sp, d
ld [$2068], sp
ldhl sp, d
stop
ld h, [hl]
jr nz, 0.l_55b6
ldhl sp, d
ld h, [hl]
ld b, b
ld [$6a00], sp
nop
ld [$6a08], sp
jr nz, 0.l_55c2
stop
ld h, [hl]
ld h, b
ldhl sp, d
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_55d6
ldhl sp, d
ld h, b
ld b, b
ld [$6400], sp
nop
ld [$6408], sp
jr nz, 0.l_55e2
stop
ld h, b
ld h, b
ldhl sp, d
ldhl sp, d
ld l, h
nop
ldhl sp, d
nop
ld l, [hl]
nop
ldhl sp, d
ld [$206e], sp
ldhl sp, d
stop
ld l, h
jr nz, 0.l_55f6
ldhl sp, d
ld l, h
ld b, b
ld [$7000], sp
nop
ld [$7008], sp
jr nz, 0.l_5602
stop
ld l, h
ld h, b
nop
nop
ld c, d
nop
nop
ld [$204a], sp
nop
ld [$20ff], sp
nop
stop
rst 38
jr nz, 0.l_560e
ldhl sp, d
rst 38
ld b, b
nop
nop
rst 38
ld b, b
nop
ld [$60ff], sp
nop
stop
rst 38
ld h, b
ld c, h
nop
ld c, h
jr nz, 0.l_566a
nop
ld c, b
jr nz, 0.l_564e
inc hl
ld e, $19
inc d
rrc a
ld a, [bc]
dec b
ld hl, $c3d0
add hl, bc
ld a, [hl]
ldh [$ff00 + $e9], a
xor a
ldh [$ff00 + $e8], a
ld e, a
ld d, b
ld hl, $5625
add hl, de
ldh a, [$ff00 + $e9]
sub a, [hl]
and $7f
ld e, a
ld d, b
ld hl, $d000
add hl, de
ld a, [hl]
ldh [$ff00 + $ee], a
ld hl, $d100
add hl, de
ld a, [hl]
ldh [$ff00 + $ec], a
ld de, $5621
ldh a, [$ff00 + $e8]
cp $00
jr z, 0.l_5667
ld hl, $c210
add hl, bc
ldh a, [$ff00 + $ec]
cp [hl]
jr z, 0.l_5672
ld de, $561d
xor a
ldh [$ff00 + $f1], a
call func_3c3b
ld a, $02
call func_3dd0
ldh a, [$ff00 + $e8]
inc a
cp $08
jr nz, 0.l_5635
call func_3dba
call func_569b
call func_7b20
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc [hl]
and $7f
ld e, a
ld d, b
ldh a, [$ff00 + $ec]
ld hl, $d100
add hl, de
ld [hl], a
ldh a, [$ff00 + $ee]
ld hl, $d000
add hl, de
ld [hl], a
ret
ld hl, $c3b0
add hl, bc
ld a, [hl]
rl a
rl a
rl a
rl a
rl a
and $e0
ld e, a
ld d, b
ld hl, $54fd
add hl, de
ld c, $08
call func_3d26
ld a, $08
call func_3dd0
ret
nop
nop
ld c, d
nop
nop
ld [$204a], sp
nop
nop
rst 38
nop
nop
nop
rst 38
nop
nop
nop
ld c, h
nop
nop
ld [$204c], sp
nop
nop
rst 38
nop
nop
nop
rst 38
nop
nop
nop
ld c, [hl]
nop
nop
ld [$204e], sp
nop
nop
rst 38
nop
nop
nop
rst 38
jr nz, 0.l_56d9
nop
ld e, h
nop
ldh a, [$ff00 + $08]
ld e, h
jr nz, 0.l_56f1
nop
ld e, [hl]
nop
nop
ld [$205e], sp
ldh a, [$ff00 + $00]
ld b, h
nop
ldh a, [$ff00 + $08]
ld b, h
jr nz, 0.l_5701
nop
ld b, h
ld b, b
nop
ld [$6044], sp
nop
<error>
ld b, b
nop
nop
inc b
ld b, d
nop
nop
inc c
ld b, b
jr nz, 0.l_5715
nop
rst 38
nop
nop
nop
ld c, b
nop
nop
ld [$2048], sp
nop
nop
rst 38
nop
nop
nop
rst 38
jr nz, 0.l_5719
pop af
rl a
rl a
rl a
rl a
and $f0
ld e, a
ld d, b
ld hl, $56b8
add hl, de
ld c, $04
call func_3d26
ld a, $04
call func_3dd0
ret
ld hl, $c440
add hl, bc
ld a, [hl]
cp $02
jp z, .l_5de0
and a
jp nz, .l_5df8
ld a, c
ld [$d201], a
ld a, [$d21a]
and a
jr nz, 0.l_575c
call func_5a6e
call func_7b20
call func_7b42
ldh a, [$ff00 + $f0]
rst 0
ld a, c
ld d, a
adc a, $57
dec bc
ld e, b
ld d, l
ld e, b
xor $58
jr z, 0.l_57ca
ld h, l
ld e, c
cp h
ld e, c
ld a, [bc]
ld e, d
dec h
ld e, d
xor a
call func_3b87
call func_5728
ldh a, [$ff00 + $98]
push af
ldh a, [$ff00 + $99]
push af
ld a, $50
ldh [$ff00 + $98], a
ld a, $30
ldh [$ff00 + $99], a
ld a, $10
call func_3c25
ld hl, $ff99
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_57b5
ld hl, $ff98
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_57b5
call func_0891
ld [hl], $50
call func_3b8d
ld [hl], $01
pop af
ldh [$ff00 + $99], a
pop af
ldh [$ff00 + $98], a
call func_7b8c
ret
inc b
inc bc
ld [bc], a
ld bc, $0000
nop
nop
nop
nop
nop
nop
nop
nop
nop
call func_0891
jr z, 0.l_57e4
rr a
rr a
rr a
and $0f
ld e, a
ld d, b
ld hl, $57bf
add hl, de
ld a, [hl]
ldh [$ff00 + $f1], a
jp $5728
xor a
ld [$d21a], a
call func_5819
ld hl, $c210
add hl, bc
ld a, [hl]
sub a, $08
ld [hl], a
call func_0891
ld [hl], $40
call func_3b8d
ld hl, $c2d0
add hl, bc
ld a, [hl]
and a
ret nz
inc [hl]
call func_52d8
ret
rrc a
ld a, [bc]
dec b
nop
call func_0891
jr nz, $55819
ld a, $22
ldh [$ff00 + $f3], a
ld [hl], $c0
jp $3b8d
call func_7c0e
ld a, e
ld [$d21e], a
ld d, b
ld hl, $5807
add hl, de
ld a, [hl]
ld hl, $c380
add hl, bc
ld [hl], a
ld hl, $c380
add hl, bc
ld a, [hl]
ld hl, $c2b0
add hl, bc
add a, [hl]
call func_3b87
ret
nop
ld bc, $0302
inc bc
inc bc
inc bc
inc bc
ld [bc], a
ld [bc], a
ld [bc], a
ld [bc], a
ld bc, $0101
ld bc, $0000
nop
nop
jr 0.l_5837
nop
nop
nop
nop
ldh a, [$ff00 + $00]
call func_0891
jr nz, 0.l_58c1
ld [$d21d], a
ld [hl], $50
ld a, $e6
call func_3c01
ld hl, $c440
add hl, de
inc [hl]
push bc
ld a, [$d21e]
ld c, a
ld hl, $584d
add hl, bc
ldh a, [$ff00 + $d7]
add a, [hl]
ld hl, $c200
add hl, de
ld [hl], a
ld hl, $5851
add hl, bc
ldh a, [$ff00 + $d8]
add a, [hl]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $c340
add hl, de
ld [hl], $42
ld hl, $c350
add hl, de
ld [hl], d
ld a, $38
ldh [$ff00 + $f4], a
ld a, [$d220]
cp $02
jr c, 0.l_58b6
ldh a, [$ff00 + $98]
ld hl, $ffe7
add a, [hl]
and $01
jr nz, 0.l_58b6
ld hl, $c290
add hl, de
ld [hl], $03
ld hl, $c2e0
add hl, de
ld [hl], $1c
ld a, $39
ldh [$ff00 + $f4], a
push de
pop bc
ld a, $18
call func_3c25
pop bc
jp $3b8d
rr a
rr a
rr a
and $03
ld hl, $c2b0
add hl, bc
ld [hl], a
call func_0891
rr a
rr a
rr a
rr a
and $0f
ld e, a
ld d, b
ld hl, $583d
add hl, de
ld a, [hl]
ld [$d21d], a
call func_0891
cp $40
jp c, $582b
and $1f
jp z, $5819
jp $582b
call func_0891
jr nz, 0.l_5909
ld [hl], $27
ld a, $35
ldh [$ff00 + $f2], a
ld hl, $c210
add hl, bc
ld a, [hl]
add a, $08
ld [hl], a
ld a, $01
ld [$d21a], a
jp $3b8d
ld hl, $c2b0
add hl, bc
ld [hl], $04
call func_582b
ret
ld d, b
jr z, 0.l_598e
jr 0.l_58a0
jr c, 0.l_5982
ld d, b
jr nc, 0.l_594d
jr nc, 0.l_596f
ld d, b
ld [hl], b
ld [hl], b
ld [hl], h
nop
ld bc, $0302
inc b
call func_0891
jr nz, 0.l_594c
call func_27ed
and $07
ld e, a
ld d, b
ld hl, $5913
add hl, de
ld a, [hl]
ld [$d21b], a
ld hl, $591b
add hl, de
ld a, [hl]
ld [$d21c], a
call func_0891
ld [hl], $1f
jp $3b8d
rr a
rr a
rr a
and $0f
ld e, a
ld d, b
ld hl, $5923
add hl, de
ld a, [hl]
ldh [$ff00 + $f1], a
jp $5728
jr 0.l_5973
stop
inc c
ld [$0205], sp
ld bc, $e0af
pop af
call func_5728
ldh a, [$ff00 + $99]
push af
ldh a, [$ff00 + $98]
push af
ld a, [$d21b]
ldh [$ff00 + $98], a
ld a, [$d21c]
ldh [$ff00 + $99], a
call func_0891
rr a
rr a
and $07
ld e, a
ld d, b
ld hl, $595d
add hl, de
ld a, [hl]
call func_3c25
ld hl, $ff99
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_59ae
ld hl, $ff98
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_59ae
call func_0891
ld [hl], $50
call func_3b8d
ld [hl], $01
pop af
ldh [$ff00 + $98], a
pop af
ldh [$ff00 + $99], a
call func_7b8c
ret
nop
ld a, [bc]
rrc a
dec b
call func_0891
jr nz, 0.l_59d7
call func_5458
ld a, $01
ld [$d21a], a
ld a, $06
call func_3b87
call func_0891
ld [hl], $50
call func_3b8d
ret
ld a, [$d221]
cp $80
jr nc, 0.l_59e2
inc a
ld [$d221], a
ld a, [$d221]
ld hl, $d222
add a, [hl]
ld [hl], a
jr nc, 0.l_59f0
ld hl, $d223
inc [hl]
ld a, [$d223]
and $03
ld e, a
ld d, b
ld hl, $59b8
add hl, de
ld a, [hl]
ld hl, $c380
add hl, bc
ld [hl], a
ld hl, $c2b0
add hl, bc
ld [hl], b
call func_582b
ret
call func_0891
jr nz, 0.l_5a15
call func_5140
jp $3b8d
cp $18
jr nc, 0.l_5a21
rr a
rr a
rr a
and $03
call func_3b87
call func_5728
ret
call func_5728
ldh a, [$ff00 + $98]
push af
ldh a, [$ff00 + $99]
push af
ld a, $50
ldh [$ff00 + $98], a
ld a, $30
ldh [$ff00 + $99], a
ld a, $10
call func_3c25
ld hl, $ff99
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_5a64
ld hl, $ff98
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_5a64
call func_52e2
call func_0891
ld [hl], $31
ld hl, $c360
add hl, bc
ld [hl], $ff
call func_5fa7
pop af
ldh [$ff00 + $99], a
pop af
ldh [$ff00 + $98], a
call func_7b8c
ret
call func_5d97
call func_5b34
call func_5b13
call func_5d51
ret
ld l, d
nop
ld l, h
nop
ld l, h
jr nz, 0.l_5aec
jr nz, 0.l_5aee
nop
rst 38
rst 38
ld l, d
jr nz, 0.l_5a89
rst 38
nop
nop
ld l, d
nop
ld [$7a08], sp
nop
ld [$7a00], sp
jr nz, 0.l_5a98
ld [$206a], sp
nop
nop
nop
nop
ld [bc], a
nop
nop
nop
nop
ld [bc], a
inc b
inc b
inc b
inc b
inc b
dec b
dec b
dec b
dec b
dec b
ldh a, [$ff00 + $f3]
di
ldh a, [$ff00 + $f5]
ldh a, [$ff00 + $f3]
di
ldh a, [$ff00 + $f5]
pop af
ldh a, [$ff00 + $f1]
<error>
ldh a, [$ff00 + $0f]
stop
rrc a
ld c, $10
<error>
<error>
pop af
pop af
<error>
<error>
<error>
pop af
pop af
<error>
<error>
or $f7
or $f8
<error>
or $f7
or $f8
ld bc, $0101
ld bc, $0103
ld bc, $0101
inc bc
ld [bc], a
ld [bc], a
ld [bc], a
ld [bc], a
ld [bc], a
inc bc
inc bc
inc bc
inc bc
inc bc
stop
dec c
dec c
stop
inc de
stop
dec c
dec c
stop
inc de
push af
or $f5
<error>
di
inc de
ld [de], a
inc de
inc d
dec d
<error>
<error>
pop af
pop af
<error>
<error>
<error>
pop af
pop af
<error>
<error>
<error>
<error>
<error>
<error>
<error>
<error>
<error>
<error>
<error>
ld hl, $c3b0
add hl, bc
ld a, [hl]
ld e, a
ld d, b
ld hl, $5aeb
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $5aff
add hl, de
ldh a, [$ff00 + $ec]
add a, $08
add a, [hl]
ldh [$ff00 + $ec], a
ld hl, $5ad7
add hl, de
jr 0.l_5b53
ld hl, $c3b0
add hl, bc
ld a, [hl]
ld e, a
ld d, b
ld hl, $5aaf
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $5ac3
add hl, de
ldh a, [$ff00 + $ec]
add a, $08
add a, [hl]
ldh [$ff00 + $ec], a
ld hl, $5a9b
add hl, de
ld a, [hl]
cp $04
jr nc, 0.l_5b62
ldh [$ff00 + $f1], a
ld de, $5a7b
call func_3c3b
jr 0.l_5b74
sub a, $04
rl a
rl a
rl a
and $f8
ld e, a
ld d, b
ld hl, $5a8b
add hl, de
ld c, $02
call func_3d26
ld a, $02
call func_3dd0
call func_3dba
ret
ldhl sp, d
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_5b93
ldhl sp, d
ld l, [hl]
nop
ld [$6400], sp
nop
ld [$6408], sp
jr nz, 0.l_5b9f
stop
ld l, [hl]
jr nz, 0.l_5b96
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_5bb3
ld sp, hl
ld l, [hl]
nop
ld [$6400], sp
nop
ld [$6408], sp
jr nz, 0.l_5bbf
rrc a
ld l, [hl]
jr nz, 0.l_5bb6
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_5bd4
ld sp, hl
ld l, [hl]
nop
ld [$6400], sp
nop
ld [$6408], sp
jr nz, 0.l_5be0
rrc a
ld l, [hl]
jr nz, 0.l_5bd6
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_5bf4
ldhl sp, d
ld l, [hl]
nop
ld [$6400], sp
nop
ld [$6408], sp
jr nz, 0.l_5c00
stop
ld l, [hl]
jr nz, 0.l_5bf8
ldhl sp, d
ld h, b
nop
ld a, [$6200]
nop
ld a, [$6208]
jr nz, 0.l_5c04
stop
ld h, b
jr nz, 0.l_5c16
ldhl sp, d
ld l, [hl]
nop
ld [$6400], sp
nop
ld [$6408], sp
jr nz, 0.l_5c22
stop
ld l, [hl]
jr nz, 0.l_5c18
ldhl sp, d
ld h, b
nop
ld a, [$6600]
nop
ld a, [$6608]
jr nz, 0.l_5c24
stop
ld h, b
jr nz, 0.l_5c33
ldhl sp, d
ld l, [hl]
nop
ld [$6800], sp
nop
ld [$6808], sp
jr nz, 0.l_5c3f
stop
ld l, [hl]
jr nz, 0.l_5c38
ldhl sp, d
ld h, b
nop
ld a, [$6600]
nop
ld a, [$6608]
jr nz, 0.l_5c44
stop
ld h, b
jr nz, 0.l_5c53
ld sp, hl
ld l, [hl]
nop
ld [$6800], sp
nop
ld [$6808], sp
jr nz, 0.l_5c5f
rrc a
ld l, [hl]
jr nz, 0.l_5c58
ldhl sp, d
ld h, b
nop
ld a, [$6600]
nop
ld a, [$6608]
jr nz, 0.l_5c64
stop
ld h, b
jr nz, 0.l_5c74
ld sp, hl
ld l, [hl]
nop
ld [$6800], sp
nop
ld [$6808], sp
jr nz, 0.l_5c80
rrc a
ld l, [hl]
jr nz, 0.l_5c78
ldhl sp, d
ld h, b
nop
ld a, [$6600]
nop
ld a, [$6608]
jr nz, 0.l_5c84
stop
ld h, b
jr nz, 0.l_5c94
ldhl sp, d
ld l, [hl]
nop
ld [$6800], sp
nop
ld [$6808], sp
jr nz, 0.l_5ca0
stop
ld l, [hl]
jr nz, 0.l_5c96
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, [hl]
nop
ldhl sp, d
ld [$2066], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_5cb2
ldhl sp, d
ld l, [hl]
nop
ld [$6800], sp
nop
ld [$6808], sp
jr nz, 0.l_5cbe
stop
ld l, [hl]
jr nz, 0.l_5cb6
<error>
ld [hl], d
nop
ldhl sp, d
inc b
ld [hl], h
nop
ld [$7600], sp
nop
ld [$7808], sp
nop
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ld a, [$72fb]
nop
ld a, [$7403]
nop
ld [$7600], sp
nop
ld [$7808], sp
nop
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ldhl sp, d
inc b
ld [hl], h
jr nz, 0.l_5cfa
inc c
ld [hl], d
jr nz, 0.l_5d0e
nop
ld a, b
jr nz, 0.l_5d12
ld [$2076], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ld a, [$7405]
jr nz, 0.l_5d1c
dec c
ld [hl], d
jr nz, 0.l_5d2e
nop
ld a, b
jr nz, 0.l_5d32
ld [$2076], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
ld bc, $0302
inc b
dec b
ld b, $07
ld [$0a09], sp
ld a, [bc]
ld a, [bc]
ld a, [bc]
dec bc
inc c
inc c
inc c
inc c
dec c
ld hl, $c3b0
add hl, bc
ld a, [hl]
ld e, a
ld d, b
ld hl, $5d3d
add hl, de
ld a, [hl]
ld d, $00
ld e, a
sla e
rl d
sla e
rl d
sla e
rl d
sla e
rl d
sla e
rl d
ld hl, $5b7d
add hl, de
ld c, $08
call func_3d26
ld a, $08
call func_3dd0
ret
ld e, $00
ld e, $60
ld a, h
nop
ld a, h
jr nz, 0.l_5e0a
nop
ld a, [hl]
jr nz, 0.l_5da4
<error>
nop
nop
nop
nop
ldh a, [$ff00 + $04]
ldh a, [$ff00 + $ed]
push af
call func_5da1
pop af
ldh [$ff00 + $ed], a
ret
ld a, [$d21d]
and a
ret z
dec a
ldh [$ff00 + $f1], a
ldh a, [$ff00 + $e7]
rl a
rl a
rl a
and $50
ldh [$ff00 + $ed], a
ld a, [$d21e]
ld e, a
ld d, b
ld hl, $5d8f
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $5d93
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld de, $5d83
call func_3c3b
ld a, $02
call func_3dd0
call func_3dba
ret
ld b, [hl]
nop
ld b, [hl]
ld h, b
ld [hl], b
nop
rst 38
rst 38
ld de, $5dd8
ret
ld a, [hl]
nop
ld a, [hl]
jr nz, 0.l_5e65
nop
ld a, h
jr nz, 0.l_5e0b
nop
ld e, $60
ld e, b
nop
ld e, b
jr nz, 0.l_5e4f
nop
ld e, d
jr nz, 0.l_5de9
rst 20
rl a
rl a
rl a
and $50
ldh [$ff00 + $ed], a
ld de, $5de4
call func_3c3b
call func_7b20
call func_08e2
ldh a, [$ff00 + $f0]
cp $04
jr nz, 0.l_5e30
call func_088c
jp z, $7c35
xor c
bit 0, a
ld e, $ff
jr z, 0.l_5e2b
call func_088c
ld e, $01
cp $08
jr nc, 0.l_5e2b
ld e, $02
ld a, e
call func_3b87
ret
call func_7b8c
call func_3b9e
ldh a, [$ff00 + $f0]
rst 0
ld b, c
ld e, [hl]
sub a, c
ld e, [hl]
cp c
ld e, [hl]
cpl
ld e, a
call func_3bb4
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc a
ld [hl], a
and $03
jr nz, 0.l_5e85
ld a, $e6
call func_3c01
ret c
ld hl, $c340
add hl, de
ld [hl], $c2
ld hl, $c350
add hl, de
ld [hl], d
ld hl, $c440
add hl, de
inc [hl]
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $c2f0
add hl, de
ld [hl], $0f
ld hl, $c3b0
add hl, de
ld [hl], $01
ld hl, $c290
add hl, de
ld [hl], $04
ld hl, $c2a0
add hl, bc
ld a, [hl]
and a
jr z, 0.l_5e90
jp $7c35
ret
ld a, $08
ldh [$ff00 + $f4], a
ld a, $18
call func_3c30
ldh a, [$ff00 + $d7]
ldh [$ff00 + $9b], a
cpl
inc a
ld hl, $c250
add hl, bc
ld [hl], a
ldh a, [$ff00 + $d8]
ldh [$ff00 + $9a], a
cpl
inc a
ld hl, $c240
add hl, bc
ld [hl], a
ld a, $10
ld [$c13e], a
call func_3b8d
ret
call func_5e44
ld a, [$d21a]
and a
ret nz
ld a, [$d201]
ld e, a
ld d, b
ld hl, $c200
add hl, de
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $10
cp $20
jr nc, 0.l_5f26
ld hl, $c210
add hl, de
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $0c
cp $18
jr nc, 0.l_5f26
ld hl, $c240
add hl, bc
ld a, [hl]
sla a
ld hl, $c3f0
add hl, de
ld [hl], a
ld hl, $c250
add hl, bc
ld a, [hl]
sla a
ld hl, $c400
add hl, de
ld [hl], a
ld hl, $c410
add hl, de
ld [hl], $12
call func_7c35
ld a, [$d220]
inc a
ld [$d220], a
cp $04
jr c, 0.l_5f1c
ld hl, $c290
add hl, de
ld [hl], $07
ld hl, $c2e0
add hl, de
ld [hl], $c0
ld a, $36
ldh [$ff00 + $f2], a
ld hl, $c420
add hl, de
ld [hl], $14
ld a, $07
ldh [$ff00 + $f3], a
ret
jr nz, 0.l_5f49
ldh [$ff00 + $e0], a
jr nz, 0.l_5f0d
jr nz, 0.l_5f0f
call func_3bbf
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
add a, $03
call func_3b87
call func_0891
jr z, 0.l_5f4c
and $01
jr nz, 0.l_5f4c
ld a, $18
call func_3c25
ld hl, $c2a0
add hl, bc
ld a, [hl]
and a
jr z, 0.l_5fa6
ld a, $36
ldh [$ff00 + $f4], a
xor a
ldh [$ff00 + $e8], a
ld a, $7d
call func_3c01
jr c, 0.l_5fa3
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $c2b0
add hl, de
inc [hl]
push bc
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ldh a, [$ff00 + $e8]
ld c, a
ld hl, $5f27
add hl, bc
ld a, [hl]
ld hl, $c240
add hl, de
ld [hl], a
ld hl, $5f2b
add hl, bc
ld a, [hl]
ld hl, $c250
add hl, de
ld [hl], a
pop bc
ldh a, [$ff00 + $e8]
inc a
cp $04
jr nz, 0.l_5f59
jp $7c35
ret
ld e, $80
ld hl, $d100
xor a
ldi [hl], a
dec e
jr nz, 0.l_5fac
ret
inc bc
inc bc
dec b
dec b
nop
nop
inc b
inc b
ld [bc], a
ld [bc], a
ld b, $06
ld bc, $0701
rlc a
nop
ld b, $0c
ld c, $10
ld c, $0c
ld b, $00
ld a, [$f2f4]
ldh a, [$ff00 + $f2]
<error>
ld a, [$0600]
inc c
ld c, $06
rlc a
nop
ld bc, $0302
inc b
dec b
call func_7b20
jp $3bb4
ldh a, [$ff00 + $f0]
rst 0
ld d, a
ld h, b
<error>
ld h, b
ret nc
ld h, b
sbc a, d
ld h, b
nop
nop
ld c, d
nop
nop
ld [$204a], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
nop
ld c, h
nop
nop
ld [$204c], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
nop
ld c, [hl]
nop
nop
ld [$204e], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
ldhl sp, d
ld a, b
nop
ldhl sp, d
nop
ld a, d
nop
ldhl sp, d
ld [$207a], sp
nop
stop
ld a, b
jr nz, 0.l_6050
nop
ld a, h
nop
ld [$7c08], sp
jr nz, 0.l_6053
inc bc
ld [bc], a
ld bc, $0000
nop
nop
xor a
ldh [$ff00 + $f1], a
call func_0891
jr nz, 0.l_6062
jp $3b8d
cp $20
jr nz, 0.l_606c
dec [hl]
call func_52d8
ld a, $20
rr a
rr a
rr a
and $07
ld e, a
ld d, b
ld hl, $604f
add hl, de
ld a, [hl]
rl a
rl a
rl a
and $f8
ld e, a
rl a
and $f0
add a, e
ld e, a
ld hl, $5fef
add hl, de
ld c, $06
call func_3d26
ld a, $06
call func_3dd0
ret
nop
nop
ld bc, $0201
ld [bc], a
inc bc
inc bc
xor a
ldh [$ff00 + $f1], a
call func_0891
jr nz, 0.l_60c4
call func_52e2
call func_5140
ld hl, $c360
add hl, bc
ld [hl], $ff
ld hl, $c340
add hl, bc
ld [hl], $40
ld hl, $c350
add hl, bc
ld [hl], $0a
ld hl, $c430
add hl, bc
ld [hl], $90
call func_3b65
ret
rr a
rr a
rr a
and $07
ld e, a
ld d, b
ld hl, $6092
jr 0.l_6076
ld hl, $c480
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_60e3
call func_0891
ld [hl], $1f
call func_5458
jp $3b8d
call func_5fde
call func_6255
call func_08e2
call func_3dba
call func_7b20
xor a
ld [$d3d6], a
ld e, $0c
ld hl, $c300
add hl, bc
ld a, [hl]
and a
jr z, 0.l_610a
call func_6118
ld a, $01
ld [$d3d6], a
ld e, $0c
ld hl, $d202
ld a, [hl]
inc a
ld [hl], a
cp e
jr c, $56118
ld [hl], b
ld a, $38
ldh [$ff00 + $f2], a
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc a
and $7f
ld [hl], a
ld e, a
ld d, b
ld hl, $d000
add hl, de
ldh a, [$ff00 + $ee]
ld [hl], a
ld hl, $d100
add hl, de
ldh a, [$ff00 + $ec]
ld [hl], a
call func_6341
ld hl, $c2b0
add hl, bc
ld e, [hl]
srl e
ld d, b
ld hl, $5fd6
add hl, de
ld a, [hl]
call func_3b87
ret
ldhl sp, d
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_615e
ldhl sp, d
ld h, h
nop
ld [$6600], sp
nop
ld [$6608], sp
jr nz, 0.l_616a
stop
ld h, h
jr nz, 0.l_615e
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_617e
ldhl sp, d
ld l, h
nop
ld [$6e00], sp
nop
ld [$6208], sp
ld h, b
ld [$6010], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld l, b
nop
ldhl sp, d
nop
ld l, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_619e
ldhl sp, d
ld l, b
ld b, b
ld [$6a00], sp
ld b, b
ld [$6208], sp
ld h, b
ld [$6010], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld l, h
ld b, b
ldhl sp, d
nop
ld l, [hl]
ld b, b
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_61be
ldhl sp, d
ld h, b
ld b, b
ld [$6200], sp
ld b, b
ld [$6208], sp
ld h, b
ld [$6010], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld h, h
ld b, b
ldhl sp, d
nop
ld h, [hl]
ld b, b
ldhl sp, d
ld [$6066], sp
ldhl sp, d
stop
ld h, h
ld h, b
ld [$60f8], sp
ld b, b
ld [$6200], sp
ld b, b
ld [$6208], sp
ld h, b
ld [$6010], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$606e], sp
ldhl sp, d
stop
ld l, h
ld h, b
ld [$60f8], sp
ld b, b
ld [$6200], sp
ld b, b
ld [$6208], sp
ld h, b
ld [$6010], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$206a], sp
ldhl sp, d
stop
ld l, b
jr nz, 0.l_621e
ldhl sp, d
ld h, b
ld b, b
ld [$6200], sp
ld b, b
ld [$6a08], sp
ld h, b
ld [$6810], sp
ld h, b
ldhl sp, d
ldhl sp, d
ld h, b
nop
ldhl sp, d
nop
ld h, d
nop
ldhl sp, d
ld [$2062], sp
ldhl sp, d
stop
ld h, b
jr nz, 0.l_623e
ldhl sp, d
ld h, b
ld b, b
ld [$6200], sp
ld b, b
ld [$6e08], sp
jr nz, 0.l_624a
stop
ld l, h
jr nz, 0.l_62b6
nop
ld [hl], b
jr nz, 0.l_62bc
nop
ld [hl], d
jr nz, 0.l_62c2
nop
ld [hl], h
jr nz, 0.l_62c8
nop
halt
jr nz, 0.l_6277
ld b, b
jp .l_3609
ld c, b
ld hl, $c3b0
add hl, bc
ld a, [hl]
rl a
rl a
rl a
rl a
rl a
and $e0
ld e, a
ld d, b
ld hl, $6145
add hl, de
ld c, $08
call func_3d26
ld hl, $c340
add hl, bc
ld [hl], $42
ld hl, $c3d0
add hl, bc
ld a, [hl]
ldh [$ff00 + $d7], a
ldh a, [$ff00 + $d7]
sub a, $0c
and $7f
ld e, a
ld d, b
ld hl, $d000
add hl, de
ld a, [hl]
ldh [$ff00 + $ee], a
ld hl, $d100
add hl, de
ld a, [hl]
ldh [$ff00 + $ec], a
ld a, $00
ldh [$ff00 + $f1], a
ld de, $6245
call func_3c3b
ldh a, [$ff00 + $d7]
sub a, $18
and $7f
ld e, a
ld d, b
ld hl, $d000
add hl, de
ld a, [hl]
ldh [$ff00 + $ee], a
ld hl, $d100
add hl, de
ld a, [hl]
ldh [$ff00 + $ec], a
ld a, $00
ldh [$ff00 + $f1], a
ld de, $6245
call func_3c3b
ldh a, [$ff00 + $d7]
sub a, $24
and $7f
ld e, a
ld d, b
ld hl, $d000
add hl, de
ld a, [hl]
ldh [$ff00 + $ee], a
ld hl, $d100
add hl, de
ld a, [hl]
ldh [$ff00 + $ec], a
ld a, $01
ldh [$ff00 + $f1], a
ld de, $6245
call func_3c3b
ldh a, [$ff00 + $d7]
sub a, $2e
and $7f
ld e, a
ld d, b
ld hl, $d000
add hl, de
ld a, [hl]
ldh [$ff00 + $ee], a
ld hl, $d100
add hl, de
ld a, [hl]
ldh [$ff00 + $ec], a
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
add a, $02
ldh [$ff00 + $f1], a
ldh a, [$ff00 + $e7]
rl a
rl a
and $10
ld hl, $ffed
xor [hl]
ld [hl], a
ld de, $6245
call func_3c3b
ldh a, [$ff00 + $f0]
cp $02
jr nc, 0.l_6340
ld hl, $c420
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_6340
ld hl, $c430
add hl, bc
ld [hl], $90
call func_3beb
ld hl, $c430
add hl, bc
ld [hl], $d0
ld hl, $c360
add hl, bc
ld a, [hl]
cp $f0
jr nc, 0.l_6340
call func_3b8d
ld hl, $c480
add hl, bc
ld [hl], $50
ret
ldh a, [$ff00 + $f0]
cp $02
jr nc, 0.l_6352
ld hl, $c420
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_6352
call func_7b8c
call func_3b9e
ld hl, $c2a0
add hl, bc
ld a, [hl]
and a
jr z, 0.l_6389
ld e, $08
bit 0, a
jr nz, 0.l_6371
ld e, $00
bit 1, a
jr nz, 0.l_6371
ld e, $04
bit 2, a
jr nz, 0.l_6371
ld e, $0c
ld hl, $c2b0
add hl, bc
ld [hl], e
call func_27ed
rr a
jr c, 0.l_6384
ld hl, $c2c0
add hl, bc
ld a, [hl]
cpl
inc a
ld [hl], a
call func_0891
ld [hl], $10
call func_088c
jr nz, 0.l_63bf
ld [hl], $06
ld hl, $c2c0
add hl, bc
ld a, [hl]
ld hl, $c2b0
add hl, bc
add a, [hl]
and $0f
ld [hl], a
ld hl, $c2b0
add hl, bc
ld e, [hl]
ld d, b
ld hl, $5fb2
add hl, de
ld a, [hl]
call func_3b87
ld hl, $5fc2
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
ld hl, $5fc6
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
call func_0891
jr nz, 0.l_63d7
call func_27ed
and $1f
add a, $10
ld [hl], a
call func_27ed
and $02
dec a
ld hl, $c2c0
add hl, bc
ld [hl], a
ret
ld hl, $c2b0
add hl, bc
ld a, [hl]
cp $03
jp z, .l_6d5d
cp $02
jp z, .l_6d8c
and a
jp nz, .l_6c7e
ldh a, [$ff00 + $f0]
cp $02
jr c, 0.l_6435
cp $0b
jr z, 0.l_63f9
cp $0c
jr nz, 0.l_6402
ld a, $06
ldh [$ff00 + $f1], a
call func_5728
jr 0.l_6405
call func_6943
call func_7b20
call func_08e2
ldh a, [$ff00 + $f0]
cp $09
jr nc, 0.l_6435
call func_3bb4
ld hl, $c360
add hl, bc
ld a, [hl]
cp $e8
jr nc, 0.l_6435
call func_3b8d
ld [hl], $09
ld a, $09
ldh [$ff00 + $f0], a
ld a, $10
ldh [$ff00 + $f3], a
call func_0891
ld [hl], $80
ld hl, $c420
add hl, bc
ld [hl], $80
ldh a, [$ff00 + $f0]
rst 0
call z, func_1f64
ld h, l
ld h, l
ld h, l
cp b
ld h, l
ldi a, [hl]
ld h, [hl]
sbc a, $66
ld h, [hl]
ld h, a
and e
ld h, a
rst 30
ld h, a
ldhl sp, d
ld h, a
rrc a
ld l, b
jr z, 0.l_64b8
xor l
ld l, b
rst 38
ld l, b
nop
nop
ld c, d
nop
nop
ld [$204a], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
nop
ld c, h
nop
nop
ld [$204c], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
nop
ld c, [hl]
nop
nop
ld [$204e], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ldh a, [$ff00 + $00]
ld e, h
nop
ldh a, [$ff00 + $08]
ld e, h
jr nz, 0.l_64a5
nop
ld e, [hl]
nop
nop
ld [$205e], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
<error>
ld l, d
nop
nop
inc b
ld l, h
jr nz, 0.l_64bd
inc c
ld l, d
jr nz, 0.l_64b4
<error>
ld d, b
nop
di
inc b
ld d, d
nop
di
inc c
ld l, [hl]
nop
xor a
ldh [$ff00 + $f1], a
call func_3b87
call func_5728
ldh a, [$ff00 + $98]
push af
ldh a, [$ff00 + $99]
push af
ld a, $50
ldh [$ff00 + $98], a
ld a, $30
ldh [$ff00 + $99], a
ld a, $10
call func_3c25
ld hl, $ff99
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_6508
ld hl, $ff98
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_6508
call func_0891
ld [hl], $60
call func_3b8d
pop af
ldh [$ff00 + $99], a
pop af
ldh [$ff00 + $98], a
call func_7b8c
ret
inc b
inc bc
ld [bc], a
ld bc, $0000
nop
nop
nop
nop
nop
nop
nop
call func_0891
jr nz, 0.l_653f
ld [$d224], a
ld hl, $c210
add hl, bc
ld a, [hl]
sub a, $08
ld [hl], a
call func_0891
ld [hl], $08
ld a, $04
call func_3b87
call func_52d8
jp $3b8d
rr a
rr a
rr a
and $0f
ld e, a
ld d, b
ld hl, $6512
add hl, de
ld a, [hl]
rl a
rl a
rl a
and $f8
ld e, a
rl a
and $f0
add a, e
ld e, a
ld hl, $6454
add hl, de
ld c, $06
call func_3d26
ld a, $06
call func_3dd0
ret
call func_0891
jr nz, 0.l_6577
ld [hl], $7f
jp $3b8d
call func_7bdf
ld a, e
ld [$d21e], a
ret
ret
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
inc b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
dec b
ld [bc], a
rlc a
ld [$0000], sp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
ld a, $00
ld [$d21e], a
call func_0891
jr nz, 0.l_65cd
call func_0887
ld [hl], $4c
call func_656f
jp $3b8d
cp $40
jr nz, 0.l_65d6
ld hl, $fff4
ld [hl], $19
cp $58
jr nz, 0.l_65df
ld hl, $fff2
ld [hl], $39
rr a
rr a
and $3f
ld e, a
ld d, b
ld hl, $6598
add hl, de
ld a, [hl]
ld [$d224], a
ld hl, $6578
add hl, de
ld a, [hl]
call func_3b87
ld a, [$d224]
cp $05
jr z, 0.l_6607
ld a, $f3
ld [$d225], a
ld a, $f0
ld [$d226], a
ret
ld a, $f8
ld [$d225], a
ld a, $fe
ld [$d226], a
ret
inc bc
ld [bc], a
ld bc, $0000
ld bc, $0302
add sp, d
nop
jr 0.l_6636
nop
add sp, d
add sp, d
nop
stop
jr 0.l_6635
ldh a, [$ff00 + $e8]
ldh a, [$ff00 + $10]
jr 0.l_65f8
add a, a
ld [$0b20], sp
ld [$d221], a
call func_0891
ld [hl], $30
jp $3b8d
ld a, [$d21e]
and a
ld a, $f5
jr z, 0.l_6644
ld a, $0b
ld [$d225], a
ld a, $ee
ld [$d226], a
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
nop
and $01
call func_3b87
ld a, [$d21e]
and a
ld hl, $6612
jr z, 0.l_6663
ld hl, $6616
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
nop
nop
and $03
ld e, a
ld d, b
add hl, de
ld a, [hl]
inc a
ld [$d224], a
ldh a, [$ff00 + $e7]
and $1f
jr nz, 0.l_66d9
ld a, [$d221]
cp $06
jr nc, 0.l_66d9
ld a, $e6
call func_3c01
ret c
ld hl, $c2e0
add hl, de
ld [hl], $30
ld hl, $c2b0
add hl, de
ld [hl], $02
push bc
ld hl, $c340
add hl, de
ld [hl], $42
ld hl, $c350
add hl, de
ld [hl], $00
push de
push de
pop bc
call func_3b65
pop de
ld a, [$d21e]
and a
ld a, [$d221]
jr nz, 0.l_66b2
xor $07
ld c, a
ld hl, $6622
add hl, bc
ld a, [$d225]
add a, [hl]
ld hl, $ffd7
add a, [hl]
ld hl, $c200
add hl, de
ld [hl], a
ld hl, $661a
add hl, bc
ld a, [hl]
sub a, $0c
ld hl, $ffd8
add a, [hl]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $d221
inc [hl]
pop bc
ret
dec bc
ld a, [bc]
ld [bc], a
ld a, [bc]
ld a, [$d21e]
and a
ld a, $fd
jr z, 0.l_66e8
ld a, $03
ld [$d225], a
ld a, $ec
ld [$d226], a
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
nop
nop
and $03
ld e, a
ld d, b
ld hl, $66da
add hl, de
ld a, [hl]
inc a
ld [$d224], a
call func_0891
jr nz, 0.l_6760
ld [hl], $40
xor a
ld [$d224], a
call func_3b8d
ld a, $e6
call func_3c01
jr c, 0.l_6760
ld hl, $c2b0
add hl, de
inc [hl]
ldh a, [$ff00 + $d8]
sub a, $10
ld hl, $c210
add hl, de
ld [hl], a
ld a, [$d21e]
ld hl, $c380
add hl, de
ld [hl], a
and a
ld a, $08
jr nz, 0.l_6736
ld a, $f8
ld hl, $ffd7
add a, [hl]
ld hl, $c200
add hl, de
ld [hl], a
ld hl, $c340
add hl, de
ld [hl], $40
ld hl, $c350
add hl, de
ld [hl], $08
push bc
push de
pop bc
call func_3b65
ld a, $18
call func_3c25
call func_0891
ld [hl], $30
ld a, $27
ldh [$ff00 + $f4], a
pop bc
ld a, $02
call func_3b87
ret
call func_0891
jr nz, 0.l_677d
ld [hl], $1f
call func_27ed
and $07
ld hl, $c2c0
add hl, bc
ld [hl], a
call func_5140
call func_3b8d
ld a, $03
call func_3b87
ret
jr z, 0.l_67d5
ld a, b
jr z, 0.l_6800
jr z, 0.l_67da
ld a, b
jr nz, 0.l_67b5
jr nz, 0.l_67bf
jr nc, 0.l_67e1
ld d, b
ld d, b
jr nz, 0.l_67b3
inc e
ld a, [de]
jr 0.l_67af
inc d
ld [de], a
stop
ld c, $0c
ld a, [bc]
ld [$0406], sp
ld [bc], a
ld a, $04
call func_3b87
ldh a, [$ff00 + $98]
push af
ldh a, [$ff00 + $99]
push af
ld hl, $c2c0
add hl, bc
ld e, [hl]
ld d, b
ld hl, $6783
add hl, de
ld a, [hl]
ldh [$ff00 + $98], a
ld hl, $678b
add hl, de
ld a, [hl]
ldh [$ff00 + $99], a
call func_0891
rr a
and $0f
ld e, a
ld d, b
ld hl, $6793
add hl, de
ld a, [hl]
call func_3c25
ld hl, $ffee
ldh a, [$ff00 + $98]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_67ed
ld hl, $ffec
ldh a, [$ff00 + $99]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_67ed
call func_3b8d
pop af
ldh [$ff00 + $99], a
pop af
ldh [$ff00 + $98], a
call func_7b8c
ret
ret
call func_0891
jr nz, 0.l_680e
ld [hl], $40
call func_5458
call func_3b8d
ld a, $00
call func_3b87
xor a
ld [$d224], a
ret
ld a, $06
ldh [$ff00 + $f1], a
call func_5728
call func_0891
jr nz, 0.l_6827
ld hl, $c340
add hl, bc
res 6, [hl]
call func_3b8d
call func_3daf
ret
call func_3bb4
call func_7b8c
call func_3b9e
ldh a, [$ff00 + $e7]
and $01
jr nz, 0.l_6856
ld a, $18
call func_3c30
ldh a, [$ff00 + $d7]
ld hl, $c250
sub a, [hl]
bit 7, a
jr z, 0.l_6848
dec [hl]
dec [hl]
inc [hl]
ldh a, [$ff00 + $d8]
ld hl, $c240
sub a, [hl]
bit 7, a
jr z, 0.l_6855
dec [hl]
dec [hl]
inc [hl]
ld hl, $c420
add hl, bc
ld a, [hl]
and a
jr z, 0.l_6876
ld hl, $c340
add hl, bc
set 6, [hl]
call func_0891
ld [hl], $80
call func_27d2
ld a, $10
ldh [$ff00 + $f3], a
call func_53ad
jp $3b8d
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc a
ld [hl], a
and $07
ret nz
ld a, $e6
call func_3c01
ret c
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $c2b0
add hl, de
ld [hl], $03
ld hl, $c2e0
add hl, de
ld [hl], $1f
ld hl, $c340
add hl, de
ld [hl], $c2
ld hl, $c3b0
add hl, de
ld [hl], $01
ret
call func_0891
cp $01
jr nz, 0.l_68b8
dec [hl]
jp $5140
and a
ret nz
ldh a, [$ff00 + $98]
push af
ldh a, [$ff00 + $99]
push af
ld a, $50
ldh [$ff00 + $98], a
ld a, $30
ldh [$ff00 + $99], a
ld a, $0c
call func_3c25
ld hl, $ff99
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_68ed
ld hl, $ff98
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_68ed
call func_0891
ld [hl], $5f
call func_3b8d
pop af
ldh [$ff00 + $99], a
pop af
ldh [$ff00 + $98], a
call func_7b8c
ret
nop
nop
nop
ld bc, $0101
ld [bc], a
ld [bc], a
call func_0891
jr nz, 0.l_692c
call func_3daf
call func_52e2
ld hl, $c360
add hl, bc
ld [hl], $ff
ld hl, $c340
add hl, bc
ld [hl], $00
ld hl, $c430
add hl, bc
ld [hl], $c0
call func_0887
ld [hl], $90
xor a
ld [$d223], a
ld hl, $c300
add hl, bc
ld [hl], $3f
ret
cp $20
jr c, 0.l_6932
ld a, $1f
rr a
rr a
and $07
ld e, a
ld d, b
ld hl, $68f7
add hl, de
ld a, [hl]
ldh [$ff00 + $f1], a
call func_5728
ret
ldh a, [$ff00 + $f0]
cp $0a
ret nc
ldh a, [$ff00 + $f1]
inc a
ret z
ld a, [$d21e]
and a
ldh a, [$ff00 + $f1]
jr z, 0.l_6956
add a, $05
ldh [$ff00 + $f1], a
call func_69ec
call func_6a84
call func_6c2c
ret
ldhl sp, d
<error>
ld d, b
nop
ldhl sp, d
inc b
ld d, d
nop
ldhl sp, d
inc c
ld l, [hl]
nop
ld [$6af8], sp
nop
ld [$6c00], sp
nop
ld [$6c08], sp
jr nz, 0.l_6983
stop
ld l, d
jr nz, 0.l_697e
rst 38
rst 38
rst 38
ei
cp $50
nop
ei
ld b, $52
nop
ei
ld c, $6e
nop
ld [$6af8], sp
nop
ld [$6c00], sp
nop
ld [$6c08], sp
jr nz, 0.l_69a3
stop
ld l, d
jr nz, 0.l_699e
rst 38
rst 38
rst 38
ldhl sp, d
<error>
ld l, [hl]
jr nz, 0.l_699f
inc b
ld d, d
jr nz, 0.l_69a3
inc c
ld d, b
jr nz, 0.l_69b7
ldhl sp, d
ld l, d
nop
ld [$6c00], sp
nop
ld [$6c08], sp
jr nz, 0.l_69c3
stop
ld l, d
jr nz, 0.l_69be
rst 38
rst 38
rst 38
ei
ld a, [$206e]
ei
ld [bc], a
ld d, d
jr nz, 0.l_69c6
ld a, [bc]
ld d, b
jr nz, 0.l_69d7
ldhl sp, d
ld l, d
nop
ld [$6c00], sp
nop
ld [$6c08], sp
jr nz, 0.l_69e3
stop
ld l, d
jr nz, 0.l_69de
rst 38
rst 38
rst 38
nop
nop
ld [bc], a
ld bc, $0200
ld [bc], a
nop
inc bc
ld [bc], a
ldh a, [$ff00 + $f1]
ld e, a
ld d, b
ld hl, $69e2
add hl, de
ld a, [hl]
rl a
rl a
rl a
rl a
rl a
and $70
ld e, a
ld hl, $6962
add hl, de
ld c, $07
call func_3d26
ld a, $07
call func_3dd0
ret
<error>
ldhl sp, d
ld h, h
nop
cp $11
ld h, b
nop
cp $19
ld h, d
nop
<error>
ld sp, hl
ld h, h
nop
cp $11
ld h, b
nop
cp $19
ld h, d
nop
ldh a, [$ff00 + $00]
ld h, h
jr nz, 0.l_6a28
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ei
stop
ld h, b
nop
ei
jr 0.l_6a9d
nop
nop
ldhl sp, d
ld h, [hl]
nop
cp $10
ld h, [hl]
jr nz, 0.l_6a44
rst 38
rst 38
rst 38
<error>
stop
ld h, h
jr nz, 0.l_6a4b
rst 28
ld h, d
jr nz, 0.l_6a4f
rst 30
ld h, b
jr nz, 0.l_6a49
rrc a
ld h, h
jr nz, 0.l_6a57
rst 28
ld h, d
jr nz, 0.l_6a5b
rst 30
ld h, b
jr nz, 0.l_6a51
ld [$0064], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ei
ldh a, [$ff00 + $62]
jr nz, 0.l_6a70
ldhl sp, d
ld h, b
jr nz, 0.l_6a77
ldhl sp, d
ld h, [hl]
nop
nop
stop
ld h, [hl]
jr nz, 0.l_6a80
rst 38
rst 38
rst 38
ldh a, [$ff00 + $f1]
rl a
rl a
and $fc
ld e, a
rl a
and $f8
add a, e
ld e, a
ld d, b
ld hl, $6a0c
add hl, de
ld c, $03
call func_3d26
ld a, $03
call func_3dd0
ret
<error>
nop
ld [hl], b
nop
<error>
ld [$2070], sp
<error>
nop
ld a, h
nop
<error>
ld [$207c], sp
ld [$7c00], sp
ld b, b
ld [$7c08], sp
ld h, b
inc d
nop
ld [hl], b
ld b, b
inc d
ld [$6070], sp
nop
nop
ld a, [hl]
ld b, b
nop
ld [$207e], sp
di
dec c
ld a, b
jr nz, 0.l_6ac0
dec d
halt
jr nz, 0.l_6ade
di
halt
ld b, b
dec c
ei
ld a, b
ld b, b
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
<error>
ld [hl], d
nop
nop
<error>
ld [hl], h
nop
nop
<error>
ld a, d
nop
nop
inc c
ld a, d
nop
nop
inc d
ld [hl], h
jr nz, 0.l_6af5
inc e
ld [hl], d
jr nz, 0.l_6af9
nop
rst 38
rst 38
nop
nop
rst 38
rst 38
nop
nop
ld a, [hl]
nop
nop
ld [$607e], sp
di
di
halt
nop
di
ei
ld a, b
nop
dec c
dec c
ld a, b
ld h, b
dec c
dec d
halt
ld h, b
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
pop af
rrc a
ld a, b
jr nz, 0.l_6b16
rl a
halt
jr nz, 0.l_6b36
di
halt
ld b, b
dec c
ei
ld a, b
ld b, b
nop
nop
rst 38
rst 38
nop
ld [$ffff], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
pop af
pop af
halt
nop
pop af
ld sp, hl
ld a, b
nop
dec c
dec c
ld a, b
ld h, b
dec c
dec d
halt
ld h, b
nop
nop
rst 38
rst 38
nop
ld [$ffff], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ldhl sp, d
ld [$2078], sp
ldhl sp, d
stop
halt
jr nz, 0.l_6b71
ldhl sp, d
halt
ld b, b
ld [$7800], sp
ld b, b
nop
nop
rst 38
ld b, b
nop
ld [$20ff], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
<error>
inc b
ld a, b
jr nz, 0.l_6b81
inc c
halt
jr nz, 0.l_6b8d
<error>
halt
ld b, b
inc b
inc b
ld a, b
ld b, b
nop
nop
rst 38
ld b, b
nop
ld [$20ff], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
ldhl sp, d
ldhl sp, d
halt
nop
ldhl sp, d
nop
ld a, b
nop
ld [$7808], sp
ld h, b
ld [$7610], sp
ld h, b
nop
nop
rst 38
nop
nop
ld [$60ff], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
<error>
<error>
halt
nop
<error>
inc b
ld a, b
nop
inc b
inc b
ld a, b
ld h, b
inc b
inc c
halt
ld h, b
nop
nop
rst 38
nop
nop
ld [$60ff], sp
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
nop
ldhl sp, d
ld [hl], d
nop
nop
nop
ld [hl], h
nop
nop
ld [$2074], sp
nop
stop
ld [hl], d
jr nz, 0.l_6bf1
ld [$ffff], sp
nop
stop
rst 38
rst 38
nop
nop
rst 38
rst 38
nop
nop
rst 38
rst 38
nop
ei
ld [hl], d
nop
nop
inc bc
ld [hl], h
nop
nop
dec b
ld [hl], h
jr nz, 0.l_6c0d
dec c
ld [hl], d
jr nz, 0.l_6c11
<error>
rst 38
rst 38
nop
inc c
rst 38
rst 38
nop
nop
rst 38
rst 38
nop
nop
rst 38
rst 38
ld [$0606], sp
ld b, $04
inc b
inc b
inc b
inc b
inc b
inc b
inc b
ld a, [$d224]
and a
ret z
ld a, [$d225]
ld hl, $ffee
add a, [hl]
ld [hl], a
ld a, [$d226]
ld hl, $ffec
add a, [hl]
ld [hl], a
ld a, [$d224]
dec a
ld e, a
ld d, b
ld hl, $6c20
add hl, de
ld c, [hl]
ld d, b
sla e
rl d
sla e
rl d
sla e
rl d
sla e
rl d
sla e
rl d
ld a, e
and $e0
ld e, a
ld hl, $6aa0
add hl, de
push bc
call func_3d26
pop de
ld a, e
call func_3dd0
call func_3dba
ret
inc bc
ld [bc], a
ld bc, $0000
ld bc, $0302
ld a, [$d201]
ld e, a
ld d, b
ld hl, $c290
add hl, de
ld a, [hl]
cp $09
jp nc, $7c35
ld hl, $c3d0
add hl, bc
ld a, [hl]
rr a
rr a
rr a
and $03
ld e, a
ld d, b
ld hl, $c380
add hl, bc
ld a, [hl]
and a
ld hl, $6c76
jr z, 0.l_6ca7
ld hl, $6c7a
add hl, de
ld a, [hl]
inc a
ld [$d224], a
xor a
ld [$d225], a
ld [$d226], a
call func_6c2c
xor a
ld [$d224], a
call func_7b20
ldh a, [$ff00 + $e7]
and $0f
jr nz, 0.l_6cc8
ld a, $3a
ldh [$ff00 + $f4], a
ld hl, $c3d0
add hl, bc
inc [hl]
call func_7b8c
call func_3bbf
call func_0891
jr z, 0.l_6cd9
ret
ldh a, [$ff00 + $98]
push af
ldh a, [$ff00 + $99]
push af
ld a, [$d201]
ld e, a
ld d, b
ld hl, $c200
add hl, de
ld a, [hl]
ldh [$ff00 + $98], a
ld hl, $c210
add hl, de
ld a, [hl]
sub a, $0c
ldh [$ff00 + $99], a
ld a, $10
call func_3c30
ld hl, $c250
add hl, bc
ldh a, [$ff00 + $d7]
sub a, [hl]
and $80
jr nz, 0.l_6d06
inc [hl]
inc [hl]
dec [hl]
ld hl, $c240
add hl, bc
ldh a, [$ff00 + $d8]
sub a, [hl]
and $80
jr nz, 0.l_6d14
inc [hl]
inc [hl]
dec [hl]
ld hl, $ff99
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_6d46
ld hl, $ff98
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $03
cp $06
jr nc, 0.l_6d46
ld a, [$d201]
ld e, a
ld d, b
ld hl, $c290
add hl, de
ld a, [hl]
cp $08
jr nz, 0.l_6d46
ld [hl], $03
ld hl, $c2e0
add hl, de
ld [hl], $4c
call func_7c35
pop af
ldh [$ff00 + $99], a
pop af
ldh [$ff00 + $98], a
ret
ld c, d
nop
ld c, d
jr nz, 0.l_6d9e
nop
ld c, h
jr nz, 0.l_6da4
nop
ld c, [hl]
jr nz, 0.l_6d5a
nop
ld bc, $1101
ld c, l
ld l, l
call func_3c3b
call func_7b20
call func_0891
jp z, $7c35
rr a
rr a
rr a
and $03
ld e, a
ld d, b
ld hl, $6d59
add hl, de
ld a, [hl]
call func_3b87
ret
ld e, $00
ld e, $60
inc [hl]
nop
inc [hl]
jr nz, 0.l_6dd9
nop
ld d, h
jr nz, 0.l_6ddf
nop
ld d, [hl]
jr nz, 0.l_6d7d
rst 20
rl a
rl a
and $10
ldh [$ff00 + $ed], a
ld de, $6d7c
call func_3c3b
call func_7b20
ldh a, [$ff00 + $f0]
rst 0
and h
ld l, l
cp e
ld l, l
call func_0891
jr nz, 0.l_6dae
ld [hl], $20
jp $3b8d
ld e, $00
cp $18
jr nc, 0.l_6db6
ld e, $01
ld a, e
call func_3b87
ret
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
add a, $02
call func_3b87
call func_0891
cp $01
jr nz, 0.l_6dd7
ld a, $28
ldh [$ff00 + $f4], a
ld a, $30
call func_3c25
ldh a, [$ff00 + $e7]
xor c
rr a
jr nc, 0.l_6de3
call func_7b8c
call func_3bbf
ldh a, [$ff00 + $ee]
cp $a8
jp nc, $7c35
ldh a, [$ff00 + $ec]
cp $88
jp nc, $7c35
ret
ld bc, $0302
inc bc
inc bc
inc bc
ld [bc], a
ld bc, $2320
ld h, $29
inc l
cpl
ldd [hl], a
dec [hl]
jr c, 0.l_6e3c
jr c, 0.l_6e3e
jr c, 0.l_6e40
jr c, 0.l_6e42
jr c, 0.l_6e44
jr c, 0.l_6e46
jr c, 0.l_6e48
jr c, 0.l_6e4a
jr nz, 0.l_6e37
ld h, $29
inc l
cpl
ldd [hl], a
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
inc [hl]
jr z, 0.l_6e53
ld h, $25
inc h
inc hl
ldi [hl], a
ld hl, $1f20
ld e, $1d
inc e
dec de
ld a, [de]
add hl, de
jr 0.l_6e54
jr 0.l_6e56
jr 0.l_6e58
jr 0.l_6e5a
inc bc
ld [bc], a
ld bc, $0000
nop
nop
nop
ld hl, $c300
add hl, bc
ld a, [hl]
and a
jr z, 0.l_6e6e
cp $10
jr nz, 0.l_6e5c
dec [hl]
call func_52d8
ld a, $10
rr a
rr a
rr a
and $07
ld e, a
ld d, b
ld hl, $6e42
add hl, de
ld a, [hl]
ldh [$ff00 + $f1], a
call func_5728
ret
call func_7070
call func_7b20
ldh a, [$ff00 + $f0]
rst 0
ld a, l
ld l, [hl]
cp c
ld l, a
sub a, $6f
ld hl, $c360
add hl, bc
ld a, [hl]
cp $f0
jr nc, 0.l_6eb3
ld a, $03
ld [$c5a7], a
ld a, $f6
call func_2197
ld a, $5e
ld [$d368], a
call func_0891
ld [hl], $80
ld hl, $c420
add hl, bc
ld [hl], $80
ld hl, $c350
add hl, bc
res 7, [hl]
ld hl, $c340
add hl, bc
set 6, [hl]
call func_27d2
call func_3b8d
ret
ldh a, [$ff00 + $e7]
and $0f
jr nz, 0.l_6ecd
ld a, [$d223]
cp $04
jr nc, 0.l_6ecd
inc a
ld [$d223], a
cp $01
jr nz, 0.l_6ecd
ld hl, $d368
ld [hl], $50
call func_08e2
ld hl, $c360
add hl, bc
ld a, [hl]
cpl
cp $17
jr c, 0.l_6edc
ld a, $17
ld e, a
ld d, b
ld hl, $6dfa
add hl, de
ld a, [hl]
ld hl, $c2b0
add hl, bc
ld [hl], a
ld hl, $6e12
add hl, de
ld a, [hl]
ld hl, $c2c0
add hl, bc
ld [hl], a
ld hl, $6e2a
add hl, de
ld a, [$d210]
inc a
cp [hl]
jr c, 0.l_6f02
ld a, $3d
ldh [$ff00 + $f2], a
xor a
ld [$d210], a
ld a, $00
call func_3b87
call func_0887
jr nz, 0.l_6f23
call func_27ed
and $0f
add a, $20
ld [hl], a
call func_27ed
and $01
jr nz, 0.l_6f23
call func_088c
ld [hl], $7f
ld hl, $c350
add hl, bc
set 7, [hl]
call func_088c
jr z, 0.l_6f48
rr a
rr a
rr a
rr a
and $07
ld e, a
ld d, b
ld hl, $6df2
add hl, de
ld a, [hl]
call func_3b87
cp $03
jr nz, 0.l_6f48
ld hl, $c350
add hl, bc
res 7, [hl]
call func_3bb4
ld e, $0f
ld hl, $c360
add hl, bc
ld a, [hl]
cp $f8
jr nc, 0.l_6f58
ld e, $07
ldh a, [$ff00 + $e7]
and e
jr nz, 0.l_6f88
ldh a, [$ff00 + $99]
push af
sub a, $20
ldh [$ff00 + $99], a
ld a, $08
call func_3c30
ldh a, [$ff00 + $d7]
ld hl, $c250
add hl, bc
sub a, [hl]
and $80
jr nz, 0.l_6f76
inc [hl]
inc [hl]
dec [hl]
ldh a, [$ff00 + $d8]
ld hl, $c240
add hl, bc
sub a, [hl]
and $80
jr nz, 0.l_6f84
inc [hl]
inc [hl]
dec [hl]
pop af
ldh [$ff00 + $99], a
call func_7b8c
call func_3b9e
ld hl, $c2b0
add hl, bc
ld e, [hl]
ld hl, $c3d0
add hl, bc
ld a, [hl]
add a, e
ld [hl], a
jr nc, 0.l_6fa3
ld a, [$d221]
inc a
ld [$d221], a
ld hl, $c2c0
add hl, bc
ld e, [hl]
ld hl, $c2d0
add hl, bc
ld a, [hl]
add a, e
ld [hl], a
jr nc, 0.l_6fb8
ld a, [$d222]
dec a
ld [$d222], a
ret
call func_0891
cp $02
jr nz, 0.l_6fc5
ld hl, $d368
ld [hl], $5f
and a
jr nz, 0.l_6fd5
ld [hl], $80
ld a, $3d
ldh [$ff00 + $f4], a
ld a, $10
ldh [$ff00 + $f3], a
call func_3b8d
ret
call func_0891
and $0f
jr nz, 0.l_700f
ld a, [$d223]
cp $00
jr nz, 0.l_700b
call func_08d7
call func_53ad
call func_7c35
ld a, $e6
call func_3c01
ld hl, $c390
add hl, de
ld [hl], $02
ld hl, $c210
add hl, de
ld [hl], $30
ld hl, $c200
add hl, de
ld [hl], $50
ld hl, $c3b0
add hl, de
ld [hl], $ff
ret
dec a
ld [$d223], a
ret
ldh a, [$ff00 + $fc]
ld h, b
nop
ldh a, [$ff00 + $04]
ld h, d
nop
ldh a, [$ff00 + $0c]
ld h, b
jr nz, 0.l_700d
<error>
ld h, h
nop
ldh a, [$ff00 + $04]
ld h, [hl]
nop
ldh a, [$ff00 + $0c]
ld h, h
jr nz, 0.l_7019
<error>
ld l, b
nop
ldh a, [$ff00 + $04]
ld l, d
nop
ldh a, [$ff00 + $0c]
ld l, b
jr nz, 0.l_7025
<error>
ld h, h
nop
ldh a, [$ff00 + $04]
ld h, [hl]
nop
ldh a, [$ff00 + $0c]
ld h, h
jr nz, 0.l_7041
<error>
ld l, h
nop
nop
inc b
ld l, [hl]
nop
nop
inc c
ld l, h
jr nz, 0.l_704d
<error>
ld [hl], b
nop
nop
inc b
ld [hl], d
nop
nop
inc c
ld [hl], b
jr nz, 0.l_7059
<error>
ld [hl], h
nop
nop
inc b
halt
nop
nop
inc c
ld [hl], h
jr nz, 0.l_7065
<error>
ld a, b
nop
nop
inc b
ld a, d
nop
nop
inc c
ld a, b
jr nz, 0.l_7061
rst 20
rr a
rr a
rr a
and $03
rl a
rl a
and $fc
ld e, a
rl a
and $f8
add a, e
ld e, a
ld d, b
ld hl, $7010
add hl, de
ld c, $03
call func_3d26
ld a, $03
call func_3dd0
ldh a, [$ff00 + $f1]
rl a
rl a
and $fc
ld e, a
rl a
and $f8
add a, e
ld e, a
ld d, b
ld hl, $7040
add hl, de
ld c, $03
call func_3d26
ld a, $03
call func_3dd0
ld hl, $c210
add hl, bc
ld a, [hl]
push af
push hl
sub a, $08
ld [hl], a
call func_3dba
call func_7196
pop hl
pop af
ld [hl], a
call func_3dba
ret
ret nc
pop de
call nc, func_dfd9
and $ee
rst 30
nop
add hl, bc
ld [de], a
ld a, [de]
ld hl, $2c27
cpl
jr nc, 0.l_7103
inc l
daa
ld hl, $121a
add hl, bc
nop
rst 30
xor $e6
rst 18
reti
call nc, func_d0d1
pop de
call nc, func_dfd9
and $ee
rst 30
jp c, .l_dddb
pop hl
and $eb
<error>
ld sp, hl
nop
rlc a
ld c, $15
ld a, [de]
rr a
inc hl
dec h
ld h, $25
inc hl
rr a
ld a, [de]
dec d
ld c, $07
nop
ld sp, hl
<error>
<error>
and $e1
<error>
<error>
jp c, .l_dddb
pop hl
and $eb
<error>
ld sp, hl
<error>
push hl
rst 20
jp [hl]
<error>
pop af
or $fb
nop
dec b
ld a, [bc]
rrc a
inc de
rl a
add hl, de
dec de
inc e
dec de
add hl, de
rl a
inc de
rrc a
ld a, [bc]
dec b
nop
ei
or $f1
<error>
jp [hl]
rst 20
push hl
<error>
push hl
rst 20
jp [hl]
<error>
pop af
or $fb
xor $ef
ldh a, [$ff00 + $f2]
<error>
or $fa
<error>
nop
inc bc
ld b, $0a
inc c
ld c, $10
ld de, $1112
stop
ld c, $0c
ld a, [bc]
ld b, $03
nop
<error>
ld a, [$f4f6]
<error>
ldh a, [$ff00 + $ef]
xor $ef
ldh a, [$ff00 + $f2]
<error>
or $fa
<error>
ldhl sp, d
ld sp, hl
ld a, [$fbfb]
<error>
<error>
rst 38
nop
ld bc, $0403
dec b
dec b
ld b, $07
ld [$0607], sp
dec b
dec b
inc b
inc bc
ld bc, $ff00
<error>
<error>
ei
ei
ld a, [$f8f9]
ld sp, hl
ld a, [$fbfb]
<error>
<error>
rst 38
ld c, [hl]
nop
ld c, [hl]
jr nz, 0.l_71db
nop
ld c, h
jr nz, 0.l_720f
nop
ld a, h
jr nz, 0.l_7191
inc hl
jp nc, .l_04fe
jr c, 0.l_71bb
ld a, [$d221]
and $1f
ld e, a
ld d, b
ld hl, $70ca
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $70c2
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $02
call func_72ed
ld a, [$d223]
cp $03
jr c, 0.l_71e0
ld a, [$d221]
and $1f
ld e, a
ld d, b
ld hl, $70f2
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $70ea
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $01
call func_72ed
ld a, [$d223]
cp $02
jr c, 0.l_7205
ld a, [$d221]
and $1f
ld e, a
ld d, b
ld hl, $711a
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $7112
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $01
call func_72ed
ld a, [$d223]
cp $01
jr c, 0.l_7241
ld a, [$d221]
and $0f
cp $07
jr z, 0.l_721d
cp $08
jr z, 0.l_721d
cp $09
jr nz, 0.l_7223
ldh a, [$ff00 + $e7]
and $01
jr nz, 0.l_7241
ld a, [$d221]
and $1f
ld e, a
ld d, b
ld hl, $7142
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $713a
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $00
call func_72ed
ld a, [$d223]
cp $04
jr c, 0.l_7266
ld a, [$d222]
and $1f
ld e, a
ld d, b
ld hl, $70ca
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $70c2
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $02
call func_72ed
ld a, [$d223]
cp $03
jr c, 0.l_728b
ld a, [$d222]
and $1f
ld e, a
ld d, b
ld hl, $70f2
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $70ea
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $01
call func_72ed
ld a, [$d223]
cp $02
jr c, 0.l_72b0
ld a, [$d222]
and $1f
ld e, a
ld d, b
ld hl, $711a
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $7112
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $01
call func_72ed
ld a, [$d223]
cp $01
jr c, 0.l_72ec
ld a, [$d222]
and $0f
cp $07
jr z, 0.l_72c8
cp $08
jr z, 0.l_72c8
cp $09
jr nz, 0.l_72ce
ldh a, [$ff00 + $e7]
and $01
jr z, 0.l_72ec
ld a, [$d222]
and $1f
ld e, a
ld d, b
ld hl, $7142
add hl, de
ldh a, [$ff00 + $ee]
add a, [hl]
ldh [$ff00 + $ee], a
ld hl, $713a
add hl, de
ldh a, [$ff00 + $ec]
add a, [hl]
ldh [$ff00 + $ec], a
ld a, $00
call func_72ed
ret
ldh [$ff00 + $f1], a
ld de, $718a
call func_3c3b
ld a, $02
call func_3dd0
ld hl, $ff98
ldh a, [$ff00 + $ee]
sub a, [hl]
add a, $08
cp $10
jr nc, 0.l_733b
ld hl, $ff99
ldh a, [$ff00 + $ec]
sub a, [hl]
add a, $08
cp $10
jr nc, 0.l_733b
ld hl, $c146
ld a, [$dbc7]
or [hl]
jr nz, 0.l_733b
ld a, $08
ld [$db94], a
ld a, $20
call func_3c30
ldh a, [$ff00 + $d7]
ldh [$ff00 + $9b], a
ldh a, [$ff00 + $d8]
ldh [$ff00 + $9a], a
ld a, $10
ld [$c13e], a
ld a, $30
ld [$dbc7], a
ld a, $03
ldh [$ff00 + $f3], a
jp $3dba
ld e, b
nop
ld e, b
jr nz, 0.l_739d
nop
ld e, d
jr nz, 0.l_7357
ldh a, [$ff00 + $00]
nop
nop
nop
ei
dec b
ld de, $733e
call func_3c3b
call func_7b20
call func_7b42
call func_7b8c
call func_3b9e
call func_3bb4
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
call func_3b87
ld hl, $c2a0
add hl, bc
ld a, [hl]
and a
jr nz, 0.l_737a
call func_0891
jr nz, 0.l_73a0
call func_0891
call func_27ed
and $7f
add a, $30
ld [hl], a
call func_27ed
and $03
ld e, a
ld d, b
ld hl, $7346
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
ld hl, $734a
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
ret
ld e, h
nop
ld e, [hl]
nop
ld e, [hl]
jr nz, 0.l_7404
jr nz, 0.l_7408
ld h, b
ld e, h
ld h, b
ld e, h
ld b, b
ld e, [hl]
ld b, b
inc l
nop
ld l, $00
ld l, $20
inc l
jr nz, 0.l_73e8
ld h, b
inc l
ld h, b
inc l
ld b, b
ld l, $40
<error>
inc bc
nop
nop
nop
nop
inc bc
<error>
ld de, $73a1
ld a, [$db95]
cp $01
jr nz, 0.l_73d6
ld de, $73b1
call func_3c3b
call func_7b20
call func_7b42
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
rr a
and $03
call func_3b87
call func_7c0e
ld hl, $c380
add hl, bc
ld [hl], e
ld hl, $c340
add hl, bc
res 7, [hl]
ld a, [$c15b]
and a
jr z, 0.l_7407
ldh a, [$ff00 + $9e]
xor $01
cp e
jr nz, 0.l_7407
set 7, [hl]
call func_3bd5
jr nc, 0.l_7446
call func_094a
ld hl, $c340
add hl, bc
ld a, [hl]
and $80
ret z
ld hl, $c380
add hl, bc
ld e, [hl]
ld d, b
ld hl, $73c1
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
ld hl, $73c5
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
ld a, $3e
ldh [$ff00 + $f2], a
call func_7b8c
ld hl, $c410
add hl, bc
ld [hl], $03
call func_3b9e
ld hl, $c410
add hl, bc
ld [hl], b
ld a, [$c16a]
and a
jr nz, 0.l_7452
ld a, [$c15b]
and a
jr nz, 0.l_7455
call func_3beb
ret
jr nc, 0.l_7428
call func_7b20
ld hl, $c380
add hl, bc
ld e, [hl]
ld d, b
ld hl, $7456
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
call func_7b8f
call func_3b9e
ldh a, [$ff00 + $af]
cp $9d
jr z, 0.l_748a
ld e, a
ld d, $01
call func_29db
and a
jr nz, 0.l_748a
call func_7c35
ld hl, $c280
add hl, bc
ld a, [hl]
ldh [$ff00 + $ea], a
ldh a, [$ff00 + $ee]
sub a, $08
ldh [$ff00 + $ce], a
swap a
and $0f
ld e, a
ldh a, [$ff00 + $ec]
add a, $04
sub a, $10
ldh [$ff00 + $cd], a
and $f0
or e
ld e, a
ld d, $00
ld hl, $d711
add hl, de
ld [hl], $9d
call func_2839
ld hl, $d601
ld a, [$d600]
ld e, a
add a, $0a
ld [$d600], a
ld d, $00
add hl, de
ldh a, [$ff00 + $cf]
ldi [hl], a
ldh a, [$ff00 + $d0]
ldi [hl], a
ld a, $81
ldi [hl], a
push hl
ld hl, $c380
add hl, bc
ld a, [hl]
pop hl
and a
jr nz, 0.l_74f5
ld a, $04
ldi [hl], a
ldh a, [$ff00 + $ea]
and a
ld a, $08
jr nz, 0.l_74da
ld a, $04
ldi [hl], a
ldh a, [$ff00 + $cf]
ldi [hl], a
ldh a, [$ff00 + $d0]
inc a
ldi [hl], a
ld a, $81
ldi [hl], a
ld a, $05
ldi [hl], a
ldh a, [$ff00 + $ea]
and a
ld a, $09
jr nz, 0.l_74f1
ld a, $05
ldi [hl], a
ld [hl], $00
ret
ldh a, [$ff00 + $ea]
and a
ld a, $0a
jr nz, 0.l_74fe
ld a, $04
ldi [hl], a
ld a, $04
ldi [hl], a
ldh a, [$ff00 + $cf]
ldi [hl], a
ldh a, [$ff00 + $d0]
inc a
ldi [hl], a
ld a, $81
ldi [hl], a
ldh a, [$ff00 + $ea]
and a
ld a, $0b
jr nz, 0.l_7515
ld a, $05
ldi [hl], a
ld a, $05
ldi [hl], a
ld [hl], $00
ret
ld hl, $c2d0
add hl, bc
ld a, [hl]
and a
jp nz, .l_758e
call func_7b20
call func_7bdf
add a, $20
cp $40
jr nc, 0.l_757d
call func_7bef
add a, $20
cp $40
jr nc, 0.l_757d
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc a
ld [hl], a
and $3f
jr nz, 0.l_757d
ld a, $b2
ld e, $04
call func_3c13
jr c, 0.l_757d
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ld hl, $c340
add hl, de
ld [hl], $12
ld hl, $c2d0
add hl, de
ld [hl], $01
ld hl, $c2e0
add hl, de
ld [hl], $18
ld hl, $c2f0
add hl, de
ld [hl], $20
push bc
push de
pop bc
ld a, $08
call func_3c25
pop bc
ret
ld [$00f8], sp
nop
nop
nop
ldhl sp, d
ld [$0070], sp
ld [hl], d
nop
ld [hl], d
jr nz, 0.l_75fd
jr nz, 0.l_75a0
add a, [hl]
ld [hl], l
call func_3c3b
call func_7b20
call func_7b42
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
and $01
call func_3b87
call func_7b8c
call func_088c
jr nz, 0.l_75af
call func_3b9e
call func_3bb4
call func_0891
jr nz, 0.l_75da
call func_27ed
and $1f
add a, $20
ld [hl], a
call func_27ed
and $03
ld e, a
ld d, b
ld hl, $757e
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
ld hl, $7582
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
ret
ld a, $00
ldhl sp, d
ld [$0000], sp
nop
nop
ld [$cdf8], sp
jr nz, 0.l_7663
ldh a, [$ff00 + $f0]
and a
jr nz, 0.l_75f0
call func_3bca
call func_7b8c
call func_3ba9
ld hl, $c2a0
add hl, bc
ld a, [hl]
and a
jr z, 0.l_7648
push hl
ldh a, [$ff00 + $ee]
ldh [$ff00 + $d7], a
ldh a, [$ff00 + $ef]
ldh [$ff00 + $d8], a
ld a, $05
call func_0953
pop hl
ld a, [hl]
cp $02
jp nz, $7c35
ld [hl], $00
ld hl, $c290
add hl, bc
ld [hl], a
ldh a, [$ff00 + $9e]
and $02
jr nz, 0.l_7625
ld hl, $c240
jr 0.l_7628
ld hl, $c250
add hl, bc
ld a, [hl]
cpl
inc a
ld [hl], a
call func_093b
ld a, $10
ld [$c13e], a
ldh a, [$ff00 + $9e]
ld e, a
ld d, b
ld hl, $75dd
add hl, de
ld a, [hl]
ldh [$ff00 + $9a], a
ld hl, $75e1
add hl, de
ld a, [hl]
ldh [$ff00 + $9b], a
ret
ldh a, [$ff00 + $ee]
add a, $04
ldh [$ff00 + $d7], a
ldh a, [$ff00 + $ef]
ldh [$ff00 + $d8], a
ld a, $06
call func_0953
ld [hl], $10
ret
nop
nop
ld [hl], h
nop
nop
ld [$2074], sp
nop
nop
rst 38
nop
ldh a, [$ff00 + $08]
ld a, d
nop
nop
nop
halt
nop
nop
ld [$0078], sp
ldh a, [$ff00 + $00]
ld a, d
jr nz, 0.l_7677
nop
ld a, b
jr nz, 0.l_767b
ld [$2076], sp
nop
nop
ld [hl], h
ld b, b
nop
ld [$6074], sp
nop
nop
rst 38
nop
ld hl, $c2b0
add hl, bc
ld a, [hl]
and a
jp nz, .l_7834
ld hl, $765a
ldh a, [$ff00 + $f1]
rl a
rl a
and $fc
ld e, a
rl a
add a, e
ld e, a
ld d, b
add hl, de
ld c, $03
call func_3d26
call func_3d19
ldh a, [$ff00 + $f0]
cp $02
jr nc, 0.l_76fe
ld a, [$c157]
and a
jr z, 0.l_76fe
ld a, [$c178]
and a
jr z, 0.l_76fe
ldh a, [$ff00 + $ee]
add a, $08
ld hl, $c179
sub a, [hl]
add a, $10
cp $20
jr nc, 0.l_76fe
ldh a, [$ff00 + $ef]
add a, $08
ld hl, $c17a
sub a, [hl]
add a, $10
cp $20
jr nc, 0.l_76fe
ld hl, $c210
add hl, bc
ld a, [hl]
add a, $18
ld [hl], a
ld hl, $c310
add hl, bc
ld [hl], $18
call func_3b8d
ld [hl], $02
ld hl, $c320
add hl, bc
ld [hl], $15
ld hl, $c250
add hl, bc
ld [hl], $0c
ld hl, $c240
add hl, bc
ld [hl], $fa
ret
ldh a, [$ff00 + $f0]
rst 0
add hl, bc
ld [hl], a
add hl, de
ld [hl], a
and d
ld [hl], a
adc a, $77
ld hl, $c200
add hl, bc
ld a, [hl]
add a, $08
ld [hl], a
call func_0891
ld [hl], $80
jp $3b8d
call func_7b20
call func_0891
ret nz
ld [hl], $50
ld hl, $c3b0
add hl, bc
ld a, [hl]
inc a
cp $03
jr nz, 0.l_772d
xor a
ld [hl], a
ldh [$ff00 + $f1], a
cp $00
jr z, 0.l_77a1
call func_0891
ld [hl], $28
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, [hl]
and $0f
jr nz, 0.l_7747
ld a, $02
jr 0.l_7749
ld a, $e0
call func_3c01
ret c
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
sub a, $0c
add a, $18
ld [hl], a
ld hl, $c310
add hl, de
ld [hl], $18
ld hl, $c2b0
add hl, de
inc [hl]
ld hl, $c320
add hl, de
ld [hl], $20
ldh a, [$ff00 + $f1]
cp $01
ld a, $f8
jr z, 0.l_777a
ld a, $08
ld hl, $c240
add hl, de
ld [hl], a
ld hl, $c250
add hl, de
ld [hl], $0c
ld hl, $c340
add hl, de
ld [hl], $12
ld hl, $c430
add hl, de
set 0, [hl]
ld a, $08
ldh [$ff00 + $f2], a
ld hl, $c2e0
add hl, de
ld [hl], $60
ld hl, $c440
add hl, de
ld [hl], $01
ret
ld a, $03
call func_3b87
call func_7b8c
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_77cd
ld [hl], b
ld hl, $c320
add hl, bc
ld [hl], $20
call func_3daf
call func_3b8d
ld a, $14
ldh [$ff00 + $f3], a
ret
ld a, $00
call func_3b87
call func_7b8c
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_780d
ld [hl], $01
call func_27ed
and $0f
add a, $08
ld hl, $c320
add hl, bc
ld [hl], a
ld a, $10
call func_3c30
ldh a, [$ff00 + $d7]
cpl
inc a
ld hl, $c250
add hl, bc
ld [hl], a
ldh a, [$ff00 + $d8]
cpl
inc a
ld hl, $c240
add hl, bc
ld [hl], a
ldh a, [$ff00 + $ee]
cp $a8
jp nc, $7c35
ldh a, [$ff00 + $ec]
cp $80
jp nc, $7c35
ldh a, [$ff00 + $e7]
and $0f
jr z, 0.l_77c9
ret
ld a, h
nop
ld a, [hl]
nop
ld a, [hl]
jr nz, 0.l_78a5
jr nz, 0.l_782b
inc c
stop
inc c
nop
<error>
ldh a, [$ff00 + $f4]
nop
inc c
ld de, $7822
call func_3c3b
call func_7b20
call func_7b42
ldh a, [$ff00 + $e7]
rr a
rr a
rr a
rr a
and $01
call func_3b87
call func_3bb4
call func_7b8c
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
jr z, 0.l_789b
ld [hl], b
call func_27ed
and $0f
add a, $10
ld hl, $c320
add hl, bc
ld [hl], a
call func_27ed
and $07
ld e, a
ld d, b
ld hl, $782c
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
ld hl, $782a
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
ld hl, $c3d0
add hl, bc
ld a, [hl]
inc [hl]
ld a, [hl]
cp $04
jp z, $7c35
ld a, $09
ldh [$ff00 + $f2], a
ret
ld d, b
nop
ld d, d
nop
ld d, h
nop
ld d, [hl]
nop
ld d, d
jr nz, 0.l_78f7
jr nz, 0.l_78ff
jr nz, 0.l_78ff
jr nz, 0.l_78ce
add a, b
jp .l_7e09
and a
jr nz, 0.l_78ba
ldh a, [$ff00 + $f1]
add a, $02
ldh [$ff00 + $f1], a
ld de, $789c
call func_3c3b
call func_7b20
call func_7bc5
ld hl, $c320
add hl, bc
dec [hl]
dec [hl]
ld hl, $c310
add hl, bc
ld a, [hl]
and $80
ldh [$ff00 + $e8], a
jr z, 0.l_78de
xor a
ld [hl], a
ld hl, $c320
add hl, bc
ld [hl], a
ldh a, [$ff00 + $f0]
rst 0
<error>
ld a, b
dec a
ld a, c
ld [bc], a
ld [$080c], sp
cp $f8
<error>
ldhl sp, d
call func_0891
jr nz, 0.l_7929
call func_27ed
and $07
ld e, a
ld d, b
ld hl, $78e5
add hl, de
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
ld a, e
and $04
ld hl, $c380
add hl, bc
ld [hl], a
call func_27ed
and $07
ld e, a
ld hl, $78e5
add hl, de
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
call func_0891
call func_27ed
and $1f
add a, $30
ld [hl], a
jp $3b8d
ld a, $01
call func_3b87
ldh a, [$ff00 + $e7]
and $1f
jr nz, 0.l_793c
ld hl, $c380
add hl, bc
ld a, [hl]
xor $04
ld [hl], a
ret
call func_7b8c
call func_3b9e
ldh a, [$ff00 + $e8]
and a
jr z, 0.l_795f
call func_0891
jr nz, 0.l_7954
ld [hl], $48
call func_3b8d
ld [hl], b
ret
ld hl, $c320
add hl, bc
ld [hl], $08
ld hl, $c310
add hl, bc
inc [hl]
ld a, $00
call func_3b87
ret
nop
ld [$1810], sp
jr nz, 0.l_7993
jr nc, 0.l_79a5
ld hl, $c340
add hl, bc
ld a, [hl]
and $0f
sla a
sla a
ld e, a
ld a, [$c3c0]
add a, e
cp $60
jr c, 0.l_7983
sub a, $60
ld [$c3c0], a
ld a, [$c3c1]
add a, e
ld [$c3c1], a
cp $60
jr c, 0.l_79a4
ldh a, [$ff00 + $e7]
ld hl, $c123
add a, [hl]
and $07
ld e, a
ld d, $00
ld hl, $7965
add hl, de
ld a, [hl]
ld [$c3c0], a
ret
ldh a, [$ff00 + $ea]
cp $07
jr z, 0.l_79f4
ld hl, $c470
add hl, bc
ld a, [hl]
cp $02
jp z, .l_79f5
cp $03
jp z, .l_7a3e
ld hl, $c310
add hl, bc
ld a, [hl]
and a
jr z, 0.l_79f4
ldh a, [$ff00 + $f9]
and a
jr nz, 0.l_79f4
ld hl, $c340
add hl, bc
ld a, [hl]
and $10
jr z, 0.l_79f4
ldh a, [$ff00 + $e7]
xor c
and $01
jr nz, 0.l_79f4
ld a, [$c3c0]
ld l, a
ld h, $00
ld de, $c030
add hl, de
ldh a, [$ff00 + $ef]
add a, $0a
ldi [hl], a
ldh a, [$ff00 + $ee]
add a, $04
ldi [hl], a
ld a, $26
ldi [hl], a
ld [hl], b
ld a, $01
call func_7974
ret
ldh a, [$ff00 + $eb]
cp $02
jr nz, $57a06
ld hl, $ffec
dec [hl]
dec [hl]
call func_7a06
jp $3dba
ld a, [$c3c0]
ld l, a
ld h, $00
ld de, $c030
add hl, de
ld e, $00
ldh a, [$ff00 + $e7]
and $04
jr z, 0.l_7a1a
ld e, $10
ldh a, [$ff00 + $ec]
add a, $0b
ldi [hl], a
ldh a, [$ff00 + $ee]
ldi [hl], a
ld a, $1c
ldi [hl], a
ld a, e
ldi [hl], a
ldh a, [$ff00 + $ec]
add a, $0b
ldi [hl], a
ldh a, [$ff00 + $ee]
add a, $08
ldi [hl], a
ld a, $1c
ldi [hl], a
ld a, e
or $20
ldi [hl], a
ld a, $02
call func_7974
ret
push bc
ld hl, $c3d0
add hl, bc
ld e, [hl]
ld hl, $c240
add hl, bc
ld a, [hl]
ld hl, $c250
add hl, bc
ld c, b
or [hl]
jr z, 0.l_7a57
ld a, e
rl a
rl a
and $20
ld c, a
ld a, [$c3c0]
ld l, a
ld h, $00
ld de, $c030
add hl, de
ldh a, [$ff00 + $ec]
add a, $08
ldi [hl], a
ldh a, [$ff00 + $ee]
dec a
ldi [hl], a
ld a, $1a
ldi [hl], a
ld a, c
ldi [hl], a
ldh a, [$ff00 + $ec]
add a, $08
ldi [hl], a
ldh a, [$ff00 + $ee]
add a, $07
ldi [hl], a
ld a, $1a
ldi [hl], a
ld a, c
ld [hl], a
pop bc
ld a, $02
call func_7974
ret
call func_3bd5
jr nc, 0.l_7ab1
call func_094a
ld a, [$c1a6]
and a
jr z, 0.l_7aa4
ld e, a
ld d, b
ld hl, $c39f
add hl, de
ld a, [hl]
cp $03
jr nz, 0.l_7aa4
ld hl, $c28f
add hl, de
ld [hl], $00
ld a, [$c14a]
ld e, a
call func_0942
call func_1495
ld a, e
scf
ret
and a
ret
ld b, $04
ld [bc], a
nop
ld hl, $c380
add hl, bc
ld e, [hl]
ld d, b
ld hl, $7ab3
add hl, de
push hl
ld hl, $c3d0
add hl, bc
inc [hl]
ld a, [hl]
rr a
rr a
rr a
rr a
pop hl
and $01
or [hl]
jp $3b87
ld e, b
ldh a, [$ff00 + $99]
ld hl, $ffef
sub a, [hl]
add a, $14
cp $28
jr nc, 0.l_7b1e
ldh a, [$ff00 + $98]
ld hl, $ffee
sub a, [hl]
add a, $10
cp $20
jr nc, 0.l_7b1e
inc e
push de
call func_7c0e
ldh a, [$ff00 + $9e]
xor $01
cp e
pop de
jr nz, 0.l_7b1e
ld hl, $c1ad
ld [hl], $01
ld a, [$c19f]
ld hl, $c14f
or [hl]
ld hl, $c146
or [hl]
ld hl, $c134
or [hl]
jr nz, 0.l_7b1e
ld a, [$db9a]
cp $80
jr nz, 0.l_7b1e
ldh a, [$ff00 + $cc]
and $10
jr z, 0.l_7b1e
scf
ret
and a
ret
ldh a, [$ff00 + $ea]
cp $05
jr nz, 0.l_7b40
ld a, [$db95]
cp $07
jr z, 0.l_7b40
ld hl, $c1a8
ld a, [$c19f]
or [hl]
ld hl, $c14f
or [hl]
jr nz, 0.l_7b40
ld a, [$c124]
and a
jr z, 0.l_7b41
pop af
ret
ld hl, $c410
add hl, bc
ld a, [hl]
and a
jr z, 0.l_7b8b
dec a
ld [hl], a
call func_3eb8
ld hl, $c240
add hl, bc
ld a, [hl]
push af
ld hl, $c250
add hl, bc
ld a, [hl]
push af
ld hl, $c3f0
add hl, bc
ld a, [hl]
ld hl, $c240
add hl, bc
ld [hl], a
ld hl, $c400
add hl, bc
ld a, [hl]
ld hl, $c250
add hl, bc
ld [hl], a
call func_7b8c
ld hl, $c430
add hl, bc
ld a, [hl]
and $20
jr nz, 0.l_7b7e
call func_3b9e
ld hl, $c250
add hl, bc
pop af
ld [hl], a
ld hl, $c240
add hl, bc
pop af
ld [hl], a
pop af
ret
call func_7b99
push bc
ld a, c
add a, $10
ld c, a
call func_7b99
pop bc
ret
ld hl, $c240
add hl, bc
ld a, [hl]
and a
jr z, 0.l_7bc4
push af
swap a
and $f0
ld hl, $c260
add hl, bc
add a, [hl]
ld [hl], a
rl d
ld hl, $c200
add hl, bc
pop af
ld e, $00
bit 7, a
jr z, 0.l_7bbb
ld e, $f0
swap a
and $0f
or e
rr d
adc a, [hl]
ld [hl], a
ret
ld hl, $c320
add hl, bc
ld a, [hl]
and a
jr z, 0.l_7bc4
push af
swap a
and $f0
ld hl, $c330
add hl, bc
add a, [hl]
ld [hl], a
rl d
ld hl, $c310
jr 0.l_7bb1
ld e, $00
ldh a, [$ff00 + $98]
ld hl, $c200
add hl, bc
sub a, [hl]
bit 7, a
jr z, 0.l_7bed
inc e
ld d, a
ret
ld e, $02
ldh a, [$ff00 + $99]
ld hl, $c210
add hl, bc
sub a, [hl]
bit 7, a
jr nz, 0.l_7bfd
inc e
ld d, a
ret
ld e, $02
ldh a, [$ff00 + $99]
ld hl, $ffec
sub a, [hl]
bit 7, a
jr nz, 0.l_7c0c
inc e
ld d, a
ret
call func_7bdf
ld a, e
ldh [$ff00 + $d7], a
ld a, d
bit 7, a
jr z, 0.l_7c1b
cpl
inc a
push af
call func_7bef
ld a, e
ldh [$ff00 + $d8], a
ld a, d
bit 7, a
jr z, 0.l_7c29
cpl
inc a
pop de
cp d
jr nc, 0.l_7c31
ldh a, [$ff00 + $d7]
jr 0.l_7c33
ldh a, [$ff00 + $d8]
ld e, a
ret
ld hl, $c280
add hl, bc
ld [hl], b
ret
ld hl, $c2c0
add hl, bc
ld a, [hl]
rst 0
ld b, a
ld a, h
ld e, b
ld a, h
ld l, c
ld a, h
call func_0891
ld [hl], $a0
ld hl, $c420
add hl, bc
ld [hl], $ff
ld hl, $c2c0
add hl, bc
inc [hl]
ret
call func_0891
jr nz, 0.l_7c68
ld [hl], $c0
ld hl, $c420
add hl, bc
ld [hl], $ff
call func_7c52
ret
call func_0891
jr nz, 0.l_7c74
call func_08d7
jp .l_3f7a
call func_7c78
ret
and $07
jr nz, 0.l_7c99
call func_27ed
and $1f
sub a, $10
ld e, a
ld hl, $ffee
add a, [hl]
ld [hl], a
call func_27ed
and $1f
sub a, $14
ld e, a
ld hl, $ffec
add a, [hl]
ld [hl], a
call func_7c9a
ret
call func_7b26
ldh a, [$ff00 + $ee]
ldh [$ff00 + $d7], a
ldh a, [$ff00 + $ec]
ldh [$ff00 + $d8], a
ld a, $02
call func_0953
ld a, $13
ldh [$ff00 + $f4], a
ret
ld a, $36
call func_3c01
ldh a, [$ff00 + $d7]
ld hl, $c200
add hl, de
ld [hl], a
ldh a, [$ff00 + $d8]
ld hl, $c210
add hl, de
ld [hl], a
ldh a, [$ff00 + $f9]
and a
jr z, 0.l_7ccf
ld hl, $c250
add hl, bc
ld [hl], $f0
jr 0.l_7cdb
ld hl, $c320
add hl, de
ld [hl], $10
ld hl, $c310
add hl, de
ld [hl], $08
call func_7c35
ld hl, $fff4
ld [hl], $1a
ret
ld hl, $d800
ldh a, [$ff00 + $f6]
ld e, a
ld a, [$dba5]
ld d, a
ldh a, [$ff00 + $f7]
cp $1a
jr nc, 0.l_7cf9
cp $06
jr c, 0.l_7cf9
inc d
add hl, de
ld a, [hl]
or $20
ld [hl], a
ldh [$ff00 + $f8], a
ret
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
rst 38
| 12.363727 | 22 | 0.515664 |
9d9bd66357b5067e6017e19103f672ca60b534d0 | 767 | asm | Assembly | oeis/163/A163037.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/163/A163037.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/163/A163037.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A163037: Number of nX2 binary arrays with all 1s connected and a path of 1s from left column to right column
; Submitted by Christian Krause
; 1,7,28,88,245,639,1608,3968,9689,23527,56964,137720,332717,803519,1940176,4684352,11309425,27303815,65917740,159140056,384198693,927538367,2239276440,5406092352,13051462345,31509018343,76069500436,183648020728,443365543517,1070379109503,2584123764384,6238626640256,15061377047009,36361380736519,87784138522428,211929657783896,511643454092885,1235216565972479,2982076586040808,7199369738057216,17380816062158521,41961001862377703,101302819786917540,244566641436216568,590436102659354637
add $0,1
lpb $0
sub $0,1
add $2,1
add $3,$2
add $4,$3
add $1,$4
mov $5,$2
add $2,1
add $2,$3
mov $3,$5
lpe
mov $0,$1
| 42.611111 | 487 | 0.803129 |
b5942961ca6c20adde740ce20b6aa6d74abe6b51 | 7,065 | asm | Assembly | play.asm | mssarts128/tetris.c64 | d274cfe5452b3d704c6ec56f1ac860a381053676 | [
"MIT",
"Unlicense"
] | 1 | 2018-01-19T14:20:04.000Z | 2018-01-19T14:20:04.000Z | play.asm | mssarts128/tetris.c64 | d274cfe5452b3d704c6ec56f1ac860a381053676 | [
"MIT",
"Unlicense"
] | null | null | null | play.asm | mssarts128/tetris.c64 | d274cfe5452b3d704c6ec56f1ac860a381053676 | [
"MIT",
"Unlicense"
] | null | null | null |
// play mode
.const linesPerLevel = 10 // level advance threshold
.const delayChange = 4 // game goes this much faster each level
.const DEFAULT_DROP_DELAY = 70
// --------------------------------------------
// starts a new game
// level and drop delay have already been set!
StartPlayMode:
// reset drop delay
lda #DEFAULT_DROP_DELAY
sta fallDelay
sta fallDelayTimer
// add the levels
// currentLevel has been set by levelselect.asm
ldx currentLevel
beq !skip+
!loop:
jsr AddLevel
dex
bne !loop-
!skip:
jsr PrintPlayScreen
jsr PrintLevel
// set up player stats
jsr ResetScore // reset player score...
jsr ResetLinesMade // and total lines made
// reset play stats
lda #$00 // reset the lines counter...
sta levelLinesCounter // which is used to go up levels.
sta linesMade // and no lines made
// set the next block value
// NewBlock will use this value for a new block
// and set the next block value again for the next call
jsr GetRandom
sta nextBlockID // this will be printed as the next block
// to fall
jsr NewBlock // get a new player block
rts
// ----------------------------------------------
UpdatePlayMode:
jsr UpdateRandom
jsr GetKeyInput
ldx inputResult
cpx #PAUSE // pressed p?
bne !skip+
jmp TogglePause // toggle and abort rest of update
!skip:
cpx #RESET
bne !skip+
// jmp ResetGame
!skip:
lda pauseFlag // are we in pause mode?
beq !skip+ // no, so continue
rts // yes, abort rest of update
!skip:
// check if we are flashing made lines
lda linesMade // did we make lines in previous update?
beq doInput // no, continue
jmp UpdateLineFlash // yes, do that, and abort rest of update
doInput:
cpx #NOINPUT
bne doControls // if there was key input, process it.
jsr GetJoyInput // if not, check joystick input
ldx inputResult
cpx #NOINPUT // if there was no input ...
beq doLogic // perform game logic and skip control process
doControls:
cpx #LEFT
bne !skipControl+
jsr BlockLeft
jmp doLogic
!skipControl:
cpx #RIGHT
bne !skipControl+
jsr BlockRight
jmp doLogic
!skipControl:
cpx #TURNCOUNTER
bne !skipControl+
jsr BlockRotateCCW
jmp doLogic
!skipControl:
cpx #TURNCLOCK
bne !skipControl+
jsr BlockRotateCW
jmp doLogic
!skipControl:
cpx #DOWN
bne doLogic
jsr BlockDown
doLogic:
jsr DropBlock // move play block down if delay has passed
cmp #$02 // Acc=2 means that a new block is needed
beq !skip+
rts // block still in play, no line check needed
!skip:
jsr CheckLines // block has dropped, so check
lda linesMade // are lines made?
beq !skip+ // no, place new block
rts // yes. do not create a new block now
// UpdateLineFlash will do that later on
!skip:
jsr NewBlock // Acc=0 means the new block fits
beq !skip+ // fits. so exit
jmp EndPlayMode // no fit!
!skip:
rts
EndPlayMode:
lda #MODE_GAMEOVER
sta gameMode
jsr StartGameOverMode
rts
// -------------------------------------------------
// up the player level
AddLevel:
inc currentLevel // go up a level
// update the level values
// so we can print it later
sed // set decimal mode
clc // clear the carry bit
lda gameLevel+0 // get current total lines value
adc #$01 // go up a level
sta gameLevel+0 // store it.
lda gameLevel+1 // and the 2nd byte.
adc #$00 // always 0, we can add 4 lines max.
sta gameLevel+1
cld // clear decimal mode
// reset the 'lines made this level' counter
lda levelLinesCounter
sec
sbc #linesPerLevel // restart count ...
sta levelLinesCounter // ... so we can restart this check.
// decrease the game delay
lda fallDelay // get the current delay
sec
sbc #delayChange // make delay shorter
bcs !skip+ // is delay lower than 0?
lda #delayChange // yes: set shortest delay.
!skip:
sta fallDelay // store the new delay value
sta fallDelayTimer // reset the current delay counter
rts
// --------------------------------------------------
UpdateLineFlash:
jsr FlashLines
lda totalFlashDelay // flashed long enough?
beq exitflash // yes. remove the lines and update score
rts // not yet. do this again on next update
exitflash:
// flashing is all done
jsr AddLinesTotal // add the made lines to total
jsr PrintTotalLinesMade // and print these
jsr AddLineScore // add score made by lines
jsr PrintScore // show the score
jsr RemoveLines // then remove lines from screen
lda levelLinesCounter // get lines made so far in this level
clc
adc linesMade // add the made lines
sta levelLinesCounter
lda #$00 // reset the lines made
sta linesMade
// go up a level?
lda levelLinesCounter // get lines made so far at this level
cmp #linesPerLevel // did we make enough to go up a level?
bcc !skip+ // no: If the C flag is 0, then A (unsigned) < NUM (unsigned)
// and BCC will branch
jsr AddLevel // go up 1 level
jsr PrintLevel // print it
!skip:
// add a new block to play with
jsr NewBlock // create a new block
beq !skip+ // fits. so exit
jmp EndPlayMode // no fit!
!skip:
rts
// --------------------------------------------------
TogglePause:
lda pauseFlag // get the current pause flag
eor #%00000001 // flip between 0 and 1
sta pauseFlag // store it
cmp #$01 // pause mode?
beq !skip+ // yes
jmp RestorePlayArea // no, restore the screen
!skip:
// game is paused. so clear the screen
lda #$01 // set the erase flag
sta playAreaErase // so area gets cleared as well
jsr SavePlayArea // save and clear the play area
jmp PrintPaused
// --------------------------------------------------
PrintPlayScreen:
// set start of data
lda #<playscreen
sta dataSourceLo
lda #>playscreen
sta dataSourceHi
// set data dimensions
lda #21
sta dataWidth
lda #21
sta dataHeight
// set start of area to print to
lda #04
sta dataDestinationHi
lda #10
sta dataDestinationLo
jmp WriteScreenData
// -----------------------------------------------------
PrintPaused:
lda #<pauseText
sta dataSourceLo
lda #>pauseText
sta dataSourceHi
lda #10
sta dataWidth
lda #20
sta dataHeight
lda #04
sta dataDestinationHi
lda #12
sta dataDestinationLo
jmp WriteScreenData
// -----------------------------------------------------
currentLevel:
.byte 0 // current player level
gameLevel:
.byte 0,0 // values for printing the current level. LSB first.
levelLinesCounter:
.byte 0 // this byte holds lines made after last
// level increase. threshold is declared on top of file.
| 23.868243 | 79 | 0.606228 |
3bf8adef3e8163430b7115979c28b3a5fc7fd721 | 20,938 | asm | Assembly | Source/ColorScroll.asm | hhprg/C64Engine | 3e23bf2134f1b64aae1fcf502ecf98801bb9764e | [
"MIT"
] | 4 | 2021-09-12T20:39:13.000Z | 2022-01-24T11:32:20.000Z | Source/ColorScroll.asm | hhprg/C64Engine | 3e23bf2134f1b64aae1fcf502ecf98801bb9764e | [
"MIT"
] | null | null | null | Source/ColorScroll.asm | hhprg/C64Engine | 3e23bf2134f1b64aae1fcf502ecf98801bb9764e | [
"MIT"
] | null | null | null | /******************************************************************
* Copyright (C) 2015-2021 Henrik Holmdahl <henrikh.git@gmail.com>
******************************************************************/
.filenamespace ColorScroll
//
.segment Zeropage "ColorScroll zeropage data"
zpRow:
.fill 1, 0
zpNewDstLo:
.fill 1, 0
zpNewDstHi:
.fill 1, 0
zpSrcLo:
.fill 1, 0
zpSrcHi:
.fill 1, 0
zpColumnIndicesLo:
.fill 1, 0
zpColumnIndicesHi:
.fill 1, 0
//
.segment Code "ColorScroll code"
.enum {kShiftLeft=0, kShiftRight=1, kUndoShiftLeft=2}
.const kMaxColorShifts = CharTileMap.kMaxColorShifts // <= 256
// How many screen rows to move colors for at once (i.e. one loop), 6 * 40 <= 256.
.const kNumBlockRows = 6
// Number of blocks needed to move colors for all screen rows.
.const kNumBlocks = ceil(kNumScreenScrollRows / kNumBlockRows)
.const kShiftLeftSrcColMem = kColorMem + kScrollOffset + 1
.const kShiftLeftDstColMem = kColorMem + kScrollOffset + 0
.const kShiftLeftNewColMem = kColorMem + kScrollOffset + kNumVisibleColumns - 1
.const kShiftRightSrcColMem = kColorMem + kScrollOffset + 0
.const kShiftRightDstColMem = kColorMem + kScrollOffset + 1
.const kShiftRightNewColMem = kColorMem + kScrollOffset + 0
.const kUndoShiftLeftSrcColMem = kColorMem + kScrollOffset - 1
.const kUndoShiftLeftDstColMem = kColorMem + kScrollOffset + 0
.const kUndoShiftLeftNewColMem = kColorMem + kScrollOffset + 0
//
Init:
{
lda #0
sta BufferIndex
jsr FlipBuffer // Use buffer index 1.
ldx #0
ldy #0
NextRow: sty Row
// Set color memory address of first (src) column of this screen row.
lda ColorMemRowAdrLo,y
sta zpSrcLo
lda ColorMemRowAdrHi,y
sta zpSrcHi
// Find columns where colors change between adjacent columns (going from end of row to start of row).
ldy #kNumVisibleColumns - 1
NextColumn: // Dst column index = source column index + 1.
lda (zpSrcLo),y
dey
eor (zpSrcLo),y
and #kColorMask
beq Same
// Adjacent columns have different colors, store (left) column index in per-row list.
// Column indices are stored in descending order.
tya
// Column indices are double buffered, assumes that BufferIndex is 1 when we get here.
sta ColumnIndices1,x
inx
Same: tya
bne NextColumn
ldy Row:#0
txa
// Keep index of last list element (+1) for each row.
sta EndIndexPerRow,y
iny
cpy #kNumScreenScrollRows
bne NextRow
// Finalize, i.e. combine per-row lists into per-block lists that can execute faster
// when it's time to shift colors.
jsr Finalize
// It's not unsynced since block lists match colors on screen.
jmp ClearUnsyncedShiftDir
}
//
FlipBuffer:
{
lax BufferIndex
eor #1
sta BufferIndex
tay
// Store finalized column indices in other (i.e. previous) column indices buffer.
lda ColumnIndicesLo,x
sta SyncShiftCommon.PrevColumnIndicesLo
sta ShiftTileRows.ShiftLeft.FinalizedColumnIndicesLo
sta ShiftTileRows.ShiftRight.FinalizedColumnIndicesLo
sta Finalize.FinalizedColumnIndicesLo
lda ColumnIndicesHi,x
sta SyncShiftCommon.PrevColumnIndicesHi
sta ShiftTileRows.ShiftLeft.FinalizedColumnIndicesHi
sta ShiftTileRows.ShiftRight.FinalizedColumnIndicesHi
sta Finalize.FinalizedColumnIndicesHi
// Current column indices will be stored here.
lda ColumnIndicesLo,y
sta zpColumnIndicesLo
lda ColumnIndicesHi,y
sta zpColumnIndicesHi
rts
}
//
ShiftTileRowsNotLeft:
ldy #<(ShiftTileRows.ShiftRight.SrcLo - ShiftTileRows.ShiftLeft.SrcLo)
// Shift color memory one step left or right.
//
// x = offset into ShiftTileRowsParameters.
// y = offset (in code) of src/dst address of colors when shifting.
ShiftTileRows:
{
sty ShiftAdrOffset
// Set branch offset for desired shift.
lda ShiftTileRowsParameters + 0,x
sta BranchOffset
// Set source color mem address.
lda ShiftTileRowsParameters + 1,x
sta ShiftLeft.SrcLo,y
lda ShiftTileRowsParameters + 2,x
sta ShiftLeft.SrcHi,y
// Set destination color mem address.
lda ShiftTileRowsParameters + 3,x
sta ShiftLeft.DstLo,y
lda ShiftTileRowsParameters + 4,x
sta ShiftLeft.DstHi,y
// Set new column destination color mem address.
lda ShiftTileRowsParameters + 5,x
sta zpNewDstLo
lda ShiftTileRowsParameters + 6,x
sta zpNewDstHi
// Set new column source address.
lda ShiftTileRowsParameters + 7,x
sta NewSrcLo
lda ShiftTileRowsParameters + 8,x
sta NewSrcHi
// Move colors block by block (a block is a set of screen rows).
ldy #0 // y = block index.
NextBlock: sty BlockIndex
lax IndexRangePerBlock,y
cmp IndexRangePerBlock + 1,y
bne BranchOffset:ShiftLeft // bne (ShiftLeft or UndoShiftLeft or ShiftRight)
BranchBase: beq SetNewCol // bra
ShiftLeft:
{
sta StopIndex
ldx IndexRangePerBlock + 1,y
// Column indices are stored in descending order per row in block.
// So iterate over indices from end to start to move columns in ascending order per row.
NextCol: dex
.label FinalizedColumnIndicesLo = *+1
.label FinalizedColumnIndicesHi = *+2
ldy kDefaultAdr,x
.label SrcLo = *+1
.label SrcHi = *+2
lda kDefaultAdr,y
.label DstLo = *+1
.label DstHi = *+2
sta kDefaultAdr,y
cpx StopIndex:#0 // Actually start index in flattened list.
bne NextCol
beq SetNewCol // bra
}
UndoShiftLeft:
{
// Undo shift left, last column.
ldx NumBlockRows,y
NextRow: ldy RowOffsetsPlus37,x
lda (zpNewDstLo),y
iny
sta (zpNewDstLo),y
dex
bpl NextRow
ldy BlockIndex
ldx IndexRangePerBlock,y
// Fall through to ShiftRight.
}
ShiftRight:
{
lda IndexRangePerBlock + 1,y
sta StopIndex
// Column indices are stored in descending order per row in block.
// Iterate over indices from start to end to move columns in descending order per row.
NextCol:
.label FinalizedColumnIndicesLo = *+1
.label FinalizedColumnIndicesHi = *+2
ldy kDefaultAdr,x
.label SrcLo = *+1
.label SrcHi = *+2
lda kDefaultAdr,y
.label DstLo = *+1
.label DstHi = *+2
sta kDefaultAdr,y
inx
cpx StopIndex:#0
bne NextCol
// Fall through to SetNewCol.
}
SetNewCol: // Set new block column.
ldy BlockIndex
ldx NumBlockRows,y
NextRow: ldy RowOffsets,x
.label NewSrcLo = *+1
.label NewSrcHi = *+2
lda kDefaultAdr,x
sta (zpNewDstLo),y
dex
bpl NextRow
// Block done. Last block?
ldy BlockIndex:#0
cpy #kNumBlocks - 1
bcs Done
ldx ShiftAdrOffset:#0
// Update addresses for next block.
lda ShiftLeft.SrcLo,x
adc #kNumBlockRows * kNumScreenColumns
sta ShiftLeft.SrcLo,x
bcc NoSrcHi
inc ShiftLeft.SrcHi,x
clc
NoSrcHi: lda ShiftLeft.DstLo,x
adc #kNumBlockRows * kNumScreenColumns
sta ShiftLeft.DstLo,x
bcc NoDstHi
inc ShiftLeft.DstHi,x
clc
NoDstHi: // Move on to start row in new column for next block.
lda NewSrcLo // New column column is 32 byte aligned.
adc #kNumBlockRows
sta NewSrcLo
lda zpNewDstLo
adc #kNumBlockRows * kNumScreenColumns
sta zpNewDstLo
bcc NoNewDstHi
inc zpNewDstHi
NoNewDstHi: iny
jmp NextBlock
Done: rts
}
//
// Finish shift by moving colors in color memory.
FinishShift:
{
lda IsShiftLeft
beq FinishShiftRight
}
//
FinishShiftLeft:
{
ldx #<(ShiftTileRowsParameters.Left - ShiftTileRowsParameters)
ldy #0
jsr ShiftTileRows
lda #kLeft
bne SetUnsyncedShiftDir // bra
}
//
FinishShiftRight:
{
ldx #<(ShiftTileRowsParameters.Right - ShiftTileRowsParameters)
jsr ShiftTileRowsNotLeft
lda #kRight
bne SetUnsyncedShiftDir // bra
}
//
UndoShiftLeft:
{
ldx #<(ShiftTileRowsParameters.UndoShiftLeft - ShiftTileRowsParameters)
jsr ShiftTileRowsNotLeft
// No need to synchronize since we undid a color shift left which means
// that column index row lists are synchronized already.
jmp ClearUnsyncedShiftDir
}
//
StartShiftLeft:
{
lda #1
bne StartShift // bra
}
//
StartShiftRight:
{
lda #0
}
//
StartShift:
{
sta IsShiftLeft
jsr SyncShift
Clear: lda #kNone
// Fall through to set unsynced shift dir.
}
.label ClearUnsyncedShiftDir = StartShift.Clear
// Unsynced when colors have been shifted but column index lists don't reflect this yet.
SetUnsyncedShiftDir:
{
sta UnsyncedShiftDir
rts
}
//
// Synchronize internal column index lists to reflect last shift.
SyncShift:
{
lda UnsyncedShiftDir
bne Shift
rts
Shift: jsr FlipBuffer
lda UnsyncedShiftDir
bmi SyncShiftRight
// Fall through to SyncShiftLeft.
}
//
// Update column index lists after columns shifted one step left.
SyncShiftLeft:
{
lda #kNumVisibleColumns - 2
ldx #BCS_REL
ldy #$fe // Add #-1
bne SyncShiftCommon // bra
}
// Update column index lists after columns shifted one step right.
SyncShiftRight:
{
lda #0
ldx #BCC_REL
ldy #1 // Add #1
// Fall through to SyncShiftCommon.
}
// Update column indices after columns shifted one step left or right.
SyncShiftCommon:
{
sta NewColumn
eor #kNumVisibleColumns - 2 // A is either 0 or kNumVisibleColumns - 2 here.
sta DiscardColumn
stx IgnoreLastColumn
stx IgnoreFirstColumn
sty ShiftStep
// Determine if first/last adjacent columns in each row contain same color.
ldx #kNumScreenScrollRows - 1
PrevRow: lda ColorMemRowAdrLo,x
sta zpSrcLo
lda ColorMemRowAdrHi,x
sta zpSrcHi
ldy NewColumn:#0
lda (zpSrcLo),y
iny
eor (zpSrcLo),y
and #kColorMask
pha // Store on stack from bottom to top row.
dex
bpl PrevRow
ldy #0 // Column indices buffer index.
sty StartIndex
inx // Row index, x = 0
clc
NextRow: stx Row
IgnoreLastColumn:
bcc SkipLastColumn // bcc = bra, bcs = brn
// Check if last column should be included for this row.
pla
beq SkipLastColumn
lda #kNumVisibleColumns - 2
sta (zpColumnIndicesLo),y
iny
SkipLastColumn:
// Empty row in previous buffer?
lda EndIndexPerRow,x
cmp StartIndex
beq RowDone
// Add/subtract one to/from column indices in previous buffer and store in current back buffer,
// since we are shifting columns one step right/left.
sta EndIndex
ldx StartIndex:#0
// Update row lists by reading lists from previous buffer, updating and writing to current buffer (i.e. double buffered).
Next: // Read column index from previous buffer, skip if first screen column, otherwise subtract one and add to current buffer.
.label PrevColumnIndicesLo = *+1
.label PrevColumnIndicesHi = *+2
lda kDefaultAdr,x
cmp DiscardColumn:#0 // Parameter
beq Skip
// Discard column = 0 --> c = 1
// Discard column = 38 --> c = 0
//clc
adc ShiftStep:#$ff // Parameter
sta (zpColumnIndicesLo),y
iny
Skip: inx
cpx EndIndex:#0
bne Next
stx StartIndex
RowDone: ldx Row:#0
// c = 1
IgnoreFirstColumn:
bcs SkipFirstColumn // bcs = bra, bcc = brn
// Check if first column should be included for this row.
pla
beq SkipFirstColumn
lda #0
sta (zpColumnIndicesLo),y
iny
SkipFirstColumn:
// New end index for this screen row.
tya
sta EndIndexPerRow,x
inx
cpx #kNumScreenScrollRows
bcc NextRow
// Fall through to finalize.
// Now updated row lists are stored in current buffer, combine into one list per block
// and write result to previous buffer.
}
//
// Finalize = flatten for groups of N rows (blocks), combine per-row lists into per-block lists.
Finalize:
{
ldx #0
ldy #0
sty EndIndex
sty ColumnOffset
NextRow: lda EndIndexPerRow,x
cmp EndIndex
beq RowDone // No colors to move for this row.
// Index of the end of this row's list.
sta EndIndex
NextClc: clc
Next: lda (zpColumnIndicesLo),y
adc ColumnOffset:#0
// Flattened index = column index + offset of block row's first column (0, 40, 80 etc.)
// Add flattened index to block list.
.label FinalizedColumnIndicesLo = *+1
.label FinalizedColumnIndicesHi = *+2
sta kDefaultAdr,y
iny
cpy EndIndex:#0
bcc Next
bne NextClc // Needed because end index can be 0 (if moving 256 colors).
// On to next row in block.
RowDone: inx
cpx #kNumScreenScrollRows
bcs Done
lda BlockColumnOffsets,x
sta ColumnOffset
bne NextRow
Done: // Block done, keep end index per block.
tya
pha
bcc NextRow
// Extract block row end indices.
ldy #kNumBlocks
End: pla
// Keep track of start and end indices per block (first start index is always 0).
sta IndexRangePerBlock,y
dey
bne End
rts
}
//
// Copy leftmost color memory column.
CopyLeftColumn:
{
ldy #0
ldx #kNumScreenScrollRows - 1
NextRow: lda ColorMemRowAdrLo,x
sta zpSrcLo
lda ColorMemRowAdrHi,x
sta zpSrcHi
lda (zpSrcLo),y
sta LeftmostColumn,x
dex
bpl NextRow
rts
}
//
.segment Code "ColorScroll const data"
NumBlockRows:
.for (var i = 0; i < kNumBlocks - 1; i++)
.byte kNumBlockRows - 1
.byte kNumScreenScrollRows - (kNumBlocks - 1) * kNumBlockRows - 1
BlockColumnOffsets:
RowOffsets:
.for (var i = 0; i < kNumBlockRows; i++)
.byte i * kNumScreenColumns
.for (var i = kNumBlockRows; i < kNumScreenScrollRows; i++)
.byte mod(i, kNumBlockRows) * kNumScreenColumns
RowOffsetsPlus37:
.for (var i = 0; i < kNumBlockRows; i++)
.byte i * kNumScreenColumns + 37
ColumnIndicesLo:
.byte <ColumnIndices0, <ColumnIndices1
ColumnIndicesHi:
.byte >ColumnIndices0, >ColumnIndices1
ColorMemRowAdrLo:
.for (var i = 0; i < kNumScreenScrollRows; i++)
.byte <(kColorMem + i * kNumScreenColumns + kScrollOffset)
ColorMemRowAdrHi:
.for (var i = 0; i < kNumScreenScrollRows; i++)
.byte >(kColorMem + i * kNumScreenColumns + kScrollOffset)
ShiftTileRowsParameters:
{
Left:
.byte ShiftTileRows.ShiftLeft - ShiftTileRows.BranchBase
.byte <kShiftLeftSrcColMem, >kShiftLeftSrcColMem
.byte <kShiftLeftDstColMem, >kShiftLeftDstColMem
.byte <kShiftLeftNewColMem, >kShiftLeftNewColMem
.byte <Scroll.ColumnColors, >Scroll.ColumnColors
Right:
.byte ShiftTileRows.ShiftRight - ShiftTileRows.BranchBase
.byte <kShiftRightSrcColMem, >kShiftRightSrcColMem
.byte <kShiftRightDstColMem, >kShiftRightDstColMem
.byte <kShiftRightNewColMem, >kShiftRightNewColMem
.byte <Scroll.ColumnColors, >Scroll.ColumnColors
UndoShiftLeft:
.byte ShiftTileRows.UndoShiftLeft - ShiftTileRows.BranchBase
.byte <kUndoShiftLeftSrcColMem, >kUndoShiftLeftSrcColMem
.byte <kUndoShiftLeftDstColMem, >kUndoShiftLeftDstColMem
.byte <kUndoShiftLeftNewColMem, >kUndoShiftLeftNewColMem
.byte <LeftmostColumn, >LeftmostColumn
}
//
.segment BSS2 "ColorScroll data"
IsShiftLeft:
.fill 1, 0
// Shift not yet reflected in ColumnIndices data? Clear (None) when ColumnIndices data synchronized with screen colors.
UnsyncedShiftDir:
.fill 1, 0
EndIndexPerRow:
.fill kNumScreenScrollRows, 0
IndexRangePerBlock:
.fill 1 + kNumBlocks, 0
BufferIndex:
.fill 1, 0
// Double buffered column indices.
ColumnIndices0:
.fill kMaxColorShifts, 0
ColumnIndices1:
.fill kMaxColorShifts, 0
.align 32 // Align to avoid LeftmostColumn page crossing.
LeftmostColumn:
.fill kNumScreenScrollRows, 0
| 30.791176 | 138 | 0.512991 |
ce6c75fe07b4b11e4a8abf3a1727b5df343db6ac | 795 | asm | Assembly | oeis/255/A255224.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/255/A255224.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/255/A255224.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A255224: Number of (n+2)X(4+2) 0..1 arrays with no 3x3 subblock diagonal sum 0 and no antidiagonal sum 0 and no row sum 2 and no column sum 2
; Submitted by Jamie Morken(w2)
; 43,49,58,70,88,115,154,211,295,418,598,862,1249,1816,2647,3865,5650,8266,12100,17719,25954,38023,55711,81634,119626,175306,256909,376504,551779,808657,1185130,1736878,2545504,3730603,5467450,8012923,11743495,17210914,25223806,36967270,54178153,79401928,116369167,170547289,249949186,366318322,536865580,786814735,1153133026,1689998575,2476813279,3629946274,5319944818,7796758066,11426704309,16746649096,24543407131,35970111409,52716760474,77260167574,113230278952,165947039395,243207206938
add $0,5
seq $0,930 ; Narayana's cows sequence: a(0) = a(1) = a(2) = 1; thereafter a(n) = a(n-1) + a(n-3).
mul $0,3
add $0,31
| 88.333333 | 491 | 0.786164 |
ab73169407d3f76c14de5b7913a5eb0685282b30 | 732 | asm | Assembly | oeis/041/A041880.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/041/A041880.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/041/A041880.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A041880: Numerators of continued fraction convergents to sqrt(462).
; Submitted by Jamie Morken(w1)
; 21,43,1827,3697,157101,317899,13508859,27335617,1161604773,2350545163,99884501619,202119548401,8588905534461,17379930617323,738545991462027,1494471913541377,63506366360199861,128507204633941099,5460808960985726019,11050125126605393137,469566064278412237773,950182253683429868683,40377220718982466722459,81704623691648363313601,3471971415768213725893701,7025647455228075815101003,298549164535347397960135827,604123976525922871735372657,25671756178624108010845787421,51947636333774138893426947499
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
dif $2,3
dif $2,7
mul $2,21
add $3,$2
lpe
mov $0,$3
| 40.666667 | 496 | 0.830601 |
e96b6b118c0580a747f94b0ad3e7506ab1c86dc2 | 562 | asm | Assembly | oeis/199/A199559.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/199/A199559.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/199/A199559.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A199559: 2*9^n+1.
; 3,19,163,1459,13123,118099,1062883,9565939,86093443,774840979,6973568803,62762119219,564859072963,5083731656659,45753584909923,411782264189299,3706040377703683,33354363399333139,300189270593998243,2701703435345984179,24315330918113857603,218837978263024718419,1969541804367222465763,17725876239305002191859,159532886153745019726723,1435795975383705177540499,12922163778453346597864483,116299474006080119380780339,1046695266054721074427023043,9420257394492489669843207379
mov $1,9
pow $1,$0
mul $1,96
sub $1,96
div $1,48
add $1,3
mov $0,$1
| 51.090909 | 472 | 0.871886 |
ef937903d6568977fa705e10307a0417c00d6a6e | 498 | asm | Assembly | arch/lib/scheme/is_sob_void.asm | Mosseridan/Compiler-Principles | 6c72a462b90ca6c6db380976c2aa60471fa65325 | [
"MIT"
] | null | null | null | arch/lib/scheme/is_sob_void.asm | Mosseridan/Compiler-Principles | 6c72a462b90ca6c6db380976c2aa60471fa65325 | [
"MIT"
] | null | null | null | arch/lib/scheme/is_sob_void.asm | Mosseridan/Compiler-Principles | 6c72a462b90ca6c6db380976c2aa60471fa65325 | [
"MIT"
] | null | null | null | /* scheme/is_sob_void.asm
* Take pointers to a Scheme object, and places in R0 either 0 or 1
* (long, not Scheme integer objects or Scheme boolean objets),
* depending on whether the argument is void.
*
* Programmer: Mayer Goldberg, 2010
*/
IS_SOB_VOID:
PUSH(FP);
MOV(FP, SP);
MOV(R0, FPARG(0));
CMP(IND(R0), T_VOID);
JUMP_EQ(L_IS_SOB_VOID_TRUE);
MOV(R0, IMM(0));
JUMP(L_IS_SOB_VOID_EXIT);
L_IS_SOB_VOID_TRUE:
MOV(R0, IMM(1));
L_IS_SOB_VOID_EXIT:
POP(FP);
RETURN;
| 19.92 | 67 | 0.684739 |
613e409a5eb0b1afc0276d90fbe166d9552f4e21 | 969 | asm | Assembly | runtime/sources/x86/memcpy.x64-sysv.asm | wdv4758h/Yeppp- | deeca59a88bc2b014be802fd575757f7c26c180e | [
"BSD-3-Clause"
] | 30 | 2015-09-18T00:52:22.000Z | 2021-11-03T17:44:30.000Z | runtime/sources/x86/memcpy.x64-sysv.asm | rguthrie3/Yeppp-Mirror | 23cc725a7489d376558bef3e92e31fda014b6c47 | [
"BSD-3-Clause"
] | 1 | 2017-02-09T04:53:29.000Z | 2017-02-09T04:53:29.000Z | runtime/sources/x86/memcpy.x64-sysv.asm | rguthrie3/Yeppp-Mirror | 23cc725a7489d376558bef3e92e31fda014b6c47 | [
"BSD-3-Clause"
] | 6 | 2017-02-09T03:05:32.000Z | 2022-03-17T06:50:19.000Z | ;
; Yeppp! library runtime infrastructure
;
; This file is part of Yeppp! library and licensed under MIT license.
; See runtime/LICENSE.txt for details.
;
;
%ifidn __OUTPUT_FORMAT__,elf64
section .text.memcpy align=32
global memcpy:function internal
memcpy:
%else
section .text
global _memcpy
_memcpy:
%endif
MOV rax, rdi
.process_by_1_prologue:
TEST rdi, 15
JZ .process_by_32_prologue
MOVZX ecx, byte [rsi]
MOV [rdi], cl
ADD rsi, 1
ADD rdi, 1
SUB rdx, 1
JNZ .process_by_1_prologue
.process_by_32_prologue:
SUB rdx, 32
JB .process_by_32_epilogue
align 32
.process_by_32:
MOVUPS xmm0, [byte rsi]
MOVUPS xmm1, [byte rsi + 16]
MOVAPS [byte rdi + 0], xmm0
MOVAPS [byte rdi + 16], xmm1
ADD rsi, 32
ADD rdi, 32
SUB rdx, 32
JAE .process_by_32
.process_by_32_epilogue:
ADD rdx, 32
JZ .return
.process_by_1_epilogue:
MOVZX ecx, byte [rsi]
MOV [rdi], cl
ADD rsi, 1
ADD rdi, 1
SUB rdx, 1
JNZ .process_by_1_epilogue
.return:
RET
| 16.15 | 69 | 0.718266 |
79100a7b49509b3e9c2904b84a71d6e16d649dbf | 1,480 | asm | Assembly | programs/oeis/187/A187298.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/187/A187298.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/187/A187298.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A187298: Number of 3-step one space leftwards or up, two space rightwards or down asymmetric rook's tours on an n X n board summed over all starting positions.
; 0,2,36,98,198,330,494,690,918,1178,1470,1794,2150,2538,2958,3410,3894,4410,4958,5538,6150,6794,7470,8178,8918,9690,10494,11330,12198,13098,14030,14994,15990,17018,18078,19170,20294,21450,22638,23858,25110,26394,27710,29058,30438,31850,33294,34770,36278,37818
mov $2,$0
mov $7,$0
lpb $2
mov $0,$7
sub $2,1
sub $0,$2
mov $8,$0
mov $17,$0
mov $18,0
lpb $8
mov $0,$17
sub $8,1
sub $0,$8
mov $13,$0
mov $15,2
lpb $15
mov $0,$13
sub $15,1
add $0,$15
sub $0,1
mov $9,$0
mov $11,2
lpb $11
mov $0,$9
sub $11,1
add $0,$11
sub $0,1
mov $5,$0
mov $6,$0
mov $0,1
add $0,$6
mul $6,$5
mov $3,$6
add $3,$6
add $3,1
mul $3,5
lpb $0
mov $0,3
sub $3,3
lpe
mov $4,$3
sub $4,$0
mov $6,$4
mov $12,$11
lpb $12
mov $10,$6
sub $12,1
lpe
lpe
lpb $9
mov $9,0
sub $10,$6
lpe
mov $6,$10
mov $16,$15
lpb $16
mov $14,$6
sub $16,1
lpe
lpe
lpb $13
mov $13,0
sub $14,$6
lpe
mov $6,$14
sub $6,4
mul $6,2
add $18,$6
lpe
add $1,$18
lpe
mov $0,$1
| 19.473684 | 260 | 0.472973 |
f9b2d26532e4c9b469996c8ee391754aa30602a7 | 225 | asm | Assembly | mc-sema/validator/x86_64/tests/BSR16rr.asm | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | 2 | 2021-08-07T16:21:29.000Z | 2021-11-17T10:58:37.000Z | mc-sema/validator/x86_64/tests/BSR16rr.asm | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | null | null | null | mc-sema/validator/x86_64/tests/BSR16rr.asm | randolphwong/mcsema | eb5b376736e7f57ff0a61f7e4e5a436bbb874720 | [
"BSD-3-Clause"
] | null | null | null | BITS 64
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=FLAG_CF|FLAG_OF|FLAG_PF|FLAG_SF|FLAG_AF
;TEST_FILE_META_END
; BSR16rr
mov ax, 0x0800
;TEST_BEGIN_RECORDING
bsr bx, ax
;TEST_END_RECORDING
| 18.75 | 57 | 0.768889 |
4a22066077ede4f0ebb3eeffb5d7ffd26d91e0f1 | 1,517 | asm | Assembly | Microcontroller_Lab/Lab_6/Read_Code.asm | MuhammadAlBarham/pic16f778_projects | c12e15e48a62cd16f869cbe9411728a4eea8f499 | [
"MIT"
] | null | null | null | Microcontroller_Lab/Lab_6/Read_Code.asm | MuhammadAlBarham/pic16f778_projects | c12e15e48a62cd16f869cbe9411728a4eea8f499 | [
"MIT"
] | null | null | null | Microcontroller_Lab/Lab_6/Read_Code.asm | MuhammadAlBarham/pic16f778_projects | c12e15e48a62cd16f869cbe9411728a4eea8f499 | [
"MIT"
] | null | null | null | Include "p16F84A.inc"
; ----------------------------------------------------------
; General Purpose RAM Assignments
; ----------------------------------------------------------
cblock 0x0C
Counter
Endc
; ----------------------------------------------------------
; Macro Definitions
; ----------------------------------------------------------
Read_EEPROM macro
Bcf STATUS, RP0
Clrf EEADR
Bsf STATUS, RP0
Bsf EECON1, RD
Bcf STATUS, RP0
Endm
; ----------------------------------------------------------
; Vector definition
; ----------------------------------------------------------
org 0x000
nop
goto Main
INT_Routine org 0x004
goto INT_Routine
; ----------------------------------------------------------
; The main Program
; ----------------------------------------------------------
Main
Read_EEPROM
Clrf Counter
Bsf STATUS, RP0
Clrf TRISB
Bcf STATUS, RP0
Movlw A'H'
Subwf EEDATA,w
Btfsc STATUS,Z
Goto Finish
Incf Counter,f
Movlw A'M'
Subwf EEDATA,w
Btfsc STATUS,Z
Finish
Incf Counter,f
Call Look_Up
Movwf PORTB
Loop
Goto Loop
; ----------------------------------------------------------
; Sub Routine Definitions
; ----------------------------------------------------------
Look_Up
Movf Counter,w
Addwf PCL,f
Retlw B'00111111'
Retlw B'00000110'
Retlw B'01011011'
Retlw B'01001111'
Retlw B'01100110'
Retlw B'01101101'
end
| 22.984848 | 61 | 0.376401 |
01a17a4ceae2f1c88a6a650878c71ae97e1571ad | 7,752 | asm | Assembly | code/6502/tests/inp/nestest.asm | visrealm/hbc-56 | 9c082946e247e79edc12867299b5b0fda3b6c873 | [
"MIT"
] | 65 | 2021-07-22T10:32:02.000Z | 2022-03-30T04:42:45.000Z | code/6502/tests/inp/nestest.asm | visrealm/hbc-56 | 9c082946e247e79edc12867299b5b0fda3b6c873 | [
"MIT"
] | 5 | 2022-03-29T20:23:57.000Z | 2022-03-30T23:12:42.000Z | code/6502/tests/inp/nestest.asm | visrealm/hbc-56 | 9c082946e247e79edc12867299b5b0fda3b6c873 | [
"MIT"
] | 4 | 2021-12-30T17:13:23.000Z | 2022-03-05T09:07:22.000Z | ; Troy's HBC-56 - Input test
;
; Copyright (c) 2021 Troy Schrapel
;
; This code is licensed under the MIT license
;
; https://github.com/visrealm/hbc-56
;
!src "hbc56kernel.inc"
Y_OFFSET = 10
hbc56Meta:
+setHbcMetaTitle "NES CARD TEST"
+setHbcMetaNES
rts
hbc56Main:
jsr tmsModeGraphicsI
lda #TMS_R1_SPRITE_MAG2
jsr tmsReg1ClearFields
lda #TMS_R1_SPRITE_16
jsr tmsReg1SetFields
+tmsSetAddrColorTable
+tmsSendData colorTab, 32
+tmsSetAddrPattTableInd 128
+tmsSendData brownWhite, 8*8
+tmsSetAddrPattTableInd 128+8
+tmsSendData blackBrown, 32*8
+tmsSetAddrPattTableInd 128+40
+tmsSendData greyBlack, 16*8
+tmsSetAddrPattTableInd 128+56
+tmsSendData greenBlack, 8*8
+tmsSetAddrPattTableInd 128+64
+tmsSendData greenBrown, 8*8
+tmsSetAddrSpritePattTable
+tmsSendData sprites, 12*8
+tmsPrint "NES PORT A", 3, Y_OFFSET-2
+tmsCreateSprite 0, 0, 48, Y_OFFSET*8+23, TMS_DK_RED
+tmsCreateSprite 1, 4, 64, Y_OFFSET*8+23, TMS_DK_RED
+tmsCreateSprite 2, 8, 88, Y_OFFSET*8+39, TMS_DK_RED
+tmsCreateSprite 3, 8, 100, Y_OFFSET*8+39, TMS_DK_RED
+tmsPrint "NES PORT B", 16+3, Y_OFFSET-2
+tmsCreateSprite 4, 0, 128+48, Y_OFFSET*8+23, TMS_DK_RED
+tmsCreateSprite 5, 4, 128+64, Y_OFFSET*8+23, TMS_DK_RED
+tmsCreateSprite 6, 8, 128+88, Y_OFFSET*8+39, TMS_DK_RED
+tmsCreateSprite 7, 8, 128+100, Y_OFFSET*8+39, TMS_DK_RED
+tmsSetPosWrite 0, Y_OFFSET
!for i, 8 {
+tmsSendData controller + ((i-1)*16), 16
+tmsSendData controller + ((i-1)*16), 16
}
+tmsPrint "HBC-56 NES CONTROLLER CARD TEST", 0, 1
+tmsEnableOutput
+hbc56SetVsyncCallback inputLoop
cli
+tmsEnableInterrupts
jmp hbc56Stop
!macro testButton1 .nesBtn, .x, .y, .offInd, .onInd {
+tmsSetPosWrite .x, .y
lda #.offInd
+nes1BranchIfNotPressed .nesBtn, +
lda #.onInd
+
+tmsPut
}
!macro testButton2 .nesBtn, .x, .y, .offInd, .onInd {
+tmsSetPosWrite .x, .y
lda #.offInd
+nes2BranchIfNotPressed .nesBtn, +
lda #.onInd
+
+tmsPut
}
inputLoop:
+testButton1 NES_UP, 3, Y_OFFSET+3, BTN_UP, BTN_UP_SEL
+testButton1 NES_LEFT, 2, Y_OFFSET+4, BTN_LEFT, BTN_LEFT_SEL
+testButton1 NES_RIGHT, 4, Y_OFFSET+4, BTN_RIGHT, BTN_RIGHT_SEL
+testButton1 NES_DOWN, 3, Y_OFFSET+5, BTN_DOWN, BTN_DOWN_SEL
+testButton1 NES_SELECT, 6, Y_OFFSET+5, BTN_STAL, BTN_STAL_SEL
+testButton1 NES_SELECT, 7, Y_OFFSET+5, BTN_STAR, BTN_STAR_SEL
+testButton1 NES_START, 8, Y_OFFSET+5, BTN_STAL, BTN_STAL_SEL
+testButton1 NES_START, 9, Y_OFFSET+5, BTN_STAR, BTN_STAR_SEL
+tmsSpriteColor 2, TMS_DK_RED
+nes1BranchIfNotPressed NES_B, +
+tmsSpriteColor 2, TMS_DK_GREEN
+
+tmsSpriteColor 3, TMS_DK_RED
+nes1BranchIfNotPressed NES_A, +
+tmsSpriteColor 3, TMS_DK_GREEN
+
+testButton2 NES_UP, 16+3, Y_OFFSET+3, BTN_UP, BTN_UP_SEL
+testButton2 NES_LEFT, 16+2, Y_OFFSET+4, BTN_LEFT, BTN_LEFT_SEL
+testButton2 NES_RIGHT, 16+4, Y_OFFSET+4, BTN_RIGHT, BTN_RIGHT_SEL
+testButton2 NES_DOWN, 16+3, Y_OFFSET+5, BTN_DOWN, BTN_DOWN_SEL
+testButton2 NES_SELECT, 16+6, Y_OFFSET+5, BTN_STAL, BTN_STAL_SEL
+testButton2 NES_SELECT, 16+7, Y_OFFSET+5, BTN_STAR, BTN_STAR_SEL
+testButton2 NES_START, 16+8, Y_OFFSET+5, BTN_STAL, BTN_STAL_SEL
+testButton2 NES_START, 16+9, Y_OFFSET+5, BTN_STAR, BTN_STAR_SEL
+tmsSpriteColor 6, TMS_DK_RED
+nes2BranchIfNotPressed NES_B, +
+tmsSpriteColor 6, TMS_DK_GREEN
+
+tmsSpriteColor 7, TMS_DK_RED
+nes2BranchIfNotPressed NES_A, +
+tmsSpriteColor 7, TMS_DK_GREEN
+
rts
BTN_UP = $ae
BTN_LEFT = $af
BTN_RIGHT = $b0
BTN_DOWN = $b1
BTN_STAL = $9f
BTN_STAR = $a0
BTN_UP_SEL = $b8
BTN_LEFT_SEL = $b9
BTN_RIGHT_SEL = $ba
BTN_DOWN_SEL = $bb
BTN_STAL_SEL = $c0
BTN_STAR_SEL = $c1
colorTab:
!byte $f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4,$f4
!byte $b4,$1b,$1b,$1b,$1b,$e1,$e1,$c1,$cb,$f4,$f4,$f4,$f4,$f4,$f4,$f4
controller:
!byte $80,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$80
!byte $82,$85,$85,$85,$85,$85,$85,$85,$85,$85,$85,$85,$85,$85,$85,$83
!byte $82,$8f,$88,$99,$88,$88,$a8,$a9,$a9,$aa,$88,$88,$88,$88,$90,$83
!byte $82,$8c,$97,$ae,$9b,$88,$a8,$a9,$a9,$aa,$88,$88,$88,$88,$8d,$83
!byte $82,$98,$af,$b2,$b0,$9c,$ab,$ac,$ac,$ad,$88,$8a,$8a,$8b,$8d,$83
!byte $82,$8c,$9a,$b1,$9d,$9e,$9f,$a0,$9f,$a0,$96,$85,$85,$95,$8d,$83
!byte $82,$91,$8e,$93,$8e,$8e,$93,$93,$93,$93,$8e,$93,$93,$94,$92,$83
!byte $80,$84,$84,$84,$84,$84,$84,$84,$84,$84,$84,$84,$84,$84,$84,$80
brownWhite:
!byte $00,$00,$00,$00,$00,$00,$00,$00 ; $80
!byte $00,$00,$00,$00,$00,$00,$00,$ff ; $81
!byte $01,$01,$01,$01,$01,$01,$01,$01 ; $82
!byte $80,$80,$80,$80,$80,$80,$80,$80 ; $83
!byte $ff,$00,$00,$00,$00,$00,$00,$00 ; $84
!byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff ; $85
blackBrown:
!byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff ; $88
!byte $00,$ff,$ff,$ff,$ff,$ff,$ff,$ff ; $89
!byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$00 ; $8a
!byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$0f ; $8b
!byte $3f,$3f,$3f,$3f,$3f,$3f,$3f,$3f ; $8c
!byte $fc,$fc,$fc,$fc,$fc,$fc,$fc,$fc ; $8d
!byte $ff,$ff,$ff,$ff,$ff,$ff,$00,$00 ; $8e
!byte $1f,$3f,$3f,$3f,$3f,$3f,$3f,$3f ; $8f
!byte $f8,$fc,$fc,$fc,$fc,$fc,$fc,$fc ; $90
!byte $3f,$3f,$3f,$3f,$3f,$1f,$00,$00 ; $91
!byte $fc,$fc,$fc,$fc,$fc,$f8,$00,$00 ; $92
!byte $00,$ff,$ff,$ff,$ff,$ff,$00,$00 ; $93
!byte $0f,$ff,$ff,$ff,$ff,$ff,$00,$00 ; $94
!byte $07,$07,$07,$07,$07,$07,$07,$07 ; $95
!byte $fe,$7e,$7e,$7e,$7e,$7e,$7e,$7e ; $96
!byte $fe,$fe,$fe,$fe,$fe,$fe,$fe,$01 ; $97
!byte $3e,$3e,$3e,$3e,$3e,$3e,$3e,$3e ; $98
!byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$00 ; $99
!byte $01,$fe,$fe,$fe,$fe,$fe,$fe,$fe ; $9a
!byte $7f,$7f,$7f,$7f,$7f,$7f,$7f,$80 ; $9b
!byte $7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f ; $9c
!byte $80,$7f,$7f,$7f,$7f,$7f,$7f,$7f ; $9d
!byte $ff,$fe,$fe,$fe,$fe,$fe,$fe,$fe ; $9e
!byte $00,$00,$00,$0f,$1f,$0f,$00,$00 ; $9f
!byte $00,$00,$00,$f0,$f8,$f0,$00,$00 ; $a0
greyBlack:
!byte $ff,$ff,$ff,$ff,$ff,$7f,$00,$7f ; $a8
!byte $ff,$ff,$ff,$ff,$ff,$ff,$00,$ff ; $a9
!byte $ff,$ff,$ff,$ff,$ff,$fe,$00,$fe ; $aa
!byte $ff,$ff,$ff,$ff,$ff,$7f,$00,$00 ; $ab
!byte $ff,$ff,$ff,$ff,$ff,$ff,$00,$00 ; $ac
!byte $ff,$ff,$ff,$ff,$ff,$fe,$00,$00 ; $ad
!byte $00,$18,$3c,$7e,$18,$18,$18,$00 ; $ae
!byte $00,$10,$30,$7e,$7e,$30,$10,$00 ; $af
!byte $00,$08,$0c,$7e,$7e,$0c,$08,$00 ; $b0
!byte $00,$18,$18,$18,$7e,$3c,$18,$00 ; $b1
!byte $00,$18,$3c,$7e,$7e,$3c,$18,$00 ; $b2
greenBlack:
!byte $00,$18,$3c,$7e,$18,$18,$18,$00 ; $b8
!byte $00,$10,$30,$7e,$7e,$30,$10,$00 ; $b9
!byte $00,$08,$0c,$7e,$7e,$0c,$08,$00 ; $ba
!byte $00,$18,$18,$18,$7e,$3c,$18,$00 ; $bb
greenBrown:
!byte $00,$00,$00,$0f,$1f,$0f,$00,$00 ; $c0
!byte $00,$00,$00,$f0,$f8,$f0,$00,$00 ; $c1
sprites:
!byte $00,$00,$00,$00,$00,$00,$00,$00 ; SEL $00
!byte $3b,$22,$3b,$0a,$3b,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $a0,$20,$20,$20,$b8,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00 ; STA $04
!byte $3b,$21,$39,$09,$39,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $b8,$28,$38,$28,$28,$00,$00,$00
!byte $3c,$7e,$ff,$ff,$ff,$ff,$7e,$3c ; A/B $08
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
!byte $00,$00,$00,$00,$00,$00,$00,$00
| 32.165975 | 74 | 0.572497 |
a054571e30d156e10a623b55ea06667046186ddf | 3,504 | asm | Assembly | Miscellaneous/Chip16-Emulator/roms/Sources/CollisionTest.asm | ghivert/Student-Projects | 43d7a61eac94365b3296ea09311f855ac00d71d1 | [
"MIT"
] | 2 | 2017-09-11T19:13:06.000Z | 2020-01-20T09:05:40.000Z | Miscellaneous/Chip16-Emulator/roms/Sources/CollisionTest.asm | ghivert/Student-Projects | 43d7a61eac94365b3296ea09311f855ac00d71d1 | [
"MIT"
] | null | null | null | Miscellaneous/Chip16-Emulator/roms/Sources/CollisionTest.asm | ghivert/Student-Projects | 43d7a61eac94365b3296ea09311f855ac00d71d1 | [
"MIT"
] | 3 | 2017-02-08T18:01:56.000Z | 2018-10-04T21:30:08.000Z | ;Collision test for Chip16
;Shendo 2011
;
;Changelog:
; Ver 1.1 04/18/2011
; Fixed a bug which allowed player to go offscreen.
;
; Ver 1.2 08/04/2011
; Updated the source to comply with the new specs.
;
;r0 - Player X position
;r1 - Player Y position
;r2 - Player max X position
;r3 - Player max Y position
;r4 - RND generated X1 position
;r5 - RND generated Y1 position
;r6 - RND generated X2 position
;r7 - RND generated Y2 position
;r8 - RND generated X3 position
;r9 - RND generated Y3 position
;r6 - Sprite counter
;ra - PAD1 state
;rb - PAD1 state for manipulation
;
cls ;Start clean
spr #0804 ;8x8 px sprites
ldi r0, 158 ;Default player X position
ldi r1, 118 ;Default player Y position
ldi r2, 312 ;Maximum player X position
ldi r3, 232 ;Maximum player Y position
rnd r4, 312 ;Generate block X1 position
rnd r5, 232 ;Generate block Y1 position
rnd r6, 312 ;Generate block X2 position
rnd r7, 232 ;Generate block Y2 position
rnd r8, 312 ;Generate block X3 position
rnd r9, 232 ;Generate block Y3 position
:loop
vblnk ;Wait for VBlank
vblnk ;Wait for VBlank
cls ;Clear screen
bgc #B ;Dark blue background
ldm ra,#FFF0 ;Read PAD1 state
:check_up
mov rb,ra ;Copy PAD1 state to rb
andi rb,1 ;Isolate UP key
jz check_down ;If the button is not pressed, skip moving up
addi r1,0 ;Update flags
jz check_down ;Skip moving if min Y value has been reached
subi r1,2 ;Move sprite up
:check_down
mov rb,ra ;Copy PAD1 state to rb
andi rb,2 ;Isolate DOWN key
jz check_left ;If the button is not pressed, skip moving down
jme r1,r3,check_left ;Check if max Y value has been reached
addi r1,2 ;Move sprite down
:check_left
mov rb,ra ;Copy PAD1 state to rb
andi rb,4 ;Isolate LEFT key
jz check_right ;If the button is not pressed, skip moving left
addi r0,0 ;Update flags
jz check_right ;Skip moving if the min X value has been reached
subi r0,2 ;Move sprite left
:check_right
mov rb,ra ;Copy PAD1 state to rb
andi rb,8 ;Isolate RIGHT key
jz draw_sprite ;If the button is not pressed, skip moving right
jme r0,r2,draw_sprite ;Check if max X value has been reached
addi r0,2 ;Move sprite right
:draw_sprite
drw r4,r5,player_gray ;Draw 1st generated block sprite
drw r6,r7,player_gray ;Draw 2nd generated block sprite
drw r8,r9,player_gray ;Draw 3rd generated block sprite
drw r0,r1,player_green ;Draw green player sprite
jc draw_red_sprite ;Collision happened, draw red sprite
jmp loop ;Draw new frame
:draw_red_sprite
drw r0,r1,player_red ;Draw red player sprite
jmp loop ;Draw new frame
:player_green
db #00
db #0A
db #A0
db #00
db #00
db #0A
db #A0
db #00
db #00
db #0A
db #A0
db #00
db #AA
db #AA
db #AA
db #AA
db #AA
db #AA
db #AA
db #AA
db #00
db #0A
db #A0
db #00
db #00
db #0A
db #A0
db #00
db #00
db #0A
db #A0
db #00
:player_red
db #00
db #03
db #30
db #00
db #00
db #03
db #30
db #00
db #00
db #03
db #30
db #00
db #33
db #33
db #33
db #33
db #33
db #33
db #33
db #33
db #00
db #03
db #30
db #00
db #00
db #03
db #30
db #00
db #00
db #03
db #30
db #00
:player_gray
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22
db #22 | 19.79661 | 67 | 0.66153 |
938c15cfbbb01349183bb44a66c6c320630dcc91 | 350 | asm | Assembly | data/mapHeaders/SafariZoneNorthRestHouse.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | data/mapHeaders/SafariZoneNorthRestHouse.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | data/mapHeaders/SafariZoneNorthRestHouse.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | SafariZoneNorthRestHouse_h:
db GATE ; tileset
db SAFARI_ZONE_NORTH_REST_HOUSE_HEIGHT, SAFARI_ZONE_NORTH_REST_HOUSE_WIDTH ; dimensions (y, x)
dw SafariZoneNorthRestHouse_Blocks ; blocks
dw SafariZoneNorthRestHouse_TextPointers ; texts
dw SafariZoneNorthRestHouse_Script ; scripts
db 0 ; connections
dw SafariZoneNorthRestHouse_Object ; objects
| 38.888889 | 95 | 0.854286 |
22e364e7d16afb83690cd2435cc02ef88d990566 | 365 | asm | Assembly | Irvine/Examples/ch14/Hello.asm | alieonsido/ASM_TESTING | 4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7 | [
"Apache-2.0"
] | null | null | null | Irvine/Examples/ch14/Hello.asm | alieonsido/ASM_TESTING | 4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7 | [
"Apache-2.0"
] | null | null | null | Irvine/Examples/ch14/Hello.asm | alieonsido/ASM_TESTING | 4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7 | [
"Apache-2.0"
] | null | null | null | ; Hello World Program (Hello.asm)
.MODEL small
.STACK 100h
.386
.data
message BYTE "Hello, world!",0dh,0ah
.code
main PROC
mov ax,@data ; initialize DS
mov ds,ax
mov ah,40h ; write to file/device
mov bx,1 ; output handle
mov cx,SIZEOF message ; number of bytes
mov dx,OFFSET message ; addr of buffer
int 21h
.EXIT
main ENDP
END main | 15.869565 | 41 | 0.676712 |
af8d7770ac9a6513cf099a6f2f2040b091edf05c | 335 | asm | Assembly | oeis/117/A117451.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/117/A117451.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/117/A117451.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A117451: Expansion of (1-x+x^2+x^5)/((1-x)*(1-x^5)).
; 1,0,1,1,1,3,2,3,3,3,5,4,5,5,5,7,6,7,7,7,9,8,9,9,9,11,10,11,11,11,13,12,13,13,13,15,14,15,15,15,17,16,17,17,17,19,18,19,19,19,21,20,21,21,21,23,22,23,23,23,25,24,25,25,25,27,26,27,27,27,29,28,29,29,29,31,30,31
mov $1,$0
gcd $1,5
mov $2,$0
add $2,$0
add $1,$2
div $1,5
mov $0,$1
| 30.454545 | 210 | 0.58209 |
592acb4f7b021c7378c46634f45ff9eaaaf9239a | 48 | asm | Assembly | test-suite/programs/unit/or_0x02.asm | ocus/TinyASM_Haskell | 35698bd1d8c6587e76480531f9e6c3d2086f4c40 | [
"BSD-3-Clause"
] | null | null | null | test-suite/programs/unit/or_0x02.asm | ocus/TinyASM_Haskell | 35698bd1d8c6587e76480531f9e6c3d2086f4c40 | [
"BSD-3-Clause"
] | null | null | null | test-suite/programs/unit/or_0x02.asm | ocus/TinyASM_Haskell | 35698bd1d8c6587e76480531f9e6c3d2086f4c40 | [
"BSD-3-Clause"
] | null | null | null | MOV [0] 10
MOV [1] 3
OR [0] [1]
DPRINT [0]
HALT
| 8 | 10 | 0.541667 |
307516f0999a38b31b51461768bf375d5c5b2ca5 | 766 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_9_1213.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_9_1213.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_9_1213.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 %r11
push %r12
push %r15
push %r8
push %rcx
push %rsi
// Faulty Load
lea addresses_WC+0x5b3e, %r8
nop
and %rsi, %rsi
vmovups (%r8), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %r15
lea oracles, %r12
and $0xff, %r15
shlq $12, %r15
mov (%r12,%r15,1), %r15
pop %rsi
pop %rcx
pop %r8
pop %r15
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'00': 9}
00 00 00 00 00 00 00 00 00
*/
| 17.813953 | 121 | 0.650131 |
1c0e7cac070a3109088fd1508d23b74e049345da | 805 | asm | Assembly | oeis/002/A002548.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/002/A002548.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/002/A002548.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A002548: Denominators of coefficients for numerical differentiation.
; Submitted by Christian Krause
; 1,1,12,6,180,10,560,1260,12600,1260,166320,13860,2522520,2702700,2882880,360360,110270160,2042040,775975200,162954792,56904848,2586584,1427794368,892371480,116008292400,120470149800,1124388064800,40156716600,34936343442000,1164544781400,1155228423148800,2382658622744400,223169127199200,229732925058000,236296722916800,6563797858800,9228699789472800,9471560310248400,9714420831024000,242860520775600,418205816775583200,1422468764542800,2691310902514977600,30277247653293498000,30950075378922242400
add $0,1
mov $2,1
mov $3,$0
add $0,1
lpb $3
mul $1,$3
mul $1,$0
mov $4,$3
add $4,1
mul $2,$4
add $1,$2
mul $2,$0
sub $3,1
lpe
mul $4,$2
gcd $2,$1
mov $1,$4
div $1,$2
mov $0,$1
div $0,4
| 32.2 | 499 | 0.790062 |
721696f8d498699fd2356f809b9276f2fe09536f | 384 | asm | Assembly | oeis/259/A259048.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/259/A259048.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/259/A259048.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A259048: u(1) = v(1) = 1, u(n) = u(n-1) + v(n-1), v(n) = u(n-1)^2 + v(n-1)^2, a(n) = u(n).
; Submitted by Christian Krause
; 1,2,4,12,92,6636,42839036,1834614576635532,3365810487617338033584723922844,11328680238554850474377984661704304183660014108982249765031212
mov $2,$0
mov $0,1
mov $1,1
lpb $2
add $0,$3
sub $2,1
mov $3,$1
add $1,$0
pow $0,2
pow $3,2
lpe
mov $0,$1
| 22.588235 | 139 | 0.638021 |
0a8df3f29343c6c228f89165f553ac6b154f95fe | 3,362 | asm | Assembly | 配套代码/L030/L030/Hello.asm | zmrbak/ReverseAnalysis | 994fdc61c8af2eecc2a065a6f5ee0aacf371e836 | [
"MIT"
] | 35 | 2019-11-19T03:12:09.000Z | 2022-02-18T08:38:53.000Z | 配套代码/L028/L028/1.1.asm | zmrbak/ReverseAnalysis | 994fdc61c8af2eecc2a065a6f5ee0aacf371e836 | [
"MIT"
] | null | null | null | 配套代码/L028/L028/1.1.asm | zmrbak/ReverseAnalysis | 994fdc61c8af2eecc2a065a6f5ee0aacf371e836 | [
"MIT"
] | 22 | 2019-08-03T17:07:17.000Z | 2022-02-18T08:38:55.000Z | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.24.28117.0
TITLE C:\Users\libit\source\repos\L028\L028\L028.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
CONST SEGMENT
$SG5562 DB 'Hello World!', 0aH, 00H
CONST ENDS
PUBLIC ___local_stdio_printf_options
PUBLIC __vfprintf_l
PUBLIC _printf
PUBLIC ?memory_copy@@YAXPAE0I@Z ; memory_copy
PUBLIC _main
PUBLIC ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage
EXTRN ___acrt_iob_func:PROC
EXTRN ___stdio_common_vfprintf:PROC
; COMDAT ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA
_BSS SEGMENT
?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA DQ 01H DUP (?) ; `__local_stdio_printf_options'::`2'::_OptionsStorage
_BSS ENDS
; Function compile flags: /Ogtpy
_TEXT SEGMENT
_main PROC
; File C:\Users\libit\source\repos\L028\L028\L028.cpp
; Line 17
push OFFSET $SG5562
call _printf
add esp, 4
; Line 18
xor eax, eax
ret 0
_main ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
_TEXT SEGMENT
_dst$ = 8 ; size = 4
_src$ = 12 ; size = 4
_count$ = 16 ; size = 4
?memory_copy@@YAXPAE0I@Z PROC ; memory_copy
; File C:\Users\libit\source\repos\L028\L028\L028.cpp
; Line 9
mov edx, DWORD PTR _count$[esp-4]
test edx, edx
je SHORT $LN3@memory_cop
mov eax, DWORD PTR _dst$[esp-4]
push esi
mov esi, DWORD PTR _src$[esp]
sub esi, eax
$LL8@memory_cop:
; Line 11
mov cl, BYTE PTR [esi+eax]
lea eax, DWORD PTR [eax+1]
mov BYTE PTR [eax-1], cl
sub edx, 1
jne SHORT $LL8@memory_cop
pop esi
$LN3@memory_cop:
; Line 13
ret 0
?memory_copy@@YAXPAE0I@Z ENDP ; memory_copy
_TEXT ENDS
; Function compile flags: /Ogtpy
; COMDAT _printf
_TEXT SEGMENT
__Format$ = 8 ; size = 4
_printf PROC ; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h
; Line 954
push esi
; Line 958
mov esi, DWORD PTR __Format$[esp]
push 1
call ___acrt_iob_func
add esp, 4
; Line 643
lea ecx, DWORD PTR __Format$[esp+4]
push ecx
push 0
push esi
push eax
call ___local_stdio_printf_options
push DWORD PTR [eax+4]
push DWORD PTR [eax]
call ___stdio_common_vfprintf
add esp, 24 ; 00000018H
; Line 960
pop esi
; Line 961
ret 0
_printf ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; COMDAT __vfprintf_l
_TEXT SEGMENT
__Stream$ = 8 ; size = 4
__Format$ = 12 ; size = 4
__Locale$ = 16 ; size = 4
__ArgList$ = 20 ; size = 4
__vfprintf_l PROC ; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h
; Line 643
push DWORD PTR __ArgList$[esp-4]
push DWORD PTR __Locale$[esp]
push DWORD PTR __Format$[esp+4]
push DWORD PTR __Stream$[esp+8]
call ___local_stdio_printf_options
push DWORD PTR [eax+4]
push DWORD PTR [eax]
call ___stdio_common_vfprintf
add esp, 24 ; 00000018H
; Line 644
ret 0
__vfprintf_l ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; COMDAT ___local_stdio_printf_options
_TEXT SEGMENT
___local_stdio_printf_options PROC ; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h
; Line 88
mov eax, OFFSET ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage
; Line 89
ret 0
___local_stdio_printf_options ENDP
_TEXT ENDS
END
| 25.278195 | 129 | 0.740333 |
6c5bbe1bfd20833f96078d0e7c9d7d9a58b7a9ec | 174 | asm | Assembly | libsrc/_DEVELOPMENT/sound/bit/c/sccz80/bit_beepfx_di.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/sound/bit/c/sccz80/bit_beepfx_di.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/sound/bit/c/sccz80/bit_beepfx_di.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; void bit_beepfx_di(void *effect)
SECTION code_sound_bit
PUBLIC bit_beepfx_di
EXTERN asm_bit_beepfx_di
bit_beepfx_di:
push hl
pop ix
jp asm_bit_beepfx_di
| 10.875 | 34 | 0.764368 |
84d1ae9b2c826f1eef2c63ccce42cf4d30007960 | 379 | asm | Assembly | test/java/two-classes/ASecondClass.asm | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 4,668 | 2017-01-02T19:35:10.000Z | 2020-05-16T03:18:45.000Z | test/java/two-classes/ASecondClass.asm | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 1,750 | 2017-01-02T19:37:06.000Z | 2020-05-16T14:54:29.000Z | test/java/two-classes/ASecondClass.asm | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 620 | 2017-01-03T00:29:17.000Z | 2020-05-14T09:27:47.000Z | Compiled from "example.java"
class ASecondClass {
ASecondClass();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 7: 0
static int square(int);
Code:
0: iload_0
1: iload_0
2: imul
3: ireturn
LineNumberTable:
line 9: 0
}
| 18.95 | 83 | 0.538259 |
5e2cb0701512be520f17fa636b42a3d21b80cb7b | 3,067 | asm | Assembly | src/shaders/h264/mc/Intra_PCM.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 192 | 2018-01-26T11:51:55.000Z | 2022-03-25T20:04:19.000Z | src/shaders/h264/mc/Intra_PCM.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 256 | 2017-01-23T02:10:27.000Z | 2018-01-23T10:00:05.000Z | src/shaders/h264/mc/Intra_PCM.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 64 | 2018-01-30T19:51:53.000Z | 2021-11-24T01:26:14.000Z | /*
* Decode Intra_PCM macroblock
* Copyright © <2010>, 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, sub license, 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 (including the
* next paragraph) 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 NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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.
*
* This file was originally licensed under the following license
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// Kernel name: Intra_PCM.asm
//
// Decoding of I_PCM macroblock
//
// $Revision: 8 $
// $Date: 10/18/06 4:10p $
//
// ----------------------------------------------------
// Main: Intra_PCM
// ----------------------------------------------------
.kernel Intra_PCM
INTRA_PCM:
#ifdef _DEBUG
// WA for FULSIM so we'll know which kernel is being debugged
mov (1) acc0:ud 0x03aa55a5:ud
#endif
#include "SetupForHWMC.asm"
// Not actually needed here but just want to slow down the Intra-PCM to avoid race condition
//
#ifdef SW_SCOREBOARD
and (1) REG_INTRA_PRED_AVAIL_FLAG_WORD<1>:w REG_INTRA_PRED_AVAIL_FLAG_WORD<0;1,0>:w 0xffe0:w // Ensure all neighbor avail flags are "0"
CALL(scoreboard_start_intra,1)
wait n0:ud // Now wait for scoreboard to response
#endif
//
// Decoding Y blocks
//
// In I_PCM mode, the samples are already arranged in raster scan order within the macroblock.
// We just need to save them to picture buffers
//
#include "save_I_PCM.asm" // Save to destination picture buffers
#ifdef SW_SCOREBOARD
#include "scoreboard_update.asm"
#endif
// Terminate the thread
//
#include "EndIntraThread.asm"
// End of Intra_PCM
| 35.252874 | 139 | 0.699381 |
471337f4eb1337d42e2aa639e2ff1089f71ef8d5 | 642 | asm | Assembly | programs/oeis/172/A172046.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/172/A172046.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/172/A172046.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A172046: Partial sums of floor(n^2/7) (A056834).
; 0,0,0,1,3,6,11,18,27,38,52,69,89,113,141,173,209,250,296,347,404,467,536,611,693,782,878,982,1094,1214,1342,1479,1625,1780,1945,2120,2305,2500,2706,2923,3151,3391,3643,3907,4183,4472,4774,5089,5418,5761,6118,6489,6875,7276,7692,8124,8572,9036,9516,10013,10527,11058,11607,12174,12759,13362,13984,14625,15285,15965,16665,17385,18125,18886,19668,20471,21296,22143,23012,23903,24817,25754,26714,27698,28706,29738,30794,31875,32981,34112,35269,36452,37661,38896,40158,41447,42763,44107,45479,46879
lpb $0
mov $2,$0
sub $0,1
seq $2,56834 ; a(n) = floor(n^2/7).
add $1,$2
lpe
mov $0,$1
| 58.363636 | 495 | 0.739875 |
f4b0f0fda1ef91e535d99d93067577e9774b017e | 1,124 | asm | Assembly | Library/Mailbox/Inbox/inboxManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Mailbox/Inbox/inboxManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Mailbox/Inbox/inboxManager.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1994 -- All Rights Reserved
PROJECT: Clavin
MODULE: Inbox-Specific Functions
FILE: inboxManager.asm
AUTHOR: Adam de Boor, May 9, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Adam 5/9/94 Initial revision
DESCRIPTION:
$Id: inboxManager.asm,v 1.1 97/04/05 01:20:50 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
include mailboxGeode.def
include Internal/geodeStr.def
include thread.def
include file.def
include fileEnum.def
include Objects/vTextC.def
include system.def
include initfile.def
include timer.def
include inboxConstant.def
include inboxVariable.def
include inboxApplicationList.asm
include inboxAppToken.asm
include inboxControlPanel.asm
include inboxDetails.asm
include inboxInit.asm
include inboxMessageList.asm
include inboxRegister.asm
include inboxFetch.asm
include inboxTransWin.asm
include inboxUtils.asm
| 20.814815 | 79 | 0.631673 |
aa727c631dcafb02e5f5b0ba3d1f6648c8332546 | 711 | asm | Assembly | oeis/131/A131137.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/131/A131137.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/131/A131137.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A131137: Denominator of (exponential) expansion of log((2*x/3-1)/(x-1)).
; 1,3,9,27,27,81,243,243,729,2187,729,2187,6561,6561,19683,59049,59049,177147,531441,177147,531441,1594323,1594323,4782969,14348907,14348907,43046721,129140163,14348907,43046721,129140163,129140163,387420489,1162261467,1162261467,3486784401,10460353203,3486784401,10460353203,31381059609,31381059609,94143178827,282429536481,282429536481,847288609443,2541865828329,847288609443,2541865828329,7625597484987,7625597484987,22876792454961,68630377364883,68630377364883,205891132094649,617673396283947
seq $0,131138 ; a(n)=log_3(A131137(n)).
add $0,2
seq $0,60816 ; a(0) = 1; a(n) = (5*3^(n-1) - 1)/2 for n > 0.
div $0,15
mul $0,2
add $0,1
| 71.1 | 496 | 0.790436 |
c24bc2c31eea1ac4f7d37927b2025da43c862060 | 1,758 | asm | Assembly | text.asm | codebur/_a2-chemi-gs-1993 | 23d03a7a6727e37650288303ffa86474982a1dfe | [
"MIT"
] | 1 | 2019-10-05T10:04:12.000Z | 2019-10-05T10:04:12.000Z | text.asm | codebur/_a2-chemi-gs-1993 | 23d03a7a6727e37650288303ffa86474982a1dfe | [
"MIT"
] | null | null | null | text.asm | codebur/_a2-chemi-gs-1993 | 23d03a7a6727e37650288303ffa86474982a1dfe | [
"MIT"
] | null | null | null | keep TEXT
****************************************************************
* ChemiGS *
****************************************************************
* A Drawing Program for Chemical Structures *
* (c) 1992-93 by Urs Hochstrasser *
* Buendtenweg 6 *
* 5105 AUENSTEIN (SWITZERLAND) *
****************************************************************
* Module TEXT
****************************************************************
*
* USES ...
*
mcopy text.macros
copy equates.asm
KeyFilter start
using Globals
oteH equ 8 Offset to the teH Input Parm
otype equ 4 Offset to the type Input Parm
phd save current DP
tsc
tcd switch to DP in stack
ldy #0 *** new: save InfoRect into gInfoRect
lda #0 ***
sta $E0C034 ***
lda [oteH],y
sta teH
iny
iny
lda [oteH],y
sta teH+2
lda [otype],y
sta type
* ------------------- individual routine -----------------
inc gaga ***
lda gaga ***
inc a ***
sta $E0C034 ***
lda $E0C030
~HandToPtr teH,#teRec,#$106
ldx #$D8
lda teRec,x
sta theChar
* do conversion stuff
lda theChar example...
and #$005F
sta outChar
~PtrToHand #outChar,outH,#2
ldx #$DC keyRecord.theInputHandle
lda outH
sta teRec,x
lda outH+2
sta teRec+2,x
ldx #$E4 keyRecord.theOpcode
stz teRec,x
~PtrToHand #teRec,teH,#106
* ------------------- Remove input parameters from stack
ply pull original DP, save in y
lda 2,s Move RTL addr down over inp parms
sta 8,s
lda 0,s
sta 6,s
tsc now move SP over inp parms
clc
adc #6 add number input parm bytes to SP
tcs and reset stack
tya restore original DP
tcd
* lda #2 ***
* sta $E0C034 ***
rtl back to Window Mgr
teH ds 4
type ds 2
tePtr ds 4
theChar ds 2
outChar ds 2
gaga ds 2
end
| 1,758 | 1,758 | 0.535836 |
5a35348aa7ce55e6bf729f552d1c19c05952519c | 7,003 | asm | Assembly | Transynther/x86/_processed/NONE/_un_/i9-9900K_12_0xa0.log_1_774.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_un_/i9-9900K_12_0xa0.log_1_774.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_un_/i9-9900K_12_0xa0.log_1_774.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 %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0xd946, %rsi
lea addresses_D_ht+0x7b26, %rdi
nop
nop
nop
xor $45661, %rbx
mov $108, %rcx
rep movsw
nop
nop
nop
xor %r15, %r15
lea addresses_UC_ht+0x17ca6, %rsi
nop
nop
xor %r10, %r10
movl $0x61626364, (%rsi)
nop
nop
nop
nop
nop
sub $6079, %rsi
lea addresses_WC_ht+0x9aca, %rsi
nop
and $57759, %rbx
mov $0x6162636465666768, %r15
movq %r15, (%rsi)
nop
nop
nop
nop
add %rbx, %rbx
lea addresses_WT_ht+0x18a6, %rcx
nop
nop
nop
nop
xor $53937, %r8
and $0xffffffffffffffc0, %rcx
vmovaps (%rcx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %rsi
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_UC_ht+0x4626, %rsi
lea addresses_WC_ht+0x16776, %rdi
nop
nop
xor $29622, %rdx
mov $19, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r15, %r15
lea addresses_A_ht+0x78a6, %rsi
lea addresses_WC_ht+0x84c6, %rdi
clflush (%rdi)
nop
nop
nop
nop
sub $25281, %r8
mov $36, %rcx
rep movsb
nop
add %rdi, %rdi
lea addresses_A_ht+0xa975, %rcx
nop
nop
nop
nop
nop
cmp $5989, %r8
mov $0x6162636465666768, %r10
movq %r10, (%rcx)
nop
nop
nop
nop
inc %r10
lea addresses_normal_ht+0x175a6, %rbx
nop
nop
nop
nop
xor %rsi, %rsi
movb $0x61, (%rbx)
nop
nop
nop
cmp $47376, %rdi
lea addresses_UC_ht+0x12d36, %rsi
lea addresses_WT_ht+0xad26, %rdi
nop
nop
and %rbx, %rbx
mov $66, %rcx
rep movsl
nop
nop
nop
mfence
lea addresses_WT_ht+0x3ea6, %rcx
nop
cmp $59292, %r10
mov (%rcx), %r8d
nop
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_D_ht+0x64a6, %r15
nop
nop
nop
nop
sub $2897, %rbx
movups (%r15), %xmm0
vpextrq $0, %xmm0, %rdi
and $64792, %r15
lea addresses_A_ht+0x186a6, %rdi
clflush (%rdi)
nop
nop
xor $689, %r15
mov (%rdi), %cx
nop
xor %rbx, %rbx
lea addresses_D_ht+0x38a6, %rsi
lea addresses_WC_ht+0x1e2a6, %rdi
clflush (%rsi)
xor $5706, %r10
mov $61, %rcx
rep movsb
inc %r10
lea addresses_A_ht+0x102e1, %r8
nop
nop
nop
nop
and $36045, %r15
movups (%r8), %xmm5
vpextrq $0, %xmm5, %rsi
nop
xor %r10, %r10
lea addresses_normal_ht+0x8306, %rdi
nop
nop
nop
nop
cmp $30339, %r10
vmovups (%rdi), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rcx
nop
nop
xor $57988, %r8
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r8
push %r9
push %rax
push %rcx
push %rdx
// Store
lea addresses_WC+0xaaa6, %rax
nop
nop
nop
add %r9, %r9
mov $0x5152535455565758, %rdx
movq %rdx, (%rax)
dec %r8
// Load
lea addresses_RW+0xdea6, %r9
nop
nop
nop
sub %rcx, %rcx
mov (%r9), %r15w
nop
nop
nop
and %rcx, %rcx
// Load
mov $0xca6, %r13
nop
nop
nop
nop
and %r15, %r15
movups (%r13), %xmm7
vpextrq $1, %xmm7, %r8
nop
dec %rcx
// Store
mov $0x2a6, %rax
nop
nop
nop
xor $30982, %r15
mov $0x5152535455565758, %r13
movq %r13, (%rax)
nop
cmp %rdx, %rdx
// Store
lea addresses_WC+0x116a6, %rax
nop
nop
nop
nop
nop
cmp %r15, %r15
mov $0x5152535455565758, %r13
movq %r13, %xmm3
and $0xffffffffffffffc0, %rax
vmovaps %ymm3, (%rax)
nop
nop
cmp %r15, %r15
// Store
lea addresses_A+0x6946, %rax
nop
cmp %r9, %r9
mov $0x5152535455565758, %r15
movq %r15, (%rax)
nop
nop
xor %r8, %r8
// Store
lea addresses_normal+0x166a6, %r8
nop
nop
nop
add $9407, %r9
movl $0x51525354, (%r8)
nop
nop
nop
nop
nop
and $37351, %rcx
// Store
lea addresses_UC+0x1b8a6, %rcx
nop
nop
sub $9817, %r9
mov $0x5152535455565758, %r13
movq %r13, (%rcx)
nop
nop
nop
nop
xor $60239, %r13
// Faulty Load
lea addresses_UC+0x96a6, %r8
nop
nop
nop
nop
nop
sub $65358, %rax
movups (%r8), %xmm0
vpextrq $1, %xmm0, %r13
lea oracles, %r15
and $0xff, %r13
shlq $12, %r13
mov (%r15,%r13,1), %r13
pop %rdx
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC', 'AVXalign': False, 'size': 8}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_RW', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_P', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_P', 'AVXalign': False, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 10, 'type': 'addresses_WC', 'AVXalign': True, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_A', 'AVXalign': False, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_normal', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_UC', 'AVXalign': False, 'size': 8}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}}
{'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 32}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1}}
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'ff': 1}
ff
*/
| 19.951567 | 148 | 0.645438 |
48d4264911384f035a5f593db0e6cc005a2d00ea | 62 | asm | Assembly | src/main/fragment/mos6502-common/_deref_pwsz1=_deref_pwsz2.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuz2.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/_deref_pwuz1=_deref_pwuz2.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | ldy #0
lda ({z2}),y
sta ({z1}),y
iny
lda ({z2}),y
sta ({z1}),y | 10.333333 | 12 | 0.5 |
bdca032a161cf91881b4f6d588f0769e61e24e0b | 147 | asm | Assembly | other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_label.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_label.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm1/zel_label.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | Name: zel_label.asm
Type: file
Size: 17565
Last-Modified: '2016-05-13T04:23:03Z'
SHA-1: FDFF0FAEEAEDAEF1B8F50542B10EAE94E961A17B
Description: null
| 21 | 47 | 0.816327 |
f1a989903f77b42bf9e1f3d06ac1d60e0c9a9497 | 441 | asm | Assembly | programs/oeis/001/A001047.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/001/A001047.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/001/A001047.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A001047: a(n) = 3^n - 2^n.
; 0,1,5,19,65,211,665,2059,6305,19171,58025,175099,527345,1586131,4766585,14316139,42981185,129009091,387158345,1161737179,3485735825,10458256051,31376865305,94134790219,282412759265,847255055011,2541798719465,7625463267259,22876524019505,68629840493971,205890058352825,617671248800299,1853015893884545,5559051976620931
mov $2,1
lpb $0,1
sub $0,1
add $1,$2
add $3,$1
mov $1,$3
mul $2,2
mul $3,2
lpe
| 33.923077 | 319 | 0.770975 |
1987166d6c2ff1d6e5a8a120eaea6b62c7e89288 | 6,759 | asm | Assembly | KernelLand/Kernel/arch/x86/proc.asm | thepowersgang/acess2 | b52f9a841f47d7f29e9813b215e1290f191b5171 | [
"Zlib"
] | 58 | 2015-02-11T23:18:09.000Z | 2022-02-23T14:11:11.000Z | KernelLand/Kernel/arch/x86/proc.asm | thepowersgang/acess2 | b52f9a841f47d7f29e9813b215e1290f191b5171 | [
"Zlib"
] | 5 | 2015-01-12T03:28:04.000Z | 2016-01-12T12:21:34.000Z | KernelLand/Kernel/arch/x86/proc.asm | thepowersgang/acess2 | b52f9a841f47d7f29e9813b215e1290f191b5171 | [
"Zlib"
] | 10 | 2015-04-05T08:03:36.000Z | 2022-02-09T23:33:58.000Z | ; AcessOS Microkernel Version
; Start.asm
%include "arch/x86/common.inc.asm"
[bits 32]
%define SAVEFLAG_FPU 0x1
KERNEL_BASE equ 0xC0000000
KSTACK_USERSTATE_SIZE equ (4+8+1+5)*4 ; SRegs, GPRegs, CPU, IRET
[section .text]
[extern MM_Clone]
[global Proc_CloneInt]
Proc_CloneInt:
pusha
; Save RSP
mov eax, [esp+0x20+4]
mov [eax], esp
push DWORD [esp+0x20+12]
call MM_Clone
add esp, 4
; Save CR3
mov esi, [esp+0x20+8]
mov [esi], eax
; Undo the pusha
popa
mov eax, .newTask
ret
.newTask:
popa
xor eax, eax
ret
[global SwitchTasks]
; + 4 = New RSP
; + 8 = Old RSP save loc
; +12 = New RIP
; +16 = Old RIP save loc
; +20 = CR3
SwitchTasks:
PUSH_CC
; Old IP
mov eax, [esp+0x20+16]
test eax, eax
jz .nosave
mov DWORD [eax], .restore
; Old SP
mov eax, [esp+0x20+8]
mov [eax], esp
.nosave:
mov ecx, [esp+0x20+12] ; New IP
mov eax, [esp+0x20+20] ; New CR3
mov esp, [esp+0x20+ 4] ; New SP
test eax, eax
jz .setState
mov cr3, eax
invlpg [esp]
invlpg [esp+0x1000]
.setState:
jmp ecx
.restore:
POP_CC
xor eax, eax
ret
[global Proc_InitialiseSSE]
Proc_InitialiseSSE:
mov eax, cr4
or eax, (1 << 9)|(1 << 10) ; Set OSFXSR and OSXMMEXCPT
mov cr4, eax
mov eax, cr0
and ax, ~(1 << 2) ; Clear EM
or eax, (1 << 1) ; Set MP
mov eax, cr0
ret
[global Proc_DisableSSE]
Proc_DisableSSE:
mov eax, cr0
or ax, 1 << 3 ; Set TS
mov cr0, eax
ret
[global Proc_EnableSSE]
Proc_EnableSSE:
mov eax, cr0
and ax, ~(1 << 3) ; Clear TS
mov cr0, eax
ret
[global Proc_SaveSSE]
Proc_SaveSSE:
mov eax, [esp+4]
fxsave [eax]
ret
[global Proc_RestoreSSE]
Proc_RestoreSSE:
mov eax, [esp+4]
fxrstor [eax]
ret
%if USE_MP
[extern giMP_TimerCount]
[extern gpMP_LocalAPIC]
[extern Isr240.jmp]
[global SetAPICTimerCount]
SetAPICTimerCount:
PUSH_CC
PUSH_SEG
mov eax, [gpMP_LocalAPIC]
mov ecx, [eax+0x320]
test ecx, 0x00010000
jz .setTime
mov DWORD [eax+0x380], 0xFFFFFFFF ; Set Initial Count
mov DWORD [eax+0x320], 0x000000F0 ; Enable the timer on IVT#0xEF (One Shot)
jmp .ret
.setTime:
; Get Timer Count
mov ecx, 0xFFFFFFFF
sub ecx, [eax+0x390]
mov DWORD [giMP_TimerCount], ecx
; Disable APIC Timer
mov DWORD [eax+0x320], 0x000100EF
mov DWORD [eax+0x380], 0
; Update Timer IRQ to the IRQ code
mov eax, Proc_EventTimer_PIT
sub eax, Isr240.jmp+5
mov DWORD [Isr240.jmp+1], eax
;xchg bx, bx ; MAGIC BREAK
.ret:
mov dx, 0x20
mov al, 0x20
out 0x20, al ; ACK IRQ
POP_SEG
POP_CC
add esp, 8 ; CPU ID / Error Code
iret
%endif
%if USE_MP
[global Proc_EventTimer_LAPIC]
Proc_EventTimer_LAPIC:
push eax
mov eax, SS:[gpMP_LocalAPIC]
mov DWORD SS:[eax + 0xB0], 0
pop eax
jmp Proc_EventTimer_Common
%endif
[global Proc_EventTimer_PIT]
Proc_EventTimer_PIT:
push eax
mov al, 0x20
out 0x20, al ; ACK IRQ
pop eax
jmp Proc_EventTimer_Common
[extern Proc_HandleEventTimer]
[global Proc_EventTimer_Common]
Proc_EventTimer_Common:
PUSH_CC
PUSH_SEG
; Clear the Trace/Trap flag
pushf
and BYTE [esp+1], 0xFE ; Clear Trap Flag
popf
; Re-enable interrupts
; - TODO: This is quite likely racy, if we get an interrupt flood
sti
%if USE_MP
call GetCPUNum
push eax ; Push as argument
%else
push 0
%endif
call Proc_HandleEventTimer
[global scheduler_return]
scheduler_return: ; Used by some hackery in Proc_DumpThreadCPUState
add esp, 4 ; Remove CPU Number (thread is poped later)
jmp ReturnFromInterrupt
;
; Returns after an interrupt, restoring the user state
; - Also handles signal handlers
;
[global ReturnFromInterrupt]
[extern Threads_GetPendingSignal]
[extern Threads_GetSignalHandler]
[extern Proc_CallUser]
ReturnFromInterrupt:
; Check that we're returning to userland
test DWORD [esp+(4+8+2+1)*4], 0x07
jz .ret ; Kernel interrupted, return
call Threads_GetPendingSignal
; eax: signal number
test eax, eax
jz .ret
; There's a signal pending, funtime
push eax
call Threads_GetSignalHandler
; eax: signal handler
pop ecx
test eax, eax
jz .ret
cmp eax, -1
jz .default
; (some stack abuse)
push User_RestoreState
push ecx
mov ecx, esp
push (2+4+8+2+2)*4 ; Up to and incl. CS
push ecx ; User stack data base
push DWORD [ecx+(2+4+8+2+3)*4] ; User SP
push eax ; handler
call Proc_CallUser
; Oh, ... it failed. Default time?
add esp, (4+2)*4
.default:
; Fall through to return
.ret:
pop gs
pop fs
pop es
pop ds
popa
add esp, 2*4 ; IRQ Num / CPU ID + error code
iret
[extern Proc_Clone]
[extern Threads_Exit]
[global SpawnTask]
SpawnTask:
; Call Proc_Clone with Flags=0
xor eax, eax
; push eax
push eax
call Proc_Clone
add esp, 8 ; Remove arguments from stack
test eax, eax
jnz .parent
; In child, so now set up stack frame
mov ebx, [esp+4] ; Child Function
mov edx, [esp+8] ; Argument
; Child Function
push edx ; Argument
call ebx ; Function
; Kill thread once done
push eax ; Exit Code
push 0 ; Kill this thread
call Threads_Exit ; Kill Thread
.parent:
ret
; void Proc_ReturnToUser(void *Method, Uint Parameter, tVAddr KernelStack)
; Calls a user fault handler
;
[global Proc_ReturnToUser]
[extern Proc_GetCurThread]
Proc_ReturnToUser:
push ebp
mov ebp, esp
; [EBP+8]: handler to use
; [EBP+12]: parameter
; [EBP+16]: kernel stack top
; Get kernel stack
mov eax, [ebp+16]
sub eax, KSTACK_USERSTATE_SIZE
;
; NOTE: This can cause corruption if the signal happens while the user
; has called a kernel operation.
; Good thing this can only be called on a user fault.
;
; Create data to add to user stack
push DWORD [ebp+12]
push User_Syscall_RetAndExit
mov ecx, esp
; Call user method
push 2*4
push ecx
push DWORD [eax+KSTACK_USERSTATE_SIZE-12] ; User ESP is at top of kstack - 3*4
push DWORD [ebp+8]
call Proc_CallUser
; Just kill the bleeding thing
; (I know it calls int 0xAC in kernel mode, but meh)
.justKillIt:
xor eax, eax
xor ebx, ebx
dec ebx ; EBX = -1
int 0xAC
[global GetCPUNum]
GetCPUNum: ; TODO: Store in debug registers
mov eax, dr1
ret
[extern GetEIP]
[global GetEIP_Sched]
[global GetEIP_Sched_ret]
GetEIP_Sched_ret equ GetEIP_Sched.ret
GetEIP_Sched:
call GetEIP
GetEIP_Sched.ret:
ret
; Usermode code exported by the kernel
[section .usertext]
; Export a place for the user to jump to to call a syscall
; - Allows the kernel to change the method easily
User_Syscall:
xchg bx, bx ; MAGIC BREAKPOINT
int 0xAC
[global User_Signal_Kill]
User_Signal_Kill:
xor eax, eax
mov bl, [esp+4]
mov bh, 0x02
int 0xAC
jmp $
User_RestoreState:
pop gs
pop fs
pop es
pop ds
popa
add esp, 2*4 ; Kernel's error code and interrupt number
retf ; EFLAGS/SS/ESP were not included in the state
; A place to return to and exit
User_Syscall_RetAndExit:
push eax
call User_Syscall_Exit
User_Syscall_Exit:
xor eax, eax
mov ebx, [esp+4]
int 0xAC
; vim: ft=nasm ts=8
| 18.467213 | 79 | 0.713123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.