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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8fff3ccf780ba9f636eea966a9edd7630f9abcc0 | 1,137 | asm | Assembly | src/SonicBoomRiseOfLyric/Cheats/UnlockAllPowerGlyphs/patch_UnlockAllPowerGlyphs.asm | lilystudent2016/cemu_graphic_packs | a7aaa6d07df0d5ca3f6475d741fb8b80fadd1a46 | [
"CC0-1.0"
] | 1,002 | 2017-01-10T13:10:55.000Z | 2020-11-20T18:34:19.000Z | src/SonicBoomRiseOfLyric/Cheats/UnlockAllPowerGlyphs/patch_UnlockAllPowerGlyphs.asm | lilystudent2016/cemu_graphic_packs | a7aaa6d07df0d5ca3f6475d741fb8b80fadd1a46 | [
"CC0-1.0"
] | 347 | 2017-01-11T21:13:20.000Z | 2020-11-27T11:33:05.000Z | src/SonicBoomRiseOfLyric/Cheats/UnlockAllPowerGlyphs/patch_UnlockAllPowerGlyphs.asm | lilystudent2016/cemu_graphic_packs | a7aaa6d07df0d5ca3f6475d741fb8b80fadd1a46 | [
"CC0-1.0"
] | 850 | 2017-01-10T06:06:43.000Z | 2020-11-06T21:16:49.000Z | [WiiULauncher0US]
moduleMatches = 0x90DAC5CE
; Skip upgrade checks
0x307EA80 = b 0x307EA90
0x307EAB0 = b 0x307EAC0
0x307EAE0 = b 0x307EAF0
0x307EB10 = b 0x307EB20
0x307EB40 = b 0x307EB50
0x307EB70 = b 0x307EB80
0x307EBA0 = b 0x307EBB0
0x307EBD0 = b 0x307EBE0
0x307EC00 = b 0x307EC10
[WiiULauncher0EU]
moduleMatches = 0x8F7D2702
; Skip upgrade checks
0x307EA60 = b 0x307EA70
0x307EA90 = b 0x307EAA0
0x307EAC0 = b 0x307EAD0
0x307EAF0 = b 0x307EB00
0x307EB20 = b 0x307EB30
0x307EB50 = b 0x307EB60
0x307EB80 = b 0x307EB90
0x307EBB0 = b 0x307EBC0
0x307EBE0 = b 0x307EBF0
[WiiULauncher0JP]
moduleMatches = 0x0D395735
; Skip upgrade checks
0x307E9DC = b 0x307E9EC
0x307EA0C = b 0x307EA1C
0x307EA3C = b 0x307EA4C
0x307EA6C = b 0x307EA7C
0x307EA9C = b 0x307EAAC
0x307EACC = b 0x307EADC
0x307EAFC = b 0x307EB0C
0x307EB2C = b 0x307EB3C
0x307EB5C = b 0x307EB6C
[WiiULauncher16]
moduleMatches = 0x113CC316
; Skip upgrade checks
0x307ECA0 = b 0x307ECB0
0x307ECD0 = b 0x307ECE0
0x307ED00 = b 0x307ED10
0x307ED30 = b 0x307ED40
0x307ED60 = b 0x307ED70
0x307ED90 = b 0x307EDA0
0x307EDC0 = b 0x307EDD0
0x307EDF0 = b 0x307EE00
0x307EE20 = b 0x307EE30 | 20.672727 | 26 | 0.794195 |
c628a7bb4c0e99d47ac562878314da8f2c76c291 | 568 | asm | Assembly | libsrc/_DEVELOPMENT/l/z80/ascii/num_to_txt/small/l_small_ultoh.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/l/z80/ascii/num_to_txt/small/l_small_ultoh.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/l/z80/ascii/num_to_txt/small/l_small_ultoh.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_l
PUBLIC l_small_ultoh
EXTERN l_small_utoh
l_small_ultoh:
; write unsigned hexadecimal long to ascii buffer in uppercase
;
; enter : dehl = unsigned long
; bc = char *buffer
; carry set to write leading zeroes
;
; exit : de = char *buffer (one byte past last char written)
; carry set if in write loop
;
; uses : af, de
push hl
ex de,hl
ld e,c
ld d,b
call l_small_utoh
jr c, was_writing
dec de
was_writing:
pop hl
jp l_small_utoh
| 15.351351 | 66 | 0.612676 |
746ae56187fdd87025dd92862a799a332eab96ba | 4,137 | asm | Assembly | Osdk/_final_/sample/floppybuilder/code/sector_1-jasmin.asm | nekoniaow/OSDK | ba6692caba3da0afde67e5709de21aacab8b03b7 | [
"WTFPL",
"Zlib"
] | 5 | 2018-10-31T10:33:44.000Z | 2022-02-28T14:33:52.000Z | Osdk/_final_/sample/floppybuilder/code/sector_1-jasmin.asm | nekoniaow/OSDK | ba6692caba3da0afde67e5709de21aacab8b03b7 | [
"WTFPL",
"Zlib"
] | 2 | 2018-05-15T06:06:14.000Z | 2018-05-17T05:52:59.000Z | Osdk/_final_/sample/floppybuilder/code/sector_1-jasmin.asm | nekoniaow/OSDK | ba6692caba3da0afde67e5709de21aacab8b03b7 | [
"WTFPL",
"Zlib"
] | 1 | 2018-10-31T10:35:20.000Z | 2018-10-31T10:35:20.000Z | ;
; This is the bootsector for the Jasmin drives.
; No particular magic to do here, all the versions of the Jasmin system load the boot sector in page 4,
; so we can just assemble the bootsector code using $400 as the base address
;
; Warning: This whole code CANNOT be more than 256 bytes (ie: the size of the sector)
#define FDC_command_register $03f4
#define FDC_status_register $03f4
#define FDC_track_register $03f5
#define FDC_sector_register $03f6
#define FDC_data $03f7
#define FDC_flags $03f8
#define FDC_drq $03FC
#define FDC_ovl_control $03FA
#define FDC_rom_control $03FB
#define CMD_ReadSector $8c
#define CMD_Seek $1F
#define wait_status_floppy 30
#include "floppy_description.h" ; This file is generated by the floppy builder
.zero
*=$00
retry_counter .dsb 1 ; Number of attempts at loading data (ie: not quite clear what happens when this fails...)
.text
*=$400
jmp JasminStart ;.byt $01,$00,$00
.byt $00,$00,$00,$00,$00,$20,$20,$20,$20,$20,$20,$20,$20
.byt $00,$00,$03,$00,$00,$00,$01,$00,$53,$45,$44,$4F,$52,$49,$43,$20
.byt $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20
.byt $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20
JasminStart
;jmp JasminStart
;
; Here starts the actual executable part, maximum available size is 233 bytes (256-23)
;
;
; Try to find the load address
;
sei ; Disable interruptions
; Enable Overlay ram
lda #1
sta FDC_ovl_control ; Enable Overlay
lda #1
sta FDC_rom_control ; Disable ROM
;
; Read sector data
;
ldy #4
sty retry_counter
read_sectors_loop
readretryloop
nop
nop
nop
read_one_sector
;
; Check if we are on the correct track already and if not
; then send a SEEK command to the FDC to move the head to
; the correct track.
;
ldx #FLOPPY_LOADER_TRACK
cpx FDC_track_register
beq track_ok
; Write the track number in the FDC data register
stx FDC_data
wait_drive2
lda FDC_drq ; We are waiting for the drive maybe not useful if drive is ready after the eprom boot
bmi wait_drive2
;
; Send a SEEK command (change track)
;
lda #CMD_Seek
sta FDC_command_register
;
; Command words should only be loaded in the Command Register when the Busy status bit is off (Status bit 0). The one exception is the Force Interrupt command.
; Whenever a command is being executed, the Busy status bit is set.
; When a command is completed, an interrupt is generated and the busy status bit is reset.
; The Status Register indicates whethter the completed command encountered an error or was fault free. For ease of discussion, commands are divided into four types (I, II, III, IV).
ldy #4
r_wait_completion
dey
bne r_wait_completion
r2_wait_completion
lda FDC_status_register
lsr
bcs r2_wait_completion
asl
track_ok
; Write the sector number in the FDC sector register
__auto__sector_index
lda #FLOPPY_LOADER_SECTOR
sta FDC_sector_register
;
; Send a READSECTOR command
;
lda #CMD_ReadSector
sta FDC_command_register
ldy #wait_status_floppy
waitcommand
nop ; Not useful but for old Floppy drive maybe
nop ; Not useful but for old Floppy drive maybe
dey
bne waitcommand
;
; Read the sector data
;
ldy #0
fetch_bytes_from_FDC
lda FDC_drq
bmi fetch_bytes_from_FDC
lda FDC_data
__auto_write_address
sta FLOPPY_LOADER_ADDRESS,y
iny
bne fetch_bytes_from_FDC
; Done loading the sector
lda FDC_status_register
and #$1C
beq sector_OK
dec retry_counter
bne readretryloop
sector_OK
inc __auto__sector_index+1
inc __auto_write_address+2
dec sector_counter
bne read_sectors_loop
;
; Data successfully loader (we hope)
;
sei
lda #%10000001 ; Disable the FDC (Eprom select + FDC Interrupt request)
sta FDC_flags
ldx #1 ; 1 = Jasmin initialisation code
jmp FLOPPY_LOADER_ADDRESS
sector_counter .byt (($FFFF-FLOPPY_LOADER_ADDRESS)+1)/256
_END_
| 24.052326 | 183 | 0.693256 |
9591f4626193e35f25ace8e48519d55e5e9da940 | 271 | asm | Assembly | programs/oeis/119/A119479.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/119/A119479.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/119/A119479.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A119479: Length of longest run of consecutive integers having exactly n divisors.
; 1,2,1,3,1,5,1,7,1,3,1
pow $0,2
mov $2,$0
lpb $0
div $0,2
add $3,$2
mov $4,$0
cmp $4,0
add $0,$4
gcd $0,$3
sub $2,1
mul $0,$2
add $1,7
lpe
div $1,7
add $1,1
mov $0,$1
| 13.55 | 83 | 0.575646 |
14c7a4d1a5db0828a04306f1cb95635c4b6890ac | 692 | asm | Assembly | oeis/084/A084137.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/084/A084137.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/084/A084137.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A084137: Binomial transform of A084136.
; Submitted by Christian Krause
; 1,2,8,32,144,672,3200,15360,73984,356864,1722368,8314880,40144896,193830912,935886848,4518838272,21818834944,105350561792,508677324800,2456111022080,11859152338944,57261051346944,276480810549248,1334967439196160,6445792982204416,31123041652047872,150275338469900288,725593520353574912,3503475435025465344,16916275820979290112,81679005022945280000,394381123373550796800,1904240513581689339904,9194486547812370612224,44394908245559059939328,214357579173451362467840,1035009949675972970151936
mov $3,$0
seq $0,84128 ; a(n) = 4*a(n-1) + 4*a(n-2), a(0)=1, a(1)=2.
mov $2,2
pow $2,$3
add $0,$2
sub $0,2
div $0,2
add $0,1
| 53.230769 | 491 | 0.82659 |
776af9713e19decdb86c3a8eca00a21e29e982c9 | 250 | asm | Assembly | libsrc/_DEVELOPMENT/adt/wa_stack/c/sccz80/wa_stack_init_callee.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/wa_stack/c/sccz80/wa_stack_init_callee.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/wa_stack/c/sccz80/wa_stack_init_callee.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; wa_stack_t *wa_stack_init(void *p, void *data, size_t capacity)
SECTION code_adt_wa_stack
PUBLIC wa_stack_init_callee
EXTERN w_array_init_callee
defc wa_stack_init_callee = w_array_init_callee
INCLUDE "adt/wa_stack/z80/asm_wa_stack_init.asm"
| 19.230769 | 65 | 0.836 |
37c96e9787318d534858da29197d92bf65a1721c | 1,798 | asm | Assembly | tests/parsing/new_apostrophe.asm | cizo2000/sjasmplus | 615d7c0e09a44aa2a923095fc9ed6dca6ecae4a4 | [
"BSD-3-Clause"
] | 220 | 2016-10-22T19:44:39.000Z | 2022-03-29T20:57:04.000Z | tests/parsing/new_apostrophe.asm | ped7g/sjasmplus | 487635c8057cd5594c372d9b70bc00a3f3a1ecc4 | [
"BSD-3-Clause"
] | 153 | 2018-05-07T10:31:23.000Z | 2022-03-30T04:35:59.000Z | tests/parsing/new_apostrophe.asm | ped7g/sjasmplus | 487635c8057cd5594c372d9b70bc00a3f3a1ecc4 | [
"BSD-3-Clause"
] | 51 | 2016-05-12T21:27:36.000Z | 2022-03-27T15:16:16.000Z | OUTPUT "new_apostrophe.bin"
; test new \0 escape for double quotes
db "\0"
; test new stricter rules for not-escaping apostrophe strings
db '\E', '\\' ; test (4 bytes)
db "\\E", "\\\\" ; expected (emulating expected result in quotes)
db '''''', '\', 0, '' ; test (4 bytes) + warning
db "''", "\\", 0 ; expected (emulating expected result in quotes)
; more tricky ones (putting stress also on line parsers and buffer readers)
db '/**/''/**/''\n\\''\"'''
db "/**/'/**/'\\n\\\\'\\\"'" ; expected
db "\"" : db 0
db '\' : db 1
db '\\' : db 2
db '' : db 3 ; warning empty string + error no arguments
db '''' : db 4
dw 'ABCD', 'ABCDEFGHXX'; regular value check warnings + string literal overflow
dw "ABCD", "ABCDEFGHXX"; regular value check warnings + string literal overflow
;; exercise remaining escape sequences inside apostrophes (shouldn't be escaped)
db '\A', '\B', '\D', '\E' ; verify nothing leaks into comments
db '\F', '\N', '\R', '\T' ; verify nothing leaks into comments
db '\\', '\"', '\?', '"\' ; verify nothing leaks into comments
db '\0', '\''' ; verify nothing leaks into comments
db "\n"
;; Example about string literals from documentation
BYTE "stringconstant\n" ; escape sequence assembles to newline
BYTE 'stringconstant\n' ; \n assembles literally as two bytes: '\', 'n'
LD HL,'hl' ; hl = 0x686C = 'l', 'h'
LD HL,"hl" ; hl = 0x686C = 'l', 'h'
LD A,"7" ; not recommended (but works)
LD A,'8' ; recommended
LD A,'\E' ; warning + truncating value to 'E' (0x45)
LD A,'"' ; A = 0x22
LD A,"'" ; A = 0x27
LD A,'''' ; A = 0x27 ; since v1.11
| 41.813953 | 84 | 0.538376 |
cd607cdb8e12f77a4c7b4c7897473a2c2967e7a5 | 257 | asm | Assembly | libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sccz80/esxdos_disk_info_callee.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sccz80/esxdos_disk_info_callee.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sccz80/esxdos_disk_info_callee.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | ; int esxdos_disk_info(uchar device, void *buf)
SECTION code_clib
SECTION code_esxdos
PUBLIC esxdos_disk_info_callee
EXTERN asm_esxdos_disk_info
esxdos_disk_info_callee:
pop af
pop hl
pop bc
push af
ld a,c
jp asm_esxdos_disk_info
| 13.526316 | 47 | 0.762646 |
c719b83c0b0fb1a438d8e0c05175154173e83e0b | 5,392 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_469.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_469.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_469.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0xf9a2, %rsi
lea addresses_WT_ht+0xe052, %rdi
inc %r12
mov $63, %rcx
rep movsb
nop
nop
nop
dec %rdx
lea addresses_WC_ht+0x1da32, %rsi
lea addresses_A_ht+0x1bd62, %rdi
nop
nop
nop
nop
nop
cmp $57365, %r9
mov $62, %rcx
rep movsq
nop
nop
nop
nop
nop
sub $22927, %rsi
lea addresses_WC_ht+0xfee2, %r9
nop
nop
sub $15927, %r15
mov (%r9), %r12
nop
nop
lfence
lea addresses_WC_ht+0x3377, %rdx
and %r15, %r15
movl $0x61626364, (%rdx)
nop
nop
nop
nop
nop
xor %rdx, %rdx
lea addresses_WC_ht+0x1b462, %rsi
lea addresses_normal_ht+0x16762, %rdi
clflush (%rdi)
nop
nop
nop
xor $35501, %rbx
mov $122, %rcx
rep movsq
cmp %r12, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r15
push %r8
push %rbx
push %rcx
push %rdx
// Load
lea addresses_D+0xd222, %r8
nop
inc %r12
mov (%r8), %r15
inc %r12
// Faulty Load
lea addresses_RW+0x15462, %r8
nop
nop
nop
sub %rcx, %rcx
mov (%r8), %r10w
lea oracles, %r12
and $0xff, %r10
shlq $12, %r10
mov (%r12,%r10,1), %r10
pop %rdx
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'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
*/
| 42.793651 | 2,999 | 0.660237 |
427dbf226fa26ea071cb141999dfba9501f4bcbf | 1,028 | asm | Assembly | Breaks6502/BreaksDebug/Build/TestIllegal.asm | ogamespec/breaknes | b053afb6924ca661f71a129766e8945f64f6ec7b | [
"CC0-1.0"
] | 2 | 2022-03-10T16:56:33.000Z | 2022-03-20T13:28:20.000Z | Breaks6502/BreaksDebug/Build/TestIllegal.asm | ogamespec/breaknes | b053afb6924ca661f71a129766e8945f64f6ec7b | [
"CC0-1.0"
] | null | null | null | Breaks6502/BreaksDebug/Build/TestIllegal.asm | ogamespec/breaknes | b053afb6924ca661f71a129766e8945f64f6ec7b | [
"CC0-1.0"
] | 1 | 2022-03-10T12:06:25.000Z | 2022-03-10T12:06:25.000Z | ; A sandbox to check illegal opcodes.
org $200
Reset:
jmp Test_ATX
; DCP Tests ripped from nestest.nes
LDA #$FF
STA $1
LDX #$FF
; Test 1
DCP_Test_1:
LDA #$EB
STA $0647
BIT $01
CLC
LDA #$40
BYTE #$DF ; DCP $0548,X
BYTE #$48
BYTE #$05
NOP
BVC BadDCP
BCS BadDCP
BMI BadDCP
CMP #$40
BNE BadDCP
LDA $0647
CMP #$EA
BNE BadDCP
; Test 2
DCP_Test_2:
LDA #$00
STA $0647
CLV
SEC
LDA #$FF
BYTE #$DF ; DCP $0548,X
BYTE #$48
BYTE #$05
NOP
BVS BadDCP
BNE BadDCP
BMI BadDCP
BCC BadDCP
CMP #$FF
BNE BadDCP
LDA $0647
CMP #$FF
BNE BadDCP
; Test 3
DCP_Test_3:
LDA #$37
STA $0647
BIT $01
LDA #$F0
BYTE #$DF ; DCP $0548,X
BYTE #$48
BYTE #$05
NOP
BVC BadDCP
BEQ BadDCP
BPL BadDCP
BCC BadDCP
CMP #$F0
BNE BadDCP
LDA $0647
CMP #$36
BNE BadDCP
GoodDCP:
jmp GoodDCP
BadDCP:
brk
; AND byte with accumulator, then transfer accumulator to X register.
; Status flags: N,Z
Test_ATX:
lda #$12
byte #$AB
byte #$ab
nop
org $fffa
word Reset
word Reset
word Reset
| 9.518519 | 69 | 0.638132 |
af707da7d2ea3a126091a4cf4ad874ac92fafbaa | 65 | asm | Assembly | src/main/fragment/mos6502-common/vwsc1_eq_pwsc2_derefidx_vbuyy_then_la1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/vwsc1_eq_pwsc2_derefidx_vbuyy_then_la1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/vwsc1_eq_pwsc2_derefidx_vbuyy_then_la1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | lda #>{c1}
cmp {c2}+1,y
bne !+
lda #<{c1}
cmp {c2},y
beq {la1}
!: | 9.285714 | 12 | 0.492308 |
97658c8ddc9289e17ea70f44ac4494993276b5a3 | 57 | asm | Assembly | src/menuscreen.asm | hackneyc/CastleEscape | cbf676a4358bdb32d5b2b5251dd17951af19b5df | [
"BSD-3-Clause"
] | null | null | null | src/menuscreen.asm | hackneyc/CastleEscape | cbf676a4358bdb32d5b2b5251dd17951af19b5df | [
"BSD-3-Clause"
] | 11 | 2021-01-26T02:59:18.000Z | 2021-02-05T04:45:55.000Z | src/menuscreen.asm | hackneyc/CastleEscape | cbf676a4358bdb32d5b2b5251dd17951af19b5df | [
"BSD-3-Clause"
] | null | null | null | section RODATA_7
binary "mainmenu.scr"
| 14.25 | 30 | 0.561404 |
2ebd2f959ad90f4533c533e9706506979c82d0ae | 7,424 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2738.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_0x48.log_21829_2738.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_0x48.log_21829_2738.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x18b43, %r13
nop
nop
nop
nop
xor $13042, %rbp
mov (%r13), %rdi
nop
cmp $3539, %r8
lea addresses_WC_ht+0x15343, %r15
xor %r8, %r8
mov (%r15), %ecx
nop
nop
nop
nop
xor %r8, %r8
lea addresses_WT_ht+0x14157, %rsi
lea addresses_normal_ht+0x1ef93, %rdi
nop
nop
inc %rbx
mov $117, %rcx
rep movsq
nop
cmp %r13, %r13
lea addresses_WT_ht+0xd343, %r8
nop
nop
xor %rbx, %rbx
mov (%r8), %si
nop
and $42577, %rbx
lea addresses_D_ht+0x17043, %r8
nop
nop
nop
nop
nop
and $63904, %rbx
movw $0x6162, (%r8)
nop
nop
nop
add $7471, %rbp
lea addresses_A_ht+0x9c3, %rbx
nop
nop
nop
nop
nop
cmp %rsi, %rsi
mov (%rbx), %bp
nop
add $16560, %rbp
lea addresses_normal_ht+0xb0a3, %rcx
nop
nop
nop
xor $22024, %r13
movb $0x61, (%rcx)
nop
nop
nop
nop
xor %r13, %r13
lea addresses_normal_ht+0x4ac3, %rsi
cmp %rbp, %rbp
mov $0x6162636465666768, %r8
movq %r8, %xmm6
movups %xmm6, (%rsi)
nop
inc %rsi
lea addresses_A_ht+0x1aa13, %rcx
cmp %rbp, %rbp
mov $0x6162636465666768, %rsi
movq %rsi, (%rcx)
nop
nop
nop
nop
nop
xor %rbx, %rbx
lea addresses_A_ht+0x1b143, %rsi
lea addresses_WT_ht+0x5943, %rdi
nop
nop
nop
sub $50150, %r15
mov $66, %rcx
rep movsb
nop
cmp $17064, %rcx
lea addresses_A_ht+0x5b43, %rsi
lea addresses_normal_ht+0x15a33, %rdi
nop
nop
nop
nop
nop
and $2177, %r15
mov $83, %rcx
rep movsb
nop
sub %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %rax
push %rbx
push %rcx
push %rdx
// Store
lea addresses_UC+0x1b2f7, %rdx
nop
nop
sub $42100, %rcx
movw $0x5152, (%rdx)
nop
nop
nop
nop
nop
cmp %rax, %rax
// Store
lea addresses_UC+0x5297, %rax
dec %rbx
mov $0x5152535455565758, %rcx
movq %rcx, %xmm7
movups %xmm7, (%rax)
nop
nop
nop
nop
nop
xor $36089, %r14
// Store
lea addresses_normal+0x16889, %rdx
nop
nop
nop
nop
cmp %r15, %r15
mov $0x5152535455565758, %r10
movq %r10, (%rdx)
nop
nop
nop
nop
nop
dec %r10
// Faulty Load
lea addresses_PSE+0x1b343, %rcx
nop
add %r14, %r14
mov (%rcx), %eax
lea oracles, %rdx
and $0xff, %rax
shlq $12, %rax
mov (%rdx,%rax,1), %rax
pop %rdx
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 4, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'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
*/
| 33.745455 | 2,999 | 0.655846 |
cc0c47cef90c9c5debd8e725283d5d343bdd9be7 | 764 | asm | Assembly | data/mapObjects/VictoryRoad1F.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | data/mapObjects/VictoryRoad1F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | data/mapObjects/VictoryRoad1F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | VictoryRoad1F_Object:
db $7d ; border block
db 3 ; warps
warp 8, 17, 2, -1
warp 9, 17, 2, -1
warp 1, 1, 0, VICTORY_ROAD_2F
db 0 ; signs
db 7 ; objects
object SPRITE_LASS, 7, 5, STAY, RIGHT, 1, OPP_COOLTRAINER_F, 5
object SPRITE_BLACK_HAIR_BOY_1, 3, 2, STAY, DOWN, 2, OPP_COOLTRAINER_M, 5
object SPRITE_BALL, 11, 0, STAY, NONE, 3, TM_43
object SPRITE_BALL, 9, 2, STAY, NONE, 4, RARE_CANDY
object SPRITE_BOULDER, 5, 15, STAY, BOULDER_MOVEMENT_BYTE_2, 5 ; person
object SPRITE_BOULDER, 14, 2, STAY, BOULDER_MOVEMENT_BYTE_2, 6 ; person
object SPRITE_BOULDER, 2, 10, STAY, BOULDER_MOVEMENT_BYTE_2, 7 ; person
; warp-to
warp_to 8, 17, VICTORY_ROAD_1F_WIDTH
warp_to 9, 17, VICTORY_ROAD_1F_WIDTH
warp_to 1, 1, VICTORY_ROAD_1F_WIDTH ; VICTORY_ROAD_2F
| 31.833333 | 74 | 0.735602 |
5102ec9e740b231155cb9bd5ebfb2a98636de8a3 | 310 | asm | Assembly | programs/oeis/020/A020699.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/020/A020699.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/020/A020699.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A020699: Expansion of (1-3*x)/(1-5*x).
; 1,2,10,50,250,1250,6250,31250,156250,781250,3906250,19531250,97656250,488281250,2441406250,12207031250,61035156250,305175781250,1525878906250,7629394531250,38146972656250,190734863281250,953674316406250,4768371582031250
mov $1,5
pow $1,$0
add $1,2
mul $1,2
div $1,5
| 34.444444 | 221 | 0.790323 |
7720128451d2f8a15fbd7e546c4cc1c2b8e0bff1 | 606 | asm | Assembly | libpal/intel_64bit_ms64_masm/vmcall_kvm.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 26 | 2020-01-06T23:53:17.000Z | 2022-02-01T08:58:21.000Z | libpal/intel_64bit_ms64_masm/vmcall_kvm.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 30 | 2019-11-13T00:55:22.000Z | 2022-01-06T08:09:35.000Z | libpal/intel_64bit_ms64_masm/vmcall_kvm.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 14 | 2019-11-15T16:56:22.000Z | 2021-12-22T10:14:17.000Z | .code
; MS64 argument order: RCX, RDX, R8, R9, stack
; vmcall argument order: rax, rbx, rcx, rdx, rsi
; vmcall clobbers: rax (TODO: other registers may be clobbered if specifically documented)
pal_execute_vmcall_kvm proc
; collect fifth and higher arguments from the stack
pop r10;
; save callee-preserved (non-volatile) registers
push rbx;
push rsi;
mov rax, rcx;
mov rbx, rdx;
mov rcx, r8;
mov rdx, r9;
mov rsi, r10;
vmcall;
; restore callee-preserved (non-volatile) registers
pop rsi;
pop rbx;
ret;
pal_execute_vmcall_kvm endp
end
| 19.548387 | 90 | 0.668317 |
8d3e9bf4a9c4a5f7bc932720718867411f25c2b3 | 807 | asm | Assembly | programs/oeis/143/A143182.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/143/A143182.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/143/A143182.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A143182: Triangle T(n,m) = 1 + abs(n-2*m), read by rows, 0<=m<=n.
; 1,2,2,3,1,3,4,2,2,4,5,3,1,3,5,6,4,2,2,4,6,7,5,3,1,3,5,7,8,6,4,2,2,4,6,8,9,7,5,3,1,3,5,7,9,10,8,6,4,2,2,4,6,8,10,11,9,7,5,3,1,3,5,7,9,11,12,10,8,6,4,2,2,4,6,8,10,12,13,11,9,7,5,3,1,3,5,7,9,11,13,14,12,10,8,6,4,2,2,4,6,8,10,12,14,15,13,11,9,7,5,3,1,3,5,7,9,11,13,15,16,14,12,10,8,6,4,2,2,4,6,8,10,12,14,16,17,15,13,11,9,7,5,3,1,3,5,7,9,11,13,15,17,18,16,14,12,10,8,6,4,2,2,4,6,8,10,12,14,16,18,19,17,15,13,11,9,7,5,3,1,3,5,7,9,11,13,15,17,19,20,18,16,14,12,10,8,6,4,2,2,4,6,8,10,12,14,16,18,20,21,19,17,15,13,11,9,7,5,3,1,3,5,7,9,11,13,15,17,19,21,22,20,18,16,14,12,10,8,6,4,2,2,4,6,8,10,12,14,16
mul $0,2
mov $1,1
mov $2,4
lpb $0
add $0,3
add $2,3
mov $3,$2
sub $3,1
mov $2,$3
trn $3,$0
trn $0,$2
add $0,$3
lpe
add $1,$0
| 44.833333 | 596 | 0.557621 |
f059d3bad7a6d8d91c7925d07f205e5a67e01fc9 | 217 | asm | Assembly | WEEK-5/7.asm | ShruKin/Microprocessor-and-Microcontroller-Lab | 279c1432f0dee01fae37dc8fcb1dcb798e5725d8 | [
"MIT"
] | null | null | null | WEEK-5/7.asm | ShruKin/Microprocessor-and-Microcontroller-Lab | 279c1432f0dee01fae37dc8fcb1dcb798e5725d8 | [
"MIT"
] | null | null | null | WEEK-5/7.asm | ShruKin/Microprocessor-and-Microcontroller-Lab | 279c1432f0dee01fae37dc8fcb1dcb798e5725d8 | [
"MIT"
] | null | null | null | LDA 2200
MOV C,A
MVI B,00
MVI D,00
LXI H,2201
REPEAT: MOV A,M
ANI 01
JZ SKIP
MOV A,B
ADD M
MOV B,A
SKIP: INX H
DCR C
JNZ REPEAT
MOV A,B
STA 2210
HLT
| 10.85 | 18 | 0.479263 |
81d75b0ebfd9811de0e20c05c59a42bdb0f494ae | 11,212 | asm | Assembly | examples/01_helloFix/01_helloFix.asm | sheng007/freemlib-neogeo | 3044ede6531f80d371a1d9baaf7b30f57e548db3 | [
"0BSD"
] | 26 | 2015-01-05T16:27:43.000Z | 2021-07-10T17:54:34.000Z | examples/01_helloFix/01_helloFix.asm | sheng007/freemlib-neogeo | 3044ede6531f80d371a1d9baaf7b30f57e548db3 | [
"0BSD"
] | 12 | 2015-11-26T22:17:09.000Z | 2018-06-03T11:47:45.000Z | examples/01_helloFix/01_helloFix.asm | sheng007/freemlib-neogeo | 3044ede6531f80d371a1d9baaf7b30f57e548db3 | [
"0BSD"
] | 5 | 2015-02-26T03:23:53.000Z | 2021-03-17T07:42:37.000Z | ; freemlib for Neo-Geo Example 01: Hello World on the Fix Layer
;==============================================================================;
; defines
include "../../src_68k/inc/neogeo.inc"
include "../../src_68k/inc/ram_bios.inc"
include "../../src_68k/inc/mess_defs.inc" ; used for Japanese text
;------------------------------------------------------------------------------;
; headers
include "header_68k.inc"
ifd TARGET_CD
include "header_cd.inc"
else
include "header_cart.inc"
endif
;==============================================================================;
; USER
; Needs to perform actions according to the value in BIOS_USER_REQUEST.
; Must jump back to SYSTEM_RETURN at the end so the BIOS can have control.
USER:
move.b d0,REG_DIPSW ; kick watchdog
lea BIOS_WORKRAM,sp ; set stack pointer to BIOS_WORKRAM
move.w #0,LSPC_MODE ; Disable auto-animation, timer interrupts, set auto-anim speed to 0 frames
move.w #7,LSPC_IRQ_ACK ; ack. all IRQs
move.w #$2000,sr ; Enable VBlank interrupt, go Supervisor
; Handle user request
moveq #0,d0
move.b (BIOS_USER_REQUEST).l,d0
lsl.b #2,d0 ; shift value left to get offset into table
lea cmds_USER_REQUEST,a0
movea.l (a0,d0),a0
jsr (a0)
;------------------------------------------------------------------------------;
; BIOS_USER_REQUEST commands
cmds_USER_REQUEST:
dc.l userReq_StartupInit ; Command 0 (Initialize)
dc.l userReq_Eyecatch ; Command 1 (Custom eyecatch)
dc.l userReq_Game ; Command 2 (Demo Game/Game)
dc.l userReq_Game ; Command 3 (Title Display)
;------------------------------------------------------------------------------;
; userReq_StartupInit
; Initialize the backup work area.
userReq_StartupInit:
move.b d0,REG_DIPSW ; kick watchdog
jmp SYSTEM_RETURN
;------------------------------------------------------------------------------;
; userReq_Eyecatch
; Only to be fully coded if your game uses its own eyecatch (value at $114 is 1).
; Otherwise, jmp to SYSTEM_RETURN.
userReq_Eyecatch:
move.b d0,REG_DIPSW ; kick watchdog
jmp SYSTEM_RETURN
;------------------------------------------------------------------------------;
; userReq_Game
; This is the complex one. For this demo, we're only going to treat it as a
; combination of initialization and main loop, but for a real game, you might
; want to have BIOS_USER_REQUEST commands 2 and 3 do different things.
userReq_Game:
move.b d0,REG_DIPSW ; kick watchdog
; perform your initialization
; set up palettes
move.b d0,PALETTE_BANK1 ; use palette bank 1
lea paletteData,a0 ; load palette data start address into a0
lea PALETTES,a1 ; load palette RAM start address into a1
move.l #(16*NUM_PALETTES)-1,d7 ; each palette is 16 colors; the -1 is for loop logic to work
.ldpal:
move.w (a0)+,(a1)+ ; copy palette data from ROM to RAM
dbra d7,.ldpal ; loop logic; d7 is decremented and .ldpal loops
jsr FIX_CLEAR ; clear fix layer, add borders on sides
jsr LSP_1st ; clear first sprite
jsr CreateDisplay ; create initial display
; execution continues into main loop.
;------------------------------------------------------------------------------;
; mainLoop
; The game's main loop. This is where you run the actual game part.
mainLoop:
move.b d0,REG_DIPSW ; kick the watchdog
; do things like:
; Check Input
jsr WaitVBlank ; wait for the vblank
; and other things that would normally happen in a game's main loop.
jmp mainLoop
;==============================================================================;
; PLAYER_START
; Called by the BIOS if one of the Start buttons is pressed while the player
; has enough credits (or if the the time runs out on the title menu?).
; We're not using this in this demo.
PLAYER_START:
move.b d0,REG_DIPSW ; kick the watchdog
rts
;==============================================================================;
; DEMO_END
; Called by the BIOS when the Select button is pressed; ends the demo early.
DEMO_END:
; if necessary, store any items in the (MVS) backup RAM.
rts
;==============================================================================;
; COIN_SOUND
; Called by the BIOS when a coin is inserted; should play a coin drop sound.
; We don't actually do anything here since this isn't meant to take coins.
COIN_SOUND:
; Send a sound code
rts
;==============================================================================;
; VBlank
; VBlank interrupt, run things we want to do every frame.
VBlank:
; check if the BIOS wants to run its vblank
btst #7,BIOS_SYSTEM_MODE
bne .gamevbl
; run BIOS vblank
jmp SYSTEM_INT1
; run the game's vblank
.gamevbl
movem.l d0-d7/a0-a6,-(sp) ; save registers
move.w #4,LSPC_IRQ_ACK ; acknowledge the vblank interrupt
move.b d0,REG_DIPSW ; kick the watchdog
; do things in vblank
.endvbl:
jsr SYSTEM_IO ; "Call SYSTEM_IO every 1/60 second."
jsr MESS_OUT ; Puzzle Bobble calls MESS_OUT just after SYSTEM_IO
move.b #0,flag_VBlank ; clear vblank flag so waitVBlank knows to stop
movem.l (sp)+,d0-d7/a0-a6 ; restore registers
rte
;==============================================================================;
; IRQ2
; Level 2/timer interrupt, unused here. You could use it for effects, though.
IRQ2:
move.w #2,LSPC_IRQ_ACK ; ack. interrupt #2 (HBlank)
move.b d0,REG_DIPSW ; kick watchdog
rte
;==============================================================================;
; IRQ3
; Level 3 IRQ, unused here. Might be used for something else on CD, though.
; (More research needed)
IRQ3:
move.w #1,LSPC_IRQ_ACK ; acknowledge interrupt 3
move.b d0,REG_DIPSW ; kick watchdog
rte
;==============================================================================;
; WaitVBlank
; Waits for VBlank to finish (via a flag cleared at the end).
WaitVBlank:
move.b #1,flag_VBlank ; set our flag, which gets unset in our vblank
.waitLoop
tst.b flag_VBlank ; test the flag
bne.s .waitLoop ; if it's not cleared, keep looping until vblank finishes
rts
;==============================================================================;
; CreateDisplay
; Creates the display for this demonstration.
CreateDisplay:
jsr Display_Raw ; Use LSPC registers
jsr Display_MessOut ; Use MESS_OUT
rts
;------------------------------------------------------------------------------;
; Display_Raw
; Writes tiles to the fix layer with the LSPC registers.
Display_Raw:
; tell MESS_OUT we're busy messing with the data
; this is more of a safeguard; your program should probably have a flag
; called LSPC_BUSY (or GPU_BUSY, VRAM_BUSY, whatever...) that's used in
; situations like this instead.
bset.b #0,BIOS_MESS_BUSY
move.w #$7044,LSPC_ADDR ; set vram address to $7044
move.w #$20,LSPC_INCR ; set auto-increment to $20 (horizontal writing)
; write string data
lea string_HelloRaw,a0 ; load address of string_HelloRaw in a0
move.l #29-1,d7 ; string length-1
; loop that writes characters to the LSPC_DATA register.
.dispRaw_Loop:
clr.w d2
move.b (a0)+,d2 ; get byte from string_HelloRaw
or.w #$0000,d0 ; set upper byte (palette 0, page 0)
move.w d2,LSPC_DATA ; write data to VRAM
dbra d7,.dispRaw_Loop
bclr.b #0,BIOS_MESS_BUSY ; tell MESS_OUT it can run again
rts
string_HelloRaw:
dc.b "Hello World (via LSPC writes)"
even ; used to align data automatically
;------------------------------------------------------------------------------;
; Display_MessOut
; Writes tiles to the fix layer using MESS_OUT.
Display_MessOut:
bset.b #0,BIOS_MESS_BUSY ; tell MESS_OUT we're busy messing with the data
movea.l BIOS_MESS_POINT,a0 ; get current message pointer
move.l #0,(a0)+ ; raw commands
; command $01: data format
move.w #$0001,(a0)+ ; data in bytes, uses end code.
move.w #$10FF,(a0)+ ; upper byte=$10, end code=$FF
; command $02: VRAM auto-increment
move.w #$2002,(a0)+ ; (xx02; xx=number of bytes; $20 = one column/horizontal writing)
; command $03: VRAM address ($7000-$74FF ...bankswitching?)
move.w #$0003,(a0)+
move.w #$7066,(a0)+ ; VRAM address $7066
; command $0A: sub-command list (8x8 text)
move.w #$000A,(a0)+
move.l #string_HelloMess8,(a0)+
; command 05: add to VRAM address
move.w #$0005,(a0)+
move.w #$0022,(a0)+
; command $0A: sub-command list (8x16 text)
move.w #$000A,(a0)+
move.l #string_HelloMess16,(a0)+
; add to vram address again
move.w #$0005,(a0)+
move.w #$0022,(a0)+
; command $0A: sub-command list (Japanese text)
move.w #$000A,(a0)+
move.l #string_HelloMessJP,(a0)+
move.l #0,(a0)+ ; end commands
move.l a0,BIOS_MESS_POINT ; Update pointer
bclr.b #0,BIOS_MESS_BUSY ; tell MESS_OUT it can run again
rts
string_HelloMess8:
dc.w $0007 ; command 07: direct output (used for 8x8 tiles)
dc.b "Hello World (8x8 MESS OUT)",$FF
dc.b $00 ; pad byte
dc.w $000B ; return to command list
string_HelloMess16:
dc.w $2108 ; command 08: 8x16 output
dc.b "Hello World (8x16 MESS OUT)",$FF
dc.w $000B ; return to command list
; todo: use
string_HelloMessJP:
dc.w $3109 ; command 09: 8x16 output (Japanese)
dc.b KANA_HA,KANA_RO,KANA_CHOU, KANA_WA,KANA_CHOU,KANA_RU,KANA_DO
dc.b " (8X16 MESS OUT ",HIRA_NI,HIRA_HO,HIRA_N,HIRA_GO,")",$FF,$00
dc.w $000B ; return to command list
;==============================================================================;
; [Palettes]
NUM_PALETTES equ 4 ; used in palette loading loop
paletteData:
; Palette Set $00 (Fix/Spr)
dc.w $8000 ; reference color, must be $8000 black
dc.w $7FFF ; White
dc.w $0000 ; normal Black
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
;--------------------------------------------------------------------------;
; Palette Set $01 (Fix/Spr)
dc.w $0000 ; transparent color
dc.w $0F00 ; Red
dc.w $0000 ; Black
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
;--------------------------------------------------------------------------;
; Palette Set $02 (Fix/Spr)
dc.w $0000 ; transparent color
dc.w $00F0 ; Green
dc.w $0000 ; Black
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
;--------------------------------------------------------------------------;
; Palette Set $03 (Fix/Spr)
dc.w $0000 ; transparent color
dc.w $000F ; Blue
dc.w $0000 ; Black
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
dc.w $0000
;==============================================================================;
include "ram_user.inc"
| 30.221024 | 98 | 0.56609 |
782143b2656de8a899d982c03ee5f7369af4902b | 1,485 | asm | Assembly | coms/basic/decodeUTF8.asm | yunxu1019/efront | b30398485e702785ae7360190e50fe329addcfb3 | [
"MIT"
] | 1 | 2019-04-26T02:56:54.000Z | 2019-04-26T02:56:54.000Z | coms/basic/decodeUTF8.asm | yunxu1019/efront | b30398485e702785ae7360190e50fe329addcfb3 | [
"MIT"
] | 3 | 2019-06-10T02:59:29.000Z | 2021-06-06T01:09:58.000Z | coms/basic/decodeUTF8.asm | yunxu1019/efront | b30398485e702785ae7360190e50fe329addcfb3 | [
"MIT"
] | 1 | 2020-08-16T03:19:29.000Z | 2020-08-16T03:19:29.000Z | decodeUTF8 proc srcstart,srcsize,dststart
local srcend,i,t
mov eax,srcstart
mov ebx,srcsize
add eax,ebx
mov srcend,eax
mov ebx,srcstart
mov edx,dststart
.while ebx<srcend
mov eax,i
inc eax
mov i,eax
mov ecx,0
mov eax,0
mov al,BYTE ptr[ebx]
inc ebx
.if eax<192
.elseif eax<224
and eax,00011111b
shl eax,6
mov ecx,0
mov cl,BYTE ptr[ebx]
inc ebx
and ecx,00111111b
or eax,ecx
.elseif eax<240
and eax,00001111b
shl eax,12
mov ecx,0
mov cl,BYTE ptr[ebx]
inc ebx
and ecx,00111111b
or eax,ecx
mov ecx,0
mov cl,BYTE ptr[ebx]
inc ebx
and ecx,00111111b
or eax,ecx
.elseif eax<248
and eax,00000111b
shl eax,18
mov ecx,0
mov cl,BYTE ptr[ebx]
inc ebx
and ecx,00111111b
or eax,ecx
mov ecx,0
mov cl,BYTE ptr[ebx]
inc ebx
and ecx,00111111b
or eax,ecx
mov ecx,0
mov cl,BYTE ptr[ebx]
inc ebx
and ecx,00111111b
or eax,ecx
.endif
mov eax,t
mov DWORD ptr[edx],eax
add edx,4
.endw
mov eax,edx
ret
decodeUTF8 endp | 23.203125 | 41 | 0.457239 |
0f1d9b22378619b9f60ce7d8d515926300f3bfe0 | 608 | asm | Assembly | oeis/100/A100227.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/100/A100227.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/100/A100227.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A100227: Main diagonal of triangle A100226.
; 1,1,5,13,33,81,197,477,1153,2785,6725,16237,39201,94641,228485,551613,1331713,3215041,7761797,18738637,45239073,109216785,263672645,636562077,1536796801,3710155681,8957108165,21624372013,52205852193,126036076401,304278004997,734592086397,1773462177793,4281516441985,10336495061765,24954506565517,60245508192801,145445522951121,351136554095045,847718631141213,2046573816377473,4940866263896161,11928306344169797,28797478952235757,69523264248641313,167844007449518385,405211279147678085
trn $0,1
seq $0,78057 ; Expansion of (1+x)/(1-2*x-x^2).
mul $0,2
sub $0,1
| 76 | 486 | 0.848684 |
88bd604ae96e0eb7f82d01161ed62c9b906f1f1f | 6,409 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_3934_522.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_3934_522.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_3934_522.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x119d0, %r14
nop
inc %rsi
mov (%r14), %r11
nop
sub $40406, %r14
lea addresses_WC_ht+0x1c3d0, %rdi
nop
nop
nop
cmp %rsi, %rsi
movups (%rdi), %xmm1
vpextrq $1, %xmm1, %r13
nop
nop
add %r11, %r11
lea addresses_D_ht+0x1ad50, %rcx
nop
sub $54728, %r11
mov (%rcx), %r13w
nop
nop
nop
xor %r14, %r14
pop %rsi
pop %rdi
pop %rcx
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r14
push %r8
push %rcx
push %rdi
// Store
lea addresses_WC+0x113d0, %r14
nop
nop
nop
nop
cmp %r8, %r8
movl $0x51525354, (%r14)
nop
nop
nop
nop
nop
cmp %r10, %r10
// Store
lea addresses_RW+0xf2b0, %r12
nop
nop
nop
nop
and $11142, %rdi
movb $0x51, (%r12)
dec %r14
// Load
lea addresses_PSE+0x4bd0, %r14
clflush (%r14)
nop
add $14211, %r8
mov (%r14), %r12
nop
nop
nop
nop
and $14349, %r8
// Store
lea addresses_US+0x3022, %r8
nop
xor %rcx, %rcx
movl $0x51525354, (%r8)
nop
nop
nop
inc %rdi
// Store
lea addresses_WT+0x109d0, %rdi
nop
nop
nop
nop
nop
sub $38091, %r12
movl $0x51525354, (%rdi)
nop
nop
nop
nop
nop
cmp %r10, %r10
// Store
mov $0x490, %r14
nop
nop
and %r8, %r8
movb $0x51, (%r14)
cmp $46154, %r14
// Store
lea addresses_RW+0x130b0, %r12
nop
nop
nop
inc %r14
movw $0x5152, (%r12)
nop
nop
add $41833, %rdi
// Store
lea addresses_WC+0x6d90, %rdi
nop
add %r12, %r12
mov $0x5152535455565758, %r10
movq %r10, (%rdi)
nop
nop
nop
nop
nop
dec %rdi
// Faulty Load
lea addresses_WT+0x93d0, %rdi
nop
nop
nop
and $65498, %r10
mov (%rdi), %r8
lea oracles, %r14
and $0xff, %r8
shlq $12, %r8
mov (%r14,%r8,1), %r8
pop %rdi
pop %rcx
pop %r8
pop %r14
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 3, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 5, 'size': 8, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': True, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 3, 'size': 2, 'same': False, 'NT': False}}
{'54': 3934}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
| 34.272727 | 2,999 | 0.648151 |
461a1200c01fa324c578d3a48213f58fb592bc78 | 109 | asm | Assembly | ESEMPI/14 PROGRAMMA OR.asm | Porchetta/py-pdp8-tk | 5eba6bb2cf72b97602bfa2239e7bf44c454794e0 | [
"MIT"
] | 8 | 2019-06-07T10:38:41.000Z | 2022-03-24T13:05:12.000Z | ESEMPI/14 PROGRAMMA OR.asm | Porchetta/py-pdp8-tk | 5eba6bb2cf72b97602bfa2239e7bf44c454794e0 | [
"MIT"
] | 2 | 2015-07-14T12:22:33.000Z | 2018-05-11T08:35:24.000Z | ESEMPI/14 PROGRAMMA OR.asm | Porchetta/py-pdp8-tk | 5eba6bb2cf72b97602bfa2239e7bf44c454794e0 | [
"MIT"
] | 9 | 2015-05-06T14:35:08.000Z | 2021-03-23T14:27:21.000Z | ORG 200 /OR tra A e B
LDA A
CMA
STA A
LDA B
CMA
AND A
CMA
STA RIS
HLT
A, HEX FFFE
B, HEX 0001
RIS, HEX 0
END
| 7.266667 | 21 | 0.678899 |
8619ba537f1e802fcac337e6bbe901dfb154403f | 7,109 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1922.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_0xca_notsx.log_21829_1922.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_0xca_notsx.log_21829_1922.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r15
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0xe249, %rdi
nop
nop
nop
xor $60091, %rcx
mov $0x6162636465666768, %r15
movq %r15, %xmm0
and $0xffffffffffffffc0, %rdi
vmovntdq %ymm0, (%rdi)
nop
and %r11, %r11
lea addresses_WC_ht+0xf091, %rdx
nop
nop
nop
nop
and %r9, %r9
mov (%rdx), %r11d
nop
nop
nop
sub %rdx, %rdx
lea addresses_D_ht+0xa031, %r9
nop
nop
and %r10, %r10
mov $0x6162636465666768, %rcx
movq %rcx, %xmm4
vmovups %ymm4, (%r9)
nop
nop
nop
nop
nop
cmp $41250, %rdx
lea addresses_D_ht+0xb411, %rsi
lea addresses_UC_ht+0xf371, %rdi
nop
sub $19565, %rdx
mov $62, %rcx
rep movsl
nop
nop
nop
nop
sub %r10, %r10
lea addresses_normal_ht+0x16f71, %rdx
nop
nop
nop
add $9782, %r15
mov (%rdx), %r9
nop
nop
nop
nop
xor $30231, %r15
lea addresses_A_ht+0x1151d, %rsi
nop
and %r11, %r11
and $0xffffffffffffffc0, %rsi
vmovaps (%rsi), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r15
nop
nop
xor $24349, %rdi
lea addresses_A_ht+0x29d, %rsi
lea addresses_UC_ht+0x15c31, %rdi
nop
nop
and %rdx, %rdx
mov $18, %rcx
rep movsl
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0xe3f1, %r15
nop
nop
and %r11, %r11
mov $0x6162636465666768, %r9
movq %r9, %xmm0
and $0xffffffffffffffc0, %r15
vmovaps %ymm0, (%r15)
nop
nop
nop
nop
nop
sub $30418, %rsi
lea addresses_normal_ht+0x1371, %rsi
lea addresses_UC_ht+0x10271, %rdi
inc %rdx
mov $75, %rcx
rep movsw
nop
nop
nop
nop
sub $48737, %r15
lea addresses_UC_ht+0x7b7f, %rcx
add $15833, %rdi
mov (%rcx), %r9
nop
nop
dec %r10
lea addresses_normal_ht+0x2452, %rsi
lea addresses_A_ht+0x12831, %rdi
nop
nop
nop
nop
and $31070, %r9
mov $7, %rcx
rep movsb
nop
inc %rdi
lea addresses_D_ht+0x18a31, %r11
nop
nop
add %r9, %r9
movw $0x6162, (%r11)
nop
nop
nop
add $62909, %r11
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %r9
push %rax
push %rbp
// Faulty Load
lea addresses_RW+0x1fb71, %rbp
clflush (%rbp)
sub %r9, %r9
mov (%rbp), %r8d
lea oracles, %r9
and $0xff, %r8
shlq $12, %r8
mov (%r9,%r8,1), %r8
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': True, 'type': 'addresses_RW', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': True, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}}
{'src': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_D_ht', 'size': 32, 'AVXalign': True}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}}
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 6, 'NT': False, 'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False}}
{'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
*/
| 36.270408 | 2,999 | 0.660149 |
f00b381e44e5a9b9947471b62bc52663ca836caf | 552 | asm | Assembly | programs/oeis/079/A079905.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/079/A079905.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/079/A079905.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A079905: a(1)=1; then a(n) is smallest positive integer which is consistent with sequence being monotonically increasing and satisfying a(a(n)) = 2n+1 for n>1.
; 1,3,5,6,7,9,11,12,13,14,15,17,19,21,23,24,25,26,27,28,29,30,31,33,35,37,39,41,43,45,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,96,97,98,99,100,101,102
seq $0,115836 ; Self-describing sequence. The n-th integer of the sequence indicates how many integers of the sequence are strictly < 2n.
lpb $0
sub $0,1
mul $0,6
lpe
add $0,1
| 55.2 | 208 | 0.70471 |
37d57ae9d991b05e9e7fe1c99a950103c2a0bbcb | 326 | asm | Assembly | programs/oeis/054/A054401.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/054/A054401.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/054/A054401.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A054401: 5^n-4^n-1.
; 0,8,60,368,2100,11528,61740,325088,1690980,8717048,44633820,227363408,1153594260,5835080168,29443836300,148292923328,745759583940,3745977788888,18798608421180,94267920012848,472439111692020,2366593604971208
add $0,1
mov $1,4
pow $1,$0
mov $2,5
pow $2,$0
sub $2,$1
mov $0,$2
mul $0,4
div $0,8
mul $0,2
| 23.285714 | 208 | 0.757669 |
d4bda8eaa07a1159d8c2bd63eb13dc83f3985b0e | 10,325 | asm | Assembly | src/ucode_apu.asm | DigiDwrf/neon64v2-easybuild | 94fa46fbc8ddb2af593cb42162df58f65a03ebc4 | [
"0BSD"
] | 36 | 2020-07-08T11:27:17.000Z | 2022-03-15T08:38:52.000Z | src/ucode_apu.asm | DigiDwrf/neon64v2-easybuild | 94fa46fbc8ddb2af593cb42162df58f65a03ebc4 | [
"0BSD"
] | 19 | 2020-07-12T23:14:03.000Z | 2021-12-14T07:57:40.000Z | src/ucode_apu.asm | DigiDwrf/neon64v2-easybuild | 94fa46fbc8ddb2af593cb42162df58f65a03ebc4 | [
"0BSD"
] | 6 | 2021-07-17T09:57:46.000Z | 2022-03-13T07:50:25.000Z | // Audio synthesis
constant oversample_amount_shift(1)
constant oversample_amount(1<<oversample_amount_shift)
constant min_triangle_timer(2)
constant min_abuf_margin(3)
constant reset_p1_flag(1)
constant reset_p2_flag(2)
constant tri_enabled_flag(4)
constant noise_mode_flag(8)
InitAPU:
lli t0, 1
jr ra
sh t0, dmem_noise_reg (r0)
scope RunAPU: {
lhu a0, dmem_abuf_samples_left (r0)
bnez a0, check_alist
lli ra, RunAPU
// 0 samples = no current buffer, get a new one
// Check that we're not getting too close to the next read buffer
lw t0, dmem_abuf_write (r0)
lw t1, dmem_abuf_read (r0)
addi t2, t0, min_abuf_margin
subi t3, t2, num_abufs
bltz t3,+
nop
move t2, t3
+
beq t2, t1, skip_render
nop
// Wrap
lli t2, num_abufs-1
bne t0, t2,+
addi t0, 1
lli t0, 0
+
sll t0, 2
lw t0, dmem_abuf_addrs (t0)
sw t0, dmem_abuf_pos (r0)
lli a0, abuf_samples
sh a0, dmem_abuf_samples_left (r0)
check_alist:
lw t1, dmem_alist_entry + alist_SampleDelta (r0)
bnez t1, alist_ready
sub t2, t1, a0
// 0 samples left for current config, load a new one
lw t3, dmem_alist_read (r0)
lw t4, dmem_alist_write (r0)
la sp_t5, alist_buffer&0x7f'ffff
bne t3, t4,+
sll sp_t6, t3, alist_entry_size_shift
// alist buffer is empty, do nothing unless we're flushing
lw t0, dmem_flush_abuf (r0)
beqz t0, skip_render
nop
// Flushing, render the rest of the samples in the buffer anyway using
// the current config.
j render_samples
sw r0, dmem_flush_abuf (r0)
+
// DMA in the new alist entry
add sp_t5, sp_t6
mtc0 sp_t5, C0_DRAM_ADDR
lli sp_t5, dmem_alist_entry
mtc0 sp_t5, C0_MEM_ADDR
lli sp_t5, alist_entry_size-1
mtc0 sp_t5, C0_RD_LEN
-
mfc0 t2, C0_DMA_BUSY
bnez t2,-
nop
// Release alist entry
lli t2, num_alists-1
bne t3, t2,+
addi t3, 1
lli t3, 0
+
sw t3, dmem_alist_read (r0)
lw t1, dmem_alist_entry + alist_SampleDelta (r0)
sub t2, t1, a0
alist_ready:
// t2 = alist samples left (t1) - abuf samples left (a0)
bgez t2,+
nop
// alist ends before end of buffer, stop at alist end
move a0, t1
+
sub t1, a0
sw t1, dmem_alist_entry + alist_SampleDelta (r0)
scope render_samples: {
// a0 = number of samples to render
constant samples_left(a0)
constant sample_ptr(a1)
constant tri_timer_init(sp_s0)
constant tri_timer(sp_s1)
constant tri_sample(sp_s2)
constant timer_dec(sp_s3)
constant p1_timer_init(sp_s4)
constant p1_timer(sp_s5)
constant p1_sample(sp_s6)
constant p2_timer_init(sp_s7)
constant p2_timer(a2)
constant p2_sample(a3)
constant sample_sum(sp_t7)
constant oversampling(sp_t6)
constant noise_timer(sp_t5)
constant noise_timer_init(sp_v0)
constant noise_sample(v1)
constant dmc_timer(k0)
constant dmc_timer_init(k1)
constant dmc_sample(t9)
lli sample_ptr, dmem_dst
// APU rate is half CPU rate
la timer_dec, (clock_rate<<16)/cpu_div/2/samplerate/oversample_amount
// Load P1
lbu t0, dmem_alist_entry + alist_Flags (r0)
lhu p1_timer_init, dmem_alist_entry + alist_P1Timer (r0)
lw p1_timer, dmem_p1_timer (r0)
andi t1, t0, reset_p1_flag
beqz t1,+
xori t0, reset_p1_flag
sb t0, dmem_alist_entry + alist_Flags (r0)
sb r0, dmem_p1_phase (r0)
+
lli p1_sample, 0
beqz p1_timer_init,+
nop
addi p1_timer_init, 1
sll p1_timer_init, 16
macro scope update_pulse_sample(duty, phase, env, sample_reg, inc_reg, tmp1, tmp2) {
scope {#} {
lbu {tmp1}, dmem_alist_entry + {duty} (r0)
lbu {tmp2}, {phase} (r0)
lbu {tmp1}, dmem_pulse_sequence_table ({tmp1})
if {inc_reg} != r0 {
add {tmp2}, {inc_reg}
}
andi {tmp2}, 7
srlv {tmp1}, {tmp2}
andi {tmp1}, 1
lli {sample_reg}, 0
beqz {tmp1}, end
sb {tmp2}, {phase} (r0)
lbu {sample_reg}, dmem_alist_entry + {env} (r0)
end:
}
}
update_pulse_sample(alist_P1Duty, dmem_p1_phase, alist_P1Env, p1_sample, r0, t0, t1)
+
// Load P2
lbu t0, dmem_alist_entry + alist_Flags (r0)
lhu p2_timer_init, dmem_alist_entry + alist_P2Timer (r0)
lw p2_timer, dmem_p2_timer (r0)
andi t1, t0, reset_p2_flag
beqz t1,+
xori t0, reset_p2_flag
sb t0, dmem_alist_entry + alist_Flags (r0)
sb r0, dmem_p2_phase (r0)
+
lli p2_sample, 0
beqz p2_timer_init,+
nop
addi p2_timer_init, 1
sll p2_timer_init, 16
update_pulse_sample(alist_P2Duty, dmem_p2_phase, alist_P2Env, p2_sample, r0, t0, t1)
+
// Load Tri
macro update_tri_sample(inc_reg, tmp1) {
lbu {tmp1}, dmem_tri_phase (r0)
if {inc_reg} != r0 {
add {tmp1}, {inc_reg}
}
andi {tmp1}, 0x1f
lbu tri_sample, dmem_tri_sequence_table ({tmp1})
if {inc_reg} != r0 {
sb {tmp1}, dmem_tri_phase (r0)
}
}
update_tri_sample(r0, t0)
lbu tri_timer_init, dmem_alist_entry + alist_Flags (r0)
andi tri_timer_init, tri_enabled_flag
// Don't step if disabled
beqz tri_timer_init,+
nop
lhu tri_timer_init, dmem_alist_entry + alist_TriTimer (r0)
subi t0, tri_timer_init, min_triangle_timer
addi tri_timer_init, 1
// Don't step if period is too short
bgez t0,+
sll tri_timer_init, 16
lli tri_timer_init, 0
lli tri_sample, 22 // approximately 7.5*3
+
lw tri_timer, dmem_tri_timer (r0)
// Load Noise
lhu noise_timer_init, dmem_alist_entry + alist_NoiseTimer (r0)
lw noise_timer, dmem_noise_timer (r0)
addi noise_timer_init, 1
sll noise_timer_init, 16
macro update_noise_sample(inc_reg, tmp1, tmp2, tmp3) {
scope {#} {
if {inc_reg} != r0 {
lbu {tmp1}, dmem_alist_entry + alist_Flags (r0)
}
lhu noise_sample, dmem_noise_reg (r0)
if {inc_reg} != r0 {
andi {tmp1}, noise_mode_flag
beqz {tmp1}, mode_done
lli {tmp3}, 1
lli {tmp3}, 6
mode_done:
loop:
// Assume initially > 0
addi {inc_reg}, -1
andi {tmp1}, noise_sample, 1
srlv {tmp2}, noise_sample, {tmp3}
xor {tmp1}, {tmp2}
andi {tmp1}, 1
srl noise_sample, 1
sll {tmp1}, 14
bnez {inc_reg}, loop
or noise_sample, {tmp1}
sh noise_sample, dmem_noise_reg (r0)
}
andi noise_sample, 1
// Use envelope if 0
bnez noise_sample, end
lli noise_sample, 0
lbu noise_sample, dmem_alist_entry + alist_NoiseEnv (r0)
end:
}
}
update_noise_sample(r0, t0, t1, t2)
+
// Load DMC
lb t0, dmem_alist_entry + alist_DMCLoad (r0)
lw dmc_timer, dmem_dmc_timer (r0)
lbu dmc_sample, dmem_dmc_level (r0)
bgez t0,+
lhu dmc_timer_init, dmem_alist_entry + alist_DMCTimer (r0)
andi dmc_sample, t0, 0x7f
sb dmc_sample, dmem_dmc_level (r0)
sb r0, dmem_alist_entry + alist_DMCLoad (r0)
+
beqz dmc_timer_init,+
nop
addi dmc_timer_init, 1
sll dmc_timer_init, 16
+
macro update_dmc_sample(inc_reg, tmp1, tmp2, tmp3, tmp4) {
scope {#} {
loop:
// Assume initially > 0
addi {inc_reg}, -1
lbu {tmp2}, dmem_dmc_cur (r0)
lbu {tmp1}, dmem_alist_entry + alist_DMCSampleCount (r0)
srl {tmp4}, {tmp2}, 1
bnez {tmp4}, sample_present
andi {tmp2}, 1
// Load a new sample byte
addi {tmp2}, {tmp1}, -1
lbu {tmp3}, dmem_alist_entry + alist_DMCSamples ({tmp2})
beqz {tmp1}, done
nop
sb {tmp2}, dmem_alist_entry + alist_DMCSampleCount (r0)
andi {tmp2}, {tmp3}, 1
srl {tmp4}, {tmp3}, 1
ori {tmp4}, 0x80
sample_present:
sb {tmp4}, dmem_dmc_cur (r0)
beqz {tmp2}, down
addi {tmp2}, dmc_sample, -2
addi {tmp2}, dmc_sample, 2
down:
andi {tmp4}, {tmp2}, 0x7f
xor {tmp4}, {tmp2}
bnez {tmp4}, out_of_range
nop
move dmc_sample, {tmp2}
out_of_range:
bnez {inc_reg}, loop
nop
done:
sb dmc_sample, dmem_dmc_level (r0)
}
}
// Init mix
lli sample_sum, 0
lli oversampling, oversample_amount-1
sample_loop:
// mix current sample
// tri is pre-multiplied (*3)
// noise*2
add t1, tri_sample, noise_sample
add t1, noise_sample
add t1, dmc_sample
lbu t0, dmem_dtn_mix_table (t1)
add t2, p1_sample, p2_sample
lbu t3, dmem_pulse_mix_table (t2)
add t0, t3
add sample_sum, t0
bnez oversampling,+
addi oversampling, -1
sll sample_sum, 7-oversample_amount_shift
sh sample_sum, 0 (sample_ptr)
sh sample_sum, 2 (sample_ptr)
addi samples_left, -1
addi sample_ptr, 4
lli sample_sum, 0
lli oversampling, oversample_amount-1
+
// step timers
// P1
beqz p1_timer_init,+
nop
sub p1_timer, timer_dec
bgtz p1_timer,+
lli t0, 0
-
add p1_timer, p1_timer_init
blez p1_timer,-
addi t0, 1
update_pulse_sample(alist_P1Duty, dmem_p1_phase, alist_P1Env, p1_sample, t0, t1, t2)
+
// P2
beqz p2_timer_init,+
nop
sub p2_timer, timer_dec
bgtz p2_timer,+
lli t0, 0
-
add p2_timer, p2_timer_init
blez p2_timer,-
addi t0, 1
update_pulse_sample(alist_P2Duty, dmem_p2_phase, alist_P2Env, p2_sample, t0, t1, t2)
+
// Tri
beqz tri_timer_init,+
nop
// Tri is clocked at CPU rate, twice APU
sub tri_timer, timer_dec
sub tri_timer, timer_dec
bgtz tri_timer,+
lli t0, 0
-
add tri_timer, tri_timer_init
blez tri_timer,-
addi t0, 1
update_tri_sample(t0, t1)
+
// Noise
sub noise_timer, timer_dec
bgtz noise_timer,+
lli t0, 0
-
add noise_timer, noise_timer_init
blez noise_timer,-
addi t0, 1
update_noise_sample(t0, t1, t2, t3)
+
// DMC
beqz dmc_timer_init,+
nop
// DMC is clocked at CPU rate, twice APU
sub dmc_timer, timer_dec
sub dmc_timer, timer_dec
bgtz dmc_timer,+
lli t0, 0
-
add dmc_timer, dmc_timer_init
blez dmc_timer,-
addi t0,1
update_dmc_sample(t0, t1, t2, t3, t4)
+
// loop
bnez samples_left, sample_loop
nop
// save
sw p1_timer, dmem_p1_timer (r0)
sw p2_timer, dmem_p2_timer (r0)
sw tri_timer, dmem_tri_timer (r0)
sw noise_timer, dmem_noise_timer (r0)
sw dmc_timer, dmem_dmc_timer (r0)
}
render_done:
// a1 = dmem_dst + samples rendered * 4
// DMA out samples
lw a2, dmem_abuf_pos (r0)
lli t2, dmem_dst
mtc0 t2, C0_MEM_ADDR
mtc0 a2, C0_DRAM_ADDR
sub t2, a1, t2
subi t2, 1
mtc0 t2, C0_WR_LEN
-
mfc0 t1, C0_DMA_BUSY
bnez t1,-
nop
addi t2, 1
add t0, a2, t2
srl t2, 2
lhu a0, dmem_abuf_samples_left (r0)
sub a0, t2
sh a0, dmem_abuf_samples_left (r0)
// Try another alist if we didn't fill the buffer
bnez a0, check_alist
sw t0, dmem_abuf_pos (r0)
// Release the buffer for playback
lw t0, dmem_abuf_write (r0)
lli t1, num_abufs-1
// Wrap
bne t0, t1,+
addi t0, 1
lli t0, 0
+
sw t0, dmem_abuf_write (r0)
// Yield to scheduler
la a0, AI.PlayBufferFromSP
sw a0, dmem_completion_vector (r0)
skip_render:
lw t0, dmem_flush_abuf (r0)
lw t1, dmem_alist_read (r0)
lw t2, dmem_alist_write (r0)
bnez t0,+
lli t0, 1
beq t1, t2,++
nop
+
sb t0, dmem_work_left (r0)
+
j Yield
nop
}
| 20.486111 | 84 | 0.707797 |
b880e732f8789748e7097db7219fc4b72559da1b | 711 | asm | Assembly | 5. Addition of Two Numbers.asm | rng70/Assembly-Programming | 38c60807b944b49e52f189930c5bf1beadf80d74 | [
"MIT"
] | null | null | null | 5. Addition of Two Numbers.asm | rng70/Assembly-Programming | 38c60807b944b49e52f189930c5bf1beadf80d74 | [
"MIT"
] | null | null | null | 5. Addition of Two Numbers.asm | rng70/Assembly-Programming | 38c60807b944b49e52f189930c5bf1beadf80d74 | [
"MIT"
] | null | null | null |
; THIS PROGRAM ADD TO NUMBER A AND B
; AND STORE THEM IN SUM
; AND THEN PRINT THE SUMMATION
.MODEL SMALL
.STACK 100H
.DATA
A DW 2
B DW 5
SUM DW ?
MSG DB 'THE SUM IS: $'
.CODE
MAIN PROC
; INITIALIZE DATA SECGENT
MOV AX, @DATA
MOV DS, AX
; ADD THE NUMBERS
MOV AX, A
ADD AX, B
ADD AX, 30H
MOV SUM, AX
; PRINT THE SUM
LEA DX, MSG
MOV AH, 9
INT 21H
MOV DX, SUM
MOV AH, 2
INT 21H
; EXIT TO DOS
MOV AX, 4C00H
INT 21H
MAIN ENDP
END MAIN | 14.8125 | 36 | 0.419128 |
6d58df7c856c950e04fb186ea25a04948da62ba9 | 19,097 | asm | Assembly | Library/Trans/SSheet/Lotus123/Shared/sharedDataChain.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Trans/SSheet/Lotus123/Shared/sharedDataChain.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Trans/SSheet/Lotus123/Shared/sharedDataChain.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @-----------------------------------------------------------------------
Copyright (c) Geoworks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE:
AUTHOR: Cheng, 10/91
ROUTINES:
Name Description
---- -----------
DataChainGetNextEntry
DataChainInitStackFrame
DataChainLockBlock
DataChainUnlockBlock
ImpexVMAlloc
ImpexVMLock
ImpexVMUnlock
DataChainAddEntry
DataChainAllocDataBlock
DataChainLinkNewDataBlock
ECCheckDataBlockEntry
ECCheckDataBlock
ECCheckDataChainRecord
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 10/91 Initial revision
DESCRIPTION:
$Id: sharedDataChain.asm,v 1.1 97/04/07 11:42:16 newdeal Exp $
-------------------------------------------------------------------------------@
COMMENT @-----------------------------------------------------------------------
FUNCTION: DataChainGetNextEntry
DESCRIPTION: Retrieve the next data block entry into the given buffer.
The buffer should be of type DataBlockEntry and a buffer
with sufficient space should follow this DataBlockEntry
for the storage of the data.
CALLED BY: EXTERNAL ()
PASS: ss:bx - DataChainRecord with the following fields filled in:
DCR_vmFileHan
DCR_curEntryMagicNum (dword) - Pass 0:0 to get the first
entry, leave it alone for all subsequent calls.
(Implementation note: hi word = VM blk handle, lo = offset)
es:di - DataBlockEntry buffer that is of sufficient size
RETURN: carry clear if next entry exists
cx - size of the DataBlockEntry
buffer filled with the data block entry
DCR_curEntryMagicNum - magic number of the current entry
carry set otherwise
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
DCSF_flag will be used to indicate if the desired block is the first
0 if not first block, -1 if so
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
DataChainGetNextEntry proc far uses ax,ds,di,si
DC_local local DataChainStackFrame
.enter
;-----------------------------------------------------------------------
; initialize the stack frame and lock the data block
call DataChainInitStackFrame
mov DC_local.DCSF_flag, 0 ; assume not first block
mov ax, ss:[bx].DCR_curEntryMagicNum.high
tst ax ; get first entry?
jne notFirstEntry
;
; caller wants the first entry in the data chain
;
dec DC_local.DCSF_flag ; indicate first block desired
mov ss:[bx].DCR_curEntryMagicNum.low, size DataBlockHeader
mov ax, ss:[bx].DCR_chain.DCTR_firstBlkVMHan
tst ax ; anything?
stc ; assume not
je exit ; exit if assumption correct
notFirstEntry:
mov DC_local.DCSF_curBlkVMHan, ax
call DataChainLockBlock
;EC< push es >
;EC< mov es, DC_local.DCSF_curBlkSegAddr >
;EC< call ECCheckDataBlock >
;EC< pop es >
mov ds, DC_local.DCSF_curBlkSegAddr ; ds:si <- entry
mov si, ss:[bx].DCR_curEntryMagicNum.low
EC< call ECCheckDataBlockEntry > ; check current entry
cmp DC_local.DCSF_flag, 0 ; first block desired?
jne found ; branch if so
;-----------------------------------------------------------------------
; locate the next data block entry
mov ax, ds:[si].DBE_entrySize
add ax, size DataBlockEntry ; ax <- size of this entry
add si, ax ; si points past this entry
cmp si, ds:DBH_blockSize ; past last entry?
jb found ; branch if not
;-----------------------------------------------------------------------
; need to go to next data block
mov ax, ds:DBH_nextBlkVMHan + offset VMCL_next ; ax <- VM blk han of next blk
tst ax ; anything?
stc ; assume not
je done ; exit if assumption correct
call DataChainUnlockBlock ; else unlock current data blk
mov DC_local.DCSF_curBlkVMHan, ax ; stuff VM blk han of next blk
call DataChainLockBlock
mov ds, DC_local.DCSF_curBlkSegAddr
mov si, size DataBlockHeader
found:
;-----------------------------------------------------------------------
; store the new magic numbers and copy the entry data
mov ax, DC_local.DCSF_curBlkVMHan
mov ss:[bx].DCR_curEntryMagicNum.high, ax
mov ss:[bx].DCR_curEntryMagicNum.low, si
EC< call ECCheckDataBlockEntry > ; check entry
mov cx, ds:[si].DBE_entrySize
add cx, size DataBlockEntry ; cx <- size of this entry
push cx
rep movsb
pop cx
clc
done:
call DataChainUnlockBlock
exit:
.leave
ret
DataChainGetNextEntry endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DataChainInitStackFrame
DESCRIPTION: Initializes the DataChainStackFrame with the info given in
the DataChainRecord.
CALLED BY: INTERNAL ()
PASS: ss:bx - DataChainRecord with the following filled:
DCR_chain.DCTR_firstBlkVMHan
DCR_vmFileHan
DataChainStackFrame
RETURN: DataChainStackFrame fields initialized
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
DataChainInitStackFrame proc near uses ax
DC_local local DataChainStackFrame
.enter inherit near
mov ax, ss:[bx].DCR_vmFileHan
EC< tst ax >
EC< ERROR_E ROUTINE_USING_BAD_PARAMS >
mov DC_local.DCSF_vmFileHan, ax
mov ax, ss:[bx].DCR_chain.DCTR_firstBlkVMHan
mov DC_local.DCSF_curBlkVMHan, ax
EC< mov DC_local.DCSF_curBlkMemHan, 0 >
EC< mov DC_local.DCSF_curBlkSegAddr, 0 >
.leave
ret
DataChainInitStackFrame endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DataChainLockBlock
DESCRIPTION: Lock the given VM block and store its particulars in the
DataChainStackFrame.
CALLED BY: INTERNAL ()
PASS: DataChainStackFrame with the following filled in:
DCSF_vmFileHan
DCSF_curBlkVMHan
RETURN: DataChainStackFrame with the following filled in:
DCSF_curBlkMemHan
DCSF_curBlkSegAddr
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
DataChainLockBlock proc near uses ax,bx,cx,es
DC_local local DataChainStackFrame
.enter inherit near
EC< cmp DC_local.DCSF_curBlkMemHan, 0 >
EC< ERROR_NE IMPEX_ALREADY_HAVE_A_DATA_BLOCK_LOCKED >
mov bx, DC_local.DCSF_vmFileHan
mov ax, DC_local.DCSF_curBlkVMHan
call ImpexVMLock ; es <- seg addr, cx <- mem han
mov DC_local.DCSF_curBlkMemHan, cx
mov DC_local.DCSF_curBlkSegAddr, es
.leave
ret
DataChainLockBlock endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DataChainUnlockBlock
DESCRIPTION: Unlock the block in the DataChainStackFrame.
CALLED BY: INTERNAL ()
PASS: DataChainStackFrame with the following filled in:
DCSF_curBlkMemHan
RETURN: nothing
DESTROYED: nothing, flags remain intact
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
DataChainUnlockBlock proc near uses cx
DC_local local DataChainStackFrame
.enter inherit near
pushf
EC< cmp DC_local.DCSF_curBlkMemHan, 0 >
EC< ERROR_E IMPEX_NO_DATA_BLOCK_TO_UNLOCK >
mov cx, DC_local.DCSF_curBlkMemHan
call ImpexVMUnlock
EC< mov DC_local.DCSF_curBlkMemHan, 0 >
EC< mov DC_local.DCSF_curBlkSegAddr, 0 >
popf
.leave
ret
DataChainUnlockBlock endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: ImpexVMAlloc
DESCRIPTION: Don't use any override.
CALLED BY: INTERNAL ()
PASS: bx - vm file handle
cx - size of block to allocate
RETURN: ax - vm block handle
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 5/91 Initial version
-------------------------------------------------------------------------------@
ImpexVMAlloc proc far
.enter
call VMAlloc ; ax <- VM block handle
.leave
ret
ImpexVMAlloc endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: ImpexVMLock
DESCRIPTION: Doesn't mess with the BP register.
CALLED BY: INTERNAL ()
PASS: bx - vm file handle
ax - vm handle
RETURN: es - seg addr of vm block
cx - VM mem handle
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 5/91 Initial version
-------------------------------------------------------------------------------@
ImpexVMLock proc far uses ax,bp
.enter
call VMLock
mov cx, bp ; cx <- VM mem handle
mov es, ax ; es <- seg addr
.leave
ret
ImpexVMLock endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: ImpexVMUnlock
DESCRIPTION: Doesn't mess with the BP register.
CALLED BY: INTERNAL ()
PASS: cx - VM mem handle
RETURN: nothing
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 5/91 Initial version
-------------------------------------------------------------------------------@
ImpexVMUnlock proc far uses bp
.enter
mov bp, cx
call VMUnlock
.leave
ret
ImpexVMUnlock endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DataChainAddEntry
DESCRIPTION: Add an entry to a data chain, creating a data block
if necessary.
CALLED BY: EXTERNAL ()
PASS: ax - token (optional and for use with DataChainLocateEntry)
cx - size of the entry data
ds:si - address of data
ss:bx - DataChainRecord
RETURN: nothing
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
goto last block
if there's no space {
create a new block
link this block as the next block and the last block
}
realloc last block
add entry
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
DataChainAddEntry proc far uses ax,di,si
DC_local local DataChainStackFrame
.enter
EC< call ECCheckDataChainRecord >
push ax ; save token
;-----------------------------------------------------------------------
; initialize stack frame and lock the last block
call DataChainInitStackFrame
mov ax, ss:[bx].DCR_chain.DCTR_lastBlkVMHan
tst ax ; is there a last block?
jne lastBlkExists ; branch if so
call DataChainAllocDataBlock ; ax <- VM blk han
mov ss:[bx].DCR_chain.DCTR_firstBlkVMHan, ax
mov ss:[bx].DCR_chain.DCTR_lastBlkVMHan, ax
lastBlkExists:
; ax = vm block handle of last block
mov DC_local.DCSF_curBlkVMHan, ax
call DataChainLockBlock
mov es, DC_local.DCSF_curBlkSegAddr ; es <- seg addr of block
checkSpace:
;-----------------------------------------------------------------------
; see if there's enough space for an entry in this block
EC< call ECCheckDataBlock >
mov ax, es:DBH_blockSize ; ax <- current size of block
push ax ; this will be address of entry
add ax, cx ; add size of entry data
jo sizeError ; need new block if overflow
add ax, size DataBlockEntry ; add size of entry header
jno doRealloc ; branch if no overflow
sizeError:
;-----------------------------------------------------------------------
; creation of a new block necessary
pop ax ; clear stack
call DataChainLinkNewDataBlock ; es <- seg addr of new block
jmp short checkSpace
doRealloc:
push ax ; save size of new block
push bx,cx ; save size of entry data
mov bx, DC_local.DCSF_curBlkMemHan ; bx <- data block handle
mov cx, mask HAF_LOCK or mask HAF_ZERO_INIT
call MemReAlloc
mov DC_local.DCSF_curBlkSegAddr, ax
mov es, ax ; es <- seg addr
pop bx,cx
pop es:DBH_blockSize ; store new block size
;-----------------------------------------------------------------------
; init entry header and copy data
pop di ; es:di <- new entry
mov es:[di].DBE_signature, DATA_BLOCK_ENTRY_SIG
mov es:[di].DBE_entrySize, cx
pop es:[di].DBE_token ; retrieve token
mov es:[di].DBE_newToken, 0
add di, offset DBE_data
rep movsb ; copy data
;-----------------------------------------------------------------------
; inc entry counts and unlock the block
inc es:DBH_numEntries ; inc count in data blk header
inc ss:[bx].DCR_chain.DCTR_numEntries ; inc count in chain record
call DataChainUnlockBlock
.leave
ret
DataChainAddEntry endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DataChainAllocDataBlock
DESCRIPTION: Allocate a new data block.
CALLED BY: INTERNAL (DataChainLinkNewDataBlock)
PASS: DataChainStackFrame with the following filled in:
DCSF_vmFileHan
RETURN: ax - VM blk han of new block
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
DataChainAllocDataBlock proc near uses bx,cx,es
DC_local local DataChainStackFrame
.enter inherit near
mov bx, DC_local.DCSF_vmFileHan
mov cx, size DataBlockHeader
push cx
call ImpexVMAlloc ; ax <- VM blk han
; initialize the DataBlockHeader
call ImpexVMLock ; es <- seg addr, cx <- mem han
mov es:DBH_signature, DATA_BLOCK_HEADER_SIG
pop es:DBH_blockSize
mov es:DBH_numEntries, 0
mov es:DBH_nextBlkVMHan + offset VMCL_next, 0
call ImpexVMUnlock
.leave
ret
DataChainAllocDataBlock endp
COMMENT @-----------------------------------------------------------------------
FUNCTION: DataChainLinkNewDataBlock
DESCRIPTION: Allocate and link a new block to the block listed in
the DataChainStackFrame. This original block will be unlocked,
and the new block will be locked and made current.
CALLED BY: INTERNAL ()
PASS: es - seg addr of current block
DataChainStackFrame with the following filled in:
DCSF_vmFileHan
ss:bx - DataChainRecord
RETURN: es - seg addr of the new block
*NOTE*: new block is locked
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
DataChainLinkNewDataBlock proc near uses ax
DC_local local DataChainStackFrame
.enter inherit near
EC< call ECCheckDataBlock >
EC< push ax >
EC< mov ax, es >
EC< cmp ax, DC_local.DCSF_curBlkSegAddr >
EC< ERROR_NE IMPEX_BAD_DATA_BLOCK_ENTRY >
EC< pop ax >
EC< call ECCheckDataChainRecord >
call DataChainAllocDataBlock ; ax <- VM blk han
mov es:DBH_nextBlkVMHan + offset VMCL_next, ax ; link new block
call DataChainUnlockBlock ; unlock original block
mov ss:[bx].DCR_chain.DCTR_lastBlkVMHan, ax ; note in chain record
mov DC_local.DCSF_curBlkVMHan, ax ; note in stack frame
call DataChainLockBlock
mov es, DC_local.DCSF_curBlkSegAddr
.leave
ret
DataChainLinkNewDataBlock endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ERROR CHECKING ROUTINES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @-----------------------------------------------------------------------
FUNCTION: ECCheckDataBlockEntry
DESCRIPTION: Checks to see that the data block entry is valid.
CALLED BY: INTERNAL ()
PASS: ds:si - addr of data block entry
RETURN: nothing, dies if assertions fail
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
-------------------------------------------------------------------------------@
if ERROR_CHECK
ECCheckDataBlockEntry proc near
.enter
pushf
cmp ds:[si].DBE_signature, DATA_BLOCK_ENTRY_SIG
ERROR_NE IMPEX_BAD_DATA_BLOCK_ENTRY
popf
.leave
ret
ECCheckDataBlockEntry endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECCheckDataBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Checks to see that the data block is valid
CALLED BY: INTERNAL ()
PASS: es - seg addr of data block
RETURN: nothing, dies if assertions fail
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if ERROR_CHECK
ECCheckDataBlock proc near uses ax
.enter
pushf
cmp es:DBH_signature, DATA_BLOCK_HEADER_SIG
ERROR_NE IMPEX_BAD_DATA_BLOCK_ENTRY
popf
.leave
ret
ECCheckDataBlock endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECCheckDataChainRecord
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Checks to see that the data chain record is valid.
CALLED BY: INTERNAL ()
PASS: ss:bx - DataChainRecord
RETURN: nothing, dies if assertions fail
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cheng 6/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if ERROR_CHECK
ECCheckDataChainRecord proc near
.enter
pushf
cmp ss:[bx].DCR_chain.DCTR_signature, DATA_CHAIN_RECORD_SIG
ERROR_NE IMPEX_BAD_DATA_CHAIN_RECORD
popf
.leave
ret
ECCheckDataChainRecord endp
endif
| 23.518473 | 81 | 0.591245 |
664390f8adcd1fc9a3cf1d659350f2214743067c | 668 | asm | Assembly | src/engine/utilities/load-direct-16.asm | jameswilddev/comb | ef75d7d54af1ad599a0d72cb08cc793fa3f0eec6 | [
"MIT"
] | null | null | null | src/engine/utilities/load-direct-16.asm | jameswilddev/comb | ef75d7d54af1ad599a0d72cb08cc793fa3f0eec6 | [
"MIT"
] | 2 | 2021-04-17T09:31:24.000Z | 2021-04-17T09:31:53.000Z | src/engine/utilities/load-direct-16.asm | jameswilddev/comb | ef75d7d54af1ad599a0d72cb08cc793fa3f0eec6 | [
"MIT"
] | null | null | null | ; Load a two-byte word into a register pair in 4 cycles.
; - The r* to load the low byte into.
; - The r* to load the high byte into.
; - The address of the low byte to load.
.macro load_direct_16
lds @0, @2
lds @1, @2 + 1
.endm
; Load a two-byte word into X in 4 cycles.
; - The address of the low byte to load.
.macro load_direct_16_x
load_direct_16 r26, r27, @0
.endm
; Load a two-byte word into Y in 4 cycles.
; - The address of the low byte to load.
.macro load_direct_16_y
load_direct_16 r28, r29, @0
.endm
; Load a two-byte word into Z in 4 cycles.
; - The address of the low byte to load.
.macro load_direct_16_z
load_direct_16 r30, r31, @0
.endm
| 24.740741 | 56 | 0.696108 |
3dded47e739d553280ad4938f6c87d027a327374 | 7,460 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_657.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_657.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_657.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 %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x2408, %r13
nop
nop
nop
nop
sub $47031, %r9
movb (%r13), %r12b
nop
nop
nop
nop
add %r8, %r8
lea addresses_WC_ht+0xac88, %r13
nop
nop
nop
add $12143, %rbx
mov $0x6162636465666768, %r8
movq %r8, %xmm6
vmovups %ymm6, (%r13)
nop
nop
nop
nop
nop
and %r9, %r9
lea addresses_WC_ht+0x18561, %r8
nop
nop
nop
cmp %rbx, %rbx
movb $0x61, (%r8)
nop
and $55372, %r13
lea addresses_UC_ht+0x13a08, %r8
sub $63786, %r13
vmovups (%r8), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %r9
nop
nop
nop
nop
sub $3604, %r9
lea addresses_WT_ht+0x17708, %r8
nop
nop
nop
nop
nop
add $41857, %rcx
mov $0x6162636465666768, %r9
movq %r9, %xmm3
movups %xmm3, (%r8)
nop
and $2188, %rcx
lea addresses_UC_ht+0x1de08, %rcx
nop
nop
nop
nop
nop
and $49162, %r10
movw $0x6162, (%rcx)
nop
nop
nop
nop
and $52491, %r8
lea addresses_D_ht+0x4ed4, %r10
nop
nop
nop
nop
sub $14843, %rbx
mov $0x6162636465666768, %r12
movq %r12, %xmm7
vmovups %ymm7, (%r10)
add $60044, %rbx
lea addresses_UC_ht+0x18f08, %r13
cmp %rcx, %rcx
mov $0x6162636465666768, %r12
movq %r12, %xmm7
vmovups %ymm7, (%r13)
nop
and %r8, %r8
lea addresses_A_ht+0x12938, %rsi
lea addresses_D_ht+0xe988, %rdi
nop
and $34160, %r10
mov $66, %rcx
rep movsq
xor %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_WT+0x7008, %rdi
nop
nop
nop
nop
nop
add %r9, %r9
mov $0x5152535455565758, %rbx
movq %rbx, %xmm5
vmovups %ymm5, (%rdi)
add %r9, %r9
// Load
lea addresses_normal+0x16628, %rsi
nop
nop
nop
nop
add $6990, %rax
mov (%rsi), %ecx
nop
nop
nop
xor %rax, %rax
// Store
mov $0xcf8, %rax
nop
nop
nop
nop
nop
and %r9, %r9
movl $0x51525354, (%rax)
nop
nop
nop
nop
nop
dec %rax
// Load
lea addresses_WT+0x9c83, %rcx
nop
nop
nop
nop
nop
xor $26460, %rbx
mov (%rcx), %esi
nop
nop
nop
nop
nop
add %r9, %r9
// Store
lea addresses_WC+0x6608, %r9
nop
nop
nop
nop
inc %rdi
movb $0x51, (%r9)
nop
and $32451, %rsi
// Faulty Load
lea addresses_D+0x1e08, %rsi
dec %r14
mov (%rsi), %ebx
lea oracles, %rcx
and $0xff, %rbx
shlq $12, %rbx
mov (%rcx,%rbx,1), %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_D_ht'}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 31.610169 | 2,999 | 0.652011 |
6d4d431aec0c70b047ec425dacd4ad16d2be380c | 632 | asm | Assembly | oeis/109/A109002.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/109/A109002.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/109/A109002.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A109002: Maximal difference between two n-digit numbers.
; 9,89,899,8999,89999,899999,8999999,89999999,899999999,8999999999,89999999999,899999999999,8999999999999,89999999999999,899999999999999,8999999999999999,89999999999999999,899999999999999999,8999999999999999999,89999999999999999999,899999999999999999999,8999999999999999999999,89999999999999999999999,899999999999999999999999,8999999999999999999999999,89999999999999999999999999,899999999999999999999999999,8999999999999999999999999999,89999999999999999999999999999,899999999999999999999999999999
mov $1,10
pow $1,$0
sub $1,1
mul $1,9
div $1,5
mul $1,5
add $1,9
mov $0,$1
| 52.666667 | 496 | 0.875 |
1b9426ddfac2e78800ee648332f1a010dbaabd41 | 140 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/modf_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/modf_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sdcc_iy/modf_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_clib
SECTION code_fp_math48
PUBLIC _modf_callee
EXTERN cm48_sdcciy_modf_callee
defc _modf_callee = cm48_sdcciy_modf_callee
| 14 | 43 | 0.878571 |
808dd34d77eb0f0f01f13a78637fd3429ce36e3c | 1,062 | asm | Assembly | EserciziMips/SommaDiagonaliMatrice2.asm | AntoAndGar/MIPS | 776bbf3ca1d9a3184f469a11b5230d4d03622826 | [
"MIT"
] | null | null | null | EserciziMips/SommaDiagonaliMatrice2.asm | AntoAndGar/MIPS | 776bbf3ca1d9a3184f469a11b5230d4d03622826 | [
"MIT"
] | null | null | null | EserciziMips/SommaDiagonaliMatrice2.asm | AntoAndGar/MIPS | 776bbf3ca1d9a3184f469a11b5230d4d03622826 | [
"MIT"
] | null | null | null | # Data una matrice 4x4 di interi (word) riportare la somma degli elementi presenti lungo le diagonali
.text
.globl main
main:
la $t0, matrix
li $t1, 0 # i
li $t2, 0 # j
lw $t3, R
lw $t4, C
# for i = 0 to 3
#for j= 0 to 3
# sum all element i=j and put in x
# sum all element i+j = 3 and put in y
r_loop:
li $t2, 0
c_loop:
bne $t1, $t2, no_load
mul $t7, $t4, $t1
add $t8, $t2, $t7 # C(r-1)+(c-1)
mul $t9, $t8, 4
lw $s0, matrix($t9)
add $s1, $s1, $s0
no_load:
addi $t2, $t2, 1
blt $t2, $t3, c_loop
addi $t1, $t1, 1
blt $t1, $t3, r_loop
li $t1, 0 # i
li $t2, 0 # j
r_loop1:
li $t2, 0
c_loop1:
add $s2, $t1, $t2
bne $s2, 3, no_load1
mul $t7, $t4, $t1
add $t8, $t2, $t7 # C(r-1)+(c-1)
mul $t9, $t8, 4
lw $s0, matrix($t9)
add $s1, $s1, $s0
no_load1:
addi $t2, $t2, 1
ble $t2, $t3, c_loop1
addi $t1, $t1, 1
ble $t1, $t3, r_loop1
move $a0, $s1
li $v0, 1
syscall
li $v0, 10
syscall
.data
matrix: .word 45, 235, 142, 3,
124, 6, 337, 2353,
3546, 670, 104, 3465,
60000, 456, 5673, 10000
R: .word 4
C: .word 4 | 15.850746 | 101 | 0.564972 |
60cb0eb401dc40999b50fe9053d4f8e369d7a5f0 | 68 | asm | Assembly | unittests/ASM/Primary/Primary_9B.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 628 | 2020-03-06T14:01:32.000Z | 2022-03-31T06:35:14.000Z | unittests/ASM/Primary/Primary_9B.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 576 | 2020-03-06T08:25:12.000Z | 2022-03-30T04:05:29.000Z | unittests/ASM/Primary/Primary_9B.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 38 | 2020-03-07T06:10:00.000Z | 2022-03-29T09:27:36.000Z | %ifdef CONFIG
{
}
%endif
; Just to ensure this executes
fwait
hlt
| 6.8 | 30 | 0.705882 |
249e16cfc9c2c7187752b1a129d780ff61ff0be5 | 802 | asm | Assembly | src/kernel/io.asm | raining888/neonix | 4335b0866ae8d5ece91a287dde3c80ff66133c47 | [
"MIT"
] | null | null | null | src/kernel/io.asm | raining888/neonix | 4335b0866ae8d5ece91a287dde3c80ff66133c47 | [
"MIT"
] | null | null | null | src/kernel/io.asm | raining888/neonix | 4335b0866ae8d5ece91a287dde3c80ff66133c47 | [
"MIT"
] | null | null | null | [bits 32]
section .text ; 代码段
global inb ; 将inb导出,链接时能找到这个函数
inb:
push ebp
mov ebp, esp ; 保存栈帧
xor eax, eax
mov edx, [ebp + 8] ; port
in al, dx
jmp $+2
jmp $+2
jmp $+2
leave ; 恢复栈帧
ret
global outb
outb:
push ebp
mov ebp, esp ; 保存栈帧
mov edx, [ebp + 8] ; port
mov eax, [ebp + 12] ; value
out dx, al ; 将value的8bit输出到port
jmp $+2
jmp $+2
jmp $+2
leave ; 恢复栈帧
ret
global inw
inw:
push ebp
mov ebp, esp ; 保存栈帧
xor eax, eax
mov edx, [ebp + 8] ; port
in ax, dx
jmp $+2
jmp $+2
jmp $+2
leave ; 恢复栈帧,即恢复ebp和esp
ret
global outw
outw:
push ebp
mov ebp, esp ; 保存栈帧
mov edx, [ebp + 8] ; port
mov eax, [ebp + 12] ; value
out dx, ax ; 将value的16bit输出到port
jmp $+2
jmp $+2
jmp $+2
leave ; 恢复栈帧
ret
| 10.837838 | 35 | 0.552369 |
12a4669326119380f55b839300375afcae7ce8b2 | 825 | asm | Assembly | programs/oeis/016/A016134.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/016/A016134.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/016/A016134.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A016134: Expansion of 1/((1-2x)(1-10x)).
; 1,12,124,1248,12496,124992,1249984,12499968,124999936,1249999872,12499999744,124999999488,1249999998976,12499999997952,124999999995904,1249999999991808,12499999999983616,124999999999967232,1249999999999934464,12499999999999868928,124999999999999737856,1249999999999999475712,12499999999999998951424,124999999999999997902848,1249999999999999995805696,12499999999999999991611392,124999999999999999983222784,1249999999999999999966445568,12499999999999999999932891136,124999999999999999999865782272,1249999999999999999999731564544,12499999999999999999999463129088,124999999999999999999998926258176,1249999999999999999999997852516352,12499999999999999999999995705032704,124999999999999999999999991410065408
add $0,1
mov $1,10
pow $1,$0
mov $2,2
pow $2,$0
sub $1,$2
div $1,8
mov $0,$1
| 68.75 | 703 | 0.888485 |
11424fde23448c90848688a5b157f182858f9444 | 7,836 | asm | Assembly | myexceptions.asm | ricdizio/breakout | 3f2a44656c693c7234e17bcaeefb076dac25e4c1 | [
"MIT"
] | null | null | null | myexceptions.asm | ricdizio/breakout | 3f2a44656c693c7234e17bcaeefb076dac25e4c1 | [
"MIT"
] | null | null | null | myexceptions.asm | ricdizio/breakout | 3f2a44656c693c7234e17bcaeefb076dac25e4c1 | [
"MIT"
] | null | null | null | # SPIM S20 MIPS simulator.
# The default exception handler for spim.
#
# Copyright (c) 1990-2010, James R. Larus.
# 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 James R. Larus 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 the exception handling code. This must go first!
.kdata
__m1_: .asciiz " Exception "
__m2_: .asciiz " keyboard\n"
__m3_: .asciiz " key A\n"
__m4_: .asciiz " key D\n"
__m5_: .asciiz " key Space\n"
__m6_: .asciiz " key Escape\n"
__e0_: .asciiz " [Interrupt] "
__e1_: .asciiz " [TLB]"
__e2_: .asciiz " [TLB]"
__e3_: .asciiz " [TLB]"
__e4_: .asciiz " [Address error in inst/data fetch] "
__e5_: .asciiz " [Address error in store] "
__e6_: .asciiz " [Bad instruction address] "
__e7_: .asciiz " [Bad data address] "
__e8_: .asciiz " [Error in syscall] "
__e9_: .asciiz " [Breakpoint] "
__e10_: .asciiz " [Reserved instruction] "
__e11_: .asciiz ""
__e12_: .asciiz " [Arithmetic overflow] "
__e13_: .asciiz " [Trap] "
__e14_: .asciiz ""
__e15_: .asciiz " [Floating point] "
__e16_: .asciiz ""
__e17_: .asciiz ""
__e18_: .asciiz " [Coproc 2]"
__e19_: .asciiz ""
__e20_: .asciiz ""
__e21_: .asciiz ""
__e22_: .asciiz " [MDMX]"
__e23_: .asciiz " [Watch]"
__e24_: .asciiz " [Machine check]"
__e25_: .asciiz ""
__e26_: .asciiz ""
__e27_: .asciiz ""
__e28_: .asciiz ""
__e29_: .asciiz ""
__e30_: .asciiz " [Cache]"
__e31_: .asciiz ""
__excp: .word __e0_, __e1_, __e2_, __e3_, __e4_, __e5_, __e6_, __e7_, __e8_, __e9_
.word __e10_, __e11_, __e12_, __e13_, __e14_, __e15_, __e16_, __e17_, __e18_,
.word __e19_, __e20_, __e21_, __e22_, __e23_, __e24_, __e25_, __e26_, __e27_,
.word __e28_, __e29_, __e30_, __e31_
s1: .word 0
s2: .word 0
# This is the exception handler code that the processor runs when
# an exception occurs. It only prints some information about the
# exception, but can server as a model of how to write a handler.
#
# Because we are running in the kernel, we can use $k0/$k1 without
# saving their old values.
# This is the exception vector address for MIPS-1 (R2000):
# .ktext 0x80000080
# This is the exception vector address for MIPS32:
.ktext 0x80000180
# Select the appropriate one for the mode in which SPIM is compiled.
# apagamos la entrada por teclado
lw $k0,MMIO($zero)
lw $k1,0($k0)
ori $k1,$k1,0x00000010
sw $k1,0($k0)
#.set noat discomment for SPIM
move $k1 $at # Save $at
#.set at discomment for SPIM
sw $v0 s1 # Not re-entrant and we can't trust $sp
sw $a0 s2 # But we need to use these registers
mfc0 $k0 $13 # Cause register
srl $a0 $k0 2 # Extract ExcCode Field
andi $a0 $a0 0x1f
# Print information about exception.
#
li $v0 4 # syscall 4 (print_str)
la $a0 __m1_
syscall
li $v0 1 # syscall 1 (print_int)
srl $a0 $k0 2 # Extract ExcCode Field
andi $a0 $a0 0x1f
syscall
li $v0 4 # syscall 4 (print_str)
andi $a0 $k0 0x3c
lw $a0 __excp($a0)
nop
syscall
bne $k0 0x18 ok_pc # Bad PC exception requires special checks
nop
mfc0 $a0 $14 # EPC
andi $a0 $a0 0x3 # Is EPC word-aligned?
beq $a0 0 ok_pc
nop
li $v0 10 # Exit on really bad PC
syscall
ok_pc:
li $v0 4 # syscall 4 (print_str)
la $a0 __m2_
syscall
srl $a0 $k0 2 # Extract ExcCode Field
andi $a0 $a0 0x1f
bne $a0 0 ret # 0 means exception was an interrupt
nop
# Interrupt-specific code goes here!
# Don't skip instruction at EPC since it has not executed.
# AQUI VA EL CODIGO PARA LA EJECUCION DE LA EXCEPCION DEL TECLADO
interrupTeclado:
lw $k0, MMIO($zero)
addi $k0,$k0, 4
lw $k1,0($k0)
li $k0,0x00000061 # Key A
beq $k1,$k0,moveLeft
li $k0,0x00000064 # Key D
beq $k1,$k0,moveRight
li $k0,0x0000001b # Key ESC
beq $k1,$k0,Escape
li $k0,0x00000020 # Key Space
beq $k1,$k0,Space
# Others
j ret
moveLeft:
#move to the left the bar
# Print information about exception.
#
li $v0 4 # syscall 4 (print_str)
la $a0 __m3_
syscall
#Limpiar Cero
lw $k0, bar
#Verificamos pared
li $k1,0x10040f80
beq $k0,$k1, passLeft
#No es esquina
li $k1, 0
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
#Colocar Nueva Barra
lw $k0, bar
addi $k0,$k0,-4
li $k1, 0x000000FF
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x000000C0
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x0000006F
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x000000C0
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x000000FF
sw $k1, ($k0)
#Guardar Nueva Barra
lw $k0, bar
addi $k0,$k0,-4
sw $k0,bar
passLeft:
j ret
moveRight:
#move to the right the bar
# Print information about exception.
#
li $v0 4 # syscall 4 (print_str)
la $a0 __m4_
syscall
#Limpiar Cero
lw $k0, bar
#Verificamos pared
li $k1,0x10040FFA
beq $k0,$k1, passRight
#No es pared
li $k1, 0
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
addi $k0, $k0, 4
sw $k1, ($k0)
#Colocar Nueva Barra
lw $k0, bar
addi $k0,$k0,4
li $k1, 0x000000FF
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x000000C0
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x0000006F
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x000000C0
sw $k1, ($k0)
addi $k0, $k0, 4
li $k1, 0x000000FF
sw $k1, ($k0)
#Guardar Nueva Barra
lw $k0, bar
addi $k0,$k0,4
sw $k0,bar
passRight:
j ret
Escape:
#Exit
# Print information about exception.
#
li $v0 4 # syscall 4 (print_str)
la $a0 __m6_
syscall
li $v0,10
syscall
Space:
#Pause game
# Print information about exception.
#
li $v0 4 # syscall 4 (print_str)
la $a0 __m5_
syscall
j ret
ret:
# Return from (non-interrupt) exception. Skip offending instruction
# at EPC to avoid infinite loop.
#
mfc0 $k0 $14 # Bump EPC register
addiu $k0 $k0 4 # Skip faulting instruction
# (Need to handle delayed branch case here)
mtc0 $k0 $14
# Restore registers and reset processor state
#
lw $v0 s1 # Restore other registers
lw $a0 s2
move $at $k1 # Restore $at
mtc0 $0 $13 # Clear Cause register
mfc0 $k0 $12 # Set Status register
ori $k0 0x1 # Interrupts enabled
mtc0 $k0 $12
# Return from exception on MIPS32:
# habilitamos la entrada por teclado
lw $k0,MMIO($zero)
lw $k1,0($k0)
ori $k1,$k1,0x00000010
sw $k1,0($k0)
eret
# Standard startup code. Invoke the routine "main" with arguments:
# main(argc, argv, envp)
#
.data
.include "breakout.asm"
.text
.globl __start
#AQUI COMIENZA EL PROGRAMA
__start:
nop
.globl __eoth
__eoth:
| 22.647399 | 85 | 0.682491 |
10667644a90fb30bde63306e034bff679f17c7bf | 395 | asm | Assembly | src/r_layers/layer0.asm | Gip-Gip/VePseu | 44e89cd70cab8c9e24ddb024b953cfa842ed54c7 | [
"0BSD"
] | 5 | 2018-04-20T01:00:01.000Z | 2020-08-18T23:31:50.000Z | src/r_layers/layer0.asm | Gip-Gip/VePseu | 44e89cd70cab8c9e24ddb024b953cfa842ed54c7 | [
"0BSD"
] | 3 | 2018-06-25T14:07:03.000Z | 2018-06-29T00:56:36.000Z | src/r_layers/layer0.asm | Gip-Gip/VePseu | 44e89cd70cab8c9e24ddb024b953cfa842ed54c7 | [
"0BSD"
] | null | null | null | ; Peripheral vision rendering (54 cycles)
INCLUDE "include/ands_0.h"
X_POS_LOS ; 24 cycles
LDA (mapPtr),Y
AND #AND_W0S1P1
STA shadow1a
TYA ; Move twice the amount of a normal X_POS_GAIN (20 cycles)
CLC
ADC xGain
ADC xGain
SEC
SBC xLoss
SBC xLoss
TAY
LDA (mapPtr),Y ; 10 cycles
AND #AND_W0S1P2
STA shadow1e
| 17.954545 | 67 | 0.597468 |
e344bebed2c1d77ce4d7ab6285462ed975ffc3a3 | 710 | asm | Assembly | oeis/097/A097738.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/097/A097738.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/097/A097738.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A097738: Pell equation solutions (9*a(n))^2 - 82*b(n)^2 = -1 with b(n):=A097739(n), n >= 0.
; Submitted by Jon Maiga
; 1,327,106601,34751599,11328914673,3693191431799,1203969077851801,392490226188255327,127950609768293384801,41711506294237455189799,13597823101311642098489673,4432848619521301086652443599,1445095052140842842606598123601,471096554149295245388664335850327,153576031557618109153861966889083001,50065315191229354288913612541505207999,16321139176309211880076683826563808724673,5320641306161611843550710013847260139035399,1734512744669509151785651387830380241516815401
mul $0,2
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
mul $2,9
add $3,$2
lpe
mov $0,$3
div $0,9
| 39.444444 | 462 | 0.812676 |
a8b87b90f4c1723929dc9d2bf8942817911cf45b | 1,318 | asm | Assembly | tests/ops.asm | notaz/ia32rtools | 75b4a70dafd7faf3c27b963fa8e67462538f91d4 | [
"BSD-3-Clause"
] | 55 | 2015-01-27T01:10:27.000Z | 2022-03-27T05:35:08.000Z | tests/ops.asm | notaz/ia32rtools | 75b4a70dafd7faf3c27b963fa8e67462538f91d4 | [
"BSD-3-Clause"
] | null | null | null | tests/ops.asm | notaz/ia32rtools | 75b4a70dafd7faf3c27b963fa8e67462538f91d4 | [
"BSD-3-Clause"
] | 9 | 2015-08-16T03:27:24.000Z | 2020-10-28T05:14:52.000Z | ; test random ops
_text segment para public 'CODE' use32
sub_test proc near
push ebp
push ebx
push esi
push edi
mov ebx, 10000h
mov esi, 20000h
mov edi, 30000h
mov ecx, 10
loop:
lodsb
xlat
stosb
lodsw
neg ax
stosw
lodsd
stosd
movsb
cmpsw
scasb
loop loop
std
stosb
stosw
stosd
cld
cdq
bsf eax, ecx
call __allshl
mov edi, eax
call __allshr
bswap eax
xor ecx, eax
add eax, ecx
repne cmpsb
setne cl
adc cl, cl
push 1
pop eax
pop edi
pop esi
pop ebx
pop ebp
retn
sub_test endp
_text ends
; vim:expandtab
| 21.966667 | 48 | 0.292868 |
bc9530fcabd4fbc95206a8f273ebdd3a1b2b7ad4 | 20,972 | asm | Assembly | mallocV1/Example/malloc.asm | Maknee/LC4Malloc | 61638d01353ba62923f79dac608e33fdb4cbd41a | [
"MIT"
] | null | null | null | mallocV1/Example/malloc.asm | Maknee/LC4Malloc | 61638d01353ba62923f79dac608e33fdb4cbd41a | [
"MIT"
] | null | null | null | mallocV1/Example/malloc.asm | Maknee/LC4Malloc | 61638d01353ba62923f79dac608e33fdb4cbd41a | [
"MIT"
] | null | null | null | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;sbrk;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.ADDR x1600
.FALIGN
sbrk
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
;; function body
LEA R7, breakAddr
LDR R3, R7, #0
LDR R2, R5, #3
ADD R3, R3, R2
STR R3, R7, #0
LDR R7, R7, #0
CONST R3, #0
HICONST R3, #64
CMP R7, R3
BRzp L2_malloc
LEA R7, L4_malloc
ADD R6, R6, #-1
STR R7, R6, #0
JSR lc4_puts
ADD R6, R6, #1 ;; free space for arguments
CONST R7, #-1
JMP L1_malloc
L2_malloc
LEA R7, breakAddr
LDR R7, R7, #0
CONST R3, #0
HICONST R3, #64
CONST R2, #0
HICONST R2, #48
ADD R3, R3, R2
CMP R7, R3
BRn L5_malloc
LEA R7, L7_malloc
ADD R6, R6, #-1
STR R7, R6, #0
JSR lc4_puts
ADD R6, R6, #1 ;; free space for arguments
CONST R7, #-1
JMP L1_malloc
L5_malloc
LEA R7, breakAddr
LDR R7, R7, #0
L1_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;intialize_heap;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
intialize_heap
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
;; function body
CONST R7, #0
HICONST R7, #64
LEA R3, breakAddr
STR R7, R3, #0
LEA R3, main_arena
STR R7, R3, #2
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #0
CONST R2, #255
HICONST R2, #127
AND R3, R3, R2
STR R3, R7, #0
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #0
STR R3, R7, #2
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #0
STR R3, R7, #1
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #0
STR R3, R7, #3
L8_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;find_block;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
find_block
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-2 ;; allocate stack space for local variables
;; function body
CONST R7, #0
HICONST R7, #64
STR R7, R5, #-1
JMP L11_malloc
L10_malloc
LDR R7, R5, #3
LDR R3, R5, #-1
STR R3, R7, #0
LDR R7, R5, #-1
LDR R7, R7, #2
STR R7, R5, #-1
L11_malloc
LDR R7, R5, #-1
ADD R3, R7, #0
CONST R2, #0
CMP R3, R2
BRz L13_malloc
LDR R7, R7, #0
STR R7, R5, #-2
CONST R3, #0
HICONST R3, #128
AND R3, R7, R3
CONST R2, #0
CMP R3, R2
BRnp L10_malloc
LDR R7, R5, #4
LDR R3, R5, #-2
CMP R3, R7
BRn L10_malloc
L13_malloc
LDR R7, R5, #-1
L9_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;extend_heap;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
extend_heap
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-2 ;; allocate stack space for local variables
;; function body
LEA R7, main_arena
LDR R7, R7, #2
STR R7, R5, #-1
LEA R7, main_arena
LDR R7, R7, #2
LDR R7, R7, #3
CONST R3, #0
CMP R7, R3
BRnp L15_malloc
LDR R7, R5, #4
ADD R7, R7, #8
STR R7, R5, #-2
JMP L16_malloc
L15_malloc
LDR R7, R5, #4
ADD R7, R7, #4
STR R7, R5, #-2
L16_malloc
LDR R7, R5, #-2
ADD R6, R6, #-1
STR R7, R6, #0
JSR sbrk
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
LEA R3, main_arena
STR R7, R3, #2
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #-1
CMP R7, R3
BRnp L17_malloc
CONST R7, #0
JMP L14_malloc
L17_malloc
LEA R7, main_arena
ADD R7, R7, #2
LDR R3, R7, #0
ADD R3, R3, #-4
STR R3, R7, #0
LDR R7, R5, #-1
LDR R3, R5, #4
CONST R2, #0
HICONST R2, #128
OR R3, R3, R2
STR R3, R7, #0
LDR R7, R5, #-1
CONST R3, #0
HICONST R3, #64
CMP R7, R3
BRnp L19_malloc
LDR R7, R5, #-1
CONST R3, #0
STR R3, R7, #1
JMP L20_malloc
L19_malloc
LDR R7, R5, #3
CONST R3, #0
CMP R7, R3
BRz L21_malloc
LDR R7, R5, #-1
LDR R3, R5, #3
STR R3, R7, #1
L21_malloc
L20_malloc
LDR R7, R5, #-1
LEA R3, main_arena
LDR R3, R3, #2
STR R3, R7, #2
LDR R7, R5, #-1
STR R7, R7, #3
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #0
HICONST R3, #64
CONST R2, #0
HICONST R2, #48
ADD R3, R3, R2
ADD R2, R7, #0
SUB R3, R3, R2
ADD R3, R3, #-4
STR R3, R7, #0
LEA R7, main_arena
LDR R7, R7, #2
LDR R3, R5, #-1
STR R3, R7, #1
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #0
STR R3, R7, #2
LEA R7, main_arena
LDR R7, R7, #2
STR R7, R7, #3
LDR R7, R5, #3
CONST R3, #0
CMP R7, R3
BRz L23_malloc
LDR R7, R5, #3
LDR R3, R5, #-1
STR R3, R7, #2
L23_malloc
LDR R7, R5, #-1
L14_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;shrink_heap;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
shrink_heap
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-5 ;; allocate stack space for local variables
;; function body
ADD R1, R5, #-5
LEA R7, main_arena
LDR R0, R7, #2
;ASGNB
ADD R6, R6, #-1
STR R2, R6, #0
ADD R6, R6, #-1
STR R3, R6, #0
;blkloop!!!!
AND R3, R3, #0
ADD R3, R3, #5
L28
LDR R2, R0, #0
STR R2, R1, #0
ADD R0, R0, #1
ADD R1, R1, #1
ADD R3, R3, #-1
BRnp L28
LDR R3, R6, #0
ADD R6, R6, #1
LDR R2, R6, #0
ADD R6, R6, #1
LDR R7, R5, #4
NOT R7,R7
ADD R7,R7,#1
ADD R6, R6, #-1
STR R7, R6, #0
JSR sbrk
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
LEA R3, main_arena
STR R7, R3, #2
LEA R7, main_arena
LDR R7, R7, #2
CONST R3, #-1
CMP R7, R3
BRnp L26_malloc
CONST R7, #0
JMP L25_malloc
L26_malloc
LEA R7, main_arena
ADD R7, R7, #2
LDR R3, R7, #0
ADD R3, R3, #-4
ADD R3, R3, #-4
STR R3, R7, #0
LEA R7, main_arena
LDR R7, R7, #2
LDR R3, R5, #-5
STR R3, R7, #0
LEA R7, main_arena
LDR R7, R7, #2
LDR R3, R5, #3
STR R3, R7, #1
LEA R7, main_arena
LDR R7, R7, #2
ADD R3, R5, #-5
LDR R3, R3, #2
STR R3, R7, #2
LEA R7, main_arena
LDR R7, R7, #2
ADD R3, R5, #-5
LDR R3, R3, #3
STR R3, R7, #3
LDR R7, R5, #3
LEA R3, main_arena
LDR R3, R3, #2
STR R3, R7, #2
LEA R7, main_arena
LDR R7, R7, #2
L25_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;split_chunk;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
split_chunk
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-2 ;; allocate stack space for local variables
;; function body
LDR R7, R5, #3
LDR R3, R5, #4
ADD R7, R7, R3
STR R7, R5, #-2
LDR R7, R5, #-2
ADD R7, R7, #4
STR R7, R5, #-2
LDR R7, R5, #-2
STR R7, R5, #-1
LDR R7, R5, #-1
LDR R3, R5, #3
LDR R3, R3, #2
STR R3, R7, #2
LDR R7, R5, #-1
LDR R3, R5, #3
STR R3, R7, #1
LDR R7, R5, #-1
LDR R3, R5, #3
LDR R3, R3, #0
LDR R2, R5, #4
SUB R3, R3, R2
ADD R3, R3, #-4
STR R3, R7, #0
LDR R7, R5, #-1
LDR R3, R7, #0
CONST R2, #255
HICONST R2, #127
AND R3, R3, R2
STR R3, R7, #0
LDR R7, R5, #-1
STR R7, R7, #3
LDR R7, R5, #-1
LDR R3, R7, #2
STR R7, R3, #1
LDR R7, R5, #3
LDR R3, R5, #4
CONST R2, #0
HICONST R2, #128
OR R3, R3, R2
STR R3, R7, #0
LDR R7, R5, #3
LDR R3, R5, #-1
STR R3, R7, #2
L29_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;malloc;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
malloc
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-4 ;; allocate stack space for local variables
;; function body
CONST R7, #0
STR R7, R5, #-1
LEA R7, main_arena
LDR R7, R7, #2
LDR R7, R7, #3
CONST R3, #0
CMP R7, R3
BRz L31_malloc
LEA R7, main_arena
LDR R7, R7, #2
STR R7, R5, #-2
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
ADD R7, R5, #-2
ADD R6, R6, #-1
STR R7, R6, #0
JSR find_block
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #2 ;; free space for arguments
STR R7, R5, #-1
LDR R7, R5, #-1
CONST R3, #0
CMP R7, R3
BRz L33_malloc
LEA R3, main_arena
LDR R3, R3, #2
CMP R7, R3
BRz L33_malloc
LDR R7, R5, #-1
LDR R7, R7, #0
LDR R3, R5, #3
SUB R7, R7, R3
STR R7, R5, #-4
CONST R7, #1
STR R7, R5, #-3
LDR R7, R5, #-3
ADD R7, R7, #4
STR R7, R5, #-3
LDR R7, R5, #-4
LDR R3, R5, #-3
CMP R7, R3
BRn L35_malloc
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
LDR R7, R5, #-1
ADD R6, R6, #-1
STR R7, R6, #0
JSR split_chunk
ADD R6, R6, #2 ;; free space for arguments
JMP L36_malloc
L35_malloc
LDR R7, R5, #-1
LDR R3, R5, #3
CONST R2, #0
HICONST R2, #128
OR R3, R3, R2
STR R3, R7, #0
L36_malloc
LDR R7, R5, #-1
STR R7, R7, #3
JMP L32_malloc
L33_malloc
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
LDR R7, R5, #-2
ADD R6, R6, #-1
STR R7, R6, #0
JSR extend_heap
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #2 ;; free space for arguments
STR R7, R5, #-1
LDR R7, R5, #-1
LDR R3, R5, #-2
STR R3, R7, #1
LDR R7, R5, #-1
CONST R3, #0
CMP R7, R3
BRnp L32_malloc
CONST R7, #0
JMP L30_malloc
L31_malloc
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
CONST R7, #0
ADD R6, R6, #-1
STR R7, R6, #0
JSR extend_heap
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #2 ;; free space for arguments
STR R7, R5, #-1
LDR R7, R5, #-1
CONST R3, #0
CMP R7, R3
BRnp L39_malloc
CONST R7, #0
JMP L30_malloc
L39_malloc
L32_malloc
LDR R7, R5, #-1
ADD R7, R7, #4
L30_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;merge_chunk;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
merge_chunk
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-1 ;; allocate stack space for local variables
;; function body
LDR R7, R5, #3
ADD R3, R7, #0
LDR R7, R7, #0
CONST R2, #255
HICONST R2, #127
AND R7, R7, R2
ADD R7, R3, R7
ADD R7, R7, #4
STR R7, R5, #-1
LDR R7, R5, #-1
ADD R3, R7, #0
CONST R2, #0
CMP R3, R2
BRz L42_malloc
LDR R7, R7, #0
CONST R2, #0
HICONST R2, #128
AND R7, R7, R2
CONST R2, #0
CMP R7, R2
BRnp L42_malloc
LEA R7, main_arena
LDR R7, R7, #2
CMP R3, R7
BRz L42_malloc
LDR R7, R5, #3
LDR R3, R7, #0
LDR R2, R7, #2
LDR R2, R2, #0
ADD R2, R2, #4
ADD R3, R3, R2
STR R3, R7, #0
LDR R7, R5, #3
LDR R3, R7, #0
CONST R2, #255
HICONST R2, #127
AND R3, R3, R2
STR R3, R7, #0
LDR R7, R5, #3
LDR R3, R5, #-1
LDR R3, R3, #2
STR R3, R7, #2
LDR R7, R5, #3
LDR R7, R7, #2
CONST R3, #0
CMP R7, R3
BRz L44_malloc
LDR R7, R5, #3
LDR R3, R7, #2
STR R7, R3, #1
L44_malloc
CONST R7, #1
JMP L41_malloc
L42_malloc
CONST R7, #0
L41_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;check_if_valid;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
check_if_valid
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-1 ;; allocate stack space for local variables
;; function body
LEA R7, main_arena
LDR R7, R7, #2
LDR R7, R7, #3
CONST R3, #0
CMP R7, R3
BRz L47_malloc
LDR R7, R5, #3
STR R7, R5, #-1
CONST R3, #0
HICONST R3, #64
CMP R7, R3
BRn L49_malloc
LEA R7, main_arena
LDR R7, R7, #2
LDR R3, R5, #-1
CMP R3, R7
BRzp L49_malloc
LDR R7, R5, #3
LDR R3, R7, #3
CMP R3, R7
BRnp L51_malloc
CONST R7, #1
JMP L46_malloc
L51_malloc
L49_malloc
L47_malloc
CONST R7, #0
L46_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;free;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
free
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
;; function body
LDR R7, R5, #3
ADD R7, R7, #-4
STR R7, R5, #3
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
JSR check_if_valid
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
CONST R3, #0
CMP R7, R3
BRz L54_malloc
LDR R7, R5, #3
LDR R3, R7, #0
CONST R2, #255
HICONST R2, #127
AND R3, R3, R2
STR R3, R7, #0
LDR R7, R5, #3
CONST R3, #0
STR R3, R7, #3
LDR R7, R5, #3
LDR R7, R7, #1
ADD R3, R7, #0
CONST R2, #0
CMP R3, R2
BRz L56_malloc
LDR R7, R7, #0
CONST R3, #0
HICONST R3, #128
AND R7, R7, R3
CONST R3, #0
CMP R7, R3
BRnp L56_malloc
LDR R7, R5, #3
LDR R7, R7, #1
ADD R6, R6, #-1
STR R7, R6, #0
JSR merge_chunk
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
L56_malloc
L57_malloc
LDR R7, R5, #3
LDR R7, R7, #2
CONST R3, #0
CMP R7, R3
BRz L58_malloc
LEA R3, main_arena
LDR R3, R3, #2
CMP R7, R3
BRz L58_malloc
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
JSR merge_chunk
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
CONST R3, #0
CMP R7, R3
BRnp L55_malloc
JMP L55_malloc
L58_malloc
LDR R7, R5, #3
LDR R7, R7, #1
CONST R3, #0
CMP R7, R3
BRz L62_malloc
LDR R7, R5, #3
LDR R3, R7, #0
ADD R6, R6, #-1
STR R3, R6, #0
LDR R7, R7, #1
ADD R6, R6, #-1
STR R7, R6, #0
JSR shrink_heap
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #2 ;; free space for arguments
JMP L55_malloc
L62_malloc
JSR intialize_heap
ADD R6, R6, #0 ;; free space for arguments
JMP L55_malloc
L54_malloc
LEA R7, L64_malloc
ADD R6, R6, #-1
STR R7, R6, #0
JSR lc4_puts
ADD R6, R6, #1 ;; free space for arguments
JSR lc4_halt
ADD R6, R6, #0 ;; free space for arguments
L55_malloc
L53_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;calloc;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
calloc
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-3 ;; allocate stack space for local variables
;; function body
CONST R7, #0
STR R7, R5, #-1
LDR R7, R5, #3
LDR R3, R5, #4
MUL R7, R7, R3
STR R7, R5, #-2
LDR R7, R5, #-2
ADD R6, R6, #-1
STR R7, R6, #0
JSR malloc
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
STR R7, R5, #-3
JMP L67_malloc
L66_malloc
LDR R7, R5, #-1
LDR R3, R5, #-3
ADD R7, R7, R3
CONST R3, #0
STR R3, R7, #0
LDR R7, R5, #-1
ADD R7, R7, #1
STR R7, R5, #-1
L67_malloc
LDR R7, R5, #-1
LDR R3, R5, #-2
CMP R7, R3
BRn L66_malloc
CONST R7, #0
L65_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;copy_chunk;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
copy_chunk
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-2 ;; allocate stack space for local variables
;; function body
CONST R7, #0
STR R7, R5, #-1
LDR R7, R5, #4
LDR R7, R7, #0
CONST R3, #255
HICONST R3, #127
AND R7, R7, R3
STR R7, R5, #-2
CONST R7, #20
LDR R3, R5, #3
ADD R3, R3, R7
STR R3, R5, #3
LDR R3, R5, #4
ADD R7, R3, R7
STR R7, R5, #4
JMP L71_malloc
L70_malloc
CONST R7, #5
LDR R3, R5, #-1
MUL R7, R7, R3
LDR R3, R5, #4
ADD R1, R7, R3
LDR R3, R5, #3
ADD R0, R7, R3
;ASGNB
ADD R6, R6, #-1
STR R2, R6, #0
ADD R6, R6, #-1
STR R3, R6, #0
;blkloop!!!!
AND R3, R3, #0
ADD R3, R3, #5
L73
LDR R2, R0, #0
STR R2, R1, #0
ADD R0, R0, #1
ADD R1, R1, #1
ADD R3, R3, #-1
BRnp L73
LDR R3, R6, #0
ADD R6, R6, #1
LDR R2, R6, #0
ADD R6, R6, #1
LDR R7, R5, #-1
ADD R7, R7, #1
STR R7, R5, #-1
L71_malloc
LDR R7, R5, #-1
LDR R3, R5, #-2
CMP R7, R3
BRn L70_malloc
L69_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;realloc;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.CODE
.FALIGN
realloc
;; prologue
STR R7, R6, #-2 ;; save return address
STR R5, R6, #-3 ;; save base pointer
ADD R6, R6, #-3
ADD R5, R6, #0
ADD R6, R6, #-4 ;; allocate stack space for local variables
;; function body
LDR R7, R5, #3
ADD R7, R7, #-4
STR R7, R5, #3
LDR R7, R5, #3
CONST R3, #0
CMP R7, R3
BRnp L75_malloc
LDR R7, R5, #4
ADD R6, R6, #-1
STR R7, R6, #0
JSR malloc
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
JMP L74_malloc
L75_malloc
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
JSR check_if_valid
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
CONST R3, #0
CMP R7, R3
BRz L77_malloc
LDR R7, R5, #3
LDR R7, R7, #0
LDR R3, R5, #4
SUB R7, R7, R3
STR R7, R5, #-3
CONST R7, #1
STR R7, R5, #-2
LDR R7, R5, #-2
ADD R7, R7, #4
STR R7, R5, #-2
LDR R7, R5, #-3
LDR R3, R5, #-2
CMP R7, R3
BRn L79_malloc
LDR R7, R5, #4
ADD R6, R6, #-1
STR R7, R6, #0
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
JSR split_chunk
ADD R6, R6, #2 ;; free space for arguments
JMP L78_malloc
L79_malloc
LDR R7, R5, #3
LDR R7, R7, #2
CONST R3, #0
CMP R7, R3
BRz L81_malloc
LEA R3, main_arena
LDR R3, R3, #2
CMP R7, R3
BRz L81_malloc
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
JSR merge_chunk
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
CONST R3, #1
CMP R7, R3
BRnp L78_malloc
LDR R7, R5, #3
LDR R7, R7, #0
LDR R3, R5, #4
SUB R7, R7, R3
STR R7, R5, #-4
LDR R7, R5, #-4
LDR R3, R5, #-2
CMP R7, R3
BRn L78_malloc
LDR R7, R5, #4
ADD R6, R6, #-1
STR R7, R6, #0
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
JSR split_chunk
ADD R6, R6, #2 ;; free space for arguments
JMP L78_malloc
L81_malloc
LDR R7, R5, #4
ADD R6, R6, #-1
STR R7, R6, #0
JSR malloc
LDR R7, R6, #-1 ;; grab return value
ADD R6, R6, #1 ;; free space for arguments
STR R7, R5, #-1
LDR R7, R5, #-1
CONST R3, #-20
ADD R7, R7, R3
ADD R6, R6, #-1
STR R7, R6, #0
LDR R7, R5, #3
ADD R6, R6, #-1
STR R7, R6, #0
JSR copy_chunk
ADD R6, R6, #2 ;; free space for arguments
LDR R7, R5, #3
ADD R7, R7, #4
ADD R6, R6, #-1
STR R7, R6, #0
JSR free
ADD R6, R6, #1 ;; free space for arguments
LDR R7, R5, #-1
JMP L74_malloc
L77_malloc
LEA R7, L87_malloc
ADD R6, R6, #-1
STR R7, R6, #0
JSR lc4_puts
ADD R6, R6, #1 ;; free space for arguments
JSR lc4_halt
ADD R6, R6, #0 ;; free space for arguments
L78_malloc
CONST R7, #0
L74_malloc
;; epilogue
ADD R6, R5, #0 ;; pop locals off stack
ADD R6, R6, #3 ;; free space for return address, base pointer, and return value
STR R7, R6, #-1 ;; store return value
LDR R5, R6, #-3 ;; restore base pointer
LDR R7, R6, #-2 ;; restore return address
RET
.DATA
.ADDR 0x3900
.DATA
main_arena
.FILL #18522
.FILL #1
.FILL x0
breakAddr .BLKW 1
L87_malloc .STRINGZ "SEGFAULT - Realloc - ptr is invalid"
L64_malloc .STRINGZ "SEGFAULT - freeing twice"
L7_malloc .STRINGZ "Break cannot be placed after the heap (break < 0x3000)"
L4_malloc .STRINGZ "Break cannot be placed before the heap (break < 0x4000)" | 19.878673 | 80 | 0.591503 |
8b903047dbd238212fb91893171ee7cec90d8578 | 179 | asm | Assembly | data/pokemon/dex_entries/clamperl.asm | AtmaBuster/pokeplat-gen2 | fa83b2e75575949b8f72cb2c48f7a1042e97f70f | [
"blessing"
] | 6 | 2021-06-19T06:41:19.000Z | 2022-02-15T17:12:33.000Z | data/pokemon/dex_entries/clamperl.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | null | null | null | data/pokemon/dex_entries/clamperl.asm | AtmaBuster/pokeplat-gen2-old | 01e42c55db5408d72d89133dc84a46c699d849ad | [
"blessing"
] | 3 | 2021-01-15T18:45:40.000Z | 2021-10-16T03:35:27.000Z | db "BIVALVE@" ; species name
db "When this #MON"
next "evolves, it makes"
next "a mysterious pearl"
page "that amplifies"
next "psychic powers"
next "when it's held.@"
| 17.9 | 29 | 0.670391 |
ed81672800f0f97cf8e050c89cac1f20bdf2213f | 673 | asm | Assembly | programs/oeis/005/A005099.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/005/A005099.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/005/A005099.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A005099: (( Primes == -1 mod 4 ) + 1)/4.
; 1,2,3,5,6,8,11,12,15,17,18,20,21,26,27,32,33,35,38,41,42,45,48,50,53,56,57,60,63,66,68,71,77,78,83,87,90,92,95,96,105,108,110,111,116,117,120,122,123,125,126,131,137,141,143,147,150,152,155,158,161,162,165,171,173,180,182,185,186,188,197,203,206,207,210,215,216,221,222,227,228,230,237,242,243,246,248,255,258,260,263,266,272,273,276,281,288,291,293,297
mov $1,2
mov $2,$0
pow $2,2
add $2,1
lpb $2
sub $2,1
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,4
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
div $1,4
mul $1,4
sub $1,4
div $1,4
add $1,1
mov $0,$1
| 26.92 | 355 | 0.632987 |
7c56eecbf15f392b3ea5a649b8132de9bf66c09f | 733 | asm | Assembly | oeis/053/A053493.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/053/A053493.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/053/A053493.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A053493: Number of symmetric 4 X 4 matrices of nonnegative integers with every row and column adding to n.
; Submitted by Christian Krause
; 1,10,56,214,641,1620,3616,7340,13825,24510,41336,66850,104321,157864,232576,334680,471681,652530,887800,1189870,1573121,2054140,2651936,3388164,4287361,5377190,6688696,8256570,10119425,12320080,14905856,17928880,21446401,25521114,30221496,35622150,41804161,48855460,56871200,65954140,76215041,87773070,100756216,115301714,131556481,149677560,169832576,192200200,216970625,244346050,274541176,307783710,344314881,384389964,428278816,476266420,528653441,585756790,647910200,715464810,788789761
add $0,2
mov $1,$0
mul $1,$0
mov $0,$1
mul $1,2
sub $1,1
mul $1,$0
add $1,8
mul $0,$1
div $0,144
| 48.866667 | 493 | 0.811733 |
3c664099f4401e6bb5b78cdfc2c478bd34fb72ab | 45,136 | asm | Assembly | P6/P6Judger - 100 testpoints/testpoint/testpoint22.asm | flyinglandlord/BUAA-CO-2021 | 1aa28b09762dfb2376ed2aac4126839f0e6fcf93 | [
"MIT"
] | 5 | 2021-12-05T12:58:26.000Z | 2022-03-31T02:05:13.000Z | P6/P6Judger - 100 testpoints/testpoint/testpoint22.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | null | null | null | P6/P6Judger - 100 testpoints/testpoint/testpoint22.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | 2 | 2021-12-19T11:49:48.000Z | 2021-12-22T10:25:38.000Z | ori $1, $0, 6
ori $2, $0, 12
ori $3, $0, 2
ori $4, $0, 14
sw $4, 0($0)
sw $3, 4($0)
sw $4, 8($0)
sw $2, 12($0)
sw $1, 16($0)
sw $1, 20($0)
sw $4, 24($0)
sw $1, 28($0)
sw $2, 32($0)
sw $1, 36($0)
sw $2, 40($0)
sw $3, 44($0)
sw $3, 48($0)
sw $3, 52($0)
sw $4, 56($0)
sw $3, 60($0)
sw $1, 64($0)
sw $3, 68($0)
sw $3, 72($0)
sw $4, 76($0)
sw $2, 80($0)
sw $3, 84($0)
sw $3, 88($0)
sw $3, 92($0)
sw $2, 96($0)
sw $4, 100($0)
sw $4, 104($0)
sw $3, 108($0)
sw $4, 112($0)
sw $1, 116($0)
sw $2, 120($0)
sw $1, 124($0)
lhu $1, 0($2)
sll $3, $1, 6
mult $3, $1
div $2, $3
TAG1:
sb $3, -768($3)
lbu $2, -768($3)
sll $3, $2, 9
mfhi $4
TAG2:
and $3, $4, $4
or $2, $4, $3
blez $4, TAG3
lui $2, 2
TAG3:
lui $1, 3
mtlo $1
nor $4, $2, $1
slt $4, $1, $1
TAG4:
lui $4, 1
blez $4, TAG5
xori $2, $4, 9
srl $1, $2, 12
TAG5:
sh $1, 0($1)
srlv $2, $1, $1
sltiu $3, $1, 10
mflo $2
TAG6:
sll $0, $0, 0
blez $2, TAG7
addu $4, $2, $2
sll $0, $0, 0
TAG7:
bne $4, $4, TAG8
sll $0, $0, 0
addu $4, $2, $2
bltz $2, TAG8
TAG8:
sll $0, $0, 0
mthi $4
sra $2, $4, 4
mthi $2
TAG9:
sll $0, $0, 0
mflo $2
sra $1, $2, 10
lui $3, 5
TAG10:
sll $0, $0, 0
sltiu $2, $2, 13
sltu $2, $3, $3
lui $2, 6
TAG11:
bltz $2, TAG12
ori $4, $2, 3
mflo $2
slt $4, $4, $2
TAG12:
lui $1, 5
sh $4, 0($4)
mult $4, $1
sra $2, $4, 12
TAG13:
multu $2, $2
sw $2, 0($2)
sb $2, 0($2)
lui $2, 5
TAG14:
lui $3, 13
srl $4, $2, 4
sll $4, $3, 14
beq $2, $4, TAG15
TAG15:
mthi $4
ori $3, $4, 2
sll $0, $0, 0
xori $4, $4, 7
TAG16:
mult $4, $4
bne $4, $4, TAG17
srlv $3, $4, $4
mtlo $3
TAG17:
mflo $2
mflo $4
lui $2, 7
sll $0, $0, 0
TAG18:
sll $0, $0, 0
or $3, $3, $3
bltz $4, TAG19
sll $0, $0, 0
TAG19:
sltu $1, $3, $3
bne $3, $1, TAG20
sll $0, $0, 0
mtlo $3
TAG20:
sw $1, 0($1)
mult $1, $1
and $1, $1, $1
sw $1, 0($1)
TAG21:
subu $1, $1, $1
xori $4, $1, 10
bgtz $1, TAG22
xori $1, $1, 15
TAG22:
divu $1, $1
lui $2, 11
srl $4, $1, 5
sll $0, $0, 0
TAG23:
beq $4, $4, TAG24
mfhi $3
beq $4, $3, TAG24
mthi $4
TAG24:
or $3, $3, $3
sltiu $1, $3, 2
lhu $3, 0($3)
bgtz $1, TAG25
TAG25:
lui $4, 10
ori $1, $4, 2
xori $2, $4, 2
sllv $4, $3, $2
TAG26:
sb $4, 0($4)
mtlo $4
mult $4, $4
sw $4, 0($4)
TAG27:
mfhi $2
mtlo $2
mflo $4
mflo $1
TAG28:
multu $1, $1
or $4, $1, $1
mthi $1
mfhi $3
TAG29:
beq $3, $3, TAG30
multu $3, $3
mtlo $3
sra $3, $3, 0
TAG30:
mfhi $1
mtlo $1
sb $3, 0($3)
lbu $4, 0($1)
TAG31:
lb $2, 0($4)
mult $2, $2
sw $2, 0($2)
sw $4, 0($2)
TAG32:
blez $2, TAG33
mtlo $2
lh $4, 0($2)
bgez $4, TAG33
TAG33:
sb $4, 0($4)
lui $3, 6
bltz $3, TAG34
srl $1, $4, 5
TAG34:
lbu $3, 0($1)
lh $1, 0($3)
bgtz $1, TAG35
xori $2, $1, 3
TAG35:
lb $4, 0($2)
sll $3, $4, 15
mfhi $1
sh $4, 0($4)
TAG36:
mfhi $2
mult $2, $1
bne $2, $1, TAG37
mfhi $2
TAG37:
multu $2, $2
multu $2, $2
lui $3, 15
sll $0, $0, 0
TAG38:
sub $3, $1, $1
lw $4, 0($1)
bne $3, $1, TAG39
mthi $4
TAG39:
lui $2, 1
mflo $2
bgtz $2, TAG40
mfhi $4
TAG40:
lui $2, 13
mult $4, $4
mthi $2
beq $2, $4, TAG41
TAG41:
mthi $2
sll $3, $2, 14
sll $0, $0, 0
mthi $2
TAG42:
lui $2, 10
subu $3, $3, $3
beq $3, $2, TAG43
multu $3, $2
TAG43:
sb $3, 0($3)
mtlo $3
lui $4, 7
mfhi $3
TAG44:
sll $4, $3, 15
mult $4, $3
sltu $4, $4, $3
lh $4, 0($4)
TAG45:
mthi $4
sb $4, 0($4)
sb $4, 0($4)
addi $3, $4, 12
TAG46:
lhu $3, 0($3)
xori $1, $3, 1
lb $4, 0($1)
beq $3, $3, TAG47
TAG47:
addu $3, $4, $4
bltz $3, TAG48
lui $1, 1
beq $1, $4, TAG48
TAG48:
mthi $1
sltu $3, $1, $1
bgtz $1, TAG49
xor $3, $3, $3
TAG49:
mult $3, $3
slt $1, $3, $3
add $3, $1, $1
mfhi $3
TAG50:
lui $3, 3
mflo $1
lb $3, 0($1)
sw $3, 0($1)
TAG51:
sll $4, $3, 3
and $2, $3, $4
nor $3, $3, $4
lhu $3, 1($3)
TAG52:
lw $2, 0($3)
sra $4, $3, 13
sllv $3, $2, $3
srl $2, $2, 5
TAG53:
sll $1, $2, 4
lui $3, 12
lui $2, 11
srav $1, $2, $2
TAG54:
bltz $1, TAG55
mfhi $1
mthi $1
lui $2, 0
TAG55:
slti $1, $2, 3
bgez $2, TAG56
lh $3, 0($2)
mflo $2
TAG56:
mult $2, $2
bne $2, $2, TAG57
lui $2, 3
lui $2, 2
TAG57:
mflo $3
lui $1, 3
sll $0, $0, 0
sll $4, $4, 8
TAG58:
lhu $3, 0($4)
mtlo $4
bne $4, $4, TAG59
andi $1, $4, 8
TAG59:
srl $4, $1, 10
sltu $2, $1, $4
lw $1, 0($4)
subu $3, $1, $2
TAG60:
lh $4, 0($3)
mult $3, $4
mthi $3
mflo $4
TAG61:
mtlo $4
mfhi $4
mfhi $4
beq $4, $4, TAG62
TAG62:
sw $4, 0($4)
bne $4, $4, TAG63
mfhi $1
lhu $1, 0($4)
TAG63:
lhu $2, 0($1)
sw $1, 0($1)
beq $2, $2, TAG64
mthi $2
TAG64:
bgtz $2, TAG65
mfhi $1
xori $2, $2, 10
ori $4, $2, 6
TAG65:
lh $2, 0($4)
mthi $2
lb $1, 0($2)
sh $2, 0($4)
TAG66:
ori $3, $1, 6
addu $4, $1, $3
bltz $1, TAG67
mflo $1
TAG67:
mthi $1
nor $2, $1, $1
mflo $3
mthi $1
TAG68:
bne $3, $3, TAG69
ori $4, $3, 12
multu $4, $3
lui $2, 6
TAG69:
sll $0, $0, 0
lui $4, 0
mfhi $3
bltz $3, TAG70
TAG70:
sb $3, 0($3)
lui $1, 13
mflo $1
multu $1, $1
TAG71:
xor $2, $1, $1
mult $1, $1
lui $1, 8
multu $2, $2
TAG72:
mtlo $1
sll $0, $0, 0
lui $1, 2
mthi $1
TAG73:
sll $0, $0, 0
slt $2, $4, $1
sltu $3, $4, $1
lb $2, 0($2)
TAG74:
mflo $3
lw $2, 0($2)
bltz $2, TAG75
divu $2, $3
TAG75:
lh $2, 0($2)
sltiu $4, $2, 8
mfhi $3
lh $3, 0($2)
TAG76:
and $4, $3, $3
sw $3, 0($4)
sllv $1, $4, $3
sltiu $1, $4, 15
TAG77:
ori $1, $1, 4
bgez $1, TAG78
multu $1, $1
sb $1, 0($1)
TAG78:
mtlo $1
sb $1, 0($1)
sb $1, 0($1)
slt $4, $1, $1
TAG79:
mfhi $4
bne $4, $4, TAG80
lui $1, 11
blez $4, TAG80
TAG80:
mfhi $2
sll $0, $0, 0
beq $4, $4, TAG81
andi $4, $1, 1
TAG81:
mflo $2
mthi $4
lbu $3, 0($2)
lbu $2, 0($4)
TAG82:
andi $3, $2, 7
bne $3, $3, TAG83
sll $4, $2, 9
mfhi $1
TAG83:
mthi $1
bne $1, $1, TAG84
mult $1, $1
mthi $1
TAG84:
mflo $4
addi $1, $1, 0
sllv $1, $1, $1
bgez $1, TAG85
TAG85:
sltu $2, $1, $1
mflo $2
multu $2, $2
mfhi $2
TAG86:
mult $2, $2
mtlo $2
lb $4, 0($2)
bgez $2, TAG87
TAG87:
lui $2, 14
lui $4, 4
mfhi $1
sb $2, 0($1)
TAG88:
lhu $3, 0($1)
mthi $1
sll $1, $1, 11
srav $4, $1, $1
TAG89:
lb $2, 0($4)
multu $4, $4
bne $2, $4, TAG90
mult $2, $4
TAG90:
multu $2, $2
blez $2, TAG91
andi $2, $2, 14
mtlo $2
TAG91:
mult $2, $2
bltz $2, TAG92
mfhi $4
lui $2, 5
TAG92:
lui $1, 1
mflo $1
lh $2, 0($1)
lbu $1, 0($1)
TAG93:
blez $1, TAG94
mfhi $4
bltz $4, TAG94
lui $2, 12
TAG94:
beq $2, $2, TAG95
mflo $3
divu $3, $2
mult $2, $2
TAG95:
sb $3, 0($3)
sh $3, 0($3)
sw $3, 0($3)
multu $3, $3
TAG96:
sra $3, $3, 0
lw $4, 0($3)
subu $4, $4, $3
mthi $3
TAG97:
lbu $2, 0($4)
slt $4, $4, $2
mfhi $4
mult $4, $2
TAG98:
lui $4, 10
sll $0, $0, 0
and $4, $4, $4
sll $0, $0, 0
TAG99:
mfhi $4
bne $4, $4, TAG100
slti $1, $4, 2
multu $4, $4
TAG100:
mthi $1
lui $1, 6
beq $1, $1, TAG101
sll $0, $0, 0
TAG101:
and $1, $1, $1
sll $0, $0, 0
mtlo $1
xori $2, $1, 13
TAG102:
sll $0, $0, 0
bne $1, $2, TAG103
nor $4, $1, $1
sh $4, 0($4)
TAG103:
slt $3, $4, $4
bgez $4, TAG104
sll $0, $0, 0
divu $3, $4
TAG104:
lbu $1, 0($3)
bne $3, $1, TAG105
andi $1, $1, 2
bne $1, $1, TAG105
TAG105:
lbu $3, 0($1)
beq $1, $1, TAG106
multu $1, $1
and $2, $3, $1
TAG106:
mfhi $1
xor $4, $1, $2
sll $0, $0, 0
sll $0, $0, 0
TAG107:
mtlo $3
bgez $3, TAG108
sb $3, 0($3)
lui $1, 7
TAG108:
mtlo $1
beq $1, $1, TAG109
addu $2, $1, $1
lui $2, 9
TAG109:
sh $2, 0($2)
sh $2, 0($2)
mfhi $4
mfhi $3
TAG110:
or $1, $3, $3
sw $3, 0($1)
lui $4, 3
mtlo $3
TAG111:
mthi $4
beq $4, $4, TAG112
sll $0, $0, 0
lw $1, 0($4)
TAG112:
beq $1, $1, TAG113
addu $2, $1, $1
mthi $1
mflo $2
TAG113:
mfhi $3
mult $2, $3
srl $4, $2, 13
sll $0, $0, 0
TAG114:
lui $2, 0
mflo $3
bne $3, $3, TAG115
lui $3, 6
TAG115:
bgtz $3, TAG116
sltu $3, $3, $3
multu $3, $3
subu $2, $3, $3
TAG116:
lbu $2, 0($2)
lh $3, 0($2)
sub $4, $2, $2
bltz $3, TAG117
TAG117:
lw $2, 0($4)
lhu $1, 0($2)
lui $1, 8
mflo $3
TAG118:
bne $3, $3, TAG119
sb $3, 0($3)
lhu $1, 0($3)
lb $3, 0($3)
TAG119:
bgez $3, TAG120
lbu $3, 0($3)
bltz $3, TAG120
srl $2, $3, 15
TAG120:
bne $2, $2, TAG121
mthi $2
multu $2, $2
lw $4, 0($2)
TAG121:
mflo $2
mflo $3
mfhi $3
mfhi $1
TAG122:
mthi $1
mflo $4
mthi $1
lbu $2, 0($1)
TAG123:
mult $2, $2
mtlo $2
sh $2, 0($2)
sltiu $1, $2, 15
TAG124:
div $1, $1
mflo $3
mult $1, $3
mflo $2
TAG125:
sb $2, 0($2)
lui $4, 3
mflo $1
sb $4, 0($1)
TAG126:
lui $4, 3
mthi $4
multu $1, $4
sra $4, $4, 6
TAG127:
sll $0, $0, 0
lui $2, 15
bne $2, $2, TAG128
mult $2, $4
TAG128:
sll $0, $0, 0
mflo $2
bne $2, $2, TAG129
addiu $4, $2, 2
TAG129:
mthi $4
subu $1, $4, $4
mthi $4
bne $4, $1, TAG130
TAG130:
lui $4, 9
multu $4, $1
lui $3, 14
bne $3, $1, TAG131
TAG131:
multu $3, $3
bne $3, $3, TAG132
addiu $4, $3, 3
mult $4, $3
TAG132:
bne $4, $4, TAG133
mfhi $4
mfhi $3
xori $2, $3, 7
TAG133:
sw $2, -195($2)
bgtz $2, TAG134
multu $2, $2
beq $2, $2, TAG134
TAG134:
lui $2, 15
mfhi $2
ori $2, $2, 3
mthi $2
TAG135:
mthi $2
lui $4, 15
sb $4, 0($2)
mthi $4
TAG136:
sll $0, $0, 0
lui $2, 5
mfhi $4
andi $3, $4, 13
TAG137:
xori $1, $3, 1
addu $4, $3, $3
bltz $3, TAG138
sw $4, 0($4)
TAG138:
mult $4, $4
multu $4, $4
lh $3, 0($4)
beq $4, $3, TAG139
TAG139:
lb $3, 0($3)
and $1, $3, $3
sh $3, 0($3)
beq $3, $3, TAG140
TAG140:
or $1, $1, $1
lbu $2, 0($1)
mfhi $2
lui $4, 7
TAG141:
sll $0, $0, 0
beq $4, $2, TAG142
sub $3, $4, $2
subu $1, $4, $2
TAG142:
lui $1, 3
mfhi $1
sub $4, $1, $1
blez $1, TAG143
TAG143:
sb $4, 0($4)
mfhi $4
mtlo $4
mthi $4
TAG144:
bltz $4, TAG145
sw $4, 0($4)
sb $4, 0($4)
lb $2, 0($4)
TAG145:
sra $3, $2, 15
mfhi $3
and $3, $3, $3
beq $2, $3, TAG146
TAG146:
lui $3, 7
mult $3, $3
addu $4, $3, $3
bltz $3, TAG147
TAG147:
sll $0, $0, 0
sll $0, $0, 0
mfhi $3
lui $2, 14
TAG148:
bltz $2, TAG149
sll $0, $0, 0
sll $0, $0, 0
sll $3, $2, 5
TAG149:
sll $0, $0, 0
sll $0, $0, 0
mult $3, $3
bne $3, $3, TAG150
TAG150:
mfhi $1
mfhi $4
div $1, $3
mfhi $4
TAG151:
xori $1, $4, 13
mflo $3
addiu $2, $1, 0
mtlo $1
TAG152:
mult $2, $2
beq $2, $2, TAG153
mtlo $2
sw $2, 0($2)
TAG153:
divu $2, $2
addiu $4, $2, 1
lui $3, 15
subu $2, $2, $4
TAG154:
mtlo $2
mult $2, $2
multu $2, $2
srl $3, $2, 13
TAG155:
bltz $3, TAG156
sll $0, $0, 0
mtlo $2
sll $0, $0, 0
TAG156:
sll $0, $0, 0
bgez $2, TAG157
lui $3, 7
mfhi $1
TAG157:
andi $3, $1, 2
mthi $3
sh $3, 0($3)
blez $1, TAG158
TAG158:
lui $4, 9
beq $4, $4, TAG159
lui $4, 11
bne $4, $4, TAG159
TAG159:
mfhi $4
lui $1, 3
bne $1, $4, TAG160
divu $4, $1
TAG160:
andi $3, $1, 0
slti $2, $1, 15
sw $2, 0($2)
mfhi $1
TAG161:
div $1, $1
mfhi $3
lhu $1, 0($1)
sw $3, 0($1)
TAG162:
bne $1, $1, TAG163
subu $4, $1, $1
mfhi $2
lh $4, 0($4)
TAG163:
mfhi $1
lh $3, 0($1)
and $4, $4, $3
lh $1, 0($4)
TAG164:
lhu $2, 0($1)
multu $1, $2
mtlo $2
beq $2, $2, TAG165
TAG165:
sra $3, $2, 2
mthi $3
ori $4, $2, 8
mfhi $2
TAG166:
lbu $1, 0($2)
slti $3, $2, 12
beq $3, $3, TAG167
lh $2, 0($2)
TAG167:
sb $2, 0($2)
mtlo $2
slti $3, $2, 13
lui $4, 14
TAG168:
beq $4, $4, TAG169
div $4, $4
srl $1, $4, 3
sb $4, 0($4)
TAG169:
lw $4, 0($1)
slti $1, $4, 7
bgtz $1, TAG170
lb $2, 0($1)
TAG170:
mfhi $4
slt $1, $4, $4
mfhi $3
sub $4, $2, $2
TAG171:
lhu $3, 0($4)
mthi $4
mtlo $4
sra $3, $3, 1
TAG172:
bne $3, $3, TAG173
srl $2, $3, 8
sltu $2, $2, $2
lui $4, 13
TAG173:
nor $4, $4, $4
sltiu $1, $4, 10
lh $3, 0($1)
addi $2, $1, 5
TAG174:
lui $1, 9
sb $1, 0($2)
mflo $1
mult $2, $1
TAG175:
blez $1, TAG176
lui $2, 5
andi $2, $1, 12
mthi $1
TAG176:
divu $2, $2
mflo $2
sb $2, 0($2)
mfhi $2
TAG177:
mult $2, $2
mult $2, $2
bgez $2, TAG178
sh $2, 0($2)
TAG178:
mthi $2
sw $2, 0($2)
lw $3, 0($2)
sra $1, $3, 3
TAG179:
bgtz $1, TAG180
mflo $3
lh $3, 0($3)
bne $3, $1, TAG180
TAG180:
mflo $2
sltu $3, $3, $2
sll $1, $3, 13
lui $1, 11
TAG181:
multu $1, $1
mfhi $2
div $2, $2
blez $1, TAG182
TAG182:
nor $4, $2, $2
srl $3, $2, 6
sh $3, 122($4)
mfhi $4
TAG183:
bne $4, $4, TAG184
mthi $4
bgtz $4, TAG184
sltiu $2, $4, 1
TAG184:
bltz $2, TAG185
mflo $2
srl $4, $2, 11
mthi $4
TAG185:
mult $4, $4
lui $1, 15
mflo $2
mult $4, $4
TAG186:
mflo $4
mflo $4
xori $2, $4, 6
sb $2, 0($2)
TAG187:
slti $2, $2, 4
mthi $2
bltz $2, TAG188
slti $4, $2, 13
TAG188:
mflo $1
bne $4, $4, TAG189
mfhi $3
bne $3, $3, TAG189
TAG189:
mthi $3
lw $3, 0($3)
mthi $3
and $3, $3, $3
TAG190:
beq $3, $3, TAG191
lui $4, 5
lbu $1, 0($4)
div $3, $3
TAG191:
sb $1, 0($1)
blez $1, TAG192
sw $1, 0($1)
lbu $2, 0($1)
TAG192:
lw $1, 0($2)
lb $4, 0($2)
mult $2, $2
and $3, $2, $4
TAG193:
srl $1, $3, 9
mfhi $2
addi $3, $3, 8
sllv $1, $3, $3
TAG194:
sb $1, -2048($1)
mthi $1
sltu $2, $1, $1
mfhi $4
TAG195:
mtlo $4
mflo $3
mthi $4
beq $3, $4, TAG196
TAG196:
sh $3, -2048($3)
mtlo $3
sh $3, -2048($3)
mtlo $3
TAG197:
mthi $3
divu $3, $3
bne $3, $3, TAG198
mfhi $2
TAG198:
lui $3, 0
sllv $4, $3, $2
mtlo $2
mflo $2
TAG199:
lh $3, 0($2)
bltz $3, TAG200
mthi $3
lui $3, 6
TAG200:
bltz $3, TAG201
sll $0, $0, 0
sll $0, $0, 0
lui $4, 5
TAG201:
bne $4, $4, TAG202
subu $1, $4, $4
beq $1, $1, TAG202
sllv $4, $4, $4
TAG202:
mflo $2
addiu $1, $2, 7
mfhi $2
lh $3, -2048($2)
TAG203:
multu $3, $3
mthi $3
mtlo $3
bltz $3, TAG204
TAG204:
srl $2, $3, 6
lw $4, 0($2)
beq $2, $2, TAG205
mtlo $4
TAG205:
mthi $4
mthi $4
addiu $3, $4, 15
mflo $2
TAG206:
and $1, $2, $2
div $2, $1
srlv $4, $2, $1
mflo $4
TAG207:
xori $4, $4, 5
sw $4, 0($4)
lw $3, 0($4)
bltz $4, TAG208
TAG208:
lui $1, 14
lbu $4, 0($3)
divu $3, $1
multu $1, $4
TAG209:
slti $1, $4, 1
bltz $1, TAG210
mtlo $4
lhu $4, 0($4)
TAG210:
sw $4, 0($4)
bltz $4, TAG211
lui $4, 1
beq $4, $4, TAG211
TAG211:
mflo $2
sh $4, 0($2)
blez $2, TAG212
mult $2, $4
TAG212:
lui $2, 3
beq $2, $2, TAG213
mfhi $1
mflo $1
TAG213:
lbu $3, 0($1)
bne $3, $3, TAG214
mthi $3
mult $1, $1
TAG214:
sh $3, 0($3)
lui $2, 9
mult $3, $3
bne $2, $2, TAG215
TAG215:
slti $4, $2, 13
andi $1, $4, 14
slti $4, $2, 13
mflo $3
TAG216:
lhu $4, 0($3)
sb $4, 0($4)
sw $3, 0($4)
mtlo $3
TAG217:
sh $4, 0($4)
sltu $4, $4, $4
sw $4, 0($4)
sw $4, 0($4)
TAG218:
bne $4, $4, TAG219
mflo $4
xori $4, $4, 3
blez $4, TAG219
TAG219:
sb $4, 0($4)
bltz $4, TAG220
mflo $3
sra $3, $4, 12
TAG220:
lui $4, 11
mthi $3
beq $4, $3, TAG221
mthi $4
TAG221:
sll $0, $0, 0
nor $3, $4, $4
sll $0, $0, 0
mtlo $4
TAG222:
lb $2, 0($1)
and $4, $2, $1
mflo $1
sll $0, $0, 0
TAG223:
mthi $1
xori $3, $1, 10
sll $0, $0, 0
mtlo $3
TAG224:
sll $0, $0, 0
lui $2, 9
xori $4, $2, 9
bne $3, $4, TAG225
TAG225:
sll $0, $0, 0
sll $0, $0, 0
mflo $3
sll $0, $0, 0
TAG226:
sltu $4, $3, $3
addu $3, $3, $3
beq $4, $3, TAG227
mthi $3
TAG227:
divu $3, $3
sltiu $3, $3, 3
lui $3, 9
srav $4, $3, $3
TAG228:
blez $4, TAG229
multu $4, $4
div $4, $4
mtlo $4
TAG229:
mfhi $3
sll $1, $4, 14
bne $4, $1, TAG230
lui $2, 7
TAG230:
beq $2, $2, TAG231
addu $3, $2, $2
beq $3, $3, TAG231
mult $3, $3
TAG231:
slti $2, $3, 7
beq $3, $2, TAG232
addiu $1, $3, 15
bltz $2, TAG232
TAG232:
sll $0, $0, 0
nor $4, $1, $1
sll $0, $0, 0
sll $0, $0, 0
TAG233:
beq $4, $4, TAG234
ori $4, $4, 14
mtlo $4
bltz $4, TAG234
TAG234:
slti $2, $4, 14
sll $0, $0, 0
mtlo $2
slti $1, $4, 2
TAG235:
lbu $1, 0($1)
mult $1, $1
multu $1, $1
or $2, $1, $1
TAG236:
bne $2, $2, TAG237
lb $2, 0($2)
lw $1, 0($2)
lui $4, 2
TAG237:
bne $4, $4, TAG238
srlv $1, $4, $4
bne $1, $1, TAG238
mthi $4
TAG238:
lui $4, 10
mult $4, $1
sll $0, $0, 0
srlv $2, $4, $3
TAG239:
lui $1, 11
mtlo $1
div $1, $1
mfhi $2
TAG240:
mthi $2
multu $2, $2
add $3, $2, $2
lhu $3, 0($2)
TAG241:
sw $3, 0($3)
lh $3, 0($3)
bgez $3, TAG242
mthi $3
TAG242:
mfhi $4
bne $4, $4, TAG243
lhu $3, 0($4)
lui $4, 12
TAG243:
sll $0, $0, 0
sll $0, $0, 0
bltz $4, TAG244
or $4, $4, $4
TAG244:
bne $4, $4, TAG245
subu $3, $4, $4
mtlo $3
sll $0, $0, 0
TAG245:
ori $1, $3, 7
multu $3, $1
lui $3, 13
sltu $4, $1, $3
TAG246:
ori $2, $4, 9
mthi $4
beq $4, $2, TAG247
sltu $4, $4, $4
TAG247:
mtlo $4
beq $4, $4, TAG248
mtlo $4
mflo $4
TAG248:
lui $3, 6
mflo $2
div $3, $3
mflo $4
TAG249:
addu $2, $4, $4
bltz $4, TAG250
sllv $4, $4, $4
lui $1, 13
TAG250:
sll $0, $0, 0
mtlo $1
beq $1, $1, TAG251
lui $2, 2
TAG251:
mtlo $2
beq $2, $2, TAG252
sltiu $2, $2, 1
lw $4, 0($2)
TAG252:
lui $1, 13
beq $1, $4, TAG253
sh $1, 0($4)
div $4, $4
TAG253:
or $2, $1, $1
sll $0, $0, 0
sll $0, $0, 0
blez $2, TAG254
TAG254:
multu $2, $2
sll $0, $0, 0
sll $0, $0, 0
lbu $2, 0($4)
TAG255:
mtlo $2
bne $2, $2, TAG256
srl $2, $2, 4
lui $1, 9
TAG256:
slti $1, $1, 10
srl $3, $1, 9
blez $1, TAG257
lui $4, 4
TAG257:
beq $4, $4, TAG258
div $4, $4
mthi $4
srl $4, $4, 4
TAG258:
nor $4, $4, $4
mfhi $2
mflo $3
div $4, $4
TAG259:
sllv $4, $3, $3
sll $2, $3, 6
mfhi $4
lui $3, 11
TAG260:
mflo $3
sltiu $2, $3, 12
sb $2, 0($3)
lui $4, 6
TAG261:
subu $1, $4, $4
mfhi $3
addiu $1, $3, 12
lui $2, 2
TAG262:
slti $2, $2, 2
sh $2, 0($2)
mthi $2
mflo $3
TAG263:
beq $3, $3, TAG264
srl $1, $3, 6
mflo $1
mflo $3
TAG264:
mfhi $3
bne $3, $3, TAG265
sllv $3, $3, $3
sw $3, 0($3)
TAG265:
addi $2, $3, 3
lbu $2, 0($3)
ori $1, $2, 15
lbu $2, 0($2)
TAG266:
bgtz $2, TAG267
multu $2, $2
bne $2, $2, TAG267
lhu $1, 0($2)
TAG267:
mult $1, $1
bltz $1, TAG268
slti $4, $1, 10
bgez $4, TAG268
TAG268:
multu $4, $4
mtlo $4
sb $4, 0($4)
lb $3, 0($4)
TAG269:
mfhi $2
mflo $3
multu $3, $3
bltz $3, TAG270
TAG270:
sra $1, $3, 4
sb $3, 0($3)
nor $3, $1, $3
lw $2, 2($3)
TAG271:
sra $4, $2, 5
beq $4, $2, TAG272
srl $4, $4, 6
mtlo $4
TAG272:
lh $3, 0($4)
mult $3, $4
lui $2, 8
or $3, $2, $3
TAG273:
sll $0, $0, 0
sll $0, $0, 0
mfhi $3
beq $2, $3, TAG274
TAG274:
lui $2, 7
mult $3, $2
lui $1, 5
bgtz $2, TAG275
TAG275:
xor $4, $1, $1
lb $1, 0($4)
sra $3, $1, 9
mult $4, $1
TAG276:
bltz $3, TAG277
sllv $2, $3, $3
srlv $2, $3, $3
lui $3, 6
TAG277:
div $3, $3
sll $0, $0, 0
xori $3, $3, 6
beq $3, $3, TAG278
TAG278:
sll $3, $3, 14
subu $4, $3, $3
lw $4, 0($4)
lui $3, 12
TAG279:
sra $2, $3, 11
mtlo $2
lui $1, 2
beq $2, $2, TAG280
TAG280:
mfhi $3
andi $3, $3, 9
mthi $3
bne $3, $3, TAG281
TAG281:
srlv $4, $3, $3
lui $2, 5
divu $4, $2
lbu $2, 0($3)
TAG282:
sb $2, 0($2)
mult $2, $2
xor $1, $2, $2
sb $1, 0($1)
TAG283:
mtlo $1
mfhi $2
sb $1, 0($1)
lui $3, 6
TAG284:
sll $0, $0, 0
bne $1, $3, TAG285
multu $3, $1
mtlo $3
TAG285:
multu $1, $1
lw $1, 0($1)
beq $1, $1, TAG286
lb $1, -256($1)
TAG286:
srav $3, $1, $1
lui $2, 11
sh $2, 0($1)
mthi $2
TAG287:
sltiu $4, $2, 3
mult $4, $4
beq $4, $4, TAG288
sll $2, $4, 10
TAG288:
addiu $2, $2, 8
mult $2, $2
bgtz $2, TAG289
sh $2, 0($2)
TAG289:
or $3, $2, $2
sh $2, 0($3)
mthi $2
srl $2, $3, 8
TAG290:
sh $2, 0($2)
blez $2, TAG291
lh $2, 0($2)
beq $2, $2, TAG291
TAG291:
addi $4, $2, 1
lui $1, 7
sb $4, 0($4)
bgez $2, TAG292
TAG292:
mfhi $3
beq $3, $1, TAG293
mthi $1
beq $1, $1, TAG293
TAG293:
lui $1, 13
lhu $1, 0($3)
lbu $2, 0($1)
mult $1, $2
TAG294:
xor $1, $2, $2
mflo $1
addu $1, $2, $1
lw $1, 0($1)
TAG295:
sltu $2, $1, $1
lw $2, 0($2)
sb $2, 0($1)
mflo $1
TAG296:
bgtz $1, TAG297
sw $1, 0($1)
div $1, $1
mthi $1
TAG297:
mthi $1
bgez $1, TAG298
div $1, $1
sh $1, 0($1)
TAG298:
srl $1, $1, 10
lh $4, 0($1)
sh $1, -256($4)
sub $2, $1, $1
TAG299:
mult $2, $2
mflo $2
mtlo $2
bltz $2, TAG300
TAG300:
slti $1, $2, 13
sll $3, $1, 4
bgtz $3, TAG301
sb $3, 0($1)
TAG301:
mflo $1
lw $1, 0($1)
mult $1, $3
mthi $1
TAG302:
sltiu $4, $1, 5
lui $4, 12
blez $4, TAG303
divu $1, $4
TAG303:
mult $4, $4
mflo $1
lui $2, 0
mflo $3
TAG304:
sw $3, 0($3)
blez $3, TAG305
lb $3, 0($3)
lui $4, 15
TAG305:
sll $0, $0, 0
sll $0, $0, 0
bgtz $4, TAG306
sll $0, $0, 0
TAG306:
sll $0, $0, 0
srl $3, $4, 3
mthi $3
blez $4, TAG307
TAG307:
lui $4, 7
lui $4, 3
div $4, $4
mult $4, $4
TAG308:
bgez $4, TAG309
lui $1, 8
lui $4, 13
bgtz $4, TAG309
TAG309:
or $3, $4, $4
lui $3, 3
or $2, $4, $3
divu $4, $2
TAG310:
nor $2, $2, $2
mthi $2
and $1, $2, $2
srav $1, $2, $2
TAG311:
addu $4, $1, $1
mult $4, $1
mflo $1
bltz $4, TAG312
TAG312:
mtlo $1
lui $1, 6
bne $1, $1, TAG313
sll $0, $0, 0
TAG313:
srlv $4, $1, $1
bltz $1, TAG314
mfhi $4
mthi $4
TAG314:
bgez $4, TAG315
addu $1, $4, $4
mthi $1
lbu $4, 0($1)
TAG315:
lhu $3, 0($4)
mflo $2
slt $3, $2, $3
mfhi $4
TAG316:
mtlo $4
beq $4, $4, TAG317
mfhi $1
srav $4, $4, $1
TAG317:
lh $1, 0($4)
ori $2, $4, 9
lui $1, 5
sll $0, $0, 0
TAG318:
sltiu $1, $1, 12
mflo $1
mthi $1
mflo $2
TAG319:
multu $2, $2
lui $4, 8
bgtz $4, TAG320
lui $1, 12
TAG320:
mtlo $1
sll $0, $0, 0
lui $2, 5
sll $0, $0, 0
TAG321:
mflo $2
sll $0, $0, 0
beq $2, $2, TAG322
divu $2, $2
TAG322:
sll $0, $0, 0
bgtz $2, TAG323
div $2, $2
beq $2, $2, TAG323
TAG323:
xori $3, $2, 0
addiu $1, $3, 4
mtlo $3
sll $0, $0, 0
TAG324:
srlv $2, $2, $2
sll $4, $2, 1
sll $0, $0, 0
blez $2, TAG325
TAG325:
mthi $4
bgtz $4, TAG326
sll $0, $0, 0
mflo $3
TAG326:
bgtz $3, TAG327
mtlo $3
addu $3, $3, $3
mtlo $3
TAG327:
mthi $3
sll $0, $0, 0
lui $1, 15
lui $3, 5
TAG328:
bne $3, $3, TAG329
sll $0, $0, 0
sll $0, $0, 0
mfhi $4
TAG329:
sll $0, $0, 0
addu $4, $4, $4
sll $0, $0, 0
mtlo $4
TAG330:
mtlo $4
bne $4, $4, TAG331
srl $1, $4, 8
lui $4, 5
TAG331:
lui $3, 3
multu $3, $3
lui $3, 13
nor $3, $3, $3
TAG332:
sll $0, $0, 0
sll $0, $0, 0
div $3, $3
srav $2, $3, $3
TAG333:
beq $2, $2, TAG334
mflo $4
sb $4, 0($2)
or $1, $4, $4
TAG334:
sll $0, $0, 0
mthi $1
sll $0, $0, 0
sll $3, $1, 13
TAG335:
bltz $3, TAG336
divu $3, $3
sll $0, $0, 0
bne $3, $3, TAG336
TAG336:
xor $1, $3, $3
lb $3, 0($1)
slti $2, $1, 11
sb $2, 0($3)
TAG337:
sb $2, 0($2)
lui $3, 15
beq $3, $3, TAG338
mflo $2
TAG338:
xori $3, $2, 8
sb $3, 0($2)
bgtz $2, TAG339
sb $2, 0($2)
TAG339:
mtlo $3
divu $3, $3
mthi $3
sb $3, 0($3)
TAG340:
bne $3, $3, TAG341
sb $3, 0($3)
mthi $3
slti $1, $3, 14
TAG341:
xor $4, $1, $1
mfhi $4
bne $1, $4, TAG342
lui $1, 6
TAG342:
mtlo $1
mult $1, $1
mflo $4
mfhi $2
TAG343:
lui $2, 12
bne $2, $2, TAG344
xor $3, $2, $2
mtlo $2
TAG344:
sllv $2, $3, $3
lui $1, 15
mult $2, $2
mfhi $3
TAG345:
mthi $3
sltiu $1, $3, 14
lui $4, 15
bne $4, $3, TAG346
TAG346:
mult $4, $4
sll $0, $0, 0
sll $0, $0, 0
slt $2, $2, $4
TAG347:
divu $2, $2
beq $2, $2, TAG348
sltu $3, $2, $2
lui $2, 6
TAG348:
sb $2, 0($2)
mthi $2
beq $2, $2, TAG349
sb $2, 0($2)
TAG349:
sb $2, 0($2)
lui $3, 8
mfhi $1
sll $0, $0, 0
TAG350:
mflo $2
mult $1, $2
bgez $2, TAG351
sb $2, 0($1)
TAG351:
mflo $2
sltu $1, $2, $2
lui $3, 10
xor $1, $2, $1
TAG352:
lui $3, 15
lbu $4, 0($1)
bne $4, $3, TAG353
div $3, $1
TAG353:
nor $3, $4, $4
subu $1, $4, $3
blez $1, TAG354
lui $3, 3
TAG354:
mfhi $1
mfhi $4
bne $4, $1, TAG355
mfhi $1
TAG355:
sw $1, 0($1)
bgtz $1, TAG356
sb $1, 0($1)
mult $1, $1
TAG356:
multu $1, $1
bgtz $1, TAG357
mult $1, $1
bne $1, $1, TAG357
TAG357:
sltiu $2, $1, 5
sw $2, 0($1)
lui $2, 7
blez $2, TAG358
TAG358:
mtlo $2
beq $2, $2, TAG359
sll $0, $0, 0
sw $2, 0($2)
TAG359:
srlv $2, $2, $2
ori $4, $2, 13
divu $2, $2
sll $0, $0, 0
TAG360:
subu $1, $3, $3
nor $2, $1, $1
beq $3, $2, TAG361
sb $2, 1($2)
TAG361:
mflo $2
lui $1, 13
xor $3, $2, $1
sll $3, $1, 10
TAG362:
bgez $3, TAG363
or $3, $3, $3
beq $3, $3, TAG363
mtlo $3
TAG363:
mflo $2
lbu $2, 0($2)
blez $2, TAG364
mflo $3
TAG364:
addu $2, $3, $3
blez $2, TAG365
divu $3, $2
sh $3, 0($2)
TAG365:
div $2, $2
lh $2, 0($2)
blez $2, TAG366
lb $2, 0($2)
TAG366:
lb $1, 0($2)
mflo $4
bgez $4, TAG367
mtlo $2
TAG367:
bgtz $4, TAG368
sb $4, 0($4)
beq $4, $4, TAG368
lui $2, 7
TAG368:
lhu $1, 0($2)
mtlo $2
mflo $2
sb $2, 0($2)
TAG369:
lui $3, 14
bltz $3, TAG370
mfhi $1
bgtz $1, TAG370
TAG370:
mfhi $1
sltiu $2, $1, 12
lui $1, 8
lui $1, 15
TAG371:
sll $0, $0, 0
addu $4, $4, $1
sll $0, $0, 0
sll $0, $0, 0
TAG372:
sll $0, $0, 0
bgez $4, TAG373
lui $1, 13
bgez $4, TAG373
TAG373:
mtlo $1
mflo $4
bltz $1, TAG374
subu $3, $1, $4
TAG374:
bne $3, $3, TAG375
sw $3, 0($3)
lui $3, 3
mtlo $3
TAG375:
lui $2, 10
sll $0, $0, 0
div $3, $3
beq $3, $2, TAG376
TAG376:
sll $0, $0, 0
mthi $3
xori $4, $3, 0
mult $4, $3
TAG377:
mfhi $3
sra $2, $3, 11
mflo $4
lhu $3, 0($4)
TAG378:
subu $2, $3, $3
mflo $2
mtlo $3
lui $4, 8
TAG379:
sll $0, $0, 0
sll $0, $0, 0
beq $2, $4, TAG380
slti $2, $2, 6
TAG380:
subu $2, $2, $2
multu $2, $2
blez $2, TAG381
lui $2, 1
TAG381:
sllv $4, $2, $2
mtlo $2
mthi $2
sll $0, $0, 0
TAG382:
andi $4, $1, 10
bgtz $1, TAG383
andi $2, $1, 14
lui $4, 8
TAG383:
lbu $1, 0($4)
mfhi $3
sw $4, 0($1)
srl $3, $1, 9
TAG384:
andi $1, $3, 6
lui $1, 12
lui $4, 7
mult $4, $1
TAG385:
and $3, $4, $4
sll $0, $0, 0
mtlo $4
sll $0, $0, 0
TAG386:
sll $0, $0, 0
div $4, $4
div $1, $4
bne $1, $1, TAG387
TAG387:
mthi $4
mfhi $1
sll $0, $0, 0
lui $4, 14
TAG388:
sll $0, $0, 0
mtlo $4
xori $2, $4, 12
mflo $4
TAG389:
lui $2, 0
mult $4, $2
lhu $4, 0($2)
addi $4, $4, 0
TAG390:
lw $1, 0($4)
sb $1, 0($1)
ori $1, $1, 5
beq $1, $1, TAG391
TAG391:
mfhi $2
mthi $2
sb $1, 0($1)
lui $4, 12
TAG392:
beq $4, $4, TAG393
mflo $4
div $4, $4
addu $1, $4, $4
TAG393:
div $1, $1
lui $3, 14
srl $3, $1, 3
divu $3, $1
TAG394:
blez $3, TAG395
multu $3, $3
bgtz $3, TAG395
mthi $3
TAG395:
bltz $3, TAG396
mult $3, $3
mthi $3
bltz $3, TAG396
TAG396:
mflo $4
multu $4, $4
mtlo $4
addu $2, $4, $4
TAG397:
mflo $3
srav $2, $2, $2
sltiu $1, $2, 4
lw $3, 0($3)
TAG398:
beq $3, $3, TAG399
sltu $3, $3, $3
lhu $4, 0($3)
lbu $1, 0($3)
TAG399:
nor $2, $1, $1
sb $1, 0($1)
mflo $2
mfhi $2
TAG400:
mflo $1
lui $4, 14
mthi $4
sw $2, 0($2)
TAG401:
blez $4, TAG402
srlv $1, $4, $4
sll $0, $0, 0
sll $0, $0, 0
TAG402:
srav $4, $3, $3
bltz $4, TAG403
sw $4, 0($3)
mthi $3
TAG403:
mflo $2
addiu $1, $2, 11
multu $4, $4
lui $3, 4
TAG404:
mfhi $2
multu $2, $2
sll $0, $0, 0
mfhi $1
TAG405:
sra $2, $1, 4
bne $1, $1, TAG406
lui $2, 7
mfhi $1
TAG406:
bne $1, $1, TAG407
srl $3, $1, 15
lh $1, 0($1)
mflo $2
TAG407:
mult $2, $2
lbu $3, 0($2)
bne $2, $2, TAG408
srl $1, $3, 6
TAG408:
bgtz $1, TAG409
multu $1, $1
lb $1, 0($1)
mfhi $2
TAG409:
sllv $1, $2, $2
beq $1, $1, TAG410
mflo $4
lui $1, 4
TAG410:
lui $1, 2
lui $3, 4
sll $0, $0, 0
mult $1, $1
TAG411:
beq $3, $3, TAG412
andi $4, $3, 9
bne $3, $4, TAG412
lui $2, 8
TAG412:
lbu $4, 0($2)
mtlo $4
nor $1, $2, $2
nor $1, $1, $2
TAG413:
sh $1, 0($1)
xor $3, $1, $1
mfhi $1
mthi $3
TAG414:
srav $3, $1, $1
mthi $3
sra $3, $1, 12
multu $1, $3
TAG415:
lui $1, 9
sb $1, 0($3)
bgtz $1, TAG416
lui $1, 4
TAG416:
sll $0, $0, 0
sh $2, 0($2)
mflo $2
bne $2, $2, TAG417
TAG417:
lui $4, 13
sw $2, 0($2)
sll $0, $0, 0
bltz $4, TAG418
TAG418:
xori $3, $2, 1
subu $4, $3, $3
ori $3, $3, 11
sra $2, $3, 9
TAG419:
lui $2, 15
mthi $2
blez $2, TAG420
sll $0, $0, 0
TAG420:
addiu $4, $2, 7
mflo $2
lui $3, 4
addiu $1, $4, 12
TAG421:
mflo $3
addiu $2, $1, 4
sll $0, $0, 0
mthi $2
TAG422:
sll $0, $0, 0
srlv $4, $1, $1
div $4, $4
slt $3, $4, $1
TAG423:
multu $3, $3
sb $3, 0($3)
slt $4, $3, $3
lbu $3, 0($3)
TAG424:
mfhi $3
bne $3, $3, TAG425
sw $3, 0($3)
blez $3, TAG425
TAG425:
sw $3, 0($3)
lw $4, 0($3)
mult $4, $3
lw $2, 0($4)
TAG426:
mthi $2
sh $2, 0($2)
mtlo $2
mtlo $2
TAG427:
add $1, $2, $2
mfhi $1
mult $2, $1
addu $1, $1, $1
TAG428:
multu $1, $1
multu $1, $1
lhu $4, 0($1)
sll $2, $4, 9
TAG429:
mfhi $3
sb $3, 0($3)
addi $3, $3, 7
bltz $3, TAG430
TAG430:
mtlo $3
lui $1, 14
lui $1, 9
bne $3, $1, TAG431
TAG431:
sll $0, $0, 0
div $1, $1
divu $1, $1
beq $1, $1, TAG432
TAG432:
sll $3, $1, 10
mult $1, $3
sll $0, $0, 0
mflo $3
TAG433:
lui $2, 15
mthi $3
lui $4, 14
bgtz $4, TAG434
TAG434:
mthi $4
mflo $2
lui $1, 0
lui $1, 15
TAG435:
mult $1, $1
bne $1, $1, TAG436
subu $1, $1, $1
sw $1, 0($1)
TAG436:
mtlo $1
lui $2, 14
slti $2, $2, 11
mthi $1
TAG437:
mtlo $2
sltu $1, $2, $2
mult $2, $1
slt $1, $1, $1
TAG438:
xori $4, $1, 14
srl $4, $4, 1
bne $4, $1, TAG439
subu $2, $1, $4
TAG439:
addu $1, $2, $2
xor $3, $1, $2
and $3, $1, $2
lh $3, 16($3)
TAG440:
addu $2, $3, $3
lw $1, 0($2)
mthi $3
mult $2, $3
TAG441:
sltiu $1, $1, 9
div $1, $1
mthi $1
blez $1, TAG442
TAG442:
subu $2, $1, $1
lui $3, 4
mtlo $1
ori $3, $2, 2
TAG443:
divu $3, $3
div $3, $3
xori $4, $3, 9
sb $4, 0($4)
TAG444:
addu $2, $4, $4
lui $4, 9
blez $4, TAG445
lui $3, 7
TAG445:
addiu $4, $3, 8
blez $3, TAG446
sll $0, $0, 0
div $4, $3
TAG446:
sll $0, $0, 0
bgtz $4, TAG447
mult $4, $4
sll $2, $4, 10
TAG447:
bltz $2, TAG448
sh $2, 0($2)
xor $2, $2, $2
and $4, $2, $2
TAG448:
bne $4, $4, TAG449
mtlo $4
bltz $4, TAG449
lhu $3, 0($4)
TAG449:
slt $1, $3, $3
sra $1, $1, 15
bne $1, $1, TAG450
lui $1, 0
TAG450:
lui $1, 12
sll $0, $0, 0
mflo $3
lui $4, 14
TAG451:
sltu $1, $4, $4
mthi $1
beq $4, $4, TAG452
nor $1, $1, $1
TAG452:
multu $1, $1
bne $1, $1, TAG453
xor $2, $1, $1
mthi $2
TAG453:
blez $2, TAG454
mfhi $2
sllv $3, $2, $2
lui $3, 8
TAG454:
srav $4, $3, $3
bgez $3, TAG455
mthi $3
srl $3, $3, 0
TAG455:
bne $3, $3, TAG456
multu $3, $3
subu $4, $3, $3
lh $2, 0($3)
TAG456:
sh $2, 0($2)
lbu $3, 0($2)
lw $4, 0($3)
lhu $2, 0($4)
TAG457:
lh $4, 0($2)
bltz $2, TAG458
sb $2, 0($2)
lw $3, 0($4)
TAG458:
lbu $1, 0($3)
lui $3, 13
mflo $4
mflo $3
TAG459:
mtlo $3
sh $3, 0($3)
mflo $3
multu $3, $3
TAG460:
lui $1, 6
lbu $1, 0($3)
sw $3, 0($1)
lui $3, 9
TAG461:
sltu $2, $3, $3
divu $3, $3
lui $3, 2
mtlo $3
TAG462:
addu $1, $3, $3
sll $2, $1, 2
addiu $2, $1, 14
beq $2, $1, TAG463
TAG463:
sll $0, $0, 0
sll $0, $0, 0
mfhi $1
sll $0, $0, 0
TAG464:
blez $4, TAG465
mflo $3
bltz $3, TAG465
and $1, $3, $4
TAG465:
lw $1, 0($1)
mflo $2
bgez $1, TAG466
mult $2, $2
TAG466:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
blez $1, TAG467
TAG467:
mflo $4
mtlo $3
sll $0, $0, 0
bgtz $3, TAG468
TAG468:
sllv $1, $4, $4
bne $4, $4, TAG469
or $2, $1, $1
mthi $4
TAG469:
mfhi $4
lui $4, 1
multu $4, $2
xor $3, $4, $4
TAG470:
srl $1, $3, 12
mult $1, $3
lbu $3, 0($3)
sb $1, 0($1)
TAG471:
beq $3, $3, TAG472
lui $4, 3
mfhi $2
mflo $3
TAG472:
blez $3, TAG473
subu $2, $3, $3
bltz $3, TAG473
mfhi $3
TAG473:
mtlo $3
mflo $2
bne $3, $3, TAG474
sw $3, 0($3)
TAG474:
bgtz $2, TAG475
sltiu $1, $2, 9
lb $2, 0($1)
sb $2, 0($1)
TAG475:
lhu $2, 0($2)
mtlo $2
bne $2, $2, TAG476
sb $2, 0($2)
TAG476:
slt $3, $2, $2
lui $4, 10
lhu $1, 0($3)
lh $2, 0($1)
TAG477:
lw $4, 0($2)
bne $2, $2, TAG478
sw $4, 0($4)
lh $3, 0($2)
TAG478:
addi $1, $3, 11
slti $3, $1, 15
mtlo $3
lb $4, 0($3)
TAG479:
lui $3, 13
mthi $4
blez $4, TAG480
mthi $4
TAG480:
lui $1, 5
or $4, $1, $3
beq $1, $1, TAG481
sll $0, $0, 0
TAG481:
mflo $3
lui $2, 5
sb $3, 0($3)
sb $3, 0($3)
TAG482:
divu $2, $2
lui $3, 12
beq $3, $3, TAG483
mthi $2
TAG483:
bgez $3, TAG484
sll $0, $0, 0
mflo $3
mult $3, $3
TAG484:
mfhi $1
subu $3, $1, $3
nor $2, $3, $1
sll $0, $0, 0
TAG485:
lui $2, 11
mfhi $3
and $2, $2, $2
xor $1, $2, $2
TAG486:
lb $4, 0($1)
mthi $4
lui $1, 12
bltz $1, TAG487
TAG487:
mtlo $1
lui $1, 5
sll $0, $0, 0
bgez $1, TAG488
TAG488:
mflo $4
div $4, $4
mtlo $4
divu $4, $4
TAG489:
mtlo $4
addu $4, $4, $4
sra $4, $4, 8
lui $1, 6
TAG490:
sll $0, $0, 0
subu $3, $1, $1
sll $0, $0, 0
mtlo $1
TAG491:
mflo $2
srav $2, $3, $2
bltz $3, TAG492
sll $1, $2, 13
TAG492:
mthi $1
bgez $1, TAG493
sltu $2, $1, $1
sh $1, 0($1)
TAG493:
sb $2, 0($2)
sw $2, 0($2)
bne $2, $2, TAG494
multu $2, $2
TAG494:
sllv $2, $2, $2
xor $1, $2, $2
multu $1, $2
sltiu $4, $2, 4
TAG495:
bne $4, $4, TAG496
mtlo $4
bgez $4, TAG496
sll $3, $4, 2
TAG496:
mfhi $2
lui $1, 2
beq $1, $2, TAG497
multu $3, $2
TAG497:
sll $0, $0, 0
sll $0, $0, 0
mflo $4
bgtz $1, TAG498
TAG498:
mtlo $4
mthi $4
mfhi $1
bltz $4, TAG499
TAG499:
sb $1, 0($1)
mflo $2
lui $1, 2
beq $1, $2, TAG500
TAG500:
slti $4, $1, 2
lui $2, 5
bne $2, $4, TAG501
mthi $1
TAG501:
bne $2, $2, TAG502
sll $0, $0, 0
lui $1, 11
lui $1, 11
TAG502:
div $1, $1
sll $0, $0, 0
addu $1, $1, $4
sll $1, $1, 10
TAG503:
sll $0, $0, 0
sll $0, $0, 0
addiu $2, $2, 9
bgtz $2, TAG504
TAG504:
mflo $2
lui $1, 13
addu $3, $2, $2
mflo $3
TAG505:
lui $3, 14
ori $1, $3, 8
bltz $1, TAG506
mult $1, $1
TAG506:
lui $1, 9
mtlo $1
divu $1, $1
lui $1, 6
TAG507:
lui $3, 9
addu $1, $1, $1
sll $0, $0, 0
beq $3, $3, TAG508
TAG508:
sll $0, $0, 0
mthi $3
mtlo $3
lui $2, 5
TAG509:
xor $3, $2, $2
div $2, $2
mtlo $2
blez $2, TAG510
TAG510:
mthi $3
beq $3, $3, TAG511
srl $1, $3, 3
bgtz $3, TAG511
TAG511:
mtlo $1
sllv $4, $1, $1
lbu $1, 0($4)
sb $1, 0($1)
TAG512:
mthi $1
mtlo $1
bgez $1, TAG513
add $3, $1, $1
TAG513:
srav $2, $3, $3
bne $3, $3, TAG514
lhu $3, 0($3)
bne $2, $3, TAG514
TAG514:
lui $2, 1
sll $0, $0, 0
mult $3, $3
sll $0, $0, 0
TAG515:
mfhi $2
beq $2, $2, TAG516
xori $1, $2, 3
sb $2, 0($2)
TAG516:
bgtz $1, TAG517
lb $3, 0($1)
beq $3, $3, TAG517
mtlo $1
TAG517:
sb $3, 0($3)
beq $3, $3, TAG518
mfhi $4
lhu $4, 0($3)
TAG518:
mthi $4
sh $4, 0($4)
ori $3, $4, 13
mfhi $1
TAG519:
multu $1, $1
mfhi $1
multu $1, $1
lhu $1, 0($1)
TAG520:
srl $1, $1, 8
sw $1, 0($1)
srav $3, $1, $1
mult $1, $1
TAG521:
mfhi $2
lhu $4, 0($3)
mfhi $2
nor $1, $4, $4
TAG522:
addu $4, $1, $1
lw $4, 1($1)
blez $4, TAG523
nor $3, $4, $1
TAG523:
lh $2, 0($3)
mflo $2
mflo $3
mult $3, $2
TAG524:
mtlo $3
mult $3, $3
bgez $3, TAG525
sh $3, 0($3)
TAG525:
sh $3, 0($3)
bgtz $3, TAG526
lb $2, 0($3)
sw $2, 0($3)
TAG526:
mult $2, $2
bltz $2, TAG527
slt $3, $2, $2
multu $3, $3
TAG527:
lhu $2, 0($3)
mfhi $4
subu $1, $2, $4
multu $1, $2
TAG528:
sw $1, 0($1)
mflo $3
mfhi $1
mult $3, $1
TAG529:
lw $3, 0($1)
sw $3, 0($1)
and $3, $3, $1
bltz $3, TAG530
TAG530:
sra $2, $3, 12
mult $2, $2
bltz $3, TAG531
sltu $4, $2, $2
TAG531:
bgez $4, TAG532
mthi $4
lw $3, 0($4)
mthi $3
TAG532:
lui $2, 6
sll $1, $3, 6
sw $3, 0($1)
bgtz $3, TAG533
TAG533:
lb $3, 0($1)
blez $3, TAG534
mult $3, $3
mthi $3
TAG534:
beq $3, $3, TAG535
and $1, $3, $3
mflo $1
mfhi $3
TAG535:
mult $3, $3
bne $3, $3, TAG536
xori $2, $3, 11
lw $3, 0($3)
TAG536:
lw $3, 0($3)
mult $3, $3
lb $1, 0($3)
bne $1, $3, TAG537
TAG537:
addiu $4, $1, 9
multu $1, $4
beq $1, $4, TAG538
lui $2, 5
TAG538:
bgez $2, TAG539
mflo $1
lui $1, 1
mthi $1
TAG539:
mthi $1
beq $1, $1, TAG540
lw $1, 0($1)
mult $1, $1
TAG540:
sw $1, 0($1)
mult $1, $1
bne $1, $1, TAG541
lui $3, 15
TAG541:
sll $0, $0, 0
sll $0, $0, 0
multu $3, $2
mfhi $4
TAG542:
lui $4, 7
bgez $4, TAG543
subu $2, $4, $4
mthi $4
TAG543:
bgtz $2, TAG544
lh $2, 0($2)
bgtz $2, TAG544
sh $2, 0($2)
TAG544:
lb $1, 0($2)
mflo $3
mfhi $2
divu $2, $2
TAG545:
sb $2, 0($2)
bltz $2, TAG546
mtlo $2
addu $2, $2, $2
TAG546:
mtlo $2
lb $2, -150($2)
mthi $2
add $1, $2, $2
TAG547:
blez $1, TAG548
lbu $3, 0($1)
mtlo $1
lui $3, 8
TAG548:
bgez $3, TAG549
multu $3, $3
srlv $2, $3, $3
xori $4, $3, 7
TAG549:
lui $4, 7
lui $4, 9
lui $4, 7
sll $0, $0, 0
TAG550:
addu $3, $4, $4
srlv $3, $4, $4
blez $3, TAG551
sll $0, $0, 0
TAG551:
sll $0, $0, 0
mflo $2
sra $2, $3, 7
mflo $1
TAG552:
blez $1, TAG553
sllv $4, $1, $1
sh $1, 0($1)
beq $1, $1, TAG553
TAG553:
slt $1, $4, $4
addi $1, $1, 0
mfhi $2
mult $1, $1
TAG554:
mult $2, $2
lui $3, 10
mtlo $2
lhu $2, 0($2)
TAG555:
slti $4, $2, 3
mult $2, $2
mthi $2
sb $2, 0($4)
TAG556:
lui $3, 9
mfhi $1
sb $3, 0($1)
or $3, $3, $4
TAG557:
mtlo $3
sll $0, $0, 0
beq $3, $3, TAG558
subu $4, $3, $3
TAG558:
mult $4, $4
multu $4, $4
mfhi $4
sh $4, 0($4)
TAG559:
beq $4, $4, TAG560
sltu $4, $4, $4
divu $4, $4
andi $2, $4, 14
TAG560:
sh $2, 0($2)
bne $2, $2, TAG561
multu $2, $2
lui $3, 7
TAG561:
sltiu $1, $3, 10
sll $0, $0, 0
bne $1, $1, TAG562
sw $1, 0($1)
TAG562:
mtlo $1
lui $4, 1
lui $3, 14
bltz $4, TAG563
TAG563:
lui $2, 5
mfhi $1
srl $4, $3, 10
divu $1, $3
TAG564:
sll $0, $0, 0
bne $1, $1, TAG565
lhu $1, -896($4)
sw $1, -896($4)
TAG565:
bgez $1, TAG566
mthi $1
beq $1, $1, TAG566
lui $4, 12
TAG566:
andi $4, $4, 6
sltu $1, $4, $4
multu $4, $4
multu $4, $4
TAG567:
sh $1, 0($1)
multu $1, $1
lw $1, 0($1)
beq $1, $1, TAG568
TAG568:
multu $1, $1
mtlo $1
mtlo $1
nor $1, $1, $1
TAG569:
bne $1, $1, TAG570
lui $3, 15
div $3, $1
srlv $2, $3, $1
TAG570:
lui $2, 3
slt $2, $2, $2
lui $2, 7
bgtz $2, TAG571
TAG571:
lui $3, 3
sll $0, $0, 0
beq $1, $1, TAG572
addiu $2, $1, 14
TAG572:
sb $2, 0($2)
sb $2, 0($2)
addu $1, $2, $2
mflo $2
TAG573:
divu $2, $2
div $2, $2
blez $2, TAG574
sll $0, $0, 0
TAG574:
slt $2, $1, $1
mtlo $2
sh $1, 0($1)
bne $1, $2, TAG575
TAG575:
lui $3, 0
sra $2, $3, 2
mtlo $2
mult $2, $3
TAG576:
beq $2, $2, TAG577
sltiu $1, $2, 1
sltiu $3, $2, 10
sra $1, $3, 11
TAG577:
sll $2, $1, 4
sltiu $3, $1, 4
bltz $2, TAG578
mthi $1
TAG578:
srlv $4, $3, $3
mult $3, $3
addiu $4, $3, 4
mflo $3
TAG579:
lbu $4, 0($3)
andi $3, $4, 2
lui $3, 5
lbu $4, 0($4)
TAG580:
bne $4, $4, TAG581
addi $3, $4, 5
beq $3, $3, TAG581
lb $2, 0($4)
TAG581:
addiu $1, $2, 3
lbu $3, 0($1)
mfhi $2
bltz $3, TAG582
TAG582:
lui $2, 4
lui $4, 14
sll $0, $0, 0
lui $4, 6
TAG583:
lui $1, 0
mflo $4
lui $4, 3
sra $4, $4, 12
TAG584:
ori $4, $4, 11
addiu $3, $4, 8
bne $4, $3, TAG585
lui $1, 15
TAG585:
srl $3, $1, 13
xori $1, $3, 13
mflo $2
andi $2, $1, 5
TAG586:
beq $2, $2, TAG587
mfhi $2
lb $2, 0($2)
bne $2, $2, TAG587
TAG587:
mthi $2
lui $2, 5
sll $0, $0, 0
mfhi $3
TAG588:
mthi $3
mfhi $1
mult $3, $3
multu $3, $1
TAG589:
mult $1, $1
sll $3, $1, 9
beq $1, $3, TAG590
subu $4, $1, $3
TAG590:
sllv $2, $4, $4
lui $1, 13
mfhi $4
mflo $3
TAG591:
multu $3, $3
mflo $1
lbu $1, 0($1)
beq $1, $1, TAG592
TAG592:
srl $1, $1, 10
sw $1, 0($1)
lui $4, 5
lui $2, 0
TAG593:
sb $2, 0($2)
lw $3, 0($2)
sllv $4, $3, $3
sh $3, 0($3)
TAG594:
addiu $3, $4, 5
subu $2, $4, $3
sw $4, 5($2)
bgtz $2, TAG595
TAG595:
sll $0, $0, 0
bgez $2, TAG596
div $2, $2
sw $4, 0($4)
TAG596:
bne $4, $4, TAG597
lbu $3, 0($4)
slti $3, $4, 0
lhu $3, 0($4)
TAG597:
mult $3, $3
mflo $3
addi $1, $3, 11
multu $1, $3
TAG598:
lb $2, 0($1)
slti $4, $2, 13
blez $4, TAG599
lui $3, 8
TAG599:
bgez $3, TAG600
div $3, $3
mflo $3
sh $3, 0($3)
TAG600:
mthi $3
bne $3, $3, TAG601
mfhi $2
xori $3, $3, 8
TAG601:
mthi $3
lui $1, 13
addiu $4, $1, 12
sll $0, $0, 0
TAG602:
addiu $4, $1, 13
mtlo $4
mtlo $4
mthi $1
TAG603:
sll $0, $0, 0
blez $3, TAG604
lui $4, 7
mflo $1
TAG604:
subu $3, $1, $1
slti $3, $1, 6
sw $3, 0($3)
mult $3, $1
TAG605:
addu $2, $3, $3
srlv $4, $3, $3
lw $1, 0($4)
mflo $3
TAG606:
sllv $3, $3, $3
lui $3, 14
mtlo $3
nor $1, $3, $3
TAG607:
lui $4, 14
bne $1, $4, TAG608
sll $0, $0, 0
bgez $4, TAG608
TAG608:
mthi $3
sll $3, $3, 5
lui $2, 7
blez $3, TAG609
TAG609:
multu $2, $2
beq $2, $2, TAG610
mflo $1
sw $2, 0($2)
TAG610:
lbu $2, 0($1)
subu $1, $2, $1
lbu $4, 0($1)
sh $4, 0($2)
TAG611:
mthi $4
multu $4, $4
sltu $2, $4, $4
mflo $1
TAG612:
sb $1, 0($1)
bgez $1, TAG613
sll $4, $1, 8
lui $3, 13
TAG613:
sll $0, $0, 0
mthi $3
xor $1, $3, $3
bne $1, $3, TAG614
TAG614:
mfhi $1
lui $2, 6
mthi $2
sll $0, $0, 0
TAG615:
mflo $4
lui $3, 12
mtlo $3
lui $4, 7
TAG616:
sll $0, $0, 0
beq $4, $4, TAG617
lui $3, 7
mflo $1
TAG617:
mfhi $3
lui $4, 13
mfhi $3
beq $3, $3, TAG618
TAG618:
sll $3, $3, 15
sh $3, 0($3)
lhu $4, 0($3)
beq $3, $3, TAG619
TAG619:
and $2, $4, $4
sb $4, 0($4)
mfhi $2
addiu $2, $2, 15
TAG620:
mult $2, $2
divu $2, $2
beq $2, $2, TAG621
mflo $2
TAG621:
sltiu $1, $2, 0
sh $2, 0($1)
lui $3, 6
bgtz $1, TAG622
TAG622:
lui $4, 10
addu $1, $4, $4
lui $1, 12
ori $3, $3, 9
TAG623:
lui $1, 8
lui $4, 1
and $1, $1, $1
sll $0, $0, 0
TAG624:
sll $0, $0, 0
and $1, $3, $3
sll $4, $3, 13
sltu $4, $1, $3
TAG625:
mult $4, $4
lui $2, 15
mfhi $1
bgtz $2, TAG626
TAG626:
multu $1, $1
mflo $2
mfhi $2
lh $1, 0($2)
TAG627:
blez $1, TAG628
srl $3, $1, 11
mtlo $3
sw $3, 0($3)
TAG628:
blez $3, TAG629
lui $4, 11
bne $4, $3, TAG629
sw $3, 0($3)
TAG629:
mfhi $4
blez $4, TAG630
multu $4, $4
sw $4, 0($4)
TAG630:
bltz $4, TAG631
srav $4, $4, $4
sltu $2, $4, $4
sltu $3, $2, $2
TAG631:
sh $3, 0($3)
xor $3, $3, $3
sh $3, 0($3)
mflo $3
TAG632:
lw $4, 0($3)
bgez $3, TAG633
sh $4, 0($4)
bgez $3, TAG633
TAG633:
multu $4, $4
sb $4, 0($4)
mtlo $4
blez $4, TAG634
TAG634:
mthi $4
beq $4, $4, TAG635
sw $4, 0($4)
mflo $3
TAG635:
bgez $3, TAG636
lhu $4, 0($3)
lui $2, 13
sw $3, 0($3)
TAG636:
bltz $2, TAG637
sw $2, 0($2)
addu $2, $2, $2
mfhi $1
TAG637:
lh $3, 0($1)
sh $3, 0($1)
mflo $2
mfhi $2
TAG638:
bne $2, $2, TAG639
mtlo $2
mflo $2
slti $1, $2, 12
TAG639:
ori $3, $1, 12
bgez $1, TAG640
and $1, $3, $1
mfhi $1
TAG640:
sb $1, 0($1)
blez $1, TAG641
sb $1, 0($1)
sb $1, 0($1)
TAG641:
bne $1, $1, TAG642
subu $1, $1, $1
bne $1, $1, TAG642
lbu $2, 0($1)
TAG642:
multu $2, $2
and $1, $2, $2
mtlo $1
sltu $1, $2, $2
TAG643:
addiu $1, $1, 13
lui $2, 8
bgez $2, TAG644
mtlo $2
TAG644:
lui $1, 15
ori $4, $1, 4
beq $2, $1, TAG645
sll $0, $0, 0
TAG645:
mfhi $1
lui $3, 3
mult $4, $1
multu $4, $1
TAG646:
mflo $1
mtlo $1
srlv $1, $3, $1
mult $1, $1
TAG647:
addiu $3, $1, 12
sll $0, $0, 0
div $3, $3
bgtz $3, TAG648
TAG648:
div $3, $3
lui $2, 7
subu $2, $3, $3
sll $0, $0, 0
TAG649:
beq $2, $2, TAG650
lui $2, 3
beq $2, $2, TAG650
add $3, $2, $2
TAG650:
sll $0, $0, 0
bltz $3, TAG651
mflo $2
sb $1, 0($2)
TAG651:
beq $2, $2, TAG652
divu $2, $2
sb $2, 0($2)
addiu $3, $2, 15
TAG652:
mfhi $1
sllv $4, $1, $3
bgtz $1, TAG653
addiu $4, $3, 0
TAG653:
sll $0, $0, 0
sltiu $1, $4, 5
lui $4, 6
sltiu $1, $4, 0
TAG654:
srav $1, $1, $1
mtlo $1
lui $4, 6
multu $1, $1
TAG655:
lui $1, 2
bne $4, $1, TAG656
sltiu $1, $1, 9
lb $2, 0($1)
TAG656:
mult $2, $2
mult $2, $2
bgez $2, TAG657
mtlo $2
TAG657:
mult $2, $2
slti $2, $2, 13
mthi $2
beq $2, $2, TAG658
TAG658:
lb $3, 0($2)
beq $2, $2, TAG659
mtlo $3
addiu $2, $2, 2
TAG659:
srav $1, $2, $2
mflo $1
sb $1, 0($2)
blez $1, TAG660
TAG660:
xori $1, $1, 2
mfhi $2
or $3, $1, $2
bltz $3, TAG661
TAG661:
lbu $4, 0($3)
lui $4, 8
mflo $3
sh $3, 0($3)
TAG662:
bne $3, $3, TAG663
multu $3, $3
andi $3, $3, 6
beq $3, $3, TAG663
TAG663:
sb $3, 0($3)
mfhi $4
lui $2, 9
lui $1, 8
TAG664:
bgez $1, TAG665
sllv $3, $1, $1
bgez $1, TAG665
mfhi $3
TAG665:
lui $4, 4
sll $0, $0, 0
lui $4, 8
mflo $3
TAG666:
mtlo $3
multu $3, $3
bgez $3, TAG667
mthi $3
TAG667:
mflo $4
mfhi $3
lui $2, 11
lw $2, 0($3)
TAG668:
mtlo $2
sb $2, 0($2)
mflo $2
sw $2, 0($2)
TAG669:
bne $2, $2, TAG670
slt $1, $2, $2
mflo $4
mult $1, $1
TAG670:
beq $4, $4, TAG671
lhu $3, 0($4)
bne $4, $3, TAG671
addu $3, $3, $4
TAG671:
sb $3, 0($3)
sh $3, 0($3)
slti $4, $3, 2
lb $2, 0($4)
TAG672:
lh $4, 0($2)
xori $2, $2, 3
bgez $2, TAG673
mthi $4
TAG673:
lui $2, 9
div $2, $2
bltz $2, TAG674
lui $3, 5
TAG674:
bltz $3, TAG675
sll $0, $0, 0
lui $1, 1
addiu $3, $3, 10
TAG675:
mflo $4
mtlo $3
addiu $1, $3, 11
mtlo $4
TAG676:
slt $4, $1, $1
sll $0, $0, 0
mthi $4
sll $0, $0, 0
TAG677:
sltu $4, $2, $2
lui $4, 13
sll $0, $0, 0
mflo $1
TAG678:
and $3, $1, $1
sb $3, 0($3)
mtlo $3
mfhi $1
TAG679:
mflo $1
mtlo $1
nor $4, $1, $1
mfhi $4
TAG680:
mult $4, $4
mflo $3
and $2, $3, $3
lui $3, 7
TAG681:
sll $0, $0, 0
sll $0, $0, 0
bne $1, $3, TAG682
multu $3, $3
TAG682:
ori $1, $2, 11
beq $1, $1, TAG683
mfhi $2
mult $1, $2
TAG683:
mtlo $2
xori $3, $2, 12
mtlo $2
addu $4, $2, $3
TAG684:
and $3, $4, $4
beq $3, $4, TAG685
mtlo $4
lbu $4, 0($4)
TAG685:
subu $4, $4, $4
mfhi $2
mtlo $2
slti $1, $4, 5
TAG686:
lui $3, 7
sll $0, $0, 0
mfhi $1
bgez $1, TAG687
TAG687:
mflo $1
multu $1, $1
multu $1, $1
mult $1, $1
TAG688:
blez $1, TAG689
mfhi $2
sltiu $2, $1, 2
mtlo $2
TAG689:
multu $2, $2
lui $4, 10
bgez $2, TAG690
andi $3, $4, 5
TAG690:
bgez $3, TAG691
mfhi $4
sra $2, $3, 11
lhu $2, 0($2)
TAG691:
sh $2, 0($2)
beq $2, $2, TAG692
mtlo $2
beq $2, $2, TAG692
TAG692:
lui $1, 1
mult $2, $2
sltiu $4, $1, 5
mflo $2
TAG693:
mult $2, $2
multu $2, $2
mthi $2
lb $4, 0($2)
TAG694:
lui $1, 5
mfhi $2
lui $1, 7
lb $4, 0($4)
TAG695:
mthi $4
sw $4, 0($4)
lui $3, 15
sll $3, $3, 6
TAG696:
beq $3, $3, TAG697
mthi $3
sw $3, 0($3)
sb $3, 0($3)
TAG697:
sll $0, $0, 0
srlv $3, $3, $3
nor $2, $3, $3
mfhi $3
TAG698:
subu $3, $3, $3
sub $3, $3, $3
lbu $2, 0($3)
bne $3, $3, TAG699
TAG699:
lui $3, 11
bne $3, $2, TAG700
div $2, $3
bne $3, $2, TAG700
TAG700:
div $3, $3
mthi $3
mfhi $4
bgtz $3, TAG701
TAG701:
lui $1, 5
andi $3, $4, 15
sll $0, $0, 0
blez $3, TAG702
TAG702:
lui $4, 11
mtlo $4
sw $3, 0($3)
xori $2, $3, 4
TAG703:
mflo $2
sll $0, $0, 0
sll $0, $0, 0
mfhi $3
TAG704:
lui $3, 15
sll $0, $0, 0
sll $0, $0, 0
lui $4, 2
TAG705:
mfhi $4
mthi $4
div $4, $4
sll $0, $0, 0
TAG706:
sll $0, $0, 0
div $4, $2
mtlo $4
mflo $1
TAG707:
addu $4, $1, $1
beq $4, $1, TAG708
lui $4, 3
mfhi $2
TAG708:
mfhi $1
lw $4, 0($1)
mflo $4
lui $2, 10
TAG709:
sll $0, $0, 0
sll $0, $0, 0
bltz $2, TAG710
sll $0, $0, 0
TAG710:
mthi $2
lui $1, 3
mtlo $2
bne $1, $2, TAG711
TAG711:
xor $3, $1, $1
srav $3, $1, $3
bne $1, $1, TAG712
lui $2, 7
TAG712:
mtlo $2
lui $3, 5
mfhi $3
addu $1, $2, $3
TAG713:
bltz $1, TAG714
sltiu $1, $1, 14
bgez $1, TAG714
ori $1, $1, 0
TAG714:
mtlo $1
sw $1, 0($1)
lui $4, 4
mflo $2
TAG715:
lh $3, 0($2)
mflo $2
and $2, $2, $2
mfhi $1
TAG716:
bgtz $1, TAG717
div $1, $1
andi $3, $1, 3
sra $1, $3, 11
TAG717:
bltz $1, TAG718
or $1, $1, $1
lui $1, 3
multu $1, $1
TAG718:
srl $3, $1, 7
addiu $4, $3, 15
mfhi $3
mflo $1
TAG719:
bltz $1, TAG720
mflo $1
add $3, $1, $1
bgtz $3, TAG720
TAG720:
lui $1, 9
multu $3, $3
bgtz $3, TAG721
mult $3, $3
TAG721:
mflo $1
srav $1, $1, $1
lw $4, 0($1)
lh $4, 0($1)
TAG722:
srav $1, $4, $4
bne $4, $4, TAG723
multu $1, $1
bltz $4, TAG723
TAG723:
mult $1, $1
slti $4, $1, 4
lh $3, 0($1)
lui $3, 11
TAG724:
sll $0, $0, 0
mtlo $1
lui $4, 9
addu $1, $1, $3
TAG725:
mult $1, $1
sll $0, $0, 0
addu $1, $2, $1
mtlo $1
TAG726:
lui $4, 2
srl $1, $1, 3
beq $4, $1, TAG727
sll $0, $0, 0
TAG727:
andi $2, $1, 6
bltz $2, TAG728
mfhi $1
lb $3, 0($1)
TAG728:
mult $3, $3
multu $3, $3
mult $3, $3
sltiu $4, $3, 11
TAG729:
lb $1, 0($4)
lbu $4, 0($1)
sll $4, $4, 1
mflo $2
TAG730:
beq $2, $2, TAG731
lw $2, 0($2)
lhu $3, 0($2)
lui $4, 0
TAG731:
sub $2, $4, $4
mult $2, $2
or $1, $4, $4
lui $2, 13
TAG732:
mthi $2
lui $2, 9
mthi $2
mthi $2
TAG733:
addiu $4, $2, 4
sll $0, $0, 0
sb $4, 0($1)
sw $2, 0($1)
TAG734:
beq $1, $1, TAG735
lb $4, 0($1)
lui $4, 8
xor $4, $1, $4
TAG735:
sltu $4, $4, $4
slt $1, $4, $4
bltz $4, TAG736
lui $2, 11
TAG736:
andi $2, $2, 10
lw $4, 0($2)
mfhi $3
addi $1, $2, 2
TAG737:
mfhi $2
mthi $2
div $2, $2
ori $4, $2, 0
TAG738:
slt $4, $4, $4
mflo $3
mthi $3
lh $2, 0($4)
TAG739:
lbu $1, 0($2)
bne $2, $2, TAG740
lui $2, 3
beq $1, $1, TAG740
TAG740:
addiu $2, $2, 9
mtlo $2
sra $2, $2, 0
lui $2, 6
TAG741:
lui $2, 8
nor $2, $2, $2
lui $3, 2
sll $0, $0, 0
TAG742:
bgez $3, TAG743
andi $2, $3, 1
div $2, $2
sll $2, $3, 13
TAG743:
sh $2, 0($2)
mthi $2
beq $2, $2, TAG744
multu $2, $2
TAG744:
bgez $2, TAG745
sh $2, 0($2)
beq $2, $2, TAG745
sw $2, 0($2)
TAG745:
mflo $2
bgez $2, TAG746
lui $3, 13
bltz $3, TAG746
TAG746:
addiu $1, $3, 7
sll $0, $0, 0
mult $1, $3
multu $3, $3
TAG747:
sltu $1, $1, $1
bne $1, $1, TAG748
mfhi $4
lui $4, 13
TAG748:
mult $4, $4
div $4, $4
lui $4, 5
addu $1, $4, $4
TAG749:
divu $1, $1
mult $1, $1
sll $0, $0, 0
sll $0, $0, 0
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop | 11.906093 | 21 | 0.541408 |
f3d0ff25e529a5521fde1d6e41d3118d6e37bf13 | 7,443 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1799.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1799.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1799.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r14
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xe01a, %r12
nop
nop
cmp $55037, %r13
movw $0x6162, (%r12)
nop
nop
nop
sub %r13, %r13
lea addresses_D_ht+0x107f4, %r14
nop
nop
and %rbp, %rbp
movw $0x6162, (%r14)
nop
nop
nop
xor %rbp, %rbp
lea addresses_WT_ht+0x4152, %rsi
add %r15, %r15
movl $0x61626364, (%rsi)
nop
nop
nop
nop
nop
cmp %r11, %r11
lea addresses_UC_ht+0xdd4a, %r12
nop
nop
nop
nop
add $11469, %r13
movb $0x61, (%r12)
nop
and %r14, %r14
lea addresses_WC_ht+0x27ea, %r13
nop
nop
nop
nop
nop
xor %r12, %r12
movw $0x6162, (%r13)
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_D_ht+0x33ea, %rsi
lea addresses_WT_ht+0x12c76, %rdi
nop
nop
nop
nop
cmp %r11, %r11
mov $112, %rcx
rep movsw
nop
nop
nop
nop
sub %rbp, %rbp
lea addresses_D_ht+0x1aa30, %rsi
nop
and %r11, %r11
movl $0x61626364, (%rsi)
nop
nop
and $63271, %rcx
lea addresses_D_ht+0x19506, %rsi
lea addresses_WT_ht+0x1a3ea, %rdi
nop
nop
sub %r11, %r11
mov $44, %rcx
rep movsq
nop
nop
nop
nop
nop
add %r15, %r15
lea addresses_D_ht+0xdc2a, %rcx
nop
cmp $54459, %r11
mov $0x6162636465666768, %r13
movq %r13, %xmm6
and $0xffffffffffffffc0, %rcx
movaps %xmm6, (%rcx)
nop
cmp %rcx, %rcx
lea addresses_WC_ht+0xd8aa, %rsi
nop
nop
and $1301, %r15
movb $0x61, (%rsi)
nop
nop
nop
nop
nop
xor %r12, %r12
lea addresses_A_ht+0x508a, %rsi
nop
nop
nop
nop
nop
cmp $27057, %r14
movb $0x61, (%rsi)
nop
nop
sub %r11, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r15
push %r8
push %r9
push %rbp
push %rbx
// Load
lea addresses_WT+0xa1ce, %r8
nop
nop
sub %rbx, %rbx
mov (%r8), %r11d
nop
sub $6304, %r11
// Load
lea addresses_D+0x118cf, %rbx
nop
nop
nop
add $55023, %r15
vmovups (%rbx), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %rbp
inc %rbx
// Load
lea addresses_WC+0xebea, %r11
clflush (%r11)
nop
nop
xor %r9, %r9
mov (%r11), %rbx
nop
nop
nop
cmp $2735, %r14
// Faulty Load
lea addresses_RW+0x4bea, %rbp
nop
nop
add $45955, %r15
vmovups (%rbp), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %r11
lea oracles, %r15
and $0xff, %r11
shlq $12, %r11
mov (%r15,%r11,1), %r11
pop %rbx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 9, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'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
*/
| 33.08 | 2,999 | 0.653097 |
63e42bf1cea7f7d717cc5bc75211cb096900e006 | 630 | asm | Assembly | oeis/051/A051744.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/051/A051744.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/051/A051744.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A051744: a(n) = n*(n+1)*(n^2+5*n+18)/24.
; 2,8,21,45,85,147,238,366,540,770,1067,1443,1911,2485,3180,4012,4998,6156,7505,9065,10857,12903,15226,17850,20800,24102,27783,31871,36395,41385,46872,52888,59466,66640,74445,82917,92093,102011,112710,124230,136612,149898,164131,179355,195615,212957,231428,251076,271950,294100,317577,342433,368721,396495,425810,456722,489288,523566,559615,597495,637267,678993,722736,768560,816530,866712,919173,973981,1031205,1090915,1153182,1218078,1285676,1356050,1429275,1505427,1584583,1666821,1752220,1840860
mov $1,$0
add $0,2
add $1,4
mov $2,$0
sub $0,2
bin $1,$0
bin $2,2
add $1,$2
mov $0,$1
| 48.461538 | 499 | 0.766667 |
00d5a64b4aa9a5afa0362fe6335645359058fa47 | 330 | asm | Assembly | data/maps/objects/LavenderMart.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | data/maps/objects/LavenderMart.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | data/maps/objects/LavenderMart.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | LavenderMart_Object:
db $0 ; border block
def_warps
warp 3, 7, 3, LAST_MAP
warp 4, 7, 3, LAST_MAP
def_signs
def_objects
object SPRITE_CLERK, 0, 5, STAY, RIGHT, 1 ; person
object SPRITE_BALDING_GUY, 3, 4, STAY, NONE, 2 ; person
object SPRITE_COOLTRAINER_M, 7, 2, STAY, NONE, 3 ; person
def_warps_to LAVENDER_MART
| 20.625 | 58 | 0.718182 |
3458f520881c3b732d4966722adaa183330dcce1 | 45,975 | asm | Assembly | Appl/Tools/Localize/Document/documentUtilities.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/Tools/Localize/Document/documentUtilities.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/Tools/Localize/Document/documentUtilities.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: ResEdit/Document
FILE: documentUtilities.asm
AUTHOR: Cassie Hartzog, Jan 20, 1993
ROUTINES:
Name Description
---- -----------
EXT GetFileHandle returns the document's file handle
(localization DB file)
EXT GetDisplayHandle returns the document's display handle
EXT DBLockMap_DS locks the map block to *ds:si
EXT DBLock_DS locks a DB item to *ds:si
EXT DBUnlock_DS unlocks the block in segment ds
EXT DBDirty_DS marks the block in ds as dirty
EXT EnumAllChunks enumerate all chunks, with callback
EXT DocumentGoToResourceChunkTarget
change to passed resource, chunk, target
INT DocumentTransferTarget moves the target between views
INT DocumentSetCurTarget gives target to current text target
EXT SendToContentObjects sends the passed message to the 2 contents
EXT FindResourceNumber
INT FindResourceCallback
EXT GetChunkBounds Returns the chunk top and bottom coordinates.
EXT IsChunkVisible Determines if a chunk is currently visible.
EXT IsChunkDirty Determines if a chunk is currently visible.
EXT IsSomethingSelected
EXT ResArrayElementToPtr Finds the nth element in the ResArray which
meets the current filter criteria.
EXT ResArrayPtrToElement Given an element pointer, return the relative
number given the filter criteria.
EXT ResMapGetArrayCount Get the count of chunks from the resource map
which meet the filter criteria.
EXT ResArrayGetCount
EXT ResMapElemenToPtr
EXT SetEditMenuState
EXT ShortcutToAscii
EXT AssertIsResEditDocument EC code to check for correct object type
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 1/20/93 Initial revision
DESCRIPTION:
Utility routines used in the Document module.
$Id: documentUtilities.asm,v 1.1 97/04/04 17:14:06 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentUtilitiesCode segment resource
;---
DocUtil_ObjMessage_stack proc near
ForceRef DocUtil_ObjMessage_stack
push di
mov di, mask MF_CALL or mask MF_STACK
call ObjMessage
pop di
ret
DocUtil_ObjMessage_stack endp
DocUtil_ObjMessage_send proc near
push di
mov di, mask MF_FIXUP_DS
call ObjMessage
pop di
ret
DocUtil_ObjMessage_send endp
DocUtil_ObjMessage_call proc near
push di
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
pop di
ret
DocUtil_ObjMessage_call endp
COMMENT @----------------------------------------------------------------------
FUNCTION: GetFileHandle
DESCRIPTION: Get the file handle from the instance data
CALLED BY: INTERNAL
PASS: *ds:si - document object
RETURN: bx - file handle
DESTROYED: none
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 3/ 9/92 Initial version
------------------------------------------------------------------------------@
GetFileHandle proc far
push si
mov si, ds:[si]
add si, ds:[si].Gen_offset
mov bx, ds:[si].GDI_fileHandle
pop si
ret
GetFileHandle endp
COMMENT @----------------------------------------------------------------------
FUNCTION: GetDisplayHandle
DESCRIPTION: Get the display handle from the instance data
CALLED BY: INTERNAL
PASS: *ds:si - document object
RETURN: bx - display handle
DESTROYED: none
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Cassie 10/ 9/92 Initial version
------------------------------------------------------------------------------@
GetDisplayHandle proc far
push si
mov si, ds:[si]
add si, ds:[si].Gen_offset
mov bx, ds:[si].GDI_display
pop si
ret
GetDisplayHandle endp
COMMENT @----------------------------------------------------------------------
FUNCTION: DBLockMap_DS
DESCRIPTION: Lock the map block to DS
CALLED BY: EXTERNAL - utility
PASS:
^hbx - file handle
RETURN:
*ds:si - map block (locked)
DESTROYED:
nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/ 9/92 Initial version
------------------------------------------------------------------------------@
DBLockMap_DS proc far uses es,di
.enter
call DBLockMap
segmov ds, es
mov si, di
.leave
ret
DBLockMap_DS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DBLock_DS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Lock a DB item into ds. If ax is passed as zero,
lock the map block.
CALLED BY: (EXTERNAL) utility
PASS: ax:di = DBItem to lock
bx = file handle
RETURN: *ds:si - name array
DESTROYED: nothing - flags preserved
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/ 7/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DBLock_DS proc far
uses ax, es, di
.enter
pushf
call DBLock
segmov ds, es
mov si, di
popf
.leave
ret
DBLock_DS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DBUnlock_DS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Unlock a db item whose segment is in ds
CALLED BY: (EXTERNAL) utility
PASS: ds - segment to unlock
RETURN: nothing
DESTROYED: nothing - flags preserved
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/ 7/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DBUnlock_DS proc far
push es
segmov es, ds
call DBUnlock
pop es
ret
DBUnlock_DS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DBDirty_DS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Mark the RE Dbitem as dirty
CALLED BY: (INTERNAL) utility
PASS: ds - segment of dbitem to mark dirty
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/ 7/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DBDirty_DS proc far
push es
segmov es, ds
call DBDirty
pop es
ret
DBDirty_DS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DerefElement
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find and lock the passed element number.
CALLED BY: EXTERNAL - Utility
PASS: *ds:si - document
ax - element number
RETURN: ds:di - ResourceArrayElement
cx - element size
DESTROYED:
PSEUDO CODE/STRATEGY:
Caller must unlock and dirty the element.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DerefElement proc far
uses bx,dx,si
.enter
EC < call AssertIsResEditDocument >
call GetFileHandle ;^hbx <- translation file
mov si, ds:[si]
add si, ds:[si].ResEditDocument_offset
push ax
mov dl, ds:[si].REDI_stateFilter
mov dh, ds:[si].REDI_typeFilter
mov ax, ds:[si].REDI_resourceGroup
mov di, ds:[si].REDI_resArrayItem
call DBLock_DS ;*ds:si = ResourceArray
pop ax
call ResArrayElementToPtr ; ds:di <- ResourceArrayElement
EC < ERROR_C CHUNK_ARRAY_ELEMENT_NOT_FOUND
.leave
ret
DerefElement endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EnumAllChunks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: For each resource, enumerate all its chunks.
CALLED BY: EXTERNAL - utility
PASS: *ds:si - document
ss:bp - EnumAllChunksStruct
passed to EACS_callback:
*ds:si - ResourceArray
ds:di - ResourceArrayElement
ss:bp - EnumAllChunksStruct
dx - file handle
cx - resource group
RETURN: carry set if enumeration was aborted
DESTROYED: bx,di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 2/ 5/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EnumAllChunks proc far
uses dx,si,bp
.enter
push ds:[LMBH_handle]
call GetFileHandle
mov dx, bx
call DBLockMap_DS ; *ds:si <- ResourceMap
mov bx, cs
mov di, offset EnumAllChunksCallback
call ChunkArrayEnum
call DBUnlock_DS
pop bx
call MemDerefDS
.leave
ret
EnumAllChunks endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EnumAllChunksCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enumerate the chunks this ResourceArray, calling
passed callback for each on.
CALLED BY: EnumAllChunks
PASS: *ds:si - ResourceMap
ds:di - ResourceMapElement
dx - file handle
ss:bp - EnumAllChunksStruct
RETURN: carry set to abort
ax - ErrorValue
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 2/ 5/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EnumAllChunksCallback proc far
uses cx, bp
.enter
push ds:[LMBH_handle]
mov bx, dx
mov ax, ds:[di].RME_data.RMD_group
mov di, ds:[di].RME_data.RMD_item
call DBLock_DS ; *ds:si <- ResourceArray
movdw bxdi, ss:[bp].EACS_callback
mov cx, ax ; cx <- group
call ChunkArrayEnum
call DBUnlock_DS
pop bx
call MemDerefDS
.leave
ret
EnumAllChunksCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DocumentChangeResourceList
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: User has selected a new resource from the ResourceList.
Go to that resource, and change to chunk 0 within it.
CALLED BY: MSG_RESEDIT_DOCUMENT_CHANGE_RESOURCE_LIST
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of ResEditDocumentClass
ax - the message
cx - resource number
RETURN: nothing
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 8/24/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentChangeResourceList method dynamic ResEditDocumentClass,
MSG_RESEDIT_DOCUMENT_CHANGE_RESOURCE_LIST
clr dx ; go to chunk 0
call DocumentChangeResourceAndChunk
ret
DocumentChangeResourceList endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DocumentChangeResourceAndChunk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Change to a given resource and chunk, without first
checking filters. Don't change target.
This will most normally be used when changing to the
next or previous resource, using it's chunk 0.
CALLED BY: MSG_RESEDIT_DOCUMENT_CHANGE_RESOURCE_AND_CHUNK
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of ResEditDocumentClass
ax - the message
cx - element # of resource
dx - element # of chunk
RETURN: carry set if resource or chunk changed
DESTROYED: bx,cx,dx,bp,si,di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 8/23/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentChangeResourceAndChunk method ResEditDocumentClass,
MSG_RESEDIT_DOCUMENT_CHANGE_RESOURCE_AND_CHUNK
uses ax,si
.enter
cmp cx, ds:[di].REDI_curResource
jne changeResource
cmp dx, ds:[di].REDI_curChunk
clc
je done
mov cx, dx
jmp changeChunk
changeResource:
push dx
mov ax, MSG_RESEDIT_DOCUMENT_CHANGE_RESOURCE
call ObjCallInstanceNoLock
pop cx
changeChunk:
mov ax, MSG_RESEDIT_DOCUMENT_CHANGE_CHUNK
call ObjCallInstanceNoLock
stc
done:
.leave
ret
DocumentChangeResourceAndChunk endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DocumentGoToResourceChunkTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Change to a specific resource, chunk, target.
The chunk number is absolute, i.e. number in
the ResourceArray, without any filters applied.
CALLED BY: (EXTERNAL) UTILITY
PASS: *ds:si - document
al - target
cx - element # of resource
dx - element # of chunk
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 2/ 5/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentGoToResourceChunkTarget proc far
uses ax,bx,cx,dx,di,bp,es
.enter
DerefDoc
segmov es, ds
mov bl, es:[di].REDI_typeFilter
mov bh, es:[di].REDI_stateFilter
; Check to see if the desired chunk is visible with
; the current filters.
;
push ax, cx, dx, si, di, ds
mov ax, cx ;ax <- resource number
push bx ;save the filters
call GetFileHandle
call DBLockMap_DS
call ChunkArrayElementToPtr ;ds:di <- ResMapElement
mov ax, ds:[di].RME_data.RMD_group
mov di, ds:[di].RME_data.RMD_item
call DBUnlock_DS
call DBLock_DS ;*ds:si <- ResArray
mov ax, dx ;ax <- chunk number
call ChunkArrayElementToPtr ;ds:di <- ResArrayElement
pop dx ;restore the filters
call ResArrayPtrToElement
mov bp, ax ;bp <- relative element number
call DBUnlock_DS
pop ax, cx, dx, si, di, ds
cmp bp, -1
jne chunkPassesFilters
mov bp, dx
; Turn off all filters in case the chunk we are supposed
; to change to is currently filtered out.
;
push cx
clr cl
mov ax, MSG_RESEDIT_DOCUMENT_SET_STATE_FILTER_LIST_STATE
call ObjCallInstanceNoLock
clr cl
mov ax, MSG_RESEDIT_DOCUMENT_SET_TYPE_FILTER_LIST_STATE
call ObjCallInstanceNoLock
pop cx
chunkPassesFilters:
mov dx, bp ;dx <- relative elmt number
;
; Take the target from the current View to the View which has
; the match. This has to be done before the resource or chunk
; is changed, or the text object won't get the target.
;
call DocumentTransferTarget
; Set REDI_newTarget so CHANGE_RESOURCE and CHANGE_CHUNK
; know which text object to give the target to.
;
mov ds:[di].REDI_newTarget, al
call ObjMarkDirty
call DocumentChangeResourceAndChunk
jc targetIsAlreadySet
call DocumentSetCurTarget
targetIsAlreadySet:
call SetEditMenuState
.leave
ret
DocumentGoToResourceChunkTarget endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DocumentTransferTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: If changing the source type, need to give the new view
the target and focus exclusives so that when the chunk
is changed, the text object will get the target.
CALLED BY: DocumentGoToResourceChunkTarget
PASS: ds:di - document instance data
al - new target
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 1/25/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentTransferTarget proc near
uses ax,bx,cx,dx,si,di,bp
.enter
; match was found in same source, so we're okay.
;
cmp al, ds:[di].REDI_curTarget
je done
cmp ds:[di].REDI_chunkType, mask CT_TEXT
jz notText
; We have to unselect everything here in case only the source type
; is changing. (If chunk changes, it would get unselected there.)
;
movdw bxsi, ds:[di].REDI_editText
cmp ds:[di].REDI_curTarget, ST_TRANSLATION
je $10
mov si, offset OrigText
$10:
push ax
mov ax, MSG_VIS_TEXT_SELECT_END
call DocUtil_ObjMessage_send
pop ax
notText:
; grab the target and focus for the new source's view
;
mov si, offset RightView
cmp al, ST_TRANSLATION
je $20
mov si, offset LeftView
$20:
mov bx, ds:[di].GDI_display
mov ax, MSG_META_GRAB_TARGET_EXCL
call DocUtil_ObjMessage_send
mov ax, MSG_META_GRAB_FOCUS_EXCL
call DocUtil_ObjMessage_send
done:
.leave
ret
DocumentTransferTarget endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DocumentSetCurTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Only the source type has changed. Give the target
and focus to the correct text object.
CALLED BY: DocumentGoToResourceChunkTarget
PASS: ds:di - document
al - new target
RETURN: nothing
DESTROYED: ax,bx,cx,dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentSetCurTarget proc near
uses si,di,bp
.enter
cmp al, ds:[di].REDI_curTarget
je done
mov ds:[di].REDI_curTarget, al ;save new curTarget
call ObjMarkDirty
test ds:[di].REDI_chunkType, mask CT_TEXT
jz done
; grab the target for the correct text object
;
movdw bxsi, ds:[di].REDI_editText
cmp al, ST_TRANSLATION
je $30
mov si, offset OrigText
$30:
mov ax, MSG_META_GRAB_TARGET_EXCL
clr di
call ObjMessage
mov ax, MSG_META_GRAB_FOCUS_EXCL
clr di
call ObjMessage
done:
.leave
ret
DocumentSetCurTarget endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SendToContentObjects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sends the passed message to both content objects.
CALLED BY:
PASS: *ds:si = document
ax = message
cx,dx,bp = data passed by calling routine
RETURN: nothing
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Send to the TransView (document object) first, so that
it will receive draw messages first. This is important, for
the SourceView clears the DS_CHANGING_RESOURCE flag, and this flag
should not be cleared until both source and trans have called
VisDrawCommon first, which tests this flag.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SendToContentObjects proc far
uses cx,dx,bx,si,bp
.enter
; Send to the Document object (me)
;
push ax, cx, dx, bp
mov bx, ds:[LMBH_handle]
call DocUtil_ObjMessage_send
pop ax, cx, dx, bp
; Send to the Content object
;
DerefDoc
mov bx, ds:[di].REDI_editText.handle
mov si, offset OrigContent
call DocUtil_ObjMessage_send
.leave
ret
SendToContentObjects endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetChunkBounds
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Return the top and bottom coordinates of the element.
CALLED BY: MakeChunkVisible
PASS: *ds:si = document
ax = chunk number
RETURN: cx, dx = top and bottom
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/16/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetChunkBounds proc far
uses ax,bx,si,di,es
.enter
DerefDoc
EC < cmp ax, ds:[di].REDI_numChunks >
EC < ERROR_AE INVALID_CHUNK_NUMBER >
push ax
mov bx, ds:[di].REDI_posArray
call MemLock
EC < ERROR_C RESEDIT_POSARRAY_CORRUPT >
mov es, ax
pop ax ;ax <- element number
mov si, size PosElement
mul si
mov si, ax
mov cx, es:[si].PE_top
mov dx, cx
add dx, es:[si].PE_height
add dx, (SELECT_LINE_WIDTH*2)
;dec dx?
call MemUnlock
.leave
ret
GetChunkBounds endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetMinMaxValues
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the localization min/max values.
CALLED BY: SetCurrentInfo
PASS: ds:di - document
^lbx - file handle
RETURN: cx - min value
dx - max value
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 2/18/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetMinMaxValues proc far
uses ax, bx, si, di, ds
.enter
mov cx, ds:[di].REDI_curChunk
cmp cx, PA_NULL_ELEMENT
je noElement
mov dl, ds:[di].REDI_stateFilter
mov dh, ds:[di].REDI_typeFilter
mov ax, ds:[di].REDI_resourceGroup
mov di, ds:[di].REDI_resArrayItem
call DBLock_DS
mov ax, cx
call ResArrayElementToPtr
EC < ERROR_C CHUNK_ARRAY_ELEMENT_NOT_FOUND >
mov cx, ds:[di].RAE_data.RAD_minSize
mov dx, ds:[di].RAE_data.RAD_maxSize
call DBUnlock_DS
done:
.leave
ret
noElement:
clr cx, dx
jmp done
GetMinMaxValues endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
IsChunkVisible
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Need to know whether the passed chunk is visible in
the current view window.
CALLED BY: INTERNAL
PASS: *ds:si = document
ax = chunk number
RETURN: cl = VisibilityType
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
IsChunkVisible proc far
uses ax, bx, dx, di
origin local PointDWord
.enter
DerefDoc
EC < cmp ax, ds:[di].REDI_numChunks >
EC < ERROR_AE INVALID_CHUNK_NUMBER >
mov dx, ds:[di].REDI_viewHeight
push dx ;save view height
push ax ;save element number
push bp, si
mov bx, ds:[di].GDI_display
mov si, offset RightView
mov cx, ss
lea dx, ss:[origin]
mov ax, MSG_GEN_VIEW_GET_ORIGIN
call DocUtil_ObjMessage_call
pop bp, si
pop ax ;ax <- element number
pop bx ;bx <- view height
call GetChunkBounds ;cx <-top, dx <-bottom
mov ax, origin.PD_y.low ;ax <- doc top
add bx, ax ;bx <- doc bottom
; check if chunk is entirely out of the visible bounds
cmp dx, ax ;if bottom before vis
jb notVisible ; region, not visible
cmp cx, bx ;if chunk top is after
ja notVisible ; visible region, done
; since chunk top <= vis region bottom and chunk bottom >=
; vis region top, if chunk top < vis region bottom, chunk bottom
; must be in the vis region ==> it is partly visible
cmp cx, ax ;
jb partVisible
; similarly, since chunk top has now been placed in the vis region,
; if chunk bottom > vis region bottom, chunk is only partly visible
cmp dx, bx
ja partVisible
mov cl, VT_ALL_VISIBLE
done:
.leave
ret
notVisible:
mov cl, VT_NOT_VISIBLE
jmp done
partVisible:
mov cl, VT_PART_VISIBLE
jmp done
IsChunkVisible endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DocumentInvalidateChunk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Invalidate a single element so that is is redrawn.
CALLED BY: EXTERNAL - utility
PASS: *ds:si - document
ax - element number
RETURN: nothing
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DocumentInvalidateChunk proc far
uses cx,dx,di,bp
.enter
DerefDoc
; get the top and bottom boundaries of this element
;
call GetChunkBounds ; cx <- top, dx <- bottom
; invalidate the portion of the document that contains this
; keyboard shortcut's text.
;
sub sp, size VisAddRectParams
mov bp, sp
clr ss:[bp].VARP_flags
mov ss:[bp].VARP_bounds.R_top, cx
mov ss:[bp].VARP_bounds.R_bottom, dx
mov ss:[bp].VARP_bounds.R_left, 0
mov ax, ds:[di].REDI_viewWidth
mov ss:[bp].VARP_bounds.R_right, ax
mov dx, size VisAddRectParams
mov ax, MSG_VIS_ADD_RECT_TO_UPDATE_REGION
call ObjCallInstanceNoLock
add sp, size VisAddRectParams
.leave
ret
DocumentInvalidateChunk endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FindResourceNumber
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the ResourceMapElement whose number matches value passed.
CALLED BY: EXTERNAL
PASS: *ds:si - ResourceMap
ax - resource number to look for
RETURN: carry clear if successful
ds:di - ResourceMapElement
carry set if not found
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 12/ 2/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FindResourceNumber proc far
uses ax,bx,cx
.enter
mov cx, ax
mov bx, cs
mov di, offset FindResourceNumberCallback
call ChunkArrayEnum ;ax <- element number
jnc notFound
EC < call ChunkArrayGetCount >
EC < cmp ax, cx >
EC < ERROR_GE CHUNK_ARRAY_ELEMENT_NOT_FOUND >
call ChunkArrayElementToPtr
stc
notFound:
cmc
.leave
ret
FindResourceNumber endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FindResourceNumberCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Does this ResourceMapElement have the number I'm looking for?
CALLED BY: FindResourceNumber (via ChunkArrayEnum)
PASS: *ds:si - ResourceMap
ds:di - ResourceMapElement
cx - number to look for
RETURN: carry set if this element has the number I'm looking for
ax - element number
carry clear if no match, to continue enumeration
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 12/ 2/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FindResourceNumberCallback proc far
.enter
cmp cx, ds:[di].RME_data.RMD_number
clc
jne continue
call ChunkArrayPtrToElement
stc
continue:
.leave
ret
FindResourceNumberCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FindChunkNumber
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the ResourceMapElement whose number matches value passed.
CALLED BY: EXTERNAL
PASS: *ds:si - ResourceArray
ax - chunk number to look for
RETURN: carry clear if successful
ds:di - ResourceArrayElement
carry set if not found
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 12/ 2/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FindChunkNumber proc far
uses ax,bx,cx
.enter
mov cx, ax
mov bx, cs
mov di, offset FindChunkNumberCallback
call ChunkArrayEnum ;ax <- element number
jnc notFound
EC < call ChunkArrayGetCount >
EC < cmp ax, cx >
EC < ERROR_GE CHUNK_ARRAY_ELEMENT_NOT_FOUND >
call ChunkArrayElementToPtr
stc
notFound:
cmc
.leave
ret
FindChunkNumber endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FindChunkNumberCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Does this ResourceMapElement have the number I'm looking for?
CALLED BY: FindChunkNumber (via ChunkArrayEnum)
PASS: *ds:si - ResourceArray
ds:di - ResourceArrayElement
cx - number to look for
RETURN: carry set if this element has the number I'm looking for
ax - element number
carry clear if no match, to continue enumeration
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 12/ 2/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FindChunkNumberCallback proc far
.enter
cmp cx, ds:[di].RAE_data.RAD_number
clc
jne continue
call ChunkArrayPtrToElement
stc
continue:
.leave
ret
FindChunkNumberCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResMapGetArrayCount
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns number of elements in this ResourceMap's ResourceArray
which meet the current filter criteria.
CALLED BY: (EXTERNAL) UTILITY
PASS: *ds:si - ResourceMap
ds:di - ResourceMapElement
^hbx - file handle
dl - ChunkState filters
dh - ChunkType filters
RETURN: cx - count
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 1/ 4/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ResMapGetArrayCount proc far
uses ax,bx,si,di,bp,ds
.enter
mov ax, ds:[di].RME_data.RMD_group
mov di, ds:[di].RME_data.RMD_item
call DBLock_DS ;*ds:si <- ResArray
call ChunkArrayGetCount ;cx <- total elements
clr bp ;no matches yet
mov bx, cs
mov di, offset ResArrayElementToPtrCallback
call ChunkArrayEnum ;bp <- # matches
mov cx, bp
call DBUnlock_DS
.leave
ret
ResMapGetArrayCount endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResArrayGetCount
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Return the number of chunks meeting the filter criteria
in this ResourceArray.
CALLED BY: (EXTERNAL) Utility
PASS: *ds:si - ResourceArray
dh - ChunkType filter
dl - ChunkState filter
RETURN: cx - count
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 1/28/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ResArrayGetCount proc far
uses ax,bx,di,bp
.enter
call ChunkArrayGetCount ;cx <- total elements
clr bp ;no matches yet
mov bx, cs
mov di, offset ResArrayElementToPtrCallback
call ChunkArrayEnum ;bp <- # matches
mov cx, bp
.leave
ret
ResArrayGetCount endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResArrayElementToPtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the nth element in the ResourceArray which meets
the filter criteria, stored in REDI_filters
CALLED BY: EXTERNAL - utility routine
PASS: *ds:si - ResourceArray
ax - element number
dl - ChunkState
dh - ChunkType
RETURN: ds:di - ResourceArrayElement
cx - element size
carry set if not found
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ResArrayElementToPtr proc far
uses ax,bx,dx,bp
.enter
mov bx, cs
mov di, offset ResArrayElementToPtrCallback
inc ax
mov cx, ax ;cx <- cardinal number
clr bp ; no matches found yet
call ChunkArrayEnum ;ax <- element number
cmc
jc done
call ChunkArrayElementToPtr ;ds:di <- element, cx <- size
clc
done:
.leave
ret
ResArrayElementToPtr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResArrayElementToPtrCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the nth element which matches the filter criteria.
CALLED BY: ResArrayElemenToPtr (via ChunkArrayEnum)
PASS: *ds:si - ResoruceArray
ds:di - ResourceArrayElement
dl - ChunkState
dh - ChunkType
cx - element number to find
bp - number of matches so far
RETURN: bp - number of matches
ax - real element number of matching element
carry set if match found
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ResArrayElementToPtrCallback proc far
mov ax, dx
call FilterElement ;carry set if passes filters
jnc done
;
; this element meets the ChunkType and ChunkState filter criteria
; but is it the element number we're looking for?
;
inc bp
call ChunkArrayPtrToElement ;ax <- element number
cmp cx, bp
stc
je done
clc
ret
done:
ret
ResArrayElementToPtrCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResMapElementToPtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the nth element in the ResourceMeap which meets
the filter criteria, stored in REDI_filters
CALLED BY: EXTERNAL - utility routine
PASS: *ds:si - ResourceMapArray
ax - element number
dx - filters
RETURN: ds:di - ResourceMapElement
carry set if not found
DESTROYED: dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ResMapElementToPtr proc far
ForceRef ResMapElementToPtr
uses ax,bx,cx,di,bp
.enter
mov bx, cs
mov di, offset ResMapElementToPtrCallback
mov cx, ax
clr bp ; no matches found yet
call ChunkArrayEnum
clr di
jnc notFound
mov di, ax
notFound:
cmc
.leave
ret
ResMapElementToPtr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResMapElementToPtrCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the nth element which matches the filter criteria.
CALLED BY: ResMapElemenToPtr (via ChunkArrayEnum)
PASS: *ds:si - ResoruceMap
ds:di - ResourceMapElement
dl - ResourceType
cx - element number to find
bp - number of matches so far
RETURN: bp - number of matches
ds:ax - ptr to matching element
carry set if match found
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ResMapElementToPtrCallback proc far
test ds:[di].RME_data.RMD_resourceType, dl
clc
jz done
mov ax, di
cmp cx, bp
stc
je done
inc bp
clc
done:
ret
ResMapElementToPtrCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResArrayPtrToElement
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the relative element number of this element,
given the filter criteria
CALLED BY: EXTERNAL - utility routine
PASS: *ds:si - ResourceArray
ds:di - ResourceArrayElement
dl - ChunkState
dh - ChunkType
RETURN: ax - relative element number,
or -1 if doesn't meet filter criteria
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/17/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ResArrayPtrToElement proc far
uses bx,dx,bp
ForceRef ResArrayPtrToElement
.enter
mov bp, ds:[di].RAE_data.RAD_number ;bp <- chunk number to look for
call ChunkArrayGetCount ;cx <- total # of elements
clr ax, bx
nextElement:
push ax, cx
call ChunkArrayElementToPtr ;ds:di <- next element
mov ax, dx ;ax <- filters
call FilterElement ;does it pass filters?
jnc gotoNext ;no, skip it
inc bx ;bx <- relative element #
cmp bp, ds:[di].RAE_data.RAD_number ;is this the one we want?
gotoNext:
pop ax, cx
je foundIt ;yes!
inc ax
loop nextElement
stc
done:
pushf
dec bx
mov ax, bx
popf
.leave
ret
foundIt:
clc
jmp done
ResArrayPtrToElement endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FilterElement
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if this element meets filter criteria.
CALLED BY: (INTERNAL) RecalcChunkPosCallback, VisDrawCallback
PASS: ax - filters
ds:di - ResourceArrayElement
RETURN: carry set if element meets filter criteria
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 1/ 4/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FilterElement proc far
tst al
jz noStateFilter
;
; if this does not have the correct state, don't count it
;
cmp ds:[di].RAE_data.RAD_chunkState, al
jne fail
noStateFilter:
;
; if there is no type filter, all types are okay
;
tst ah
jz noTypeFilter
;
; If the filter and this chunkType have one or more
; bits in common, don't count this element
;
test ds:[di].RAE_data.RAD_chunkType, ah
jnz fail
noTypeFilter:
stc
ret
fail:
clc
ret
FilterElement endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MarkBusyAndHoldUpInput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: A lengthy operation is about to commence, so mark
the application busy and hold up input.
CALLED BY: (UTILITY)
PASS: nothign
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 2/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MarkBusyAndHoldUpInput proc far
uses ax,bx,cx,dx,si,di,bp
.enter
GetResourceHandleNS ResEditApp, bx
mov si, offset ResEditApp
mov ax, MSG_GEN_APPLICATION_MARK_BUSY
clr di
call ObjMessage
GetResourceHandleNS ResEditApp, bx
mov si, offset ResEditApp
mov ax, MSG_GEN_APPLICATION_HOLD_UP_INPUT
clr di
call ObjMessage
.leave
ret
MarkBusyAndHoldUpInput endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MarkNotBusyAndResumeInput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: A lengthy operation has completed, so mark
the application not busy and resume input.
CALLED BY: (UTILITY)
PASS: nothign
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 2/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MarkNotBusyAndResumeInput proc far
uses ax,bx,cx,dx,si,di,bp
.enter
GetResourceHandleNS ResEditApp, bx
mov si, offset ResEditApp
mov ax, MSG_GEN_APPLICATION_MARK_NOT_BUSY
clr di
call ObjMessage
GetResourceHandleNS ResEditApp, bx
mov si, offset ResEditApp
mov ax, MSG_GEN_APPLICATION_RESUME_INPUT
clr di
call ObjMessage
.leave
ret
MarkNotBusyAndResumeInput endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShortcutToAscii
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Convert a KeyboardShortcut to its Ascii equivalent,
in the form of: (Physical Alt Ctrl g) or (Physical Ctrl >).
CALLED BY: EXTERNAL
PASS: es:di - buffer to copy text to
ax - KeyboardShortcut
RETURN: cx - string length (including null)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KeyboardShortcut record
KS_PHYSICAL:1 ;TRUE: match key, not character
KS_ALT:1 ;TRUE: <ALT> must be pressed
KS_CTRL:1 ;TRUE: <CTRL> must be pressed
KS_SHIFT:1 ;TRUE: <SHIFT> must be pressed
KS_CHAR_SET:4 ;lower four bits of CharacterSet
KS_CHAR Chars:8 ;character itself (Char or VChar)
KeyboardShorcut end
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 5/28/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShortcutToAscii proc far
uses ax,bx,si,di,ds
.enter
push di
mov cx, ax
GetResourceHandleNS StringsUI, bx
call MemLock
mov ds, ax
tst cx
jz noShortcut
LocalLoadChar ax, '('
LocalPutChar esdi, ax
test cx, mask KS_PHYSICAL
jz noPhysical
mov si, offset physicalString
mov si, ds:[si]
LocalCopyString
SBCS < mov {byte}es:[di-1], 20h ; replace NULL with space >
DBCS < mov {wchar}es:[di-2], 20h >
noPhysical:
test cx, mask KS_ALT
jz noAlt
mov si, offset altString
mov si, ds:[si]
LocalCopyString
SBCS < mov {byte}es:[di-1], 20h ; replace NULL with space >
DBCS < mov {wchar}es:[di-2], 20h >
noAlt:
test cx, mask KS_CTRL
jz noCtrl
mov si, offset ctrlString
mov si, ds:[si]
LocalCopyString
SBCS < mov {byte}es:[di-1], 20h ; replace NULL with space >
DBCS < mov {wchar}es:[di-2], 20h >
noCtrl:
test cx, mask KS_SHIFT
jz noShift
mov si, offset shiftString
mov si, ds:[si]
LocalCopyString
SBCS < mov {byte}es:[di-1], 20h ; replace NULL with space >
DBCS < mov {wchar}es:[di-2], 20h >
noShift:
SBCS < mov al, cl ; al <- shortcut char >
DBCS < mov ax, cx >
DBCS < andnf ax, 0x0fff ; top nibble used for flags >
LocalPutChar esdi, ax
LocalLoadChar ax, ')'
stuffIt:
LocalPutChar esdi, ax
SBCS < mov {byte}es:[di], 0 ; store the NULL >
DBCS < mov {wchar}es:[di], 0 ; store the NULL >
pop si ; es:si <- first char in string
mov cx, di
sub cx, si ; cx <- string size
DBCS < shr cx, 1 ; cx <- string length >
inc cx ; add 1 for the NULL
call MemUnlock
.leave
ret
noShortcut:
LocalLoadChar ax, ' '
jmp stuffIt
ShortcutToAscii endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[ok?] CheckIfEditableShortcut
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check if the keyboard shortcut for this object is
editable (contains and ascii character).
CALLED BY: INTERNAL (DocumentEnableKbdShortcut)
PASS: ax - KeyboardShortcut
RETURN: carry set if not editable
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
In DBCS,
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 5/17/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckIfEditableShortcut proc far
push ax
if DBCS_PCGEOS
andnf ah, 0x0f ; if this nibble is 'e', it is
cmp ah, 0x0e ; unprintable -- see definition
CheckHack < CS_CONTROL_HB eq 0xee >
clc
jnz done ; of KeyboardShortcut for DBCS
stc
else
andnf ax, mask KS_CHAR_SET ; ax <- character set
tst ax ; is it in printable Chars?
CheckHack < CS_BSW eq 0 >
clc
jz done
stc
endif
done:
pop ax
ret
CheckIfEditableShortcut endp
;============================================================================
; EC code
;============================================================================
if ERROR_CHECK
COMMENT @----------------------------------------------------------------------
FUNCTION: AssertIsResEditDocument
DESCRIPTION: Assert the *ds:si is a ResEditDocumentClass object
CALLED BY: INTERNAL
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/19/92 Initial version
------------------------------------------------------------------------------@
AssertIsResEditDocument proc far uses di, es
.enter
pushf
GetResourceSegmentNS ResEditDocumentClass, es
mov di, offset ResEditDocumentClass
call ObjIsObjectInClass
ERROR_NC OBJECT_NOT_A_RESEDIT_DOCUMENT
popf
.leave
ret
AssertIsResEditDocument endp
endif
DocumentUtilitiesCode ends
| 23.870717 | 80 | 0.573703 |
6bd0c8e26d56e06594ad307e988064d8a1e0ac12 | 115 | asm | Assembly | General/Sprites/Shields/Anim - Shield S2.asm | NatsumiFox/AMPS-Sonic-3-Knuckles | af951b39f0ca103a905d7492448ac5245a2e8104 | [
"Apache-2.0"
] | 5 | 2021-07-09T08:17:56.000Z | 2022-02-27T19:57:47.000Z | General/Sprites/Shields/Anim - Shield S2.asm | NatsumiFox/AMPS-Sonic-3-Knuckles | af951b39f0ca103a905d7492448ac5245a2e8104 | [
"Apache-2.0"
] | null | null | null | General/Sprites/Shields/Anim - Shield S2.asm | NatsumiFox/AMPS-Sonic-3-Knuckles | af951b39f0ca103a905d7492448ac5245a2e8104 | [
"Apache-2.0"
] | null | null | null | dc.w byte_177B6-Ani_Shield_S2
byte_177B6: dc.b 0, 5, 0, 5, 1, 5, 2, 5, 3, 5, 4, $FF
even | 38.333333 | 76 | 0.486957 |
a786d413eb2ad461d6c8db30ca07e47fbb2004f7 | 392 | asm | Assembly | src/test/resources/data/generationtests/asmsx-phase-expected.asm | cpcitor/mdlz80optimizer | 75070d984e1f08474e6d397c7e0eb66d8be0c432 | [
"Apache-2.0"
] | 36 | 2020-06-29T06:52:26.000Z | 2022-02-10T19:41:58.000Z | src/test/resources/data/generationtests/asmsx-phase-expected.asm | cpcitor/mdlz80optimizer | 75070d984e1f08474e6d397c7e0eb66d8be0c432 | [
"Apache-2.0"
] | 39 | 2020-07-02T18:19:34.000Z | 2022-03-27T18:08:54.000Z | src/test/resources/data/generationtests/asmsx-phase-expected.asm | cpcitor/mdlz80optimizer | 75070d984e1f08474e6d397c7e0eb66d8be0c432 | [
"Apache-2.0"
] | 7 | 2020-07-02T06:00:05.000Z | 2021-11-28T17:31:13.000Z | ; Test to check the behavior of phase/dephase
org #4000
db "AB", loop % 256, loop / 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
loop:
jr loop
__asmsx_phase_pre_1: org #c000
__asmsx_phase_post_1:
method1:
call method2
ret
method2:
ret
__asmsx_dephase_1: org __asmsx_phase_pre_1 + (__asmsx_dephase_1 - __asmsx_phase_post_1)
method3:
call method4
ret
method4:
ret
ds #6000 - $, 0
| 19.6 | 90 | 0.69898 |
50eb516ff7f9dea7512cb1e9b4855b7b202d6bc1 | 127,105 | asm | Assembly | Library/Text/TextLine/tlCommonCalc.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Text/TextLine/tlCommonCalc.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Text/TextLine/tlCommonCalc.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: tlCommonCalc.asm
AUTHOR: John Wedgwood, Jan 8, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
John 1/ 8/92 Initial revision
DESCRIPTION:
Common calculation code.
$Id: tlCommonCalc.asm,v 1.1 97/04/07 11:21:07 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextLineCalc segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CommonLineCalculate
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Calculate a line.
CALLED BY: SmallLineCalculate, LargeLineCalculate
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars set
es:di = Pointer to the line
cx = Size of current line/field data
ax = LineFlags for current line
RETURN: LICL_range.VTR_start = start of next line
LICL_calcFlags updated
Line marked as needing redraw if it changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CommonLineCalculate proc far
uses bx, cx, dx
.enter
;
; Allocate the stack frame for the kernel.
;
sub sp, size TOC_vars ; Make space on the stack
mov bx, sp ; ss:bx = kernel stack frame
;
; Mark that the field does not contain any extended styles (so far)
;
mov ss:[bp].LICL_extStylePos, -1
;
; Save new line flags
;
mov ss:[bx].TOCV_ext.TOCE_lineFlags, ax
;
; Get started
;
andnf ss:[bp].LICL_calcFlags, not mask CF_LINE_CHANGED
mov ss:[bx].TOCV_ext.TOCE_otherFlags, mask TOCOF_IS_FIRST_FIELD
;
; set TOCOF_WRAP_AFTER_OVERFLOW if HINT_VIS_TEXT_WRAP_AFTER_OVERFLOW
;
push ax
push bx
mov ax, ATTR_VIS_TEXT_WRAP_AFTER_OVERFLOW
call ObjVarFindData
mov ax, bx
pop bx
jnc noOverflow
push si
mov si, ax
VarDataSizePtr ds, si, ax ; if no width, store 0 as width
tst ax
jz haveWidth
mov ax, ds:[si] ; get specified width
haveWidth:
pop si
ornf ss:[bx].TOCV_ext.TOCE_otherFlags, mask TOCOF_WRAP_AFTER_OVERFLOW
mov ss:[bx].TOCV_ext.TOCE_wrapAfterOverflowWidth, ax
noOverflow:
pop ax
clrwbf ss:[bx].TOCV_ext.TOCE_lineHeight
clrwbf ss:[bx].TOCV_ext.TOCE_lineBLO
movdw ss:[bp].LICL_lineStart, ss:[bp].LICL_range.VTR_start, ax
movwbf ss:[bp].LICL_oldLineHeight, es:[di].LI_hgt, ax
add cx, di ; cx <- ptr past field data
lea dx, es:[di].LI_firstField ; es:dx <- first field
;-----------------------------------------------------------------------------
fieldLoop:
;
; *ds:si= Instance ptr
; ss:bp = LICL_vars
; ss:bx = TOC_vars
; es:di = Pointer to the line
; cx = Pointer past the line/field data
; es:dx = Pointer to the current field
;
; We need to save the instance pointer each time through because adding
; fields may cause the object block to move on the heap.
;
movdw ss:[bp].LICL_object, dssi ; Save instance ptr
mov ss:[bp].LICL_tabReference, RULER_TAB_TO_LINE_LEFT
call FindFieldEnd ; Calculate this one field
LONG jnc removeField ; Branch if no field
call CalcFieldPosition ; Set FI_position
call SaveNewFieldValues ; Set the rest of it
;
; Set the start of the next field.
;
mov ax, ss:[bx].TOCV_ext.TOCE_nChars
add ss:[bp].LICL_range.VTR_start.low, ax
adc ss:[bp].LICL_range.VTR_start.high, 0
;
; Check for more fields after the current one.
;
test ss:[bx].TOCV_ext.TOCE_flags, mask TOCF_LINE_TERMINATED
jnz endLoop ; Branch if line terminated
;
; Make space for the next field
;
add dx, size FieldInfo ; es:dx <- ptr to next field
call AddFieldToLine ; Make a new field
and ss:[bx].TOCV_ext.TOCE_otherFlags, not mask TOCOF_IS_FIRST_FIELD
jmp fieldLoop ; Loop to compute it
;-----------------------------------------------------------------------------
endLoop:
;
; *ds:si= Instance ptr
; ss:bp = LICL_vars
; ss:bx = TOC_vars
; es:di = Line
; es:dx = Pointer to the last field we want to keep
; cx = Size of current line/field data
;
call TruncateLineAtPosition ; Truncate the line/field data
;
; Adjust the line height and baseline offset for stuff like
; extra leading, line spacing, borders, etc...
;
; We need to copy the line-flags so that the border code will know
; what borders are appropriate.
;
mov ax, ss:[bx].TOCV_ext.TOCE_lineFlags
mov ss:[bp].LICL_lineFlags, ax
call AdjustLineHeight
;
; All the previous calculations have been done assuming that the line
; is left justified. This routine will adjust the field positions
; (and possibly the width of the last field) to account for left, center,
; right, or full justification.
;
call HandleJustification
;
; Copy the old line-flags into the stack frame so our caller knows
; what changed.
;
mov ax, es:[di].LI_flags
mov ss:[bp].LICL_oldLineFlags, ax
;
; Check to see if we need to draw the line.
;
call CheckForceDraw
;
; If the line is the first one in the region, then it can never
; interact with the line above it.
;
cmpdw ss:[bp].LICL_line, ss:[bp].LICL_regionTopLine, ax
jne flagsOK
and ss:[bx].TOCV_ext.TOCE_lineFlags, not (mask LF_INTERACTS_ABOVE)
flagsOK:
;
; Save the new LineInfo values.
;
call SaveNewLineValues
;
; Copy the final line-flags into the LICL_vars so that our caller
; knows what went on.
;
mov ax, es:[di].LI_flags
mov ss:[bp].LICL_lineFlags, ax
;
; Save the line-height.
;
movwbf dxah, ss:[bx].TOCV_ext.TOCE_lineHeight
movwbf ss:[bp].LICL_lineHeight, dxah
;
; Adjust the line-end to include any adjustment due to justification.
;
mov ax, es:[di].LI_adjustment
add ss:[bp].LICL_lineEnd, ax
mov ax, ss:[bp].LICL_lineJustEnd
add ax, es:[di].LI_adjustment
call SaveNewLineEnd
add sp, size TOC_vars ; Restore stack
;
; Save the new character count
;
movdw dxax, ss:[bp].LICL_range.VTR_start
subdw dxax, ss:[bp].LICL_lineStart ; dx.ax <- # of characters
call SaveNewLineCharCount ; Save new count
;
; Check for a dirty line and call the callback if we find one.
;
test ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED or \
mask CF_FORCE_CHANGED
jz noChange
or es:[di].LI_flags, mask LF_NEEDS_DRAW
if ERROR_CHECK
;
; If not vfptr check if the segment passed is same as current
; code segment. Since it is allowed to pass a fptr to the
; callback if you are calling from the same segment.
;
FXIP< push ax, bx >
FXIP< mov ax, ss:[bp].LICL_dirtyLineCallback.segment >
FXIP< cmp ah, 0xf0 >
FXIP< jae isVirtual >
FXIP< mov bx, cs
FXIP< cmp ax, bx >
FXIP< ERROR_NE TEXT_FAR_POINTER_TO_MOVABLE_XIP_RESORCE >
FXIP<isVirtual: >
FXIP< pop ax, bx >
endif
NOFXIP< call ss:[bp].LICL_dirtyLineCallback >
FXIP< push ax, bx >
FXIP< movdw bxax, ss:[bp].LICL_dirtyLineCallback >
FXIP< call ProcCallFixedOrMovable >
FXIP< pop ax, bx
noChange:
.leave
ret
removeField:
;
; We attempted to calculate a field but it turned out that the
; field we wanted to compute wouldn't fit on this line. This can't
; happen for the first field on the line. We want to truncate
; the line/field data at the current field.
;
; Since we do the same thing when we are done with the loop in order
; to remove extra fields we can just shuffle the "current field" pointer
; backwards one field and then let the 'endLoop' code fix everything.
;
sub dx, size FieldInfo ; es:dx <- last field to keep
jmp endLoop ; Go to remove extras
CommonLineCalculate endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckForceDraw
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check to see if we need to force a line to be drawn.
CALLED BY: CommonLineCalculate
PASS: *ds:si = Instance
ss:bp = LICL_vars
es:di = Line
ss:bx = TOC_vars
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Cases to check for:
1 - Line is being "forced" to be changed
2 - Changed range intersects start/end of line
It's #2 that's the problem. The cases are these:
1) ls < cs < le (change is after line start)
+---change---->
+---line---+
2) ls < ce < le (change is before line end)
<---change----+
+---line---+
3) cs < ls < ce (change crosses line start)
+---change----+
+---line--->
4) cs < le < ce (change crosses line end)
+---change----+
<---line---+
5) cs <= ls && ce >= le (change contains line)
+---change----+
+---line---+
6) ls <= cs && le >= ce (line contains change)
+-change-+
+---line---+
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 6/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckForceDraw proc near
uses ax, cx, dx, di
.enter
;
; Load up the start and end.
;
movdw dxax, ss:[bp].LICL_startPos
movdw cxdi, ss:[bp].LICL_range.VTR_end
;
; Check the cases of mystery...
;
cmpdw ss:[bp].LICL_lineStart, dxax
jb checkCase1
checkCasesAfter1:
cmpdw ss:[bp].LICL_lineStart, cxdi
jb checkCase2
checkCasesAfter2:
cmpdw dxax, ss:[bp].LICL_lineStart
jb checkCase3
checkCasesAfter3:
cmpdw dxax, ss:[bp].LICL_range.VTR_start
jb checkCase4
checkCasesAfter4:
cmpdw dxax, ss:[bp].LICL_lineStart
jbe checkCase5
checkCasesAfter5:
cmpdw ss:[bp].LICL_lineStart, dxax
jbe checkCase6
quit:
.leave
ret
checkCase1:
cmpdw dxax, ss:[bp].LICL_range.VTR_start
jbe forceDraw
jmp checkCasesAfter1
checkCase2:
cmpdw cxdi, ss:[bp].LICL_range.VTR_start
jbe forceDraw
jmp checkCasesAfter2
checkCase3:
cmpdw ss:[bp].LICL_lineStart, cxdi
jbe forceDraw
jmp checkCasesAfter3
checkCase4:
cmpdw ss:[bp].LICL_range.VTR_start, cxdi
jbe forceDraw
jmp checkCasesAfter4
checkCase5:
cmpdw cxdi, ss:[bp].LICL_range.VTR_start
jae forceDraw
jmp checkCasesAfter5
checkCase6:
cmpdw ss:[bp].LICL_range.VTR_start, cxdi
jae forceDraw
jmp quit
forceDraw:
or ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_NEEDS_DRAW
jmp quit
CheckForceDraw endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FindFieldEnd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the end of a field.
CALLED BY: CommonLineCalculate
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
es:dx = Field
cx = Pointer past line/field data
RETURN: carry clear if there are no more fields
DESTROYED: nothing.
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 11/ 1/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FindFieldEnd proc near
class VisTextClass
uses ax, cx, di
.enter
;
; We need to pass some flags to the kernel calculation code. These
; flags are stored in our instance data.
;
push di ; Save line ptr
call Text_DerefVis_DI ; ds:di <- instance ptr
call SetKernelCalculationFlags ; Set TOCV_ext.TOCE_flags
mov cx, ds:[di].VTI_gstate ; cx <- gstate to use.
pop di ; Restore line ptr
;
; Set the callback routines.
;
movcb ss:[bx].TOCV_int.TOCI_style.TMS_styleCallBack, \
CalculateCharAttrCallback
movcb ss:[bx].TOCV_int.TOCI_style.TMS_graphicCallBack, \
CalculateGraphicCallback
movcb ss:[bx].TOCV_ext.TOCE_hyphenCallback, CalculateHyphenCallback
movcb ss:[bx].TOCV_ext.TOCE_tabCallback, CalculateTabCallback
movcb ss:[bx].TOCV_ext.TOCE_heightCallback, CalculateHeightCallback
mov ss:[bx].TOCV_ext.TOCE_passBack, bp
;
; The maximum area that the field can fit in is the distance from the
; end of the previous field to the right margin.
;
call ComputeAreaToFill
;
; Set up some other stuff -- if this is the first field then pass
; 0 for the height and baseline offset
;
clr ss:[bx].TOCV_ext.TOCE_anchorChar
movdw ss:[bp].LICL_linePtr, esdi ; Pass the pointer to the line
mov ss:[bp].LICL_fieldPtr, dx ; Pass the pointer to the field
;
; Mark that we haven't locked any text yet.
;
and ss:[bp].LICL_calcFlags, not mask CF_TEXT_LOCKED
;
; Do the calculation.
;
push bp, di, ds ; Save frame, line, instance
mov di, cx ; di <- gstate to use
mov bp, bx ; Pass this structure pointer
call GrTextObjCalc ; Do the work
mov ax, ds ; ax <- segment of last text
pop bp, di, ds ; Restore frame, line, instance
;
; ax = Segment of last lump of text
;
test ss:[bp].LICL_calcFlags, mask CF_TEXT_LOCKED
jz skipUnlock ; Branch if nothing locked
call TS_UnlockTextPtr ; Release the text
skipUnlock:
;
; Check to see if the field contains an extended style.
;
mov ax, ss:[bx].TOCV_ext.TOCE_nChars
cmp ax, ss:[bp].LICL_extStylePos
jbe noExtStyle
;
; The field contains an extended style, mark the line
;
or ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_CONTAINS_EXTENDED_STYLE
noExtStyle:
;
; Check for field with only a NULL in it. In this case we want
; to mark that a field does exists (it's just real small).
;
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_ENDS_IN_NULL
jz notNull
stc ; Mark this is a field
jmp quit
notNull:
;
; Check for nothing fit.
;
clr ax ; This will set carry correctly
sub ax, ss:[bx].TOCV_ext.TOCE_nChars ; clear if nChars == 0.
quit:
.leave
ret
FindFieldEnd endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetKernelCalculationFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the TOCV_ext.TOCE_flags field in the stack frame based
on the text objects features flags.
CALLED BY: FindFieldEnd
PASS: ds:di = Instance ptr
ss:bx = TOC_vars
ss:bp = LICL_vars
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetKernelCalculationFlags proc near
class VisTextClass
uses ax
.enter
clr al
;
; Set the flag which tells GrTextObjCalc() whether or not to word
; wrap text.
;
test LICL_paraAttr.VTPA_attributes, mask VTPAA_DISABLE_WORD_WRAP
jnz setNoWordWrap
test ds:[di].VTI_features, mask VTF_NO_WORD_WRAPPING
jz gotWordWrapFlag
setNoWordWrap:
or al, mask TOCF_NO_WORD_WRAP
gotWordWrapFlag:
;
; Set the flag which tells GrTextObjCalc() whether or not to attempt
; hyphenation.
;
test LICL_paraAttr.VTPA_attributes, mask VTPAA_ALLOW_AUTO_HYPHENATION
jnz setAutoHyphenate
test ds:[di].VTI_features, mask VTF_AUTO_HYPHENATE
jz gotHyphenFlag
setAutoHyphenate:
or al, mask TOCF_AUTO_HYPHENATE
gotHyphenFlag:
mov ss:[bx].TOCV_ext.TOCE_flags, al
.leave
ret
SetKernelCalculationFlags endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ComputeAreaToFill
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Compute the TOCE_areaToFill field.
CALLED BY: FindFieldEnd
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
es:dx = Current field
RETURN: ss:bx.TOCE_areaToFill set
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
if (first field) {
if (line.flags & LF_STARTS_PARAGRAPH) {
leftEdge = ruler.paraMargin
} else {
leftEdge = ruler.leftMargin
}
} else {
prev = field - size FieldInfo
leftEdge = prev.FI_position + prev.FI_width
}
area = realRightMargin - leftEdge
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ComputeAreaToFill proc near
uses ax, dx
.enter
call ComputeEndPrevField ; ax <- end of prev field
mov dx, LICL_realRightMargin ; dx <- right edge
sub dx, ax ; dx <- width
mov ss:[bx].TOCV_ext.TOCE_areaToFill, dx
.leave
ret
ComputeAreaToFill endp
TextLineCalc ends
TextFixed segment
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ComputeEndPrevField
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Compute the end of the previous field.
CALLED BY: ComputeAreaToFill, others
PASS: ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
es:dx = Field
RETURN: ax = End of previous field or else appropriate margin
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ComputeEndPrevField proc far
uses cx, dx, di
.enter
clr cx ; Assume first field
lea ax, es:[di].LI_firstField ; ax <- offset to first field
cmp ax, dx ; Check for on first field
je addMargin ; Branch if on first field
;
; We aren't on the first field.
;
sub dx, size FieldInfo ; es:dx <- previous field
mov di, dx ; es:di <- previous field
mov cx, es:[di].FI_position ; ax <- end of previous field
add cx, es:[di].FI_width
addMargin:
;
; cx = End of previous field, not counting margin
;
; It's the first field on the line. For paragraph starts we use the
; paraMargin. Otherwise we use the left margin.
;
mov ax, LICL_paraAttr.VTPA_leftMargin
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_STARTS_PARAGRAPH
jz quit ; Branch if not para-start
;
; It's the start of the paragraph. Use the paragraph margin.
;
mov ax, LICL_paraAttr.VTPA_paraMargin
quit:
;
; cx = End of previous field, not counting margin
; ax = Margin to add
;
add ax, cx ; ax <- end of prev field
.leave
ret
ComputeEndPrevField endp
TextFixed ends
TextLineCalc segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetLineLeftFromTOCV
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the left edge of the line
CALLED BY: ComputeEndPrevField
PASS: ss:bp = LICL_vars with ruler set
ss:bx = TOC_vars
RETURN: ax = Left edge of the line (para-margin or left-margin)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/27/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetLineLeftFromTOCV proc near
;
; Assume not para-start
;
mov ax, LICL_paraAttr.VTPA_leftMargin
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_STARTS_PARAGRAPH
jz quit ; Branch if not para-start
;
; It's the start of the paragraph. Use the paragraph margin.
;
mov ax, LICL_paraAttr.VTPA_paraMargin
quit:
ret
GetLineLeftFromTOCV endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CalcFieldPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Calculate the position of a field.
CALLED BY: CommonLineCalculate
PASS: *ds:si = Instance ptr
ss:bp = LICL_locals
ss:bx = TOC_vars
es:di = Line
es:dx = Current field
RETURN: es:[dx].FI_position set
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 11/ 1/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalcFieldPosition proc near
uses ax, cx, di
.enter
;
; We will call a handler routine that depends on the tab-type.
; We need to get the tab type from the ruler.
;
call GetLineLeftFromTOCV ; ax <- left edge of line
push ax ; Save left edge of line
push bx
mov al, ss:[bp].LICL_tabReference ; al <- TabReference
call TabGetPositionAndAttributes ; cx <- position of tab
; al <- TabAttributes
; bx <- tab spacing
pop bx
ExtractField byte, al, TA_TYPE, al ; al <- Tab type
mov ss:[bp].LICL_lastFieldTabType, al
clr ah ; ax <- tab type
shl ax, 1 ; ax <- index into table
;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
; Replaced the commented out code, 3/29/93 -jw
; This was necessary because the routines I am calling expect to have
; es:di pointing at the line structure. None of them expect anything in ax.
;
; mov di, ax ; di <- index
;
; call cs:fieldPositionHandlers[di] ; ax <- position of field
;
push di ; Save line pointer
mov di, ax ; di <- index
mov ax, cs:fieldPositionHandlers[di]; ax <- routine to call
pop di ; Restore line pointer
call ax ; Call the handler
; ax <- position of the field
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pop cx ; cx <- left edge of line
sub ax, cx ; ax <- relative to line-left
call SaveNewFieldPosition ; Save the final field position
;
; Figure the end of the line (if justified)
;
mov cx, ss:[bx].TOCV_ext.TOCE_justWidth
add cx, ax ; Add field-start
mov ss:[bp].LICL_lineJustEnd, cx
;
; Save the end of the line. This value depends on a few things...
; - <cr> terminated line ==> justWidth
; - Everything else ==> fieldWidth
;
; Assume line was terminated.
;
mov cx, ss:[bx].TOCV_ext.TOCE_justWidth
mov ss:[bp].LICL_lastFieldJustWidth, cx
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_ENDS_IN_CR or \
mask LF_ENDS_IN_AUTO_HYPHEN
jnz setEnd
;
; Line wasn't terminated. Use field width.
;
rndwbf ss:[bx].TOCV_ext.TOCE_fieldWidth, cx
setEnd:
add ax, cx ; Add field-start
mov ss:[bp].LICL_lineEnd, ax ; Save line end
.leave
ret
CalcFieldPosition endp
fieldPositionHandlers label word
word offset cs:LeftJustifyField ; TT_LEFT
word offset cs:CenterJustifyField ; TT_CENTER
word offset cs:RightJustifyField ; TT_RIGHT
word offset cs:AnchorJustifyField ; TT_ANCHORED
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LeftJustifyField
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Left justify a field.
CALLED BY: CalcFieldPosition
PASS: *ds:si = Instance ptr
ss:bx = TOC_vars
ss:bp = LICL_vars
es:di = Line
es:dx = Field
cx = Position of the tab
RETURN: ax = Position for field
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LeftJustifyField proc near
;
; For left justified fields the left edge of the field goes at
; the position of the tab.
;
mov ax, cx
ret
LeftJustifyField endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CenterJustifyField
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Center justify a field.
CALLED BY: CalcFieldPosition
PASS: *ds:si = Instance ptr
ss:bx = TOC_vars
ss:bp = LICL_vars
es:di = Line
es:dx = Field
cx = Position of the tab
RETURN: ax = Position for field
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CenterJustifyField proc near
uses cx, dx, di
.enter
;
; Set up:
; ax = Position where field would go if left justified
; dx = 1/2 width of the field to consider when justifying
;
call ComputeEndPrevField ; ax <- end of previous fied
mov di, cx ; Save position of tab in di
mov dx, cx ; dx <- position of tab
mov cx, ax ; Save previous field end in cx
sub dx, ax ; dx <- Space left of tab
mov ax, dx ; ax <- Space left of tab
mov dx, ss:[bx].TOCV_ext.TOCE_justWidth
shr dx, 1
;
; The logic here is a bit complex...
;
; If the field cannot be centered because it would collide with the
; right margin, then we want to "right justify" it at the margin.
;
; If the field cannot be centered because it would collide with the
; end of the previous field, then we want to left justify it at the
; end of the previous field.
;
; First we check for a collision with the end of the previous field.
; If there is one, we left justify at that point.
; Then we check the case of collision with the right margin.
;
cmp ax, dx ; Check for not enough
jb setToPrevFieldEnd ; Left justify if no space
;
; There is enough space to our left to allow us to center justify the
; field. We need to make sure there is also enough space to our right.
;
mov ax, LICL_realRightMargin ; ax <- Space right of tab
sub ax, di
cmp ax, dx ; Check for not enough
jbe rightJustify ; Right justify if no space
;
; The field can be centered inside both boundaries without any problem
;
mov ax, di
sub ax, dx
quit:
;
; ax = Position for the field
;
.leave
ret
setToPrevFieldEnd:
;
; Field is too wide to center. There is not enough space on the left
; side. We butt the field up against the previous field in order to
; make it fit.
; cx = End of previous field
;
mov ax, cx
jmp quit
rightJustify:
;
; Field collides with right margin, align it at the right margin.
;
mov ax, LICL_realRightMargin
sub ax, ss:[bx].TOCV_ext.TOCE_justWidth
jmp quit
CenterJustifyField endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
RightJustifyField
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Right justify a field.
CALLED BY: CalcFieldPosition
PASS: *ds:si = Instance ptr
ss:bx = TOC_vars
ss:bp = LICL_vars
es:di = Line
es:dx = Field
cx = Position of the tab
RETURN: ax = Position for field
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
RightJustifyField proc near
uses dx
.enter
call ComputeEndPrevField ; ax <- end of previous field
mov dx, ax ; dx <- end of previous field
mov ax, cx ; cx <- tab position
sub ax, dx ; ax <- space left of field
;
; Check to see if the entire field will fit in the space between the
; end of the previous field and the position of the tabstop.
;
; If it will, then we can right justify the field, if not, then we
; position the field at the end of the previous field, and the
; tab character occupies no space.
;
cmp ss:[bx].TOCV_ext.TOCE_justWidth, ax
ja setToPrevFieldEnd
;
; It fits, the position is at tabStop.position - justWidth.
; ax = tabStop.position
;
mov ax, cx ; ax <- tab position
sub ax, ss:[bx].TOCV_ext.TOCE_justWidth ; ax <- new position
quit:
;
; ax = Position for the field
;
.leave
ret
setToPrevFieldEnd:
;
; The field is too wide to right justify on the tabstop. We need
; to make it butt up against the previous field.
;
mov ax, dx
jmp quit
RightJustifyField endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AnchorJustifyField
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Anchor a field to a position.
CALLED BY: CalcFieldPosition
PASS: *ds:si = Instance ptr
ss:bx = TOC_vars
ss:bp = LICL_vars
es:di = Line
es:dx = Field
cx = Position of the tab
RETURN: ax = Position for field
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
The calculation code has found and stored the offset into the field
at which the anchor character was found.
If the field cannot be anchored because it would collide with the
right margin, then we want to "right justify" it at the margin.
If the field cannot be anchored because it would collide with the
end of the previous field, then we want to left justify it at the
end of the previous field.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AnchorJustifyField proc near
uses cx, dx, di
.enter
; mov di, cx ; Save tab position in di
push cx ; Save tab pos without nuking
; line info, which is
; passed to ComputeEndPrev-
; Field(cbh 4/18/94)
;
; Compute:
; ax = Space to the left of the tabstop
;
call ComputeEndPrevField ; ax <- end of prev field
mov cx, ax ; Save previous field end in cx
pop di ; di <- tab pos (4/18/94 cbh)
mov ax, di ; ax <- tab position
sub ax, cx ; ax <- space left of tab
;
; Make sure there is enough space to hold the text to the left
; of the anchor.
;
cmp ax, ss:[bx].TOCV_ext.TOCE_widthToAnchor
jb setToPrevFieldEnd ; Branch if there isn't
;
; There is no collision with the previous field.
;
; Make sure there is enough space after the tabstop to hold the
; text after the anchor character.
;
; Compute:
; ax = Distance to right margin from tabstop
; dx = Size of the text after the anchor character
;
mov ax, LICL_realRightMargin
sub ax, di
mov dx, ss:[bx].TOCV_ext.TOCE_justWidth
sub dx, ss:[bx].TOCV_ext.TOCE_widthToAnchor
cmp ax, dx ; Check for not enough space
jb alignRight ; Branch if not enough space
;
; The field fits both on the left and on the right.
;
mov ax, di
sub ax, ss:[bx].TOCV_ext.TOCE_widthToAnchor
quit:
;
; ax = Position for the field
;
.leave
ret
setToPrevFieldEnd:
;
; There isn't enough space to the left of the tabstop to hold all the
; text we want to put there. We need to butt the field up against
; the end of the previous field.
;
mov ax, cx
jmp quit
alignRight:
;
; There isn't enough space to the right of the tabstop to hold all the
; text after the anchor character. We need to right justify the field
; against the right-margin.
;
mov ax, LICL_realRightMargin
sub ax, ss:[bx].TOCV_ext.TOCE_justWidth
jmp quit
AnchorJustifyField endp
COMMENT @----------------------------------------------------------------------
FUNCTION: AdjustLineHeight
DESCRIPTION: Adjust line height and baseline offset to account for
things like leading, line-spacing, and space added to the
tops and bottoms of paragraphs.
CALLED BY: LineInfoCalcLine
PASS:
*ds:si - text object
ss:bx - TOC_vars
ss:bp - LICL_vars structure
LICL_paraAttr - set
LICL_line - set
RETURN:
LICL_line - updated
DESTROYED:
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
if (leading != 0) {
/* Leading is the space between baselines */
if (line == firstLine) {
BLO = oldBLO + leading - height
} else {
prevBLO = LineInfoGetBLO( prevLine )
prevHeight = LineInfoGetHeight( prevLine )
/* need the size of the descender */
descender = prevHeight - prevBLO
BLO = leading - descender
}
height = leading
}
if (line spacing != 1) {
height = height * lineSpacing
}
if (top line of paragraph) {
height, BLO += space on top
height, BLO += border space for top
}
if (bottom line of paragraph) {
height += space on bottom
height += border space for bottom
}
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 11/89 Initial version
------------------------------------------------------------------------------@
AdjustLineHeight proc near
uses ax, bx, cx, dx
.enter
;
; if bordered top or bottom then set LICL_line.LI_{next,prev}LineBorder
;
test LICL_paraAttr.VTPA_borderFlags, mask VTPBF_TOP or mask VTPBF_BOTTOM
jz noGetInfo ;Skip if no top/bottom border.
call GetPrevNextLineBorderInfo
noGetInfo:
;
; Account for leading.
;
; If there is leading, then we need to set the distance between the
; baseline for this line and the baseline for the previous line to
; the leading value.
;
; If this is the first line in a paragraph then we need to set the
; line height to the leading value.
;
mov ax, LICL_paraAttr.VTPA_leading ; Check for no leading at all.
tst ax
jz noLeading
call AdjustForLeading
noLeading:
;
; Account for line spacing. The line spacing is a multiplier and is
; applied to the "natural" height of the line to generate the
; height used for display. The line spacing is computed after the
; leading has been applied so that things like double spacing will
; work even on leaded lines.
;
cmp {word} LICL_paraAttr.VTPA_lineSpacing, 0x0100
je noLineSpacing
call AdjustForLineSpacing
noLineSpacing:
;
; Check top line of PP. Top line of a paragraph may call for adjustments
; based on the border thickness. (If the thing has a border at all).
;
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_STARTS_PARAGRAPH
jz noPPStart
call AdjustParagraphStart
noPPStart:
;
; Check bottom line of PP. Bottom line of a paragraph may also call for
; adjustments due to borders.
;
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_ENDS_PARAGRAPH
jz noPPEnd
call AdjustParagraphEnd
noPPEnd:
;
; If this is a single line text object, then we need to adjust
; the baseline and height to compensate for accent characters.
;
; In multi-line text objects we just let lines with accents interact
; with the lines above them. We can't do that with one-line objects
; because the accents just vanish under the clip-region.
;
; A single line object can only be have one charAttr (that's all that
; is allowed).
;
call AdjustSingleLineObject
;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
; Added, 9/ 9/93 -jw
; Check for the object having the ATTR_ that implies adjusting the line height
; by adding space at the top of all lines.
push ax
push bx
mov ax, ATTR_VIS_TEXT_ADD_SPACE_TO_ALL_LINES
call ObjVarFindData ; carry set if found
; ds:bx <- ptr to data
jnc noLineSpaceOnTop ; Branch if not found
;
; There object requires that space be added to the top of every line.
; Make the adjustment.
;
mov ax, ds:[bx] ; ax <- extra space in points
;
; Restore pointer to stack frame, then push it again so that
; we don't get stack nukage later.
;
pop bx
push bx
;
; Compute and save the new height and baseline
;
add ss:[bx].TOCV_ext.TOCE_lineHeight.WBF_int, ax
add ss:[bx].TOCV_ext.TOCE_lineBLO.WBF_int, ax
noLineSpaceOnTop:
pop bx
;
; Now, deal with the text object getting too large...
;
MAXIMUM_HEIGHT_FOR_TEXT_OBJECT equ 32700 ;Must be < 0x7fff
mov ax, ss:[bp].LICL_lineBottom.WBF_int
add ax, ss:[bx].TOCV_ext.TOCE_lineHeight.WBF_int
cmp ax, MAXIMUM_HEIGHT_FOR_TEXT_OBJECT
jbe heightInBounds
; The text object is getting too large, so set this line height to 0
clrwbf ss:[bx].TOCV_ext.TOCE_lineHeight
clrwbf ss:[bx].TOCV_ext.TOCE_lineBLO
heightInBounds:
pop ax
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;;quit:
.leave
ret
AdjustLineHeight endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetPrevNextLineBorderInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get border info for the previous and next lines.
CALLED BY: AdjustLineHeight
PASS: *ds:si = Instance ptr
ss:bx = TOC_vars
ss:bp = LICL_vars
es:di = Pointer to line we're calculating
RETURN: Border information for next and previous lines set in
the LICL_vars
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextLineCalc ends
TextBorder segment resource
GetPrevNextLineBorderInfo proc far
uses ax, bx, di
.enter
;
; if CF_SAVE_RESULTS is not set, assume the caller is taking care of
; saving the previous-lines border attributes
;
test ss:[bp].LICL_calcFlags, mask CF_SAVE_RESULTS
jz afterPrevLineBorder
;
; Get border information for previous line.
;
push bx, di ; Save frame ptr, line
movdw bxdi, ss:[bp].LICL_line ; bx.di <- current line
call GetPrevBorder
pop bx, di ; Restore frame ptr, line
afterPrevLineBorder:
clr ax ; Assume current is last line
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_ENDS_IN_NULL
jnz gotCurrentBorderFlags ; Branch if last line
;
; Get the paragraph attributes for the next line.
; dx.ax <- offset into the text where next line starts
;
push bx ; Save frame ptr
movdw dxax, ss:[bp].LICL_range.VTR_start
call T_GetBorderInfo ; ax <- BorderFlags
; bx, nuked
pop bx ; Restore frame ptr
gotCurrentBorderFlags:
;
; Save margins and border attributes for various things
; ax = Border flags for next line
;
mov LICL_nextLineBorder, ax
.leave
ret
GetPrevNextLineBorderInfo endp
TextBorder ends
TextLineCalc segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AdjustForLeading
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Adjust for line leading.
CALLED BY: LICLAdjustLineHeight
PASS: ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
ax = leading (assumed to be non-zero)
RETURN: line height and baseline adjusted correctly.
DESTROYED: ax
PSEUDO CODE/STRATEGY:
if (saving results) {
if (line == firstLine) {
BLO = oldBLO + leading - height
} else {
prevBLO = LineInfoGetBLO( prevLine )
prevHeight = LineInfoGetHeight( prevLine )
/* need the size of the descender */
descender = prevHeight - prevBLO
BLO = (leading + (ENDS_PARAGRAPH ? end paragraph spacing : 0))
- descender
}
}
height = leading
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 5/25/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AdjustForLeading proc near uses cx, dx, di
.enter
;
; The first line of a region shouldn't be leaded, since there is no
; line above it.
;
cmpdw ss:[bp].LICL_line, ss:[bp].LICL_regionTopLine, cx
jne notFirst
exit:
.leave
ret
notFirst:
if 0 ;No, we really want to use manual leading in the first line of
;a paragraph. Otherwise it tend to not be very useful.
; -- tony -- 5/10/93
;
; The first line of a paragraph is never leaded.
;
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_STARTS_PARAGRAPH
jnz quit
endif
;
; ax is 13 bits of integer and 3 bits of fraction.
; For now just round it to an integer.
;
add ax, (1 shl (offset TITF_INT - 1))
ExtractField word, ax, TITF_INT, ax
test ss:[bp].LICL_calcFlags, mask CF_SAVE_RESULTS
jz setHeight ; Set height if not saving
;
; Want to set the baseline of this line to a fixed distance
; from the previous lines baseline.
;
push bx, di ; Save frame ptr, line
movdw bxdi, ss:[bp].LICL_line ; bx.di <- current line
call TL_LinePrevious ; bx.di <- previous line
;
; If the previous line is the end of a paragraph, and there
; is spacing added to the end of the paragraph. Then add
; that extra space to the leading value, for the purposes of
; calculating the baseline of the current line of text.
;
mov_tr cx, ax
mov ax, mask LF_ENDS_PARAGRAPH
call TL_LineTestFlags
mov_tr ax, cx
push ax ; save original leading value
jz dontAddEndParagraphSpacing
mov cx, LICL_paraAttr.VTPA_spaceOnBottom
ExtractField word, cx, TITF_INT, dx ; dx <- integer part
ExtractField word, cx, TITF_FRAC, cx ; cx <- fraction
add ax, dx ; ax <- adjustment integer
rnduwbf axcl, ax
dontAddEndParagraphSpacing:
push bx ; Save high word of line
call TL_LineGetBLO ; dx.bl <- prev baseline
rnduwbf dxbl, cx ; cx <- rounded baseline
pop bx ; Restore high word of line
call TL_LineGetHeight ; dx.bl <- prev line height
rnduwbf dxbl, dx ; dx <- rounded height
;
; cx = Rounded baseline
; dx = Rounded height
; ax = Rounded leading value
;
sub dx, cx ; dx <- prev line descender
mov cx, ax ; cx <- leading value
pop ax ; restore original leading
sub cx, dx ; cx <- new baseline
pop bx, di ; Restore frame ptr, line
;
; Set the new baseline (cx).
;
clr dl
movwbf ss:[bx].TOCV_ext.TOCE_lineBLO, cxdl
setHeight:
;
; Set the new height (ax).
;
clr dl
movwbf ss:[bx].TOCV_ext.TOCE_lineHeight, axdl
jmp exit
AdjustForLeading endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AdjustForLineSpacing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Adjust the line height and baseline for line-spacing
CALLED BY: AdjustLineHeight
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Current line
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Line spacing is BBFixed. Line height is WBFixed.
Here is the general algorithm...
AB.C <- line height.
* D.E <- line spacing.
----------
(AB * D.E) + (.C * D.E)
We can guarantee that (AB * D.E) will not result in a three byte
integer portion. If it does, we fatal error (ha ha ha ha ha).
We do this multiplication in portions:
ax <- AB
dx.ax <- AB * D.E (We discard highest integer portion).
cx.bl <- dl.ah.al
ax <- B.C
dx.ax <- B.C * D.E (We discard lowest fractional portion)
dx.ah <- dx.ah + cx.bl (Save the new line height).
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AdjustForLineSpacing proc near
uses ax, cx, dx, si
.enter
mov si, {word} LICL_paraAttr.VTPA_lineSpacing
cmp si, 0x100 ;Special case of multiplier = 1
jz quit ;Skip if multiplier = 1
push bx ;Save frame ptr
;
; Do first multiply.
;
mov ax, ss:[bx].TOCV_ext.TOCE_lineHeight.WBF_int
mul si ;dx.ax = result of 1st part
EC < tst dh >
EC < ERROR_NZ VIS_TEXT_LINE_SPACING_CAUSED_OVERFLOW >
;
; Save fractional line height in dh
;
mov dh, ss:[bx].TOCV_ext.TOCE_lineHeight.WBF_frac
mov ch, dl ;cx.bl <- useful part of result
mov cl, ah
mov bl, al
;
; Do second multiply.
;
mov al, dh
clr ah
mul si ;dx.ax <- result of second part
add ah, bl
adc dx, cx ;dx.ah <- new line height
pop bx ;Restore frame ptr
movwbf ss:[bx].TOCV_ext.TOCE_lineHeight, dxah
quit:
.leave
ret
AdjustForLineSpacing endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AdjustParagraphStart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Adjust the line height for being the first line in a
paragraph.
CALLED BY: AdjustLineHeight
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AdjustParagraphStart proc near
uses ax, cx, dx
.enter
clr ax ;assume no border
mov cx, mask VTPBF_TOP
test LICL_paraAttr.VTPA_borderFlags, cx
jz 10$
push bx ;Save frame ptr
call CalcBorderSpacing ;ax <- border width
pop bx ;Restore frame ptr
10$:
;
; ax = Spacing for border
; ss:bp = LICL_vars
; ss:bx = TOC_vars
;
; The spaceOnTop field is stored as a 13.3 value.
;
;
; The first line of a region shouldn't be leaded, since there is no
; line above it.
;
tst ax ; Check for has border
jnz useSpace
;vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
; Changed, 9/ 1/93 -jw
;
; If this is not the first line of the region, all spacing applies.
;
cmpdw ss:[bp].LICL_line, ss:[bp].LICL_regionTopLine, cx
jne useSpace
;
; This is the first line of the region. Check to see if the user
; wants additional spacing.
;
push bx
mov ax, ATTR_VIS_TEXT_ADD_SPACE_ON_TOP_TO_FIRST_LINE_OF_REGION
call ObjVarFindData ; carry set if found
; ds:bx <- ptr to data
mov ax, 0 ; Assume not found
jnc gotExtra ; Branch if not found
mov ax, ds:[bx] ; ax <- extra space in points
gotExtra:
pop bx
;
; ax is the amount of extra space we need given the previous hint.
;
;
tst ax
jz quit ; Branch if no space.
useSpace:
;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mov cx, LICL_paraAttr.VTPA_spaceOnTop
ExtractField word, cx, TITF_INT, dx ; dx <- integer part
ExtractField word, cx, TITF_FRAC, cx ; cx <- fraction
add ax, dx ; ax <- adjustment integer
;
; ax.cl = Amount to add to both the height and the baseline
;
;
; Compute and save the new height
;
addwbf ss:[bx].TOCV_ext.TOCE_lineHeight, axcl
;
; Compute and save the new baseline
;
addwbf ss:[bx].TOCV_ext.TOCE_lineBLO, axcl
quit::
.leave
ret
AdjustParagraphStart endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AdjustParagraphEnd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Adjust a line height for a line being the last line in a
paragraph
CALLED BY: AdjustLineHeight
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AdjustParagraphEnd proc near
uses ax, cx, dx
.enter
clr ax ; assume no border
mov cx, mask VTPBF_BOTTOM
test LICL_paraAttr.VTPA_borderFlags, cx
jz 10$
push bx ;Save frame ptr
call CalcBorderSpacing ; ax <- border width.
pop bx ;Restore frame ptr
10$:
;
; ax = Spacing for border
; ss:bp = LICL_vars
; ss:bx = TOC_vars
;
; The spaceOnBottom field is stored as a 13.3 value.
;
mov cx, LICL_paraAttr.VTPA_spaceOnBottom
ExtractField word, cx, TITF_INT, dx ; dx <- integer part
ExtractField word, cx, TITF_FRAC, cx ; cx <- fraction
add ax, dx ; ax <- adjustment integer
;
; Adjust line height by ax.cl
;
addwbf ss:[bx].TOCV_ext.TOCE_lineHeight, axcl
.leave
ret
AdjustParagraphEnd endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AdjustSingleLineObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Adjust the height and baseline of a single line object
CALLED BY: AdjustLineHeight
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AdjustSingleLineObject proc near
class VisTextClass
push di
call Text_DerefVis_DI
test ds:[di].VTI_state, mask VTS_ONE_LINE
jz done ; Branch if not 1 line object
uses ax, cx, dx, si
minHeight local WBFixed
.enter
clrwbf minHeight
push bx
mov ax, ATTR_VIS_TEXT_MINIMUM_SINGLE_LINE_HEIGHT
call ObjVarFindData
jnc noMinHeight
movwbf minHeight, ds:[bx], ax
noMinHeight:
pop bx
;
; Get accent height and add it to the baseline of the line.
; The gstate must be created at this point, it just must :-)
;
mov di, ds:[di].VTI_gstate ; di <- gstate
mov si, GFMI_ABOVE_BOX
call GrFontMetrics ; dx.ah <- aboveBox height
;
; Adjust the baseline.
;
addwbf ss:[bx].TOCV_ext.TOCE_lineBLO, dxah
;
; Compute the line height, and make sure it lies within the maximum
;
mov si, GFMI_MAX_ADJUSTED_HEIGHT
call GrFontMetrics ; dx.ah <- total height
cmpwbf dxah,minHeight
jae 10$
movwbf dxah, minHeight
10$:
movwbf ss:[bx].TOCV_ext.TOCE_lineHeight, dxah
.leave
done:
pop di
ret
AdjustSingleLineObject endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HandleJustification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle justification of a line.
CALLED BY: CommonLineCalculate
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
cx = Pointer past line/field data
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
extra = areaToFill - fieldJustWidth
spacePad = 0
adjustment = 0
if (justification == LEFT) {
/* Do nothing, defaults are OK */
} else if (justification == FULL) {
if (line ends in word-wrap) {
spacePad = extra / nSpaces
}
} else {
adjustment = extra
if (justification == CENTER) {
adjustment /= 2
}
}
line.adjustment = adjustment
lastField.spacePad = spacePad
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 11/21/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
HandleJustification proc near
uses ax, cx, dx
.enter
;
; If we aren't saving the results then all these calculations are
; meaningless. They have no affect on where things are word-wrapped.
;
test ss:[bp].LICL_calcFlags, mask CF_SAVE_RESULTS
jz quit
;
; There are two special cases to consider:
; 1) A single character being wider than the entire field.
; 2) The text fits exactly into the field with no leftover space.
;
; In both of these cases we left-justify the line.
;
call FigureLastFieldEndForJustification
; dx <- end of last field for
; justification purposes
push bx ; Save frame ptr
mov bx, J_LEFT ; Assume special case
mov ax, LICL_realRightMargin ; ax <- space after last field
sub ax, dx
jle gotJustification ; Branch if special case
;
; Text fits inside the field area with some space to spare.
; We can do some sort of justification.
;
ExtractField word,LICL_paraAttr.VTPA_attributes,VTPAA_JUSTIFICATION,bx
gotJustification:
shl bx, 1 ; bx <- index into table
; bx <- handler routine
mov bx, cs:justificationHandlers[bx]
mov ax, bx ; ax <- routine to call
pop bx ; Restore frame ptr
;
; dx = End of last field
;
call ax ; Call the justification handler
;
; dx = Adjustment for the line
; ax.ch = Space padding
;
push dx ; Save adjustment
mov dx, ax ; dx.ah <- new space padding
mov ah, ch
call SaveNewLineSpacePad ; Save the new space padding
pop dx ; dx <- new adjustment
call GetLineLeftFromTOCV ; ax <- left edge of the line
add ax, dx ; ax <- final adjustment
call SaveNewLineAdjustment ; Save the new adjustment
quit:
.leave
ret
HandleJustification endp
justificationHandlers label word
word offset cs:LeftJustifyLine ; J_LEFT
word offset cs:RightJustifyLine ; J_RIGHT
word offset cs:CenterJustifyLine ; J_CENTER
word offset cs:FullJustifyLine ; J_FULL
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LeftJustifyLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Left justify a line
CALLED BY: HandleJustification
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Pointer to the line
cx = Pointer past line/field data
RETURN: dx = Line adjustment
ax.ch = Space padding
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LeftJustifyLine proc near
clr dx ; dx <- line adjustment
clrwbf axch ; ax.ch <- space-padding
ret
LeftJustifyLine endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
RightJustifyLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Right justify a line
CALLED BY: HandleJustification
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Pointer to the line
cx = Pointer past line/field data
dx = End of last field
RETURN: dx = Line adjustment
ax.ch = Space padding
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
RightJustifyLine proc near
mov ax, dx ; ax <- end of last field
mov dx, LICL_realRightMargin ; dx <- adjustment
sub dx, ax
clrwbf axch ; ax.ch <- space padding
ret
RightJustifyLine endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CenterJustifyLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Center justify a line
CALLED BY: HandleJustification
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Pointer to the line
cx = Pointer past line/field data
dx = End of last field on the line
RETURN: dx = Line adjustment
ax.ch = Space padding
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CenterJustifyLine proc near
call RightJustifyLine ; dx <- adjustment
; ax.ch <- space padding
sar dx, 1 ; Only use 1/2 the adjustment
ret
CenterJustifyLine endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FullJustifyLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Full justify a line
CALLED BY: HandleJustification
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Pointer to the line
cx = Pointer past line/field data
dx = End of the last field on the line
RETURN: dx = Line adjustment
ax.ch = Space padding
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FullJustifyLine proc near
uses bx, di, si
if CHAR_JUSTIFICATION
test ss:[bp].LICL_theParaAttr.VTMPA_paraAttr.VTPA_miscMode, mask TMMF_CHARACTER_JUSTIFICATION
jnz FullCharJustifyLine
endif
.enter
;
; Make sure that the line is not the last in a paragraph. If it ends
; a paragraph then we don't full justify the line.
;
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_ENDS_PARAGRAPH
jnz leftJustify
;
; One more special case: The field has no spaces.
; In this case we just left justify the field.
;
tst ss:[bx].TOCV_ext.TOCE_nSpaces
jz leftJustify
;
; We need to change the field width so that it occupies the entire
; area. We do this by figuring the amount of space padding we would
; need to make the field expand to fit the entire width available to it.
;
push bx, cx ; Save frame ptr, data-end
mov cx, dx ; cx <- end of last field on line
mov dx, LICL_realRightMargin ; dx <- extra space
call GetLineLeftFromTOCV ; ax <- left edge of line
mov ss:[bp].LICL_lineJustEnd, dx ; real line end is right margin
sub ss:[bp].LICL_lineJustEnd, ax ; remove adjustment amount
sub dx, cx
clr cx ; dx.cx <- extra space (WWFixed)
mov bx, ss:[bx].TOCV_ext.TOCE_nSpaces
clr ax ; bx.ax <- # of spaces
;
; We divide the amount of space (dx.cx) by the number of spaces (bx.ax)
;
call GrUDivWWFixed ; dx.cx <- space padding
mov_tr ax, cx ; dx.ax <- space padding
pop bx, cx ; Restore frame ptr, data-end
;
; *ds:si= Instance ptr
; es:di = Line/field data
; cx = Pointer past line/field data
; dx.ax = Space padding to use (WWFixed)
;
; Before returning the adjustment and the space padding we need to set
; the width of the field to be the "correct" width.
;
; This new width is:
; fieldWidth + (nSpace + nExtraSpace)*spacePadding
; Since the spacePadding is a WWFixed and the space-count is a word
; the math looks like:
; part1 = spaceCount * spacePadding.low (dx.ax = WWFixed)
; part2 = spaceCount * spacePadding.high (ax = word)
;
; Computation:
; es:di <- ptr to last field
; si <- total number of spaces
; cx.bx <- dx.ax
;
; dx.ax = si * cx ; (part2) ax is significant
; field.width.int += dx
;
; dx.ax = si * bx ; (part1) dx.ah is significant
; field.width += dx.ah
;
pushdw dxax ; Save space padding
mov di, cx ; es:di <- ptr to last field
sub di, size FieldInfo
; si <- total number of spaces
mov si, ss:[bx].TOCV_ext.TOCE_nSpaces
add si, ss:[bx].TOCV_ext.TOCE_nExtraSpaces
if CHAR_JUSTIFICATION
call UpdateFieldWidthCommon
else
movdw cxbx, dxax ; cx.bx <- space pad (WWFixed)
;
; Part2 calculation
;
mov ax, cx ; ax <- integer part
mul si ; ax <- part2 (word)
;
; Part1 calculation
;
push ax ; Save partial result
mov ax, bx ; ax <- fractional part
mul si ; dx.ah <- part1 (WBFixed)
rndwbf dxah, dx ; dx.ah <- part1 (word)
pop ax ; Restore partial result
add ax, dx ; ax <- total to add
;
; Update the field width
;
add ax, es:[di].FI_width ; ax <- final width
mov dx, di ; es:dx <- field pointer
call SaveNewFieldWidth ; Save the new width
endif
;
; The field width is up to date. Restore the space padding to use
; and set the adjustment to zero.
;
popdw axcx ; ax.ch <- space padding
clr dx ; No adjustment
quit:
;
; dx = Line adjustment
; ax.ch = Space padding
;
.leave
ret
leftJustify:
;
; The line is the last one in the paragraph. We left justify it.
;
call LeftJustifyLine
jmp quit
FullJustifyLine endp
if CHAR_JUSTIFICATION
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UpdateFieldWidthCommon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Common code to update field width
CALLED BY: FullJustifyLine(), FullCharJustifyLine()
PASS: dx.ax - space/char pad (WWFixed)
si - # of spaces/chars
es:di - ptr to FieldInfo
RETURN: FI_width - updated
DESTROYED: ax, dx, si
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 5/26/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UpdateFieldWidthCommon proc near
.enter
movdw cxbx, dxax ; cx.bx <- space pad (WWFixed)
;
; Part2 calculation
;
mov ax, cx ; ax <- integer part
mul si ; ax <- part2 (word)
;
; Part1 calculation
;
push ax ; Save partial result
mov ax, bx ; ax <- fractional part
mul si ; dx.ah <- part1 (WBFixed)
rndwbf dxah, dx ; dx.ah <- part1 (word)
pop ax ; Restore partial result
add ax, dx ; ax <- total to add
;
; Update the field width
;
add ax, es:[di].FI_width ; ax <- final width
mov dx, di ; es:dx <- field pointer
call SaveNewFieldWidth ; Save the new width
.leave
ret
UpdateFieldWidthCommon endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FullCharJustifyLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Full justify a line using character padding
CALLED BY: HandleJustification
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Pointer to the line
cx = Pointer past line/field data
dx = End of the last field on the line
RETURN: dx = Line adjustment
ax.ch = Space padding
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 5/26/94 Initial version (based on FullJustifyLine)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FullCharJustifyLine proc near
uses bx, di, si
.enter
;
; We need to change the field width so that it occupies the entire
; area. We do this by figuring the amount of char padding we would
; need to make the field expand to fit the entire width available to it.
;
push bx, cx ; Save frame ptr, data-end
mov cx, dx ; cx <- end of last field on line
mov dx, LICL_realRightMargin ; dx <- extra space
call GetLineLeftFromTOCV ; ax <- left edge of line
mov ss:[bp].LICL_lineJustEnd, dx ; real line end is right margin
sub ss:[bp].LICL_lineJustEnd, ax ; remove adjustment amount
sub dx, cx
clr cx ; dx.cx <- extra space (WWFixed)
;
; Divide the space available *between* the characters (hence the -1).
; Handle no or only one character by left justifying the line.
;
mov ax, ss:[bx].TOCV_ext.TOCE_nChars
tst ax ; any characters?
jz leftJustifyPop ; branch if no chars
dec ax
jz leftJustifyPop ; branch if only one char
;
; See if the line ends a paragraph, and if so don't count the CR.
;
test ss:[bx].TOCV_ext.TOCE_lineFlags, mask LF_ENDS_IN_CR
jz noCR
dec ax
jz leftJustifyPop ; branch if only one char
noCR:
mov bx, ax
clr ax ; bx.ax <- # of chars
;
; We divide the amount of space (dx.cx) by the number of spaces (bx.ax)
;
call GrUDivWWFixed ; dx.cx <- space padding
mov_tr ax, cx ; dx.ax <- space padding
pop bx, cx ; Restore frame ptr, data-end
pushdw dxax ; Save char padding
mov di, cx ; es:di <- ptr to last field
sub di, size FieldInfo
; si <- total number of chars
mov si, ss:[bx].TOCV_ext.TOCE_nChars
call UpdateFieldWidthCommon
;
; The field width is up to date. Restore the char padding to use
; and set the adjustment to zero.
;
popdw axcx ; ax.ch <- space padding
clr dx ; No adjustment
ornf ah, mask TMMF_CHARACTER_JUSTIFICATION
quit:
;
; dx = Line adjustment
; ax.ch = Space padding
;
.leave
ret
leftJustifyPop:
pop bx, cx
;
; The line has only 1 character -- left justify it
;
call LeftJustifyLine
jmp quit
FullCharJustifyLine endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FigureLastFieldEndForJustification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Figure the end of the last field on the line.
CALLED BY: HandleJustification
PASS: *ds:si = Instance
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
cx = Pointer past line/field data
RETURN: dx = End of last field, including margin
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 5/28/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FigureLastFieldEndForJustification proc near
uses ax, di
.enter
mov di, cx ; es:di <- ptr to last field
sub di, size FieldInfo
mov dx, es:[di].FI_position ; dx <- position of field
call GetLineLeftFromTOCV ; ax <- left edge of line
add dx, ax ; dx <- left edge of field
; Add in justification width
add dx, ss:[bp].LICL_lastFieldJustWidth
.leave
ret
FigureLastFieldEndForJustification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CalculateCharAttrCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Callback routine for GrTextObjCalc.
Returns the character attributes for a given text offset
CALLED BY: GrTextObjCalc from CommonLineCalculate
PASS: ss:bx = TOC_vars
di = Offset into the field
ds = Segment address of old text pointer
RETURN: TMS_textAttr set
ds:si = Pointer to the text
cx = Number of characters in this style
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 11/ 7/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalculateCharAttrCallback proc far
uses ax, bx, dx, di, bp
.enter
;
; Check to see if we need to unlock the old text pointer
;
mov bx, bp ; ss:bx <- TOC_vars
mov bp, ss:[bp].TOCV_ext.TOCE_passBack ; ss:bp <- LICL_vars
mov ax, ds ; ax <- segment addr of old text
lds si, ss:[bp].LICL_object ; *ds:si <- text instance
tst di ; Branch if this is the first
jz firstCall ; callback
call TS_UnlockTextPtr ; Release the old text
firstCall:
;
; Compute the offset into the text object
;
clr dx ; dx.ax <- offset into field
mov ax, di
; dx.ax <- offset into object
adddw dxax, ss:[bp].LICL_range.VTR_start
;
; Get a pointer to the text
;
push ax ; Save low word of offset
call TS_LockTextPtr ; ds:si <- ptr to the text
; ax <- # of characters
mov cx, ax ; cx <- # of characters
pop ax ; Restore low word of offset
;
; Mark that we've locked some text
;
or ss:[bp].LICL_calcFlags, mask CF_TEXT_LOCKED
;
; ds:si = Pointer to text
; cx = Number of characters after ds:si
; ss:bp = LICL_vars
; ss:bx = TOC_vars
;
; Fill in all the attributes, we need:
; *ds:si = Instance
; bx:di = Pointer to TextAttr structure
; dx.ax = Offset into text (already set)
;
push cx, ds, si ; Save: Num chars after ds:si
push di ; Offset to start of run
; Pointer to text
lds si, ss:[bp].LICL_object ; *ds:si <- text instance
lea di, ss:[bx].TMS_textAttr ; bx:di <- ptr to attributes
push bx
mov bx, ss
call TA_FarFillTextAttrForDraw ; dx.ax <- # of chars in run
; Carry set if has ext-style
; cx has VisTextExtendedStyles
pop bx
pushf ; Save "has extd style" flag
xchg cx, ax ; cx <- # of characters
; ax has VisTextExtendedStyles
tst dx ; if nChars <= 64K, then done
jz gotNumChars
mov cx, 0xffff ; else use 64K-1 chars
gotNumChars:
popf ; Restore "has extd style" flag
pop di
;
; Extended styles are implemented in the text object, and not in the
; kernel. For that reason we need to handle saving the position at
; which the extended style was encountered, and after the calculation
; is done, if the extended style is in the line, we need to set the
; bit which signals that the line contains an extended style.
;
; Actually, we normally will go to noExtStyle, but now tha we
; pay attention to the wrap flag, we need to make sure it is turned
; off unless explicitly stated. The structure is not cleared
; in between callbacks. -- lshields 10/24/2000
jnc eraseNoWrapFlag
; If we have the extended flag of wrap set, then
; pass it on to the TextMetricStyle structure for the kernel
test ax, mask VTES_NOWRAP
jne haveNoWrapFlag
eraseNoWrapFlag:
and ss:[bx].TMS_flags, not mask TMSF_NOWRAP
jmp doneWrapFlag
haveNoWrapFlag:
or ss:[bx].TMS_flags, mask TMSF_NOWRAP
doneWrapFlag:
cmp ss:[bp].LICL_extStylePos, -1
jnz noExtStyle
mov ss:[bp].LICL_extStylePos, di ; Save position
noExtStyle:
pop bp, ds, si ; Rstr: Num chars after ds:si
; Offset to start of run
; Pointer to text
;
; ds:si = Pointer to text
; cx = Number of characters in this style
; bp = # of characters after the text pointer
;
; We want to return the minimum of the number of characters in this
; style and the number of characters in this hunk.
;
cmp cx, bp ; Branch if more total chars
jbe gotCount ; than style
mov cx, bp ; Else use total count
gotCount:
.leave
ret
CalculateCharAttrCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CalculateGraphicCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Graphic callback routine.
CALLED BY: GrTextObjCalc from CommonLineCalculate
PASS: ss:bx = LICL_vars
di = Offset into the field
ds = Segment address of text pointer
RETURN: cx = Height of the graphic of graphic at current position
dx = Width of the graphic
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 2/28/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalculateGraphicCallback proc far
uses ax, si, bp, ds
.enter
mov bp, ss:[bp].TOCV_ext.TOCE_passBack ; ss:bp <- LICL_vars
lds si, ss:[bp].LICL_object ; *ds:si <- instance ptr
call TextGStateCreate ; I don't know why we need this
clr dx
mov ax, di ; dx.ax <- offset into field
; dx.ax <- current offset
adddw dxax, ss:[bp].LICL_range.VTR_start
call TG_GraphicRunSize ; cx <- width, dx <- height.
xchg cx, dx ; Need them exchanged.
call TextGStateDestroy ; Nuke the gstate
.leave
ret
CalculateGraphicCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CalculateHyphenCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Hyphenation callback routine.
CALLED BY: GrTextObjCalc from CommonLineCalculate
PASS: ss:bp = pointer to TOC_vars structure on stack.
di = Offset to the place where we would split the word
TOCI_lastWordStart -
Offset in the text where the word to break starts
TOCI_lastWordPos -
Position (distance from left edge of the field) where
the word to break starts
RETURN: TOCI_suggestedHyphen -
The offset to break the word at. Zero to break at the
start of the word.
TOCI_suggestedHyphenPos -
The position (distance from left edge of the field)
where the hyphen starts.
TOCE_hyphenWidth -
Width of the hyphen that was placed at the end of
the line.
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 11/ 7/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalculateHyphenCallback proc far
class VisTextClass
uses ax, bx, cx, dx, bp, ds, si, di
.enter
mov bx, ss:[bp].TOCV_ext.TOCE_passBack ; ss:bx <- LICL_vars
lds si, ss:[bx].LICL_object ; *ds:si = instance ptr
;
; Assume hyphenation is not possible.
;
clr ss:[bp].TOCV_int.TOCI_suggestedHyphen
;
; If we aren't saving the results, we can't easily do hyphenation
; because we don't know if the previous lines were hyphenated.
;
test ss:[bx].LICL_calcFlags, mask CF_SAVE_RESULTS
jz reallyQuit
;
; Save the gstate because we might mess with it
;
mov ax, di
mov di, ss:[bp].TMS_gstateHandle
call GrSaveState
push di ; save the handle
mov di, ax
;
; Check to make sure we haven't hyphenated too many lines in
; a row - as determined by VisTextHyphenationInfo, which is set by
; the hyphenation controller.
;
call CheckConsecutiveHyphenatedLines ; cx = nonzero iff OK
jcxz quit
setPosition:
; *ds:si -> instance ptr
; ss:bp = TOC_vars
; ss:bx = LICL_vars
; di = break position to try
;
; We now need to check di, the word break position, and see whether
; a hyphen would also fit before the border.
;
; If a hyphen fits, we proceed to check for auto-hyphenation points
; using that word break position as our limit.
;
; Otherwise if there are more characters in the current word and
; before the current break position we decrement the break position
; until the hyphen will fit. If we run out of characters in the word
; and the hyphen still won't fit, we can't hyphenate.
;
clr cx ; cx:di = offset into field
push ax
call SetHyphenationPosition ; ax = 0 for NO hyphenation
; cx:di = field break position
tst ax
pop ax
jz quit
;
; Compute the offset to the start of the word and the offset
; to where it overflows the line. Pass these off to another module
; which actually does the hyphenation work.
;
adddw cxdi, ss:[bx].LICL_range.VTR_start ; cx.di <- offset into text
clr dx ; dx.ax <- start of the word
mov ax, ss:[bp].TOCV_int.TOCI_lastWordStart
adddw dxax, ss:[bx].LICL_range.VTR_start
; set bx = VisTextParaAttr hyphenation info
push bx ; save ss:bx -> LICL_vars
mov bx,ss:[bx].LICL_theParaAttr.VTMPA_paraAttr.VTPA_hyphenationInfo
;
; *ds:si= Instance
; dx.ax = Word start
; cx.di = Word break position
; bx = hyphenation info
;
call HyphenateWord ; Do the hyphenation
; ax = break pos in the word
pop bx ; restore ss:bx -> LICL_vars
jc quit ; carry set -> no hyphenation
;
; *ds:si= Instance
; ss:bp = TOC_vars
; ss:bx = LICL_vars
; ax = Offset into the word where we want to break
; di.cl = Position in the word where the hyphen character starts
; dx.ch = Width of the hyphen character
;
;
; Get the break position in the field so we can check if hyphen fits
; Field break position = lastWordStart + wordBreakPosition
;
add ax, ss:[bp].TOCV_int.TOCI_lastWordStart ; ax=offset into field
call CheckHyphenFits ; carry set -> hyphen doesn't
; fit, so try again if possible
jc resetHyphenation
;
; The hyphenation was possible, and the hyphen does fit.
;
;
; Save the hyphen position
;
mov ss:[bp].TOCV_int.TOCI_suggestedHyphen, ax
;
; Save the hyphen width
;
movwbf ss:[bp].TOCV_ext.TOCE_hyphenWidth, dxch
;
; The position where the hyphen starts is:
; lastWordPos + hyphenStartPos
;
addwbf dicl, ss:[bp].TOCV_int.TOCI_lastWordPos
movwbf ss:[bp].TOCV_int.TOCI_suggestedHyphenPos, dicl
quit:
;
; Restore the gstate
;
pop di
call GrRestoreState
reallyQuit:
.leave
ret
resetHyphenation:
clr cx
mov di, ax ; di = break pos
jmp setPosition
CalculateHyphenCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CalculateHeightCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find out if the region requires that the line get narrower
due to a line-height change.
CALLED BY: GrTextObjCalc
PASS: ss:bp = TOC_vars
ax.bl = New line height if characters are added
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 9/22/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalculateHeightCallback proc far
uses ax, cx, dx, bp, di, ds, si
.enter
;
; Get stack frame pointers that are useful.
;
mov dl, bl ; ax.dl <- line height
mov bx, bp ; ss:bx <- TOC_vars
mov bp, ss:[bp].TOCV_ext.TOCE_passBack ; ss:bp <- LICL_vars
lds si, ss:[bp].LICL_object ; *ds:si = instance ptr
;
; Compute new values for TA_GetParaAttrForPosition
;
cmpwbf axdl, ss:[bp].LICL_lineHeight ; Check for taller
jbe quit ; Branch if not
;
; The new field height is taller than the height of the rest of
; the line.
;
; ax.dl = New line height
;
movwbf ss:[bp].LICL_lineHeight, axdl ; Save new line heightn
;
; Compute the old width of the line
;
mov cx, LICL_realRightMargin ; cx <- old right edge
call GetLineLeftFromTOCV ; ax <- old left edge
sub cx, ax ; cx <- old line width
mov dx, cx ; dx <- old line width
;
; Fill in new paragraph attributes
;
push dx ; Save old line width
movdw dxax, ss:[bp].LICL_lineStart ; dx.ax <- offset of paragraph
call T_GetNewParaAttr ; Get (possibly new) attributes
; 3/28/94: do not use
; T_EnsureCorrectParaAttr here,
; as we need the attributes for
; *this* line (they could have
; changed from the margins of
; the first line of the
; paragraph, owing to wrapping
; around graphics) -- ardeb
pop dx ; Restore old line width
;
; Figure the difference in line widths
;
mov cx, LICL_realRightMargin ; cx <- new right edge
call GetLineLeftFromTOCV ; ax <- new left edge
sub cx, ax ; cx <- new line width
;
; Compute the difference between the old and new line widths
;
sub cx, dx ; cx <- difference in widths
;
; The difference can only be negative. That is to say, the old width
; can't be less than the new width.
;
; If the difference is zero, then quit...
;
; tst cx
; jz quit
;
; this can now happen as getting the new para attrs above means we could get
; a paragraph that is wider that the previous one (I have no idea what this
; really means). (Note we nuked the above tst also, as adding zero below is
; not a problem) - brianc 5/3/94
;
;EC < ERROR_NS -1 >
;
; The new difference isn't zero, we need to adjust the area to fill
; down by the difference.
;
add ss:[bx].TOCV_ext.TOCE_areaToFill, cx
quit:
.leave
ret
CalculateHeightCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CalculateTabCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Callback routine for GrTextObjCalc() when it encounters a TAB
character as the first char in a field.
CALLED BY: GrTextObjCalc from CommonLineCalculate
PASS: ds:si = pointer to text
ss:bp = TOC_vars
ss:bx = LICL_vars
RETURN: carry set if there is no tabstop within the margins.
TOCE_areaToFill set correctly.
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
If the field starts with a tab, then we want to choose the appropriate
tabstop for it. This means searching for a tabstop in the paraAttr, if
none is found, using a default tabstop, and if no tabstop is available
then using the intrinsic width of the tab character to decide where
the field falls. If the intrinsic width of a TAB is too large to fit
on the line, then we return the carry set to signify that there is
no area to fit to.
If the tab is not a left-justified tab-stop then the space available
to it has already been set by ComputeAreaToFill() before GrTextObjCalc
was ever called.
Depends on the associated tabstop.
Left tabstop:
Distance from this tabstop to right margin.
No, Right, Center, Character anchored tabstop:
Distance from end of previous field to right margin.
(Already set by ComputeAreaToFill)
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CalculateTabCallback proc far
uses ax, bx, cx, dx, di, si, bp, ds, es
.enter
mov bx, bp ; ss:bx <- TOC_vars
mov bp, ss:[bp].TOCV_ext.TOCE_passBack ; ss:bp <- LICL_vars
lds si, ss:[bp].LICL_object ; *ds:si <- instance ptr
les di, ss:[bp].LICL_linePtr ; es:di <- line pointer
mov dx, ss:[bp].LICL_fieldPtr ; es:dx <- field pointer
call FindNextTabStop ; carry set if none found
; dx <- position of tab
; al <- TabAttributes
jc quit ; Branch if there is none
;
; There is a tabstop. Check the type of the tabstop.
;
ExtractField byte, al, TA_TYPE, al ; al <- tab justification
cmp al, TT_LEFT
jne quitHasSpace
;
; Left justified tabstop.
;
mov ax, LICL_realRightMargin ; ax <- end of area
sub ax, dx ; ax <- space to fill
mov ss:[bx].TOCV_ext.TOCE_areaToFill, ax
quitHasSpace:
clc ; Signal there is space
quit:
.leave
ret
CalculateTabCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FindNextTabStop
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the tabstop to associate with the next field.
CALLED BY: TabCallBack
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
es:dx = Field
RETURN: carry set if there are no tabstops left on the line.
dx = Position of the tab
al = TabAttributes
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Find the first tab in the tab list whose position is greater than the
end of the previous field.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 11/ 1/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FindNextTabStop proc near
uses cx, si
.enter
call ComputeEndPrevField ; ax <- position to search from
mov si, dx ; es:si <- field
DBCS < push di >
call SearchRulerTabList ; Find a tab in the ruler
jc setTab ; Branch if we found one
;
; The current line doesn't have any user-set tabs after the current
; position. Check to see if there are any default tabs we can use.
;
call ChooseDefaultTab ; Find a default tab
jc setTab ; Branch if we found one
DBCS < pop di >
;
; No suitable default tabstop see if there is a usable tabstop on the
; next line.
;
; If there is then we can return 'no suitable tab' and the tab will
; advance to the next line.
;
; If there isn't then we need to use the intrinsic width of a tab to
; get a new position. If that position is beyond the right margin then
; we want to return that no tab worked.
;
call CheckNextLineHasUsableTab
jc done ; Branch if next has usable tab
;
; The current line has no more tabs and no more default tabs on it.
; The next line doesn't have any tabs that we can tab to. Check to see
; if a tab-character of some "intrinsic" space can fit.
;
call CheckIntrinsicTabWidth
jc done ; Branch if intr. tab won't fit
;
; The current line has no more tabs on it. It also has no more default
; tabs on it. The next line has no tabs on it that we can tab to.
; The current line can hold a tab-character that has the "intrinsic"
; width so we use that.
;
DBCS < push di >
setTab:
;
; dl = TabReference
; cx = Position of tab
; al = TabAttributes
SBCS < ; ah = Tab anchor character >
DBCS < ; di = Tab anchor character >
; ss:bx = TOC_vars
DBCS < ; on stack = saved DI >
;
mov ss:[bp].LICL_tabReference, dl ; Save the tab-reference to use
SBCS < mov dl, ah ; dx <- anchor character>
SBCS < clr dh >
SBCS < mov ss:[bx].TOCV_ext.TOCE_anchorChar, dx >
DBCS < mov ss:[bx].TOCV_ext.TOCE_anchorChar, di >
mov dx, cx ; dx <- position of tab
; al already holds TabAttributes
clc ; Signal: Usable tab found
DBCS < pop di >
done:
.leave
ret
FindNextTabStop endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SearchRulerTabList
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Search the rulers tab-list looking for a suitable tab.
CALLED BY: FindNextTabStop
PASS: ax = Position to search from
ss:bp = LICL_vars
RETURN: carry set if we found a usable tab
dl = TabReference
cx = Position of the tab
al = TabAttributes
SBCS < ah = Tab anchor character >
DBCS < di = Tab anchor character >
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
tab = FindTabInList(pos, tabList)
if (no tab found) {
if (pos < leftMargin) {
Use left margin as tab
}
} else {
if (pos < leftMargin) {
if (tab.pos > leftMargin) {
Use left margin as tab
}
}
}
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SearchRulerTabList proc near
uses bx
.enter
clr cx ; cx <- number of tabs in line
mov cl, LICL_paraAttr.VTPA_numberOfTabs
mov dx, LICL_realRightMargin ; dx <- margin to wrap to
lea bx, ss:[bp][LICL_theParaAttr+VTPA_tabList]
;
; ax = Position after which we want to find a tab
; cx = Number of tabs
; ss:bx = Pointer to tab list
; dx = Right margin we are wrapping to
;
; Run through the list of tabs until we run out, or we find one which
; fits the bill.
;
jcxz noneFound ; Quit if no tabs
tabLoop:
cmp ss:[bx].T_position, dx ; Check for beyond right-margin
ja noneFound ; Assume none if so
cmp ss:[bx].T_position, ax ; Check for after position
ja foundTab ; Found one if it is
add bx, size Tab ; Advance to next tab
loop tabLoop ; Loop to try next one
noneFound:
;
; No suitable tab was found.
; Check for current position being less than the left margin.
; If it is, then use the left margin value.
;
cmp ax, LICL_paraAttr.VTPA_leftMargin
jb useLeftMargin
;
; Check for the current position being less than the para-margin.
; If it is, then use the para margin value.
;
cmp ax, LICL_paraAttr.VTPA_paraMargin
jae noSuitableTab
mov cx, LICL_paraAttr.VTPA_paraMargin
mov dl, RULER_TAB_TO_PARA_MARGIN
mov ax, TT_LEFT or (0 shl 8) ; al = attr (TT_LEFT)
jmp gotTab
useLeftMargin:
;
; Position is less than the left margin, tab to the left margin.
;
mov cx, LICL_paraAttr.VTPA_leftMargin
mov dl, RULER_TAB_TO_LEFT_MARGIN
mov ax, TT_LEFT or (0 shl 8) ; al = attr (TT_LEFT)
; ah = anchor (none)
jmp gotTab
useTab:
mov dl, TRT_RULER shl offset TR_TYPE
or dl, cl ; Save reference #
mov cx, ss:[bx].T_position
SBCS < mov ax, ss:[bx].T_anchor ; ah = anchor >
DBCS < mov di, ss:[bx].T_anchor ; di = anchor >
SBCS < mov ah, al >
mov al, ss:[bx].T_attr ; al = attr
gotTab:
stc ; Signal: found a tab
quit:
;
; carry set if we found a usable tab.
; cx = Position of the tab
; dl = TabReference
; al = TabAttributes
SBCS < ; ah = Tab anchor character >
DBCS < ; di = Tab anchor character >
;
.leave
ret
foundTab:
;
; Found a suitable tabstop.
;
; If the position is less than the left margin and the tab that we
; found is greater than the left margin, we want to use the left
; margin as the position.
;
; ax = Position we started looking from
; ss:bx = Pointer to the tab
;
cmp ax, LICL_paraAttr.VTPA_leftMargin
jae useTab
mov ax, ss:[bx].T_position
cmp ax, LICL_paraAttr.VTPA_leftMargin
ja useLeftMargin
jmp useTab
noSuitableTab:
clc
jmp quit
SearchRulerTabList endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ChooseDefaultTab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find a usable default tab after a given position
CALLED BY: FindNextTabStop
PASS: ss:bp = LICL_vars
ax = Position to find the tab after
RETURN: carry set if the tab was found
dl = TabReference
cx = Position of tab
al = TabAttributes
SBCS < ah = Tab anchor character >
DBCS < di = Tab anchor character >
carry clear otherwise
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ChooseDefaultTab proc near
uses di
.enter
;
; Check for no default tabs.
;
tst LICL_paraAttr.VTPA_defaultTabs ; Check for no default tabs
jz done ; carry clear if we branch
;
; What we are doing here is the following:
; ax = the current position.
;
; round ax up to the next default tab position by adding in the size
; of the default tab (+1) and rounding down.
;
; cx = distance between tabs * 32
; ax = current position * 32
;
inc ax ; Force to next tab
mov cl, 5 ; cl <- # of bits of fraction
shl ax, cl ; ax <- position * 32
;
; Now ax is a 11.5 (integer.fraction) value.
;
; Compute the size of a default tab into cx.
;
mov cx, LICL_paraAttr.VTPA_defaultTabs
shl cx
shl cx ; cx <- spacing * 32
;
; Get the position past the next default tab and round down to the
; nearest default tabstop position.
;
clr dx ; dx.ax <- position
add ax, cx ; ax <- distance past next tab
adc dx, 0
push ax ; Save position past tabstop
div cx ; ax <- default tab number
; dx <- remainder
pop cx ; cx <- position past tabstop.
;
; cx = Position we were looking for a default tab near
; ax = Default tab number (numbered from 0 on the left)
; dx = Remainder (distance from tabstop to position in cx)
;
sub cx, dx ; cx <- position of tabstop
;
; The position (in cx) is an 11.5 (integer.fraction) value. Since
; we aren't dealing with fractions here we shift right 5 times to
; get an integer value
;
ExtractField word, cx, EIFF_INT, cx ; cx <- integer position
;
; Almost done... We just need to get everything into the right registers
; cx = Position of the tabstop
; al = Default tab number
;
mov dl, al ; dl <- default tab number
or dl, (TRT_OTHER shl offset TR_TYPE)
mov al, TT_LEFT ; Default tab <=> left justified
SBCS < mov ah, 0 ; No anchor character >
DBCS < mov di, 0 ; No anchor character >
;
; Now check to see if the tab position that we have established is
; beyond the right margin of the line. If it is, then we want to
; return the carry clear, signifying that there is no suitable default
; tab on this line.
;
cmp cx, LICL_realRightMargin
ja done ; (carry clear if jump taken)
stc ; Signal tab is inside margin
done:
.leave
ret
ChooseDefaultTab endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckNextLineHasUsableTab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check to see if the next line has a usable tab on it.
CALLED BY: FindNextTabStop
PASS: ss:bp = LICL_vars
es:di = Line
es:si = Field
RETURN: carry set if the next line has a usable tabstop
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
This routine is only called to check to see if we can move to the next
line when the current line ends in a TAB.
This means that the margins we need to consider are the left and
right, since the next line will never be a paragraph start.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckNextLineHasUsableTab proc near
uses ax, bx, cx, dx
.enter
;
; If the start of this field is at the start of the line then we
; don't want to skip to the next line. If we did it would leave this
; line with no characters on it and that would be bad.
;
; We check this by seeing if the field is:
; a) First field on line
; b) Contains no characters
; Since the tab is always encountered as the first field on the line
; the field must be empty. This makes life easy... we just check for
; it being the first field on the line.
;
lea ax, es:[di].LI_firstField ; ax <- ptr to first field
cmp ax, si ; Check for first field on line
jz none ; Branch if not first field
;
; We know that if we move to the next line we won't leave the current
; line completely empty. Now all we need to do is check to see if
; there actually is a tabstop on the next line.
;
lea bx, ss:[bp][LICL_theParaAttr+VTPA_tabList]
mov ax, LICL_paraAttr.VTPA_leftMargin ; ax <- left margin
mov dx, LICL_realRightMargin ; dx <- right margin
clr ch ; cx <- # of tabs
mov cl, LICL_paraAttr.VTPA_numberOfTabs
jcxz checkDefaultsAndOtherStuff ; Branch if no tabs
tabLoop:
;
; Make sure the tab actually falls inside the margins
;
cmp ss:[bx].T_position, dx
ja checkDefaultsAndOtherStuff
cmp ss:[bx].T_position, ax
ja found
add bx, size Tab ; Check next tab
loop tabLoop
checkDefaultsAndOtherStuff:
;
; There aren't any *real* tabs on the next line, or an *real* tabs
; that are within the margins, but there may be a default tab we can
; use. Heck, we may even be able to use the para-margin, if the left
; margin is less.
;
mov ax, LICL_paraAttr.VTPA_leftMargin ; ax <- left margin
cmp ax, LICL_paraAttr.VTPA_paraMargin ; Check for <para
jb found ; Branch if para is tab
;
; Well, we can't use the para-margin as the tabstop, but we can use
; a default tab, if one exists.
;
call ChooseDefaultTab ; carry set if tab found
; Nukes ax, cx, dx
jc found ; Jmp if default exists
none:
;
; There isn't a tab on the next line that we can use.
;
clc ; No usable tabs
done:
;
; Carry set if there is a tab on the next line that we can use.
;
.leave
ret
found:
;
; There is a tab on the next line that we can use.
;
stc ; Has usable tabs
jmp done
CheckNextLineHasUsableTab endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckIntrinsicTabWidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check to see if a tab character of "intrinsic" width can
fit on this line.
CALLED BY: FindNextTabStop
PASS: ss:bp = LICL_vars
ss:bx = TOC_vars
es:di = Line
es:si = Field
ax = End of previous field
RETURN: carry set if an "intrinsic" tab won't fit
carry clear otherwise
cx = Tab position
al = Tab anchor
ah = TabAttributes
dl = TabReference
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckIntrinsicTabWidth proc near
if NO_TAB_IS_RIGHT_MARGIN
;see tlTabUtils.asm for more of this fix
;
; attempt better intrinsic tab behavior
;
mov cx, LICL_paraAttr.VTPA_rightMargin
dec cx
else
mov cx, ax
add cx, TAB_INTRINSIC_WIDTH ; cx <- next tab position
endif
cmp cx, LICL_realRightMargin
jae tooFar
;
; The thing fits (fancy that). Set the default tab anchor/attributes.
;
mov ah, TT_LEFT ; ah <- Attributes
clr al ; al <- anchor
; clears carry too
mov dl, OTHER_INTRINSIC_TAB or (TRT_OTHER shl offset TR_TYPE)
done:
;
; Carry clear if an intrinsic tab will fit
; cx = Position
; al = Anchor
; ah = TabAttributes
; dl = TabReference
;
ret
tooFar:
;
; An intrinsic tab doesn't fit. If this is the only character on the
; line, then there is no way we can word-wrap it. This means that
; we must use the special "zero-width" tab.
;
mov cx, ax ; cx <- position of tab
call GetLineLeftFromTOCV ; ax <- left edge of line
cmp cx, ax ; Check for starting at left
je tabOnlyIsTooWide ; Branch if one tab is too wide
;
; The tab is not the first thing on the line, go ahead and wrap it.
;
stc ; Signal: doesn't fit
jmp done
tabOnlyIsTooWide:
mov ah, TT_LEFT ; ah <- Attributes
clr al ; al <- anchor
; clears carry too
mov dl, OTHER_ZERO_WIDTH_TAB or (TRT_OTHER shl offset TR_TYPE)
jmp done
CheckIntrinsicTabWidth endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AddFieldToLine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add a field to the end of the line.
CALLED BY: CommonLineCalculate
PASS: *ds:si = Instance ptr
ss:bp = LICL_vars with LICL_addFieldCallback set
es:di = Pointer to the line
cx = Pointer past the line/field data
es:dx = Pointer to the field we want to have
RETURN: es:di = Pointer to the line
cx = Pointer past the line/field data
es:dx = Pointer to the field
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 8/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AddFieldToLine proc near
.enter
;
; Check to see if the field doesn't already exist.
;
cmp dx, cx ; Compare ptr to data-end
jb quit ; Branch if ptr is before end
;
; Call the callback to add a field.
;
if ERROR_CHECK
;
; If not vfptr check if the segment passed is same as current
; code segment. Since it is allowed to pass a fptr to the
; callback if you are calling from the same segment.
;
FXIP< push ax, bx >
FXIP< mov ax, ss:[bp].LICL_addFieldCallback.segment >
FXIP< cmp ah, 0xf0 >
FXIP< jae isVirtual >
FXIP< mov bx, cs
FXIP< cmp ax, bx >
FXIP< ERROR_NE TEXT_FAR_POINTER_TO_MOVABLE_XIP_RESORCE >
FXIP<isVirtual: >
FXIP< pop ax, bx >
endif
;
; Validate that the callback is not in a movable code segment
;
NOFXIP< call ss:[bp].LICL_addFieldCallback ; Add me a field >
FXIP< push ax, bx >
FXIP< movdw bxax, ss:[bp].LICL_addFieldCallback >
FXIP< call ProcCallFixedOrMovable >
FXIP< pop ax, bx >
;
; es:di = Pointer to the line
; es:dx = Pointer to the field
; cx = Pointer past line/field data
;
;
; If we had to add fields then we clearly have changed the line
;
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
.leave
ret
AddFieldToLine endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TruncateLineAtPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Nuke any fields after a given position in a line.
CALLED BY: CommonLineCalculate
PASS: *ds:si = Instance ptr
es:di = Pointer to the line
es:dx = Pointer to the place we want it cut off
cx = Pointer past the end of the line/field data
ss:bp = LICL_vars
RETURN: es:di = Pointer to the line
cx = Pointer past the end of the line/field data
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TruncateLineAtPosition proc near
uses dx
.enter
add dx, size FieldInfo
cmp dx, cx ; Check for perfect size already
je quit ; Branch if all is perfect
;
; Call a callback to handle this stuff.
;
push dx ; Save pointer past end of data
sub cx, di ; cx <- size of the line/field data
sub dx, di ; dx <- size we want it to be
if ERROR_CHECK
;
; If not vfptr check if the segment passed is same as current
; code segment. Since it is allowed to pass a fptr to the
; callback if you are calling from the same segment.
;
FXIP< push ax, bx >
FXIP< mov ax, ss:[bp].LICL_truncateFieldsCallback.segment >
FXIP< cmp ah, 0xf0 >
FXIP< jae isVirtual >
FXIP< mov bx, cs >
FXIP< cmp ax, bx >
FXIP< ERROR_NE TEXT_FAR_POINTER_TO_MOVABLE_XIP_RESORCE >
FXIP<isVirtual: >
FXIP< pop ax, bx >
endif
NOFXIP< call ss:[bp].LICL_truncateFieldsCallback >
FXIP< push ax, bx >
FXIP< movdw bxax, ss:[bp].LICL_truncateFieldsCallback >
FXIP< call ProcCallFixedOrMovable >
FXIP< pop ax, bx >
pop cx ; Restore pointer past end of data
;
; If we had to remove fields then we clearly have changed the line
;
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
.leave
ret
TruncateLineAtPosition endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewFieldNChars
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save the FI_nChars for a field.
CALLED BY: FindFieldEnd
PASS: es:dx = Field
ax = Number of characters in the field
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if FI_nChars changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewFieldNChars proc near
uses di
.enter
mov di, dx
cmp es:[di].FI_nChars, ax
je quit
mov es:[di].FI_nChars, ax
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
.leave
ret
SaveNewFieldNChars endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewFieldPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save the new position for a field.
CALLED BY: CalcFieldPosition
PASS: es:dx = Field
ax = New position
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if position changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewFieldPosition proc near
uses di
.enter
mov di, dx ; es:di <- field
cmp es:[di].FI_position, ax
je quit
mov es:[di].FI_position, ax
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
.leave
ret
SaveNewFieldPosition endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewFieldWidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save the new width for a field.
CALLED BY: CalcFieldPosition
PASS: es:dx = Field
ax = New width
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if position changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewFieldWidth proc near
uses di
.enter
mov di, dx ; es:di <- field
cmp es:[di].FI_width, ax
je quit
mov es:[di].FI_width, ax
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
.leave
ret
SaveNewFieldWidth endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewFieldTab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save the new tab reference for a field.
CALLED BY: CalcFieldPosition
PASS: es:dx = Field
al = TabReference
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if position changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewFieldTab proc near
uses di
.enter
mov di, dx ; es:di <- field
cmp es:[di].FI_tab, al
je quit
mov es:[di].FI_tab, al
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
.leave
ret
SaveNewFieldTab endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineCharCount
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save character count for a line.
CALLED BY: CommonLineCalculate
PASS: es:di = Line
dl.ax = Line char count (WordAndAHalf)
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if count changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineCharCount proc near
uses ax, bx, cx, dx
.enter
mov cx, ax ; bl.cx <- new value
mov bl, dl
CommonLineGetCharCount ; dl.ax <- old value
cmp cx, ax
jne saveNewValue
cmp bl, dl
jne saveNewValue
quit:
.leave
ret
saveNewValue:
clr dh
sub ax, cx ; dx.ax <- amount of change
sbb dl, bl
sbb dh, 0
adddw ss:[bp].LICL_lineStartChange, dxax
mov dl, bl ; dl.ax <- new start
mov ax, cx
CommonLineSetCharCount ; Set new start
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
jmp quit
SaveNewLineCharCount endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineEnd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save line-end
CALLED BY: CommonLineCalculate
PASS: es:di = Line
ax = End of the line
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if count changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineEnd proc near
.enter
cmp ax, es:[di].LI_lineEnd
jne saveNewValue
quit:
.leave
ret
saveNewValue:
mov es:[di].LI_lineEnd, ax
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
jmp quit
SaveNewLineEnd endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save new flags for a line.
CALLED BY: CommonLineCalculate
PASS: es:di = Line
ax = LineFlags
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if flags changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineFlags proc near
uses dx
.enter
;
; Always clear the "needs calc" bit, since we calculated the line.
;
and es:[di], not mask LF_NEEDS_CALC
;
; Now check the new flags against the old ones, not counting the
; "needs calc" or "needs draw" flags.
;
mov dx, es:[di].LI_flags
and dx, not (mask LF_NEEDS_DRAW or mask LF_NEEDS_CALC)
cmp dx, ax
je quit
;
; Set the flags in ax, preserving the "needs draw" bit.
;
mov dx, es:[di].LI_flags
and dx, mask LF_NEEDS_DRAW
or ax, dx
mov es:[di].LI_flags, ax
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
.leave
ret
SaveNewLineFlags endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineHeight
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save new height for a line.
CALLED BY: CommonLineCalculate
PASS: es:di = Line
dx.ah = Height
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if height changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineHeight proc near
cmpwbf es:[di].LI_hgt, dxah
je quit
;
; Compute the difference in height and use it to update the "inserted
; space" field of the LICL_vars.
;
push ax, dx, cx
subwbf dxah, es:[di].LI_hgt ; dx.ah <- amount taller
clr al ; dx.ax <- amount taller
clr cx ; cx.dx.ax <- amount taller
tst dx ; Unless of course dx is <0
jns gotChange ; In which case we sign-extend
dec cx ; cx <- 0xffff
gotChange:
adddwf ss:[bp].LICL_insertedSpace, cxdxax
addwbf es:[di].LI_hgt, dxah
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
pop ax, dx, cx
quit:
ret
SaveNewLineHeight endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineBLO
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save new baseline for a line.
CALLED BY: CommonLineCalculate
PASS: es:di = Line
dx.ah = baseline
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if height changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineBLO proc near
cmpwbf es:[di].LI_blo, dxah
je quit
movwbf es:[di].LI_blo, dxah
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
ret
SaveNewLineBLO endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineAdjustment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save new adjustment for a line.
CALLED BY: CommonLineCalculate
PASS: es:di = Line
ax = Adjustment
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if adjustment changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineAdjustment proc near
cmp es:[di].LI_adjustment, ax
je quit
mov es:[di].LI_adjustment, ax
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
ret
SaveNewLineAdjustment endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineSpacePad
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save new space padding for a line.
CALLED BY: CommonLineCalculate
PASS: es:di = Line
dx.ah = Space padding
ss:bp = LICL_vars
RETURN: LICL_calcFlags w/ CF_LINE_CHANGED bit set if padding changed
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineSpacePad proc near
cmpwbf es:[di].LI_spacePad, dxah
je quit
movwbf es:[di].LI_spacePad, dxah
or ss:[bp].LICL_calcFlags, mask CF_LINE_CHANGED
quit:
ret
SaveNewLineSpacePad endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewFieldValues
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save values computed for a field in the FieldInfo structure
CALLED BY: FindFieldEnd
PASS: *ds:si = Instance ptr
es:dx = Field
es:di = Line
ss:bp = LICL_vars
ss:bx = TOC_vars
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewFieldValues proc near
uses ax
.enter
;
; FI_position has been set already
;
;
; Set FI_tab ** Problem **
;
mov al, ss:[bp].LICL_tabReference
call SaveNewFieldTab
;
; Set FI_width
;
rndwbf ss:[bx].TOCV_ext.TOCE_fieldWidth, ax
call SaveNewFieldWidth
;
; Set FI_nChars
;
mov ax, ss:[bx].TOCV_ext.TOCE_nChars
call SaveNewFieldNChars
.leave
ret
SaveNewFieldValues endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SaveNewLineValues
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Save values computed for a line in the LineInfo structure
CALLED BY: FindFieldEnd
PASS: *ds:si = Instance ptr
es:dx = Field
es:di = Line
ss:bp = LICL_vars
ss:bx = TOC_vars
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SaveNewLineValues proc near
class VisTextClass
uses ax, dx
.enter
;
; Save LI_hgt
;
movwbf dxah, ss:[bx].TOCV_ext.TOCE_lineHeight
call SaveNewLineHeight
;
; Save LI_blo
;
movwbf dxah, ss:[bx].TOCV_ext.TOCE_lineBLO
call SaveNewLineBLO
;
; Save LI_flags
;
mov ax, ss:[bx].TOCV_ext.TOCE_lineFlags
;
; For small objects, we map LF_ENDS_IN_COLUMN_BREAK and
; LF_ENDS_IN_SECTION_BREAK to LF_ENDS_IN_CR so that things will
; hopefully just work.
;
test ax, mask LF_ENDS_IN_COLUMN_BREAK or \
mask LF_ENDS_IN_SECTION_BREAK
jz saveFlags
push di
call Text_DerefVis_DI ; ds:di <- instance ptr
test ds:[di].VTI_storageFlags, mask VTSF_LARGE
pop di
jnz saveFlags ; Branch if it's large
;
; It's a small object, re-map the flags.
;
and ax, not (mask LF_ENDS_IN_COLUMN_BREAK or \
mask LF_ENDS_IN_SECTION_BREAK)
or ax, mask LF_ENDS_IN_CR
saveFlags:
call SaveNewLineFlags
.leave
ret
SaveNewLineValues endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckConsecutiveHyphenatedLines
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks whether or not the maximum number of consecutive lines
to hyphenate happened before this line.
CALLED BY: CalculateHyphenCallback
PASS: ds:si = instance ptr
ss:bx = pointer to LICL_vars on stack
RETURN: cx = zero if too many consecutive hyphenated lines
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
TJ 11/ 9/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckConsecutiveHyphenatedLines proc near
uses bx, di, ax
.enter
;
; Get the maximum number of lines to hyphenate in cx.
;
push bx
mov bx,ss:[bx].LICL_theParaAttr.VTMPA_paraAttr.VTPA_hyphenationInfo
mov cl, offset VTHI_HYPHEN_MAX_LINES ; cl = amount to shift
shr bx, cl ; cx=bx=max consecutive
mov cx, bx ; lines to hyphenate-1
inc cx ; cx = max lines to hyp
pop bx
;
; If we're on the first line of the text, can't be too many lines.
;
movdw axdi, ss:[bx].LICL_line ; bx:di = current line #
mov bx, ax
tstdw bxdi
jz notTooMany ; first line, OK
;
; loop backwards through #cx previous lines, if they're all
; auto-hyphenated then return 0. Any other case -> return 1.
;
lineLoop:
decdw bxdi ; go to previous line
call TL_LineGetFlags ; ax = LineFlags
test ax, mask LF_ENDS_IN_AUTO_HYPHEN
jz notTooMany ; no auto-hyphen -> OK
test ax, mask LF_STARTS_PARAGRAPH
jnz lastLineCheck ; last line to check, exit loop
tstdw bxdi
jz lastLineCheck ; last line to check, exit loop
dec cx
jnz lineLoop ; if more lines to test, loop
tooMany:
clr cx ; else return - too many lines
lineLoopEnd:
.leave
ret
notTooMany:
mov cx, 1
jmp lineLoopEnd
lastLineCheck:
cmp cx, 1
je tooMany
jmp notTooMany
CheckConsecutiveHyphenatedLines endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetHyphenationPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sets di to a position in the word such that if it's broken
there the hyphen will still fit on the line. Determines if
hyphenation is possible.
CALLED BY: CalculateHyphenCallback
PASS: ds:si = instance
di = position of char that overflowed the line
ss:bp = pointer to TOC_vars on stack
ss:bx = pointer to LICL_vars on stack
RETURN: cx:di = position of char where hyphenation should be tried
ax = 0 if hyphen will not fit, nonzero if it might
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
;
; We need to check the word break position, and see whether
; a hyphen would fit before the border.
;
; If a hyphen fits, we return di unchanged
;
; Otherwise if there are more characters in the current word and
; before the current break position we decrement the break position
; until the hyphen will fit, returning that position as di. If we
; run out of characters in the word and the hyphen still won't fit,
; we can't hyphenate.
;
Assumption: the character at cx:di is not the first
character in the word.
REVISION HISTORY:
Name Date Description
---- ---- -----------
TJ 11/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetHyphenationPosition proc near
class VisTextClass
uses bx,cx,dx,si,bp
overflowPos local word push di
.enter
mov di, ss:[bp] ; ss:di -> TOC_vars
hyphenFitLoop:
mov ax, overflowPos
push bp
mov bp, di
call CheckHyphenFits ; carry clear if hyphen fits
pop bp
jnc offsetOK
;
; Hyphen doesn't fit on the line yet. Check if there are still
; at least two more characters in the word (min prefix to hyphenate).
; If not, return and signal no hyphenation.
;
mov ax, overflowPos
sub ax, 2 ; axbx= pos two before overflow
cmp ax, ss:[di].TOCV_int.TOCI_lastWordStart
jle noHyphen
;
; We can try breaking the word at an earlier character position.
;
dec overflowPos ; overflowPos = previous char
jmp hyphenFitLoop
exit:
.leave
ret
noHyphen:
;
; The word cannot be hyphenated. Signal that, and return.
;
clr ax
jmp exit
offsetOK:
;
; The hyphen will fit on the line with the passed break position.
; return with di unchanged and try to hyphenate.
;
mov di, overflowPos
mov ax, 1
jmp exit
SetHyphenationPosition endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckHyphenFits
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Tests the returned hyphen position to make sure that the
hyphen fits on the line.
CALLED BY: SetHyphenationPosition, CalculateHyphenCallback
PASS: ds:si = instance
ax = position of returned hyphen to check
ss:bp = pointer to TOC_vars on stack
ss:bx = pointer to LICL_vars on stack
RETURN: carry clear if hyphen fits, else carry is set
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
TJ 11/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckHyphenFits proc near
class VisTextClass
uses es, di, cx, ax, dx
.enter
;
; First we get the distance from the start of the field to the hyphen
; position. We do this by calling CommonFieldTextPosition, which will
; also set the right font and stuff for calling GrCharWidth later.
;
push di
;
; Param: set es:di -> current field
;
movdw esdi, ss:[bx].LICL_linePtr
mov di, ss:[bx].LICL_fieldPtr
;
; Param on stack: push offset to start of field
;
movdw cxdx, ss:[bx].LICL_range.VTR_start ; offset to start of field
cmp ss:[bx].LICL_tabReference, RULER_TAB_TO_LINE_LEFT
je gotOffset ; If field starts with tab, skip tab
incdw cxdx ; Advance past TAB
gotOffset:
pushdw cxdx ; push start offset parameter
;
; Param on stack: push offset of character in the field
;
clr cx ; cxdx = position of last
mov dx, ax ; char in the field
cmp ss:[bx].LICL_tabReference, RULER_TAB_TO_LINE_LEFT
je gotPosition ; if skipped tab, dec char pos.
decdw cxdx ; One less character
gotPosition:
pushdw cxdx ; this is the constraint that will be
; used => pixel offset will be found.
;
; Param on stack: push pixel offset to find
;
mov cx, 0x7fff ; pixel offset = big number
push cx ; push param
;
; Param on stack: push space padding
;
clrdw cxdx ; space padding (none)
pushdw cxdx ; push param
call CommonFieldTextPosition ; ax = text offset
; cx = pixel offset
pop di
;
; cx = the pixel distance to the pre-overflow character. We subtract
; this from TOCE_areaToFill to get the space remaining on the line.
;
mov dx, ss:[bp].TOCV_ext.TOCE_areaToFill ; dx = offset to border
sub dx, cx ; dx = dist last char to border
mov cx, dx ; cx = dist last char to border
;
; Get the hyphen width
;
mov di, ds:[si]
add di, ds:[di].Vis_offset
mov di, ds:[di].VTI_gstate ; di = handle to gstate
mov ax, C_HYPHEN
call GrCharWidth ; dx.ah = width of hyphen
inc dx ; add one pixel to avoid writing over
; the margin line itself
mov ax, dx ; ax = hyphen width
;
; Now see if the hyphen fits.
;
cmp cx, ax ; is there room for the hyphen?
jge offsetOK ; yes, clear carry and exit
stc ; else set carry and exit
exit:
.leave
ret
offsetOK:
clc
jmp exit
CheckHyphenFits endp
TextLineCalc ends
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VisTextCalcMinWidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the maximum word width within a given piece of text
CALLED BY: GLOBAL (the browser)
PASS: *ds:si = Instance ptr
dxax = range start
cx = number of characters
RETURN: ax = minimum width
DESTROYED: bx, cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
tony 8/26/99 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if 0
;;; NOTE: THIS ROUTINE DOES NOT WORK YET
;;; It is partially completed in case it ever is needed for the browser
TextObscure segment resource
VisTextCalcMinWidth proc far uses si, di, ds
clr bx
position local dword push dx, ax
object local optr push ds, si
numToCheck local word push cx
numThisBlock local word
maxWidth local word push bx
skippingWhite local word
gstate local word push bx, bx
gstateValidCount local dword
.enter
call TextGStateCreate
call T_GetVMFile ; bx = file
mov di, ds:[si]
add di, ds:[di].Vis_offset ; ds:di = instance data
mov ax, ds:[di].VTI_gstate
mov gstate, ax
mov di, ds:[di].VTI_text ; di = vm block
call HugeArrayLock ; ds:si = data
; ds:si = text
; ax = # characters in this block
blockLoop:
cmp ax, numToCheck
jb 10$
mov ax, numToCheck
10$:
mov numThisBlock, ax
sub numToCheck, ax
mov wordStart, si
mov skippingWhite, TRUE
charLoop:
tstdw gstateValidCount
jnz 15$
call updateGState
15$:
lodsb
cmp al, C_SPACE
jz wordEnd
cmp al, C_CR
jz wordEnd
; character is not a word end -- if we are skipping white space,
; store this as the start of the word
tst skippingWhite
jz nextChar
mov skippingWhite, FALSE
mov wordStart, si
dec wordStart
jmp nextChar
wordEnd:
tst skippingWhite
jnz nextChar
; at the end of a word, calculate width for the word
push si
sub si, wordStart
mov cx, si
mov si, wordStart
call GrTextWidth
pop si
cmp dx, maxWidth
jbe 30$
mov maxWidth, dx
30$:
mov skippingWhite, TRUE
nextChar:
dec numThisBlock
jnz charLoop
tst numToCheck
jz done
dec si
call HugeArrayNext
jmp blockLoop
done:
call HugeArrayUnlock
movdw dssi, object
call TextGStateDestroy
mov ax, maxWidth
.leave
ret
updateGState:
push si, bp, ds
movdw dssi, object
movdw dxax, position
sub sp, size VisTextCharAttr
mov bp, sp
mov cl, GSFPT_MANIPULATION ;get charAttr to the right
call TA_GetCharAttrForPosition
pushdw dxax ;save count
mov di, ds:[si]
add di, ds:[di].Vis_offset
mov di, ds:[di].VTI_gstate
; set the font and point size
mov cx, ss:[bp].VTCA_fontID
mov dx, ss:[bp].VTCA_pointSize.WBF_int
mov ah, ss:[bp].VTCA_pointSize.WBF_frac
call GrSetFont
; set the text charAttr
mov al, ss:[bp].VTCA_textStyles
mov ah, 0xff
call GrSetTextStyle
; set the track kerning
mov ax, {word} ss:[bp].VTCA_trackKerning
call GrSetTrackKern
popdw dxax ; count
add sp,size VisTextCharAttr
pop si, bp, ds
movdw gstateValidCount, dxax
retn
VisTextCalcMinWidth endp
TextObscure ends
endif
| 25.939796 | 95 | 0.604005 |
60323f0e99c659783e581a4b3ffe5fb69cce4829 | 106 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/dparam2.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/dparam2.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/dparam2.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
SECTION code_fp_math48
PUBLIC dparam2
EXTERN cm48_sccz80p_dparam2
defc dparam2 = cm48_sccz80p_dparam2
| 11.777778 | 35 | 0.858491 |
459eb9b1e563d7262bcfd19f3386f4dee6a5982d | 440 | asm | Assembly | programs/oeis/109/A109395.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/109/A109395.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/109/A109395.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A109395: Denominator of phi(n)/n = Product_{p|n} (1 - 1/p); phi(n)=A000010(n), the Euler totient function.
; 1,2,3,2,5,3,7,2,3,5,11,3,13,7,15,2,17,3,19,5,7,11,23,3,5,13,3,7,29,15,31,2,33,17,35,3,37,19,13,5,41,7,43,11,15,23,47,3,7,5,51,13,53,3,11,7,19,29,59,15,61,31,7,2,65,33,67,17,69,35,71,3,73,37,15,19,77,13,79,5,3,41,83,7,85,43,87,11,89,15,91,23,31,47,95,3,97,7,33,5
mov $1,$0
seq $1,9195 ; a(n) = gcd(n, phi(n)).
div $0,$1
add $0,1
| 55 | 263 | 0.609091 |
a3f38083018d21fbada71bb7b3c8fbebc06bd579 | 497 | asm | Assembly | testmodule_win/sys/harness.asm | ranok/kernel-fuzzer-for-xen-project | 10780af1c0e640958de581cba22c2ba702dc889d | [
"MIT"
] | 392 | 2020-05-06T02:15:23.000Z | 2022-03-19T16:34:37.000Z | testmodule_win/sys/harness.asm | ranok/kernel-fuzzer-for-xen-project | 10780af1c0e640958de581cba22c2ba702dc889d | [
"MIT"
] | 38 | 2020-05-18T11:12:03.000Z | 2022-01-01T18:38:44.000Z | testmodule_win/sys/harness.asm | ranok/kernel-fuzzer-for-xen-project | 10780af1c0e640958de581cba22c2ba702dc889d | [
"MIT"
] | 56 | 2020-05-11T21:57:44.000Z | 2022-01-02T10:31:58.000Z | TITLE kfx harness
.code
;void harness(void);
harness PROC
push rax
push rbx
push rcx
push rdx
mov rax,13371337h
cpuid
pop rdx
pop rcx
pop rbx
pop rax
ret
harness ENDP
;void harness_extended(int magic_mark, unsigned long long address, size_t size);
harness_extended PROC
push rax
push rbx
push rcx
push rdx
push rsi
mov rax,rcx
mov rsi,rdx
mov rcx,r8
cpuid
pop rsi
pop rdx
pop rcx
pop rbx
pop rax
ret
harness_extended ENDP
END
| 12.121951 | 81 | 0.682093 |
60229eb74b3fd9da17b48d7f6c235e6b5e423acb | 207 | asm | Assembly | libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sdcc_iy/wv_priority_queue_top.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sdcc_iy/wv_priority_queue_top.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sdcc_iy/wv_priority_queue_top.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; void *wv_priority_queue_top(wv_priority_queue_t *q)
SECTION code_adt_wv_priority_queue
PUBLIC _wv_priority_queue_top
EXTERN _wa_priority_queue_top
defc _wv_priority_queue_top = _wa_priority_queue_top
| 18.818182 | 53 | 0.879227 |
66ae26c0561e82debd52578118f267d08f9b22f7 | 954 | asm | Assembly | payload.asm | perturbed-platypus/LinooxMalware | 1eb6db9ee34195e1dc932a51c423f5816c92e49c | [
"Apache-2.0"
] | 24 | 2019-08-10T17:46:52.000Z | 2021-07-05T14:40:17.000Z | payload.asm | djhohnstein/LinooxMalware | 1eb6db9ee34195e1dc932a51c423f5816c92e49c | [
"Apache-2.0"
] | null | null | null | payload.asm | djhohnstein/LinooxMalware | 1eb6db9ee34195e1dc932a51c423f5816c92e49c | [
"Apache-2.0"
] | 10 | 2019-08-10T21:33:59.000Z | 2021-07-05T14:40:19.000Z | default rel ; Set relative addressing
global _start ; Provide this so that the payload can also be run as a binary for testing
section .text ; So payload can also be run as a binary for testing
_start:
entry:
; Move to a safe location on the stack
;; jmp loop
sub rsp,128
; Save context
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
push rsp
and rsp, 0FFFFFFFFFFFFFFF0h
install:
; Call into dlopen(memfd, flags)
mov rsi, 2147483650 ; RTLD_NOW | DLOPEN
mov rdi, [parameter]
mov rax, [ldaddress]
call rax
exit:
; restore context
pop rsp
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rdi
pop rsi
pop rbp
pop rbx
pop rdx
pop rcx
pop rax
; restore stack
add rsp, 128
jmp qword [returnadr]
ldaddress: dq 0x0102030405060708
parameter: dq 0x1112131415161718
returnadr: dq 0x2122232425262728
| 14.90625 | 88 | 0.721174 |
c34e1791c365766e7a33b5e75433f90e2c61aef4 | 7,901 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1656.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1656.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1656.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 %r15
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0xa68c, %rsi
nop
xor %rdx, %rdx
mov (%rsi), %r10w
nop
nop
nop
nop
mfence
lea addresses_UC_ht+0xa8d0, %r10
clflush (%r10)
nop
nop
add $24077, %rdi
movb $0x61, (%r10)
nop
xor %rbp, %rbp
lea addresses_WT_ht+0x16680, %rsi
and $36952, %rdx
mov $0x6162636465666768, %r10
movq %r10, %xmm4
vmovups %ymm4, (%rsi)
nop
nop
add %r10, %r10
lea addresses_WC_ht+0x4600, %rsi
lea addresses_WC_ht+0x1eb28, %rdi
nop
nop
nop
nop
cmp %r12, %r12
mov $103, %rcx
rep movsq
nop
nop
nop
nop
add $25401, %rcx
lea addresses_A_ht+0x1b270, %r15
dec %rsi
movw $0x6162, (%r15)
xor %rcx, %rcx
lea addresses_UC_ht+0xb038, %rdi
nop
xor $4355, %rcx
mov (%rdi), %r10
nop
cmp $23565, %rdi
lea addresses_WT_ht+0x12dd0, %rdi
nop
nop
nop
sub %rcx, %rcx
mov (%rdi), %r12d
nop
and $41995, %rsi
lea addresses_WC_ht+0x65e0, %rcx
nop
xor %rbp, %rbp
mov $0x6162636465666768, %r12
movq %r12, %xmm2
and $0xffffffffffffffc0, %rcx
movaps %xmm2, (%rcx)
xor %r10, %r10
lea addresses_WC_ht+0x2680, %rdx
nop
cmp $20185, %rdi
movb (%rdx), %r10b
nop
nop
add %r10, %r10
lea addresses_WC_ht+0x9fc4, %rsi
lea addresses_WC_ht+0xe680, %rdi
clflush (%rdi)
nop
nop
inc %r15
mov $125, %rcx
rep movsb
nop
nop
add %r12, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_normal+0x3e80, %r8
nop
nop
nop
nop
nop
dec %rdi
movb $0x51, (%r8)
nop
nop
nop
xor %r14, %r14
// Store
lea addresses_D+0x1ae80, %rbx
nop
nop
nop
cmp %rdi, %rdi
movb $0x51, (%rbx)
nop
nop
nop
nop
xor %r14, %r14
// REPMOV
lea addresses_D+0x9d40, %rsi
lea addresses_UC+0x1da80, %rdi
clflush (%rdi)
nop
and %rbx, %rbx
mov $74, %rcx
rep movsl
nop
nop
lfence
// Load
lea addresses_WC+0xca80, %rbx
nop
add $59558, %r14
movaps (%rbx), %xmm2
vpextrq $1, %xmm2, %rdi
nop
cmp $53465, %r14
// Load
lea addresses_RW+0x13680, %rbx
nop
nop
nop
nop
and $30576, %r8
mov (%rbx), %si
nop
nop
nop
nop
cmp $25434, %rcx
// REPMOV
lea addresses_WC+0x1ca70, %rsi
lea addresses_WC+0x19e80, %rdi
nop
and $50239, %rbx
mov $2, %rcx
rep movsl
nop
xor %rbx, %rbx
// Faulty Load
lea addresses_WC+0x19e80, %r8
nop
nop
nop
nop
nop
cmp %rcx, %rcx
mov (%r8), %rbp
lea oracles, %rbx
and $0xff, %rbp
shlq $12, %rbp
mov (%rbx,%rbp,1), %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WC', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_RW', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC', 'congruent': 0, 'same': True}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'type': 'addresses_WC', 'same': True, 'size': 8, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'same': True, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 1, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM'}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
| 33.478814 | 2,999 | 0.65169 |
31da3b49eec8f747dc60369a19508952db151a85 | 589 | asm | Assembly | programs/oeis/247/A247643.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/247/A247643.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/247/A247643.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A247643: a(n) = ( 10*n*(n+1)+(2*n+1)*(-1)^n+7 )/8.
; 1,3,9,15,27,37,55,69,93,111,141,163,199,225,267,297,345,379,433,471,531,573,639,685,757,807,885,939,1023,1081,1171,1233,1329,1395,1497,1567,1675,1749,1863,1941,2061,2143,2269,2355,2487,2577,2715,2809,2953,3051,3201,3303,3459,3565,3727,3837,4005,4119,4293,4411,4591,4713,4899,5025,5217,5347,5545,5679,5883,6021,6231,6373,6589,6735,6957,7107,7335,7489,7723,7881,8121,8283,8529,8695,8947,9117,9375,9549,9813,9991,10261,10443,10719,10905,11187,11377,11665,11859,12153,12351
mul $0,5
div $0,2
add $0,2
bin $0,2
div $0,5
mul $0,2
add $0,1
| 53.545455 | 471 | 0.72326 |
733e1d52b85a8b0ce6742728c677d240e3d33bb6 | 2,674 | asm | Assembly | programs/oeis/017/A017098.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/017/A017098.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/017/A017098.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A017098: a(n) = (8*n + 2)^10.
; 1024,10000000000,3570467226624,141167095653376,2064377754059776,17080198121677824,97656250000000000,430804206899405824,1568336880910795776,4923990397355877376,13744803133596058624,34867844010000000000,81707280688754689024,179084769654285362176,370722131411856638976,730463141542791783424,1378584918490000000000,2504902718110474036224,4400768849616443032576,7502520803928269464576,12449449430074295092224,20159939004490000000000,31930081208285372007424,49559788255159621886976,75512230594040653874176,113113305642107341825024,166798809782010000000000,242418040278232804762624,347603700728035650405376,492219227058666339787776,688895994810941449421824,953674316406250000000000,1306763693175932538061824,1773439455035223723467776,2385094704704913351525376,3180468387218973248922624,4207072333002010000000000,5522842277952930315265024,7198040150627041378354176,9317437338664347031806976,11982811207963436516967424,15315789852644490000000000,19461082905477938625332224,24590139241073610670744576,30905275561625163865752576,38644323171282641407796224,48085843724178490000000000,59554968376655736670823424,73429918590237631550718976,90149270822232320504882176,110220031509480408885249024,134226593101524010000000000,162840646436299433535898624,196832129478228454438757376,237081297359201505991115776,284592003781306556354765824,340506289160156250000000000,406120376413199518554317824,482902181032368684001739776,572510448028705485180773376,676815634502125850495386624,797922662976120010000000000,938195677248838082877441024,1100284939352577986128946176,1287156013287068781368574976,1502121388502024803291751424,1748874703655130490000000000,2031527738966799156242228224,2354650353536627410108056576,2723313552282336906111640576,3143135875714053047266100224,3620333314568912490000000000,4161772960407114262939239424,4775030612614529378001150976,5468452571872757384253490176,6251221860048961785910273024,7133429116628826010000000000,8126148432270444060980634624,9241518390798791533220709376,10492828601993509662148043776,11894612018850973975317709824,13462743344628906250000000000,15214543846912020288468173824,17168892908174264880305611776,19346346654861037627083621376,21769264019877187453015450624,24461940606547598010000000000,27450750735620545201161217024,30764298070713746087897138176,34433575231762959905906942976,38492132820527061189996135424,42976258297035576490000000000,47925165161038656245244724224,53381192908039238466914968576,59390018245356647350847128576,66000878069893954201950004224,73266804725862006490000000000,81244874077654999869297255424,89996466950379723975933182976,99587544508217052160539698176
mul $0,8
add $0,2
pow $0,10
| 382 | 2,612 | 0.950262 |
34303c9aca8f0a856373f6540f58f2292e2cd54b | 16,094 | asm | Assembly | dol.asm | traidna/MUMPS-TI99-4A | b19c5819999a6f204a20f0496a153ba23ee8edf4 | [
"CC0-1.0"
] | null | null | null | dol.asm | traidna/MUMPS-TI99-4A | b19c5819999a6f204a20f0496a153ba23ee8edf4 | [
"CC0-1.0"
] | null | null | null | dol.asm | traidna/MUMPS-TI99-4A | b19c5819999a6f204a20f0496a153ba23ee8edf4 | [
"CC0-1.0"
] | null | null | null | ;; dol.asm - instrinsic functions and $ sys vars
getparams: ; $*(p1,p2,p3,p4) - flags r0->p1, r12->92, r15->9
push r11
clr r0
clr r12
clr r15
clr r3
movb *r9+,r3
ci r3,OpenParen
jeq getparam1
li r3,14 ; missing paren
mov r3,@ErrNum ;
pop r11 ; pop getparams rtn so that final pop
; returns to dolx caller without going back to dolx
jmp gpexit ;
getparam1: ; get param 1 - typicall the string to act on
li r0,1 ; flag that param one on stack
push r0
push r12
push r15
bl @getmstr ; get mumps string
pop r15
pop r12
pop r0
movb *r9+,r3 ; get next char
ci r3,Comma
jne getparmclose
li r12,1 ; flag param2 on stack
push r0
push r12
push r15
bl @getmstr ; get mumps string
pop r15
pop r12
pop r0
movb *r9+,r3 ; get next char
ci r3,Comma
jne getparmclose
li r15,1 ; flag param3 on stack
push r0
push r12
push r15
bl @getmstr ; get mumps string
pop r15
pop r12
pop r0
movb *r9+,r3 ; get next char
getparmclose:
;inc r9
ci r3,CloseParen
jeq gpexit
li r3,15 ; missing paren
mov r3,@ErrNum ;
pop r11 ; if error pop dolx return address to return to caller
gpexit:
pop r11
b *r11
dola: ; $a() - returns ascii value a character
; $a(string) returns ascii of first character
; $a(string,x) returns ascii of character in pos x, 1 if leftmost
; value is returned on the MUMPS string stack
push r11
bl @getparams
ci r12,0 ; is there a second param
jeq dola3 ; if no jump down
popss r6 ; if yes get address of string
bl @strtonum ; conver to num
mov r7,r12 ; move num to r12
dec r12 ; position is 0 based so dec counter
dola3:
popss r0
a r12,r0
movb *r0,r3
pushss r6
swpb r3
bl @toascstr
dolaexit:
pop r11
b *r11
dolc: ;; $c(num) return the character whose value is in the string passed
push r11
bl @getparams ; get params r0 string
popss r0
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r8
swpb r8 ; swap byte and move to string
pushss r6
mov r8,*r6+ ; move to string
clr r1 ; put NULL in r1
mov r8,*r6 ; terminate string
pop r11
b *r11
dole: ; $e() - returns ascii value a character
; $e(string) returns ascii of first character
; $e(string,x) returns ascii of character in pos x, 1 if leftmost
; value is returned on the MUMPS string stack
push r11
bl @getparams
ci r15,0 ; third param?
jeq dole2 ; if not jump down
popss r6 ; get the string
bl @strtonum ; make is a number
mov r7,r15 ; move to r15
dec r15 ; decrease by one for offset from base address
dole2: ci r12,0 ; is there a second param
jeq dole3 ; if no jump down
popss r6 ; if yes get address of string
bl @strtonum ; conver to num
mov r7,r12 ; move num to r12
dec r12 ; position is 0 based so dec counter
dole3:
popss r0 ; get string of data
a r0,r15 ; calc end address base + param 3 offset
a r12,r0 ; start pos address + offset param 2
pushss r6
dole4: movb *r0+,r3 ; get first char
movb r3,*r6+ ; put char in first pos
c r0,r15
jgt dole5
jmp dole4
dole5: clr r1
movb r1,*r6 ; terminate
doleexit:
pop r11
b *r11
dolp: ; $p() - returns ascii value a character
; $p(string) returns ascii of first character
; $p(string,x) returns ascii of character in pos x, 1 if leftmost
; value is returned on the MUMPS string stack
push r11
bl @getparams
ci r15,0 ; third param?
jne dolp1 ; r15 not zero (piece num) jump down
li r15,1 ; otherwise default to piece one
jmp dolp2 ; jump down to param two (delimiter)
dolp1:
popss r6 ; get the string
bl @strtonum ; make is a number
mov r7,r15 ; move to r15
dolp2:
ci r12,0 ; is there a second param
jeq dolperr ; if no jump down
popss r6 ; if yes get address of string
clr r1 ; clear out r1 for delimeter
movb *r6,r1 ; delimiter char to piece by (only single char)
dolp3:
popss r0 ; get string of data
li r2,1 ; piece counter to first piece
clr r5 ; null
dolp3a: c r2,r15 ; is it thispiece piece counter to piece num
jne nextpc
pushss r6 ; destination string
copypc movb *r0+,r3
cb r3,r1 ; does char match delimeter
jeq dolp5 ; if yes then have full piece data
cb r3,r5 ; is it end of string
jeq dolp5 ; end of string yes done
movb r3,*r6+ ; copy to char to dext
jmp copypc ; go back up get next char
nextpc: movb *r0+,r3
cb r3,r5 ; check for end of string
jeq dolp5 ; end of string jump out
cb r3,r1 ; end of piece
jne nextpc ; not end of peice
inc r2 ; increment piece counter
jmp dolp3a ; process this piece
dolp5: movb r5,*r6 ; terminate
dolpexit:
pop r11
b *r11
dolperr:
li r1,15
mov r1,@ErrNum
jmp dolpexit
doll: ; $l() - returns ascii value a character
; $l(string) returns length of first character
; value is returned on the MUMPS string stack
push r11
bl @getparams
popss r0 ; get address of string on top of string/math stack
push r0
bl @strlen
pop r7
mov r7,r3
pushss r6 ; get string stack address
bl @toascstr
dollexit:
pop r11
b *r11
Doltt: ; $t value
push r11 ; save caller retrun address
pushss r6 ; get a string address to retrun value
mov @DolT,*r6 ; get value from DolT from scratch pad
pop r11 ; get caller return addr
b *r11 ; return
dolu:
push r11
clr r3
movb @fioerr,r3
swpb r3
pushss r6
bl @toascstr
pop r11
b *r11
doli: ; dolio $IO
push r11
clr r3
movb *r9+,r3
ci r3,04F00h ; 'O' of $io
jne dolierr
pushss r6
mov @Dolio,*r6
doliexit:
pop r11
b *r11
dolierr:
li r1,22 ; bad function call
mov r1,@ErrNum
jmp doliexit
dolo: ; $o
b *r11
; push r11
; li r1,debug1
; bl @PrintString
; $o(x(""))
; mov *r9+,r3
; ci r3,Openpaen
; jne
; mov @head,r6
; bl @treemin
; jmp $
; pop r11
; b *r11
dolx: ;; $x(num) moves screen position to num
push r11
bl @getparams ; get params r0 string
popss r0 ; get value of param one off string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
mov r7,r2 ; copy value to r2 for gotoxy
bl @gotoxy ; set VDP write position in value
pushss r7 ; get a string stack memory space
mov r0,r6 ; copy value passed to r6
bl @strcopy ; copy to memory to pass back
pop r11 ; get caller address
b *r11 ; branch back to caller
dolv: ; non standard dol function - $v(addr) peek addr
; return value at address passed
push r11
bl @getparams ; get params r0 string
popss r0 ; get value of param one off string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
clr r3
movb *r7,r3 ; get value at address passed
swpb r3
pushss r6 ; get string space to return the value
bl @toascstr ; conver value to a string
pop r11
b *r11
dolk: ; poke $k(addr, value) pokes value into CPU addressable address
push r11
bl @getparams ; get params r0 string
ci r12,0
jeq dolkerr ;
popss r0 ; get value of param one addressoff string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
push r7
popss r0 ; get value of param one addressoff string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
pop r8
swpb r8
movb r8,*r7 ; move value to address in r7
pushss r6
mov r8,r3
swpb r3
bl @toascstr
dolkend:
pop r11
b *r11
dolkerr:
li r1,21
mov r1,@ErrNum
jmp dolkend
dolq: ; poke $Q(addr, value) pokes value into VDP addressable address
; poke $Q(value) at current VDP address VDP is auto incrementing
push r11
bl @getparams ; get params r0 string
ci r12,0
jeq dolqerr ;
popss r0 ; get value of param one addressoff string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
push r7
popss r0 ; get value of param one addressoff string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
;pop r8
;swpb r8
mov r7,r0
bl @setVDPwaddr
;mov r8,r1
pop r1
swpb r1
vsbw
pushss r6
mov r8,r3
swpb r3
bl @toascstr
dolqend:
pop r11
b *r11
dolqerr:
li r1,27
mov r1,@ErrNum
jmp dolkend
dolb: ; mapbank $m(page, block) maps page 0-247 to block address
;
; R1 - pass in page in msb of R1 xx00h
; R2 - pass in 4k block address to map to ()
; Block Register Address
; 2 4004h 2000h
; 3 4006h 3000h
; 10 4014h A000h
; 11 4016h B000h
; 12 4018h C000h
; 13 401Ah D000h
; 14 401Ch E000h
; 15 401Eh F000h
push r11
bl @getparams ; get params
ci r12,0 ;
jeq dolberr ;
popss r0 ; get value of param two addressoff string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
push r7
popss r0 ; get value of param one addressoff string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
clr r1
mov r7,r1 ; page number
swpb r1
pop r2 ; bank number
bl @savemap
a r2,r2 ; double bank number to create address
ai r2,16384 ; base of 4000h = 16384
bl @mappage
pushss r6 ; gets popped by caller (set or write)
dolbend:
mapperoff ; seting up map does not turn it on
pop r11
b *r11
dolberr:
li r1,20
mov r1,@ErrNum
jmp dolbend
savemap: ; save page to CPU scratch pad for tracking
push r2 ; save r2 bank number
ci r2,10 ; compare r2 to 10
jlt savemap2 ; if less than 10 jump
ai r2,-8 ; else map number to address
jmp savemap3
savemap2:
ai r2,-2 ; it's either 2 or 3 so offset 0 or 1
savemap3:
ai r2,Bank2Map ; get storege address of bank in Scratchpad
movb r1,*r2 ; store it
pop r2 ; bank number
b *r11
dolm: ; turn on/off SAMS card mapping
; if param = 1 turn on mapper
; if param =0 turn off mapper
; if second parameter, copy code to SAMSTRAMP and set R9 to SAMSTRAMP
push r11
clr r3 ; clear r3
movb *r9,r3 ; move current char to r3 msb
ci r3,OpenParen ; is it a Open paren
jne dolmvalue ; if not then just return current mapper value
bl @getparams ; get params
ci r12,0 ; check if a second param exisits
jeq dolmonlyswitch ; no second param
popss r6 ; get code off string stack
li r7,SAMSTRAMP
bl @strcopy ; copy to code to trampoline area
pushm r9
li r9,SAMSTRAMP
dolmonlyswitch:
popss r6 ; get value of param two addressoff string stack
bl @strtonum
ci r7,0
jne dolm2
mapperoff
jmp dolmend
dolm2:
mapperon
dolmend:
pushss r6
pop r11
b *r11
dolmvalue:
clr r3
mov @MemMapper,r3
;swpb r3
pushss r6
bl @toascstr
pop r11
b *r11
dols: ; non-standard - sound
; $s(channel, tone, volume)
; channel 0,1,2,3 - tone .XXXh - volume - 0 - 15 15 = mute
push r11
bl @getparams ; get params
ci r15,0 ; check that 3 params are entered
jeq dolspch ;
popss r0 ; get value of param 3 addr (volume) string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
push r7 ; push volume to stack
popss r0 ; get value of param two (tone) addressoff string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
push r7 ; push tone to stack
popss r0 ; get value of param 1 addr (channel) string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
push r7 ; push channel to stack
pop r2 ; channel
pop r3 ; tone
pop r4 ; volume
push r2 ; push channel to return
li r14,b1Sound_a
bl @GoBank1
;bl @Sound ; play sound
dolstrn:
pop r3 ; chanel / speech addr
pushss r6 ; get string addrss on string stack
bl @toascstr ; convert chanel to string
jmp dolsend
dolspch: ; is it speech?
ci r12,0
jne dolserr
ci r0,1
jne dolserr
popss r0 ; get value of param 1 addr (channel) string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
push r7
mov r7,r0
li r14,b1Speech_a
bl @GoBank1
jmp dolstrn
dolserr:
li r1,19
mov r1,@Errnum
dolsend:
pop r11
b *r11
dolh: ; pass in hex string return decmimal number
; $h(string) string must be valid hex string
; error checking?
push r11
bl @getparams ; get params r0 string
ci r12,1 ; r12 is flag for param 2
jeq dolherr ; if not zero wrong number of params
popss r0 ; get value of param one address off string stack
push r0 ; copy pointer to string to stack for hstrtonum later
push r0 ; push address of string to stack
bl @strlen ; get length of string returned on stack
pop r2 ; pop length off stack
ci r2,4 ; compare length to 4
jgt dolherr ; if larger then error
mov r2,r2 ; check if length of sting is 0
jeq dolherr ; if 0 then err
pop r6
bl @hstrtonum ; convert hex string to it's decimal equiv.
mov r7,r3 ; move value to R3 for toascstr
pushss r6 ; get string space to return the value
bl @toascstr ; conver value to a string
jmp dolhend
dolherr:
li r1,18
mov r1,@Errnum
dolhend:
pop r11
bl *r11
doln: ; screen parameters
; single parameter set (32 or 40 columns)
; Seconpar (>XY) X Fg COLOR y bG COLOR
; Third par - border color
push r11
bl @getparams ; get params r0 string
ci r15,0 ; make sure three params
jeq dolnerr
popss r0 ; get value of param 3 off string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
mov r7,r0 ; border color in r0 lsb
push r0
popss r0 ; get value of param 2 off string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
mov r7,r1 ; border color in r0
swpb r1
push r1
popss r0 ; get value of param 1 off string stack
mov r0,r6 ; copy pointer to string to r6
bl @strtonum ; uses r6 to convert string to num in r7
ci r7,40 ; check if request for 40 columns
jne doln32 ; if not check for 32 column
mov r7,@ScreenWidth ; update system var for screen width
bl @Cls ; Clear screen
pop r1
pop r0
li r14,b1Text40_a ; set addr for call to Text40
bl @GoBank1 ; make call
jmp doln2 ; jump to code to return value
doln32:
ci r7,32
jne dolnerr
mov r7,@ScreenWidth ; update system var for screen width
pop r1
pop r0
li r14,b1Graph32_a
bl @GoBank1
bl @Cls
doln2:
mov r7,r3
pushss r6 ; get string space to return the value
bl @toascstr ; conver value to a string
jmp dolnend
dolnerr:
li r1,26
mov r1,@Errnum
dolnend:
pop r11
b *r11
| 24.311178 | 77 | 0.615447 |
39f78e206116a0dc6d8806c44169e1127ff77639 | 500 | asm | Assembly | arch/x86/kernel/task.asm | 31core/illumi | 344fa945df9031aadda6775121e8fb641b45e844 | [
"MIT"
] | 1 | 2021-05-10T10:52:06.000Z | 2021-05-10T10:52:06.000Z | arch/x86/kernel/task.asm | 31core/illumi | 344fa945df9031aadda6775121e8fb641b45e844 | [
"MIT"
] | null | null | null | arch/x86/kernel/task.asm | 31core/illumi | 344fa945df9031aadda6775121e8fb641b45e844 | [
"MIT"
] | null | null | null | global asm_task_switch
asm_task_switch:
;保存当前任务状态
mov eax, [esp + 4] ;[esp + 4]指向task_list[old_pid].state
mov [eax], esp
mov [eax + 4], ebp
mov [eax + 8], eax
mov [eax + 12], ebx
mov [eax + 16], ecx
mov [eax + 20], edx
mov [eax + 24], esi
mov [eax + 28], edi
;恢复下一个任务状态
mov eax, [esp + 8] ;[esp + 8]指向task_list[pid].state
mov esp, [eax]
mov ebp, [eax + 4]
mov eax, [eax + 8]
mov ebx, [eax + 12]
mov ecx, [eax + 16]
mov edx, [eax + 20]
mov esi, [eax + 24]
mov edi, [eax + 28]
ret
| 20.833333 | 56 | 0.588 |
fdade4c0dd9bfaee66d6d2df786528eb1eec67da | 699 | asm | Assembly | oeis/049/A049393.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/049/A049393.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/049/A049393.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A049393: Expansion of (1-25*x)^(1/5).
; Submitted by Jon Maiga
; 1,-5,-50,-750,-13125,-249375,-4987500,-103312500,-2195390625,-47566796875,-1046469531250,-23307730468750,-524423935546875,-11900389306640625,-272008898437500000,-6256204664062500000,-144674732856445312500,-3361559969311523437500,-78436399283935546875000,-1837063035860595703125000,-43170981342723999023437500,-1017601703078494262695312500,-24052403890946228027343750000,-569937396546334533691406250000,-13536013167975445175170898437500,-322157113397815595169067382812500
mul $0,2
mov $1,1
mov $2,1
mov $3,$0
mov $4,5
lpb $3
mul $1,$2
mul $1,$4
sub $3,2
mov $4,$2
sub $5,1
div $1,$5
sub $2,5
sub $4,$2
lpe
mov $0,$1
| 33.285714 | 472 | 0.772532 |
e7d8dbfe2700502956816f4674ef31916f695ea0 | 437 | asm | Assembly | kernel/boot.asm | qt-sergal/r0 | dc0805df21fca1669cf7b477ac4d2a6ef4ffae4f | [
"MIT"
] | null | null | null | kernel/boot.asm | qt-sergal/r0 | dc0805df21fca1669cf7b477ac4d2a6ef4ffae4f | [
"MIT"
] | null | null | null | kernel/boot.asm | qt-sergal/r0 | dc0805df21fca1669cf7b477ac4d2a6ef4ffae4f | [
"MIT"
] | null | null | null |
MBALIGN equ 1 << 0
MEMINFO equ 1 << 1
FLAGS equ MBALIGN | MEMINFO
MAGIC equ 0x1BADB002
CHECKSUM equ -(MAGIC + FLAGS)
section .multiboot
align 4
dd MAGIC
dd FLAGS
dd CHECKSUM
section .bss
align 16
stack_bottom:
resb 8192 ; 8 KiB
stack_top:
section .text
global _start
_start:
mov esp, stack_top
push ebx
push eax
extern kmain
call kmain
cli
.hang: hlt
jmp .hang
.end: | 13.242424 | 32 | 0.638444 |
3daf1fe9d76e5f8f504a9579ec7b68199af5a0b2 | 412 | asm | Assembly | oeis/120/A120027.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/120/A120027.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/120/A120027.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A120027: Triangle, generated from (3^(n-k) * 5^k) table.
; Submitted by Christian Krause
; 1,3,5,9,15,25,27,45,75,125,81,135,225,375,625,243,405,675,1125,1875,3125,729,1215,2025,3375,5625,9375,15625,2187,3645,6075,10125,16875,28125,46875,78125,6561,10935,18225,30375,50625,84375,140625,234375
lpb $0
add $1,1
sub $0,$1
mov $2,$1
sub $2,$0
lpe
mov $1,3
pow $1,$2
mov $2,5
pow $2,$0
mul $2,$1
mov $0,$2
| 24.235294 | 203 | 0.677184 |
b0854eafbe0b06954ac9b45ce4ef2871a1dd3cb8 | 3,694 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2360.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_2360.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_2360.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 %r14
push %r15
push %r9
// Faulty Load
lea addresses_WT+0x7269, %r12
nop
nop
sub %r15, %r15
movups (%r12), %xmm4
vpextrq $0, %xmm4, %r9
lea oracles, %r11
and $0xff, %r9
shlq $12, %r9
mov (%r11,%r9,1), %r9
pop %r9
pop %r15
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 90.097561 | 2,999 | 0.662967 |
cd46d8375a981451c5f988c101f236d7f060c86e | 443 | asm | Assembly | oeis/144/A144347.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/144/A144347.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/144/A144347.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A144347: Second column (m=2) of triangle S2p(-4) = A011801.
; Submitted by Christian Krause
; 1,12,192,3960,100656,3048192,107255232,4302305280,193836779136,9693022090752,532784148728832,31930395433896960,2072320885985366016,144803002560595771392,10838696766561262190592,865256088684973495910400,73383436891415208719056896
mov $1,3
mov $2,3
mov $3,1
lpb $0
sub $0,1
add $2,6
mul $3,$2
sub $2,1
add $3,$1
mul $1,$2
lpe
mov $0,$3
| 26.058824 | 230 | 0.760722 |
fac03e261dd1cdadeec57a0865fc647cbf9c91ee | 596 | asm | Assembly | oeis/033/A033574.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/033/A033574.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/033/A033574.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A033574: a(n) = (2*n+1)*(10*n+1).
; 1,33,105,217,369,561,793,1065,1377,1729,2121,2553,3025,3537,4089,4681,5313,5985,6697,7449,8241,9073,9945,10857,11809,12801,13833,14905,16017,17169,18361,19593,20865,22177,23529,24921,26353,27825,29337,30889,32481,34113,35785,37497,39249,41041,42873,44745,46657,48609,50601,52633,54705,56817,58969,61161,63393,65665,67977,70329,72721,75153,77625,80137,82689,85281,87913,90585,93297,96049,98841,101673,104545,107457,110409,113401,116433,119505,122617,125769,128961,132193,135465,138777,142129,145521
mov $1,20
mul $1,$0
add $1,12
mul $1,$0
add $1,1
mov $0,$1
| 59.6 | 499 | 0.771812 |
cdaac649a8d72b40ac3dbd665965b77a85dc3e76 | 1,927 | asm | Assembly | programs/oeis/045/A045883.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/045/A045883.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/045/A045883.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A045883: a(n) = ((3*n+1)*2^n - (-1)^n)/9.
; 0,1,3,9,23,57,135,313,711,1593,3527,7737,16839,36409,78279,167481,356807,757305,1601991,3378745,7107015,14913081,31224263,65244729,136081863,283348537,589066695,1222872633,2535223751,5249404473,10856722887,22429273657,46290203079,95443717689,196614058439,404681363001,832269218247,1710351420985,3512328810951,7207909559865,14782322995655,30297653743161,62061322990023,127054676987449,259973415989703,531674956009017,1086806160077255,2220524816272953,4534874624782791,9257399234039353,18890098437026247,38530796811947577,78562793499685319,160127986750950969,326260773005062599,664531145016446521,1353081488045535687,2754201372116356665,5604479536283283911,11401112656667708985,23186532481537700295,47141679299479965241,95820587271769059783,194715631889156378169,395580178469549273543,803458186321571581497,1631512031408089231815,3312215380346070601273,6722813395751925477831,13642392061623419506233,27678314663485976113607,56143690407450226429497,113861502975857001263559,230871250273627099336249,468038989191080392290759,948670955669813171818041,1922527865914931118109127,3895427640980471785164345,7891599100262162668220871,15984685837126763532226105,32372346947458403456020935,65550644441326559695179321,132713189975472624956633543,268650182136584261045816889,543747968644446544356733383,1100391146031449133243665977,2226572709548010355547730375,4504726254066244889216257593,9112614178072938134674108871,18431551696026772981831405113,37275750071815339388629184967,75376793503154265627191119417,152404173725355704954247737799,308109520888805757308226473529,622821388653800209415914942919,1258847471059977808430753877561,2544104329624710396059355738567,5141027434258930350514407444025,10387692418536879817820206821831,20986659937111797869223197511225
add $0,1
lpb $0
mov $1,$0
mod $0,2
trn $1,2
seq $1,191007 ; a(n) = n*2^(n+1) + (2^(n+3)+(-1)^n)/3.
lpe
div $1,3
mov $0,$1
| 148.230769 | 1,751 | 0.895693 |
5fbb6724fc83e04b69717d32d9713e76ad892cb9 | 3,609 | asm | Assembly | Working Disassembly/General/Special Stage/Map - Ring.asm | TeamASM-Blur/Sonic-3-Blue-Balls-Edition | 7e8a2c5df02271615ff4cae529521e6b1560d6b1 | [
"Apache-2.0"
] | 5 | 2021-07-09T08:17:56.000Z | 2022-02-27T19:57:47.000Z | Working Disassembly/General/Special Stage/Map - Ring.asm | TeamASM-Blur/Sonic-3-Blue-Balls-Edition | 7e8a2c5df02271615ff4cae529521e6b1560d6b1 | [
"Apache-2.0"
] | null | null | null | Working Disassembly/General/Special Stage/Map - Ring.asm | TeamASM-Blur/Sonic-3-Blue-Balls-Edition | 7e8a2c5df02271615ff4cae529521e6b1560d6b1 | [
"Apache-2.0"
] | null | null | null | Map_A50A: dc.w word_A572-Map_A50A
dc.w word_A57A-Map_A50A
dc.w word_A582-Map_A50A
dc.w word_A58A-Map_A50A
dc.w word_A592-Map_A50A
dc.w word_A59A-Map_A50A
dc.w word_A5A2-Map_A50A
dc.w word_A5AA-Map_A50A
dc.w word_A5B2-Map_A50A
dc.w word_A5BA-Map_A50A
dc.w word_A5BA-Map_A50A
dc.w word_A5BA-Map_A50A
dc.w word_A5BA-Map_A50A
dc.w word_A5BA-Map_A50A
dc.w word_A5BA-Map_A50A
dc.w word_A5BA-Map_A50A
dc.w word_A5D2-Map_A50A
dc.w word_A5DA-Map_A50A
dc.w word_A5E2-Map_A50A
dc.w word_A5EA-Map_A50A
dc.w word_A5F2-Map_A50A
dc.w word_A5FA-Map_A50A
dc.w word_A602-Map_A50A
dc.w word_A60A-Map_A50A
dc.w word_A612-Map_A50A
dc.w word_A61A-Map_A50A
dc.w word_A61A-Map_A50A
dc.w word_A61A-Map_A50A
dc.w word_A61A-Map_A50A
dc.w word_A61A-Map_A50A
dc.w word_A61A-Map_A50A
dc.w word_A61A-Map_A50A
dc.w word_A632-Map_A50A
dc.w word_A63A-Map_A50A
dc.w word_A642-Map_A50A
dc.w word_A64A-Map_A50A
dc.w word_A652-Map_A50A
dc.w word_A65A-Map_A50A
dc.w word_A662-Map_A50A
dc.w word_A66A-Map_A50A
dc.w word_A672-Map_A50A
dc.w word_A67A-Map_A50A
dc.w word_A67A-Map_A50A
dc.w word_A67A-Map_A50A
dc.w word_A67A-Map_A50A
dc.w word_A67A-Map_A50A
dc.w word_A67A-Map_A50A
dc.w word_A67A-Map_A50A
dc.w word_A692-Map_A50A
dc.w word_A69A-Map_A50A
dc.w word_A6A2-Map_A50A
dc.w word_A6AA-Map_A50A
word_A572: dc.w 1
dc.b $F8, 9, 0, 0, $FF, $F4
word_A57A: dc.w 1
dc.b $F8, 9, 0, $C, $FF, $F4
word_A582: dc.w 1
dc.b $F4, $A, 0, $18, $FF, $F4
word_A58A: dc.w 1
dc.b $F8, 9, 0, $27, $FF, $F4
word_A592: dc.w 1
dc.b $F8, 5, 0, $33, $FF, $F8
word_A59A: dc.w 1
dc.b $F8, 5, 0, $39, $FF, $F8
word_A5A2: dc.w 1
dc.b $F8, 5, 0, $3F, $FF, $F8
word_A5AA: dc.w 1
dc.b $FC, 4, 0, $45, $FF, $F8
word_A5B2: dc.w 1
dc.b $FC, 0, 0, $48, $FF, $FC
word_A5BA: dc.w 1
dc.b $FC, 0, 0, $4A, $FF, $FC
dc.w 1
dc.b $FC, 0, 0, $4C, $FF, $FC
dc.w 1
dc.b $FC, 0, 0, $4E, $FF, $FC
word_A5D2: dc.w 1
dc.b $F4, 6, 0, 6, $FF, $F8
word_A5DA: dc.w 1
dc.b $F4, 6, 0, $12, $FF, $F8
word_A5E2: dc.w 1
dc.b $F4, 6, 0, $21, $FF, $F8
word_A5EA: dc.w 1
dc.b $F4, 6, 0, $2D, $FF, $F8
word_A5F2: dc.w 1
dc.b $F8, 1, 0, $37, $FF, $FC
word_A5FA: dc.w 1
dc.b $F8, 1, 0, $3D, $FF, $FC
word_A602: dc.w 1
dc.b $F8, 1, 0, $43, $FF, $FC
word_A60A: dc.w 1
dc.b $FC, 0, 0, $47, $FF, $FC
word_A612: dc.w 1
dc.b $FC, 0, 0, $49, $FF, $FC
word_A61A: dc.w 1
dc.b $FC, 0, 0, $4B, $FF, $FC
dc.w 1
dc.b $FC, 0, 0, $4D, $FF, $FC
dc.w 1
dc.b $FC, 0, 0, $4F, $FF, $FC
word_A632: dc.w 1
dc.b $F4, 6, 8, 6, $FF, $F8
word_A63A: dc.w 1
dc.b $F4, 6, 8, $12, $FF, $F8
word_A642: dc.w 1
dc.b $F4, 6, 8, $21, $FF, $F8
word_A64A: dc.w 1
dc.b $F4, 6, 8, $2D, $FF, $F8
word_A652: dc.w 1
dc.b $F8, 1, 8, $37, $FF, $FC
word_A65A: dc.w 1
dc.b $F8, 1, 8, $3D, $FF, $FC
word_A662: dc.w 1
dc.b $F8, 1, 8, $43, $FF, $FC
word_A66A: dc.w 1
dc.b $FC, 0, 8, $47, $FF, $FC
word_A672: dc.w 1
dc.b $FC, 0, 8, $49, $FF, $FC
word_A67A: dc.w 1
dc.b $FC, 0, 8, $4B, $FF, $FC
dc.w 1
dc.b $FC, 0, 8, $4D, $FF, $FC
dc.w 1
dc.b $FC, 0, 8, $4F, $FF, $FC
word_A692: dc.w 1
dc.b $F4, $A, 0, $50, $FF, $F4
word_A69A: dc.w 1
dc.b $F4, $A, $18, $50, $FF, $F4
word_A6A2: dc.w 1
dc.b $F4, $A, 8, $50, $FF, $F4
word_A6AA: dc.w 1
dc.b $F4, $A, $10, $50, $FF, $F4
| 27.135338 | 36 | 0.563037 |
0745b7268f3596cd62d207bd5513a18e589cc924 | 806 | asm | Assembly | data/pokemon/base_stats/infernape.asm | TastySnax12/pokecrystal16-493-plus | 9de36c8803c9bdf4b8564ed547f988b0b66f0c41 | [
"blessing"
] | 2 | 2021-07-31T07:05:06.000Z | 2021-10-16T03:32:26.000Z | data/pokemon/base_stats/infernape.asm | TastySnax12/pokecrystal16-493-plus | 9de36c8803c9bdf4b8564ed547f988b0b66f0c41 | [
"blessing"
] | null | null | null | data/pokemon/base_stats/infernape.asm | TastySnax12/pokecrystal16-493-plus | 9de36c8803c9bdf4b8564ed547f988b0b66f0c41 | [
"blessing"
] | 3 | 2021-01-15T18:45:40.000Z | 2021-10-16T03:35:27.000Z | db 0 ; species ID placeholder
db 76, 104, 71, 108, 104, 71
; hp atk def spd sat sdf
db FIRE, FIGHTING ; type
db 45 ; catch rate
db 240 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F12_5 ; gender ratio
db 100 ; unknown 1
db 20 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/infernape/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_MEDIUM_SLOW ; growth rate
dn EGG_GROUND, EGG_HUMANSHAPE ; egg groups
; tm/hm learnset
tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, FIRE_PUNCH, CUT, STRENGTH, FLAMETHROWER
; end
| 36.636364 | 331 | 0.730769 |
8d87d559e89253b3cde199e7c8b8ac6755d922bf | 179 | asm | Assembly | src/src/c/borlandc/dpmi32/nowin32.asm | amindlost/wdosx | 1e256d22c1547e7b1f1ccd23e400f5b81b8bd013 | [
"Unlicense"
] | 7 | 2022-01-20T08:27:54.000Z | 2022-03-17T10:15:31.000Z | src/src/c/borlandc/dpmi32/nowin32.asm | amindlost/wdosx | 1e256d22c1547e7b1f1ccd23e400f5b81b8bd013 | [
"Unlicense"
] | null | null | null | src/src/c/borlandc/dpmi32/nowin32.asm | amindlost/wdosx | 1e256d22c1547e7b1f1ccd23e400f5b81b8bd013 | [
"Unlicense"
] | null | null | null | .386
.model flat,C
PUBLIC __disallowDPMI32onWin32
.code
; We don't disallow nothing even on Win32
__disallowDPMI32onWin32 proc near
ret
__disallowDPMI32onWin32 endp
end
| 9.944444 | 41 | 0.793296 |
13e8fb39cba97e74d3892bccd7511053c21e3655 | 251 | asm | Assembly | libmikeos/src.os/os_string_to_int.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null | libmikeos/src.os/os_string_to_int.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null | libmikeos/src.os/os_string_to_int.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null |
; @@@ unsigned int mikeos_string_to_int(char *string);
%include "os_vector.inc"
section .text
use16
global _mikeos_string_to_int
_mikeos_string_to_int:
mov bx, sp
push si
mov si, [ss:bx + 2]
mov bx, os_string_to_int
call bx
pop si
ret
| 12.55 | 54 | 0.7251 |
a3766fb0df4c637fedcd3e697477def14c116c66 | 309 | asm | Assembly | boot_sector.asm | Dxpe/Canopy | 18678ae284303b216118dce4d7f3f6bda8d74247 | [
"MIT"
] | null | null | null | boot_sector.asm | Dxpe/Canopy | 18678ae284303b216118dce4d7f3f6bda8d74247 | [
"MIT"
] | null | null | null | boot_sector.asm | Dxpe/Canopy | 18678ae284303b216118dce4d7f3f6bda8d74247 | [
"MIT"
] | null | null | null | [org 0x7c00]
mov bx,startup_str
call print_str
jmp $
print_str:
pusha
mov ah,0x0e
print_loop:
mov al,[bx]
cmp al,0
je print_str_done
int 0x10
add bx,1
jmp print_loop
print_str_done:
popa
ret
startup_str db "Canopy OS (Version 0.0.1)",0
times 510 -($-$$) db 0
dw 0xaa55 | 11.884615 | 45 | 0.650485 |
54a3bc4ff042585475a8945cf7291e1d8eb58d68 | 1,657 | asm | Assembly | programs/oeis/008/A008260.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/008/A008260.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/008/A008260.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A008260: Coordination sequence for Paracelsian.
; 1,4,10,21,37,57,81,109,142,180,222,268,318,373,433,497,565,637,714,796,882,972,1066,1165,1269,1377,1489,1605,1726,1852,1982,2116,2254,2397,2545,2697,2853,3013,3178,3348,3522,3700,3882,4069,4261,4457,4657,4861,5070,5284,5502,5724,5950,6181,6417,6657,6901,7149,7402,7660,7922,8188,8458,8733,9013,9297,9585,9877,10174,10476,10782,11092,11406,11725,12049,12377,12709,13045,13386,13732,14082,14436,14794,15157,15525,15897,16273,16653,17038,17428,17822,18220,18622,19029,19441,19857,20277,20701,21130,21564,22002,22444,22890,23341,23797,24257,24721,25189,25662,26140,26622,27108,27598,28093,28593,29097,29605,30117,30634,31156,31682,32212,32746,33285,33829,34377,34929,35485,36046,36612,37182,37756,38334,38917,39505,40097,40693,41293,41898,42508,43122,43740,44362,44989,45621,46257,46897,47541,48190,48844,49502,50164,50830,51501,52177,52857,53541,54229,54922,55620,56322,57028,57738,58453,59173,59897,60625,61357,62094,62836,63582,64332,65086,65845,66609,67377,68149,68925,69706,70492,71282,72076,72874,73677,74485,75297,76113,76933,77758,78588,79422,80260,81102,81949,82801,83657,84517,85381,86250,87124,88002,88884,89770,90661,91557,92457,93361,94269,95182,96100,97022,97948,98878,99813,100753,101697,102645,103597,104554,105516,106482,107452,108426,109405,110389,111377,112369,113365,114366,115372,116382,117396,118414,119437,120465,121497,122533,123573,124618,125668,126722,127780,128842,129909,130981,132057,133137,134221,135310,136404
mov $1,1
mov $5,$0
pow $0,2
mov $6,$0
add $6,6
lpb $0,1
add $6,4
cmp $0,$6
cmp $1,$4
div $6,5
add $1,$6
lpe
mov $3,$5
mul $3,$5
mov $2,$3
mul $2,2
add $1,$2
| 78.904762 | 1,438 | 0.791189 |
98a946d7692bb7c8340ab24eb4652409956ad23b | 15,669 | asm | Assembly | source/keyboard.asm | re0ah/nameless-OS16 | 3218ec1e83130a027ec74697ab72e2de75b3bb66 | [
"Unlicense"
] | null | null | null | source/keyboard.asm | re0ah/nameless-OS16 | 3218ec1e83130a027ec74697ab72e2de75b3bb66 | [
"Unlicense"
] | null | null | null | source/keyboard.asm | re0ah/nameless-OS16 | 3218ec1e83130a027ec74697ab72e2de75b3bb66 | [
"Unlicense"
] | null | null | null | ;This is free and unencumbered software released into the public domain.
;Anyone is free to copy, modify, publish, use, compile, sell, or
;distribute this software, either in source code form or as a compiled
;binary, for any purpose, commercial or non-commercial, and by any
;means.
;In jurisdictions that recognize copyright laws, the author or authors
;of this software dedicate any and all copyright interest in the
;software to the public domain. We make this dedication for the benefit
;of the public at large and to the detriment of our heirs and
;successors. We intend this dedication to be an overt act of
;relinquishment in perpetuity of all present and future rights to this
;software under copyright law.
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
;IN NO EVENT SHALL THE AUTHORS 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.
;For more information, please refer to <http://unlicense.org/>
PICM equ 0x20 ;master PIC
PIC_EOI equ 0x20 ;end of interrupt code
KB_DATA_PORT equ 0x60
KB_STATUS_PORT equ 0x64
;LED status bitset:
;0: scroll lock
;1: num lock
;2: caps lock
;3..7: unused
;kb_led_status db 0
KB_LED_SCRL equ 0x01
KB_LED_MASK_SET_SCRL equ 0x01
KB_LED_MASK_RESET_SCRL equ 0x06
KB_LED_NUM equ 0x02
KB_LED_MASK_SET_NUM equ 0x02
KB_LED_MASK_RESET_NUM equ 0x05
KB_LED_CAPS equ 0x04
KB_LED_MASK_SET_CAPS equ 0x04
KB_LED_MASK_RESET_CAPS equ 0x03
KB_WRITE_LEDS equ 0xED
KB_WRITE_SET_SCANCODE equ 0xF0
KB_SCANCODE_SET equ 0x00
keyboard_init:
;test ps/2
; call keyboard_wait_port
; mov al, 0xAA
; out KB_STATUS_PORT, al
; call keyboard_wait_port
; in al, KB_DATA_PORT
; cmp al, 0x55
; je .exit
; jmp 0xFFFF:0x0000
.exit:
;set scancode set
; call keyboard_wait_port
; mov al, KB_WRITE_SET_SCANCODE
; out KB_DATA_PORT, al
; call keyboard_wait_port
; mov al, KB_SCANCODE_SET
; out KB_DATA_PORT, al
; call keyboard_wait_port
; in al, KB_DATA_PORT
retn
keyboard_int:
pusha
;push scancode to kb_buf, set led, caps...
push ds
push KERNEL_SEGMENT
pop ds
cmp byte[kb_miss], 0
je .continue
dec byte[kb_miss]
jmp .exit
.continue:
call keyboard_wait_port
in al, KB_DATA_PORT ;get scancode
cmp al, 0xFF
je .exit
cmp al, 0xFE
je .exit
test al, al
je .exit
cmp al, 0xEE
je .exit
cmp al, 0xFA
je .exit
cmp al, 0xE0 ;spec scancode
je kb_spec_scancode
cmp al, 0xE1
je kb_pause
call keyboard_set_led
call check_shift_pressed
call push_kb_buf
.exit:
pop ds
popa
jmp return_from_interrupt
kb_pause:
in al, KB_DATA_PORT
in al, KB_DATA_PORT
in al, KB_DATA_PORT
in al, KB_DATA_PORT
mov al, SCANCODE_OS_MAKE_PAUSE
call push_kb_buf
jmp keyboard_int.exit
kb_make_print:
in al, KB_DATA_PORT
in al, KB_DATA_PORT
mov al, SCANCODE_OS_MAKE_PRINT
call push_kb_buf
jmp keyboard_int.exit
kb_break_print:
in al, KB_DATA_PORT
in al, KB_DATA_PORT
mov al, SCANCODE_OS_BREAK_PRINT
call push_kb_buf
jmp keyboard_int.exit
kb_miss db 0
kb_spec_scancode:
call keyboard_wait_port
in al, KB_DATA_PORT
inc byte[kb_miss]
cmp al, 0x2A
je kb_make_print
cmp al, 0xB7
je kb_break_print
movzx bx, al
mov al, byte[.data_table + bx]
call push_kb_buf
jmp keyboard_int.exit
.data_table:
times 29 db 0
db SCANCODE_OS_MAKE_KP_EN ;0x1C
db SCANCODE_OS_MAKE_R_CTRL ;0x1D
times 23 db 0
db SCANCODE_OS_MAKE_KP_DIV ;0x35
times 2 db 0
db SCANCODE_OS_MAKE_R_ALT ;0x38
times 13 db 0
db SCANCODE_OS_MAKE_HOME ;0x47
db SCANCODE_OS_MAKE_UP_ARROW ;0x48
db SCANCODE_OS_MAKE_PG_UP ;0x49
times 1 db 0
db SCANCODE_OS_MAKE_LEFT_ARROW ;0x4B
times 1 db 0
db SCANCODE_OS_MAKE_RIGHT_ARROW ;0x4D
times 1 db 0
db SCANCODE_OS_MAKE_END ;0x4F
db SCANCODE_OS_MAKE_DOWN_ARROW ;0x50
db SCANCODE_OS_MAKE_PG_DOWN ;0x51
db SCANCODE_OS_MAKE_INSERT ;0x52
db SCANCODE_OS_MAKE_DELETE ;0x53
times 7 db 0
db SCANCODE_OS_MAKE_L_GUI ;0x5B
db SCANCODE_OS_MAKE_R_GUI ;0x5C
times 1 db 0
db SCANCODE_OS_MAKE_POWER ;0x5E
db SCANCODE_OS_MAKE_SLEEP ;0x5F
times 3 db 0
db SCANCODE_OS_MAKE_WAKE ;0x63
times 51 db 0
db SCANCODE_OS_BREAK_HOME ;0x97
times 4 db 0
db SCANCODE_OS_BREAK_KP_EN ;0x9C
db SCANCODE_OS_BREAK_R_CTRL ;0x9D
times 23 db 0
db SCANCODE_OS_BREAK_KP_DIV ;0xB5
times 3 db 0
db SCANCODE_OS_BREAK_R_ALT ;0xB9
times 14 db 0
db SCANCODE_OS_BREAK_UP_ARROW ;0xC8
db SCANCODE_OS_BREAK_PG_UP ;0xC9
times 1 db 0
db SCANCODE_OS_BREAK_LEFT_ARROW ;0xCB
times 1 db 0
db SCANCODE_OS_BREAK_RIGHT_ARROW ;0xCD
times 1 db 0
db SCANCODE_OS_BREAK_END ;0xCF
db SCANCODE_OS_BREAK_DOWN_ARROW ;0xD0
db SCANCODE_OS_BREAK_PG_DOWN ;0xD1
db SCANCODE_OS_BREAK_INSERT ;0xD2
db SCANCODE_OS_BREAK_DELETE ;0xD3
times 7 db 0
db SCANCODE_OS_BREAK_L_GUI ;0xDB
db SCANCODE_OS_BREAK_R_GUI ;0xDC
times 1 db 0
db SCANCODE_OS_BREAK_POWER ;0xDE
db SCANCODE_OS_BREAK_SLEEP ;0xDF
times 3 db 0
db SCANCODE_OS_BREAK_WAKE ;0xE3
;ring buffer queue
push_kb_buf:
;in: al = scancode
;out: al = KB_OVERFLOW if error, else scancode
; bx = byte[kb_buf_pos - 1]
mov bx, word[kb_buf_ptr_write]
mov byte[bx], al
call inc_kb_buf_ptr
mov word[kb_buf_ptr_write], bx
retn
inc_kb_buf_ptr:
;in: bx is kb_ptr
;out: bx inc
inc bx
cmp bx, KB_BUF_END
jne .end_ptr
mov bx, kb_buf
.end_ptr:
retn
KB_EMPTY equ 0x00 ;this scancode don't used in XT set
pop_kb_buf:
;out: al = KB_EMPTY if error, else scancode
; bx = byte[kb_buf_pos]
mov bx, word[kb_buf_ptr_read]
cmp bx, word[kb_buf_ptr_write]
je .end_empty
mov al, byte[bx]
call inc_kb_buf_ptr
mov word[kb_buf_ptr_read], bx
retn
.end_empty:
; mov al, KB_EMPTY
xor al, al
retn
keyboard_set_led:
;in: al = scancode
;out:
;check if scancode equal of caps/num/scrl lock. Set/Reset them and
;set LED state
mov bl, byte[kb_led_status]
mov cl, bl
not cl
cmp al, 0x3A ;caps lock
je .caps
cmp al, 0x45 ;num lock
je .num
cmp al, 0x46 ;scroll lock
jne .end
and bl, 0xFE
and cl, KB_LED_SCRL
jmp .write_to_led
.caps:
and bl, 0xFB
and cl, KB_LED_CAPS
jmp .write_to_led
.num:
and bl, 0xFD
and cl, KB_LED_NUM
.write_to_led:
or bl, cl
mov byte[kb_led_status], bl
.write_port:
; call keyboard_wait_port
; mov al, KB_WRITE_LEDS
; out KB_DATA_PORT, al
; call keyboard_wait_port
; mov al, byte[kb_led_status]
; out KB_DATA_PORT, al
;set LED response: 0xFA(Acknowledge) or 0xFE(Resend)
; in al, KB_DATA_PORT ;get scancode
; cmp al, 0xFA
; je .end
; cmp al, 0xFE
; je .end
; jmp 0xFFFF:0x0000
.end:
retn
keyboard_wait_port:
.wait:
; in al, KB_STATUS_PORT
; and al, 0x01
; in al, KB_DATA_PORT
; jnz .wait
in al, KB_STATUS_PORT
and al, 0x02 ;bit 1: controller current processing data
jnz .wait
retn
wait_keyboard_input:
;in:
;out: al = scancode
;wait when will pass data in keyboard buffer.
jmp .wait_in
.wait:
hlt
.wait_in:
call pop_kb_buf
test al, al
je .wait
retn
check_shift_pressed:
;in: al=scancode
;set/reset if scancode will shift
cmp al, 0x2A ;left shift make
je .shift_make
cmp al, 0xAA ;left shift break
je .shift_break
cmp al, 0x36 ;right shift make
je .shift_make
cmp al, 0xB6 ;right shift break
je .shift_break
retn
.shift_make:
mov byte[kb_shift_pressed], 1
retn
.shift_break:
mov byte[kb_shift_pressed], 0
retn
if_caps:
;out: cl = caps or not
mov cl, byte[kb_led_status]
and cx, KB_LED_CAPS
retn
KB_SCANCODE:;That not scancode's of hardware, that scancodes OS.
;Need for simple store spec scancodes.
;Used scancodes what's not used by hardware
;All another scancodes same as hardware
SCANCODE_OS_MAKE_L_GUI equ 0x5B
db SCANCODE_OS_MAKE_L_GUI ;hardware=(E0, 5B)
SCANCODE_OS_BREAK_L_GUI equ 0xDB
db SCANCODE_OS_BREAK_L_GUI ;hardware=(E0, DB)
SCANCODE_OS_MAKE_R_CTRL equ 0xA9
db SCANCODE_OS_MAKE_R_CTRL ;hardware=(E0, 1D)
SCANCODE_OS_BREAK_R_CTRL equ 0xD4
db SCANCODE_OS_BREAK_R_CTRL ;hardware=(E0, 9D)
SCANCODE_OS_MAKE_R_GUI equ 0x5C
db SCANCODE_OS_MAKE_R_GUI ;hardware=(E0, 5C)
SCANCODE_OS_BREAK_R_GUI equ 0xDC
db SCANCODE_OS_BREAK_R_GUI ;hardware=(E0, DC)
SCANCODE_OS_MAKE_R_ALT equ 0xD5
db SCANCODE_OS_MAKE_R_ALT ;hardware=(E0, 38)
SCANCODE_OS_BREAK_R_ALT equ 0xD6
db SCANCODE_OS_BREAK_R_ALT ;hardware=(E0, B9)
SCANCODE_OS_MAKE_HOME equ 0xD9
db SCANCODE_OS_MAKE_HOME ;hardware=(E0, 47)
SCANCODE_OS_BREAK_HOME equ 0xDA
db SCANCODE_OS_BREAK_HOME ;hardware=(E0, 97)
SCANCODE_OS_MAKE_INSERT equ 0xDE
db SCANCODE_OS_MAKE_INSERT ;hardware=(E0, 52)
SCANCODE_OS_BREAK_INSERT equ 0xDF
db SCANCODE_OS_BREAK_INSERT ;hardware=(E0, D2)
SCANCODE_OS_MAKE_PG_UP equ 0xE1
db SCANCODE_OS_BREAK_INSERT ;hardware=(E0, 49)
SCANCODE_OS_BREAK_PG_UP equ 0xE2
db SCANCODE_OS_BREAK_INSERT ;hardware=(E0, C9)
SCANCODE_OS_MAKE_DELETE equ 0xE3
db SCANCODE_OS_MAKE_DELETE ;hardware=(E0, 53)
SCANCODE_OS_BREAK_DELETE equ 0xE4
db SCANCODE_OS_BREAK_DELETE ;hardware=(E0, D3)
SCANCODE_OS_MAKE_END equ 0xE5
db SCANCODE_OS_MAKE_END ;hardware=(E0, 4F)
SCANCODE_OS_BREAK_END equ 0xE6
db SCANCODE_OS_BREAK_END ;hardware=(E0, CF)
SCANCODE_OS_MAKE_PG_DOWN equ 0xE7
db SCANCODE_OS_MAKE_PG_DOWN ;hardware=(E0, 51)
SCANCODE_OS_BREAK_PG_DOWN equ 0xE8
db SCANCODE_OS_BREAK_PG_DOWN ;hardware=(E0, D1)
SCANCODE_OS_MAKE_UP_ARROW equ 0xE9
db SCANCODE_OS_MAKE_UP_ARROW ;hardware=(E0, 48)
SCANCODE_OS_MAKE_LEFT_ARROW equ 0xEA
db SCANCODE_OS_MAKE_LEFT_ARROW ;hardware=(E0, 4B)
SCANCODE_OS_MAKE_DOWN_ARROW equ 0xEB
db SCANCODE_OS_MAKE_DOWN_ARROW ;hardware=(E0, 50)
SCANCODE_OS_MAKE_RIGHT_ARROW equ 0xEC
db SCANCODE_OS_MAKE_RIGHT_ARROW ;hardware=(E0, 4D)
SCANCODE_OS_BREAK_UP_ARROW equ 0xED
db SCANCODE_OS_BREAK_UP_ARROW ;hardware=(E0, C8)
SCANCODE_OS_BREAK_LEFT_ARROW equ 0xEF
db SCANCODE_OS_BREAK_LEFT_ARROW ;hardware=(E0, CB)
SCANCODE_OS_BREAK_DOWN_ARROW equ 0xF0
db SCANCODE_OS_BREAK_DOWN_ARROW ;hardware=(E0, D0)
SCANCODE_OS_BREAK_RIGHT_ARROW equ 0xF1
db SCANCODE_OS_BREAK_RIGHT_ARROW ;hardware=(E0, CD)
SCANCODE_OS_MAKE_KP_DIV equ 0xF2
db SCANCODE_OS_MAKE_KP_DIV ;hardware=(E0, 35)
SCANCODE_OS_BREAK_KP_DIV equ 0xF3
db SCANCODE_OS_BREAK_KP_DIV ;hardware=(E0, B5)
SCANCODE_OS_MAKE_KP_EN equ 0xF4
db SCANCODE_OS_MAKE_KP_EN ;hardware=(E0, 1C)
SCANCODE_OS_BREAK_KP_EN equ 0xF5
db SCANCODE_OS_BREAK_KP_EN ;hardware=(E0, 9C)
SCANCODE_OS_MAKE_PRINT equ 0xF6
db SCANCODE_OS_MAKE_PRINT ;hardware=(E0, 2A, E0, 37)
SCANCODE_OS_BREAK_PRINT equ 0xF7
db SCANCODE_OS_BREAK_PRINT ;hardware=(E0, B7, E0, AA)
SCANCODE_OS_MAKE_PAUSE equ 0xF8
db SCANCODE_OS_MAKE_PAUSE ;hardware=(E1, 1D, 45, E1, 9D, C5)
SCANCODE_OS_MAKE_POWER equ 0xF9
db SCANCODE_OS_MAKE_POWER ;hardware=(E0, 5E)
SCANCODE_OS_BREAK_POWER equ 0xFA
db SCANCODE_OS_BREAK_POWER ;hardware=(E0, DE)
SCANCODE_OS_MAKE_SLEEP equ 0xFB
db SCANCODE_OS_MAKE_SLEEP ;hardware=(E0, 5F)
SCANCODE_OS_BREAK_SLEEP equ 0xFC
db SCANCODE_OS_BREAK_SLEEP ;hardware=(E0, DF)
SCANCODE_OS_MAKE_WAKE equ 0xFD
db SCANCODE_OS_MAKE_WAKE ;hardware=(E0, 63)
SCANCODE_OS_BREAK_WAKE equ 0xFE
db SCANCODE_OS_BREAK_WAKE ;hardware=(E0, E3)
SCANCODE_SET:;(XT SCANCODE SET)
db 0x00 ; #00
db 0x00 ;MAKE ESC, #01
db '1' ;MAKE 1, #02
db '2' ;MAKE 2, #03
db '3' ;MAKE 3, #04
db '4' ;MAKE 4, #05
db '5' ;MAKE 5, #06
db '6' ;MAKE 6, #07
db '7' ;MAKE 7, #08
db '8' ;MAKE 8, #09
db '9' ;MAKE 9, #0A
db '0' ;MAKE 0, #0B
db '-' ;MAKE -, #0C
db '=' ;MAKE =, #0D
db 0x00 ;MAKE BAKESPACE, #0E
db 0x00 ;MAKE TAB, #0F
db 'q' ;MAKE Q, #10
db 'w' ;MAKE W, #11
db 'e' ;MAKE E, #12
db 'r' ;MAKE R, #13
db 't' ;MAKE T, #14
db 'y' ;MAKE Y, #15
db 'u' ;MAKE U, #16
db 'i' ;MAKE I, #17
db 'o' ;MAKE O, #18
db 'p' ;MAKE P, #19
db '[' ;MAKE [, #1A
db ']' ;MAKE ], #1B
db 0x00 ;MAKE ENTER, #1C
db 0x00 ;MAKE L CONTROL, #1D
db 'a' ;MAKE A, #1E
db 's' ;MAKE S, #1F
db 'd' ;MAKE D, #20
db 'f' ;MAKE F, #21
db 'g' ;MAKE G, #22
db 'h' ;MAKE H, #23
db 'j' ;MAKE J, #24
db 'k' ;MAKE K, #25
db 'l' ;MAKE L, #26
db 0x3B ;MAKE ;, #27
db 0x27 ;MAKE ', #28
db '`' ;MAKE `, #29
db 0x00 ;MAKE L SHIFT, #2A
db '\' ;MAKE \, #2B
db 'z' ;MAKE Z, #2C
db 'x' ;MAKE X, #2D
db 'c' ;MAKE C, #2E
db 'v' ;MAKE V, #2F
db 'b' ;MAKE B, #30
db 'n' ;MAKE N, #31
db 'm' ;MAKE M, #32
db ',' ;MAKE ,, #33
db '.' ;MAKE ., #34
db '/' ;MAKE /, #35
db 0x00 ;MAKE R SHIFT, #36
db '*' ;MAKE KP *, #37
db 0x00 ;MAKE L ALT, #38
db ' ' ;MAKE SPACE, #39
db 0x00 ;MAKE CAPS, #3A
db 0x00 ;MAKE F1, #3B
db 0x00 ;MAKE F2, #3C
db 0x00 ;MAKE F3, #3D
db 0x00 ;MAKE F4, #3E
db 0x00 ;MAKE F5, #3F
db 0x00 ;MAKE F6, #40
db 0x00 ;MAKE F7, #41
db 0x00 ;MAKE F8, #42
db 0x00 ;MAKE F9, #43
db 0x00 ;MAKE F10, #44
db 0x00 ;MAKE NUM LOCK, #45
db 0x00 ;MAKE SCROLL LCK,#46
db '7' ;MAKE KP 7, #47
db '8' ;MAKE KP 8, #48
db '9' ;MAKE KP 9, #49
db '-' ;MAKE KP -, #4A
db '4' ;MAKE KP 4, #4B
db '5' ;MAKE KP 5, #4C
db '6' ;MAKE KP 6, #4D
db '+' ;MAKE KP +, #4E
db '1' ;MAKE KP 1, #4F
db '2' ;MAKE KP 2, #50
db '3' ;MAKE KP 3, #51
db '0' ;MAKE KP 0, #52
db '.' ;MAKE KP ., #53
;no more printable chars, only BREAKS and UNUSED
SCANCODE_SET_WITH_SHIFT:;(XT SCANCODE SET)
db 0x00 ; #00
db 0x00 ;MAKE ESC, #01
db '!' ;MAKE 1, #02
db '@' ;MAKE 2, #03
db '#' ;MAKE 3, #04
db '$' ;MAKE 4, #05
db '%' ;MAKE 5, #06
db '^' ;MAKE 6, #07
db '&' ;MAKE 7, #08
db '*' ;MAKE 8, #09
db '(' ;MAKE 9, #0A
db ')' ;MAKE 0, #0B
db '_' ;MAKE -, #0C
db '+' ;MAKE =, #0D
db 0x00 ;MAKE BAKESPACE, #0E
db 0x00 ;MAKE TAB, #0F
db 'Q' ;MAKE Q, #10
db 'W' ;MAKE W, #11
db 'E' ;MAKE E, #12
db 'R' ;MAKE R, #13
db 'T' ;MAKE T, #14
db 'Y' ;MAKE Y, #15
db 'U' ;MAKE U, #16
db 'I' ;MAKE I, #17
db 'O' ;MAKE O, #18
db 'P' ;MAKE P, #19
db '{' ;MAKE [, #1A
db '}' ;MAKE ], #1B
db 0x00 ;MAKE ENTER, #1C
db 0x00 ;MAKE L CONTROL, #1D
db 'A' ;MAKE A, #1E
db 'S' ;MAKE S, #1F
db 'D' ;MAKE D, #20
db 'F' ;MAKE F, #21
db 'G' ;MAKE G, #22
db 'H' ;MAKE H, #23
db 'J' ;MAKE J, #24
db 'K' ;MAKE K, #25
db 'L' ;MAKE L, #26
db ':' ;MAKE ;, #27
db '"' ;MAKE ', #28
db '~' ;MAKE `, #29
db 0x00 ;MAKE L SHIFT, #2A
db '|' ;MAKE \, #2B
db 'Z' ;MAKE Z, #2C
db 'X' ;MAKE X, #2D
db 'C' ;MAKE C, #2E
db 'V' ;MAKE V, #2F
db 'B' ;MAKE B, #30
db 'N' ;MAKE N, #31
db 'M' ;MAKE M, #32
db '<' ;MAKE ,, #33
db '>' ;MAKE ., #34
db '?' ;MAKE /, #35
db 0x00 ;MAKE R SHIFT, #36
db '*' ;MAKE KP *, #37
db 0x00 ;MAKE L ALT, #38
db ' ' ;MAKE SPACE, #39
db 0x00 ;MAKE CAPS, #3A
db 0x00 ;MAKE F1, #3B
db 0x00 ;MAKE F2, #3C
db 0x00 ;MAKE F3, #3D
db 0x00 ;MAKE F4, #3E
db 0x00 ;MAKE F5, #3F
db 0x00 ;MAKE F6, #40
db 0x00 ;MAKE F7, #41
db 0x00 ;MAKE F8, #42
db 0x00 ;MAKE F9, #43
db 0x00 ;MAKE F10, #44
db 0x00 ;MAKE NUM LOCK, #45
db 0x00 ;MAKE SCROLL LCK,#46
db '7' ;MAKE KP 7, #47
db '8' ;MAKE KP 8, #48
db '9' ;MAKE KP 9, #49
db '-' ;MAKE KP -, #4A
db '4' ;MAKE KP 4, #4B
db '5' ;MAKE KP 5, #4C
db '6' ;MAKE KP 6, #4D
db '+' ;MAKE KP +, #4E
db '1' ;MAKE KP 1, #4F
db '2' ;MAKE KP 2, #50
db '3' ;MAKE KP 3, #51
db '0' ;MAKE KP 0, #52
db '.' ;MAKE KP ., #53
| 23.922137 | 72 | 0.684409 |
8cac6131554eacb8ad1edb129f66b4addb6fc1cf | 158 | asm | Assembly | CPU/cpu_test/test_storage/test5_lw_I.asm | SilenceX12138/MIPS-Microsystems | d389b706b0930151a710b544db436c2883af958b | [
"MIT"
] | 55 | 2021-09-06T12:12:47.000Z | 2022-01-15T04:30:53.000Z | CPU/cpu_test/test_storage/test5_lw_I.asm | SilenceX12138/MIPS-Microsystems | d389b706b0930151a710b544db436c2883af958b | [
"MIT"
] | null | null | null | CPU/cpu_test/test_storage/test5_lw_I.asm | SilenceX12138/MIPS-Microsystems | d389b706b0930151a710b544db436c2883af958b | [
"MIT"
] | null | null | null | ori $2,$0,1
ori $3,$0,3
sw $3,4($0)
sw $2,8($0)
ori $1,$0,4
lw $4,0($1)
ori $5,$0,4
ori $1,$0,8
nop
lw $6,0($1)
sw $6,12($0)
ori $1,$0,12
nop
nop
lw $7,0($1)
| 9.875 | 12 | 0.487342 |
a36d0a87e23c160ed1052aaf30aed45d3ad6aa71 | 2,017 | asm | Assembly | src/asm/StdDefs.asm | fourstix/1802PixieVideoTTY | 149cf85b1e5bf02e853d9b253313f6c0fbde8bd9 | [
"MIT"
] | 1 | 2020-09-01T16:37:38.000Z | 2020-09-01T16:37:38.000Z | src/asm/StdDefs.asm | fourstix/1802PixieVideoTTY | 149cf85b1e5bf02e853d9b253313f6c0fbde8bd9 | [
"MIT"
] | 3 | 2020-08-30T19:39:22.000Z | 2020-11-14T22:44:42.000Z | src/asm/StdDefs.asm | fourstix/1802PixieVideoTTY | 149cf85b1e5bf02e853d9b253313f6c0fbde8bd9 | [
"MIT"
] | null | null | null | ; *****************************************************************************************
; Copyright (c) 2020
; by Richard Dienstknecht
;
; Changes:
; Gaston Williams, July, 2020 - Added Macros for Std Call and Std Return
; Gaston Williams August, 2020 - Added Macro for loading Register
; *****************************************************************************************
; =========================================================================================
; Register definitions
; =========================================================================================
R0 EQU 00H
R1 EQU 01H
R2 EQU 02H
R3 EQU 03H
R4 EQU 04H
R5 EQU 05H
R6 EQU 06H
R7 EQU 07H
R8 EQU 08H
R9 EQU 09H
RA EQU 0AH
RB EQU 0BH
RC EQU 0CH
RD EQU 0DH
RE EQU 0EH
RF EQU 0FH
;------------------------------------------------------------------------------------------
; =========================================================================================
; Macro definitions for standard call and return
; See RCA CDP1802 User Manual, page 61 for more information
; =========================================================================================
CALL MACRO param1
SEP R4
dw param1
ENDM
RETURN MACRO
SEP R5
ENDM
LOAD MACRO param1, param2
LDI lo(param2)
PLO param1
LDI hi(param2)
PHI param1
ENDM | 39.54902 | 91 | 0.247893 |
7e7071d5464b9238aee6d0ebc33cfd6e9692f25a | 690 | asm | Assembly | oeis/020/A020047.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/020/A020047.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/020/A020047.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A020047: a(n) = floor(Gamma(n+7/12)/Gamma(7/12)).
; Submitted by Jon Maiga
; 1,0,0,2,8,39,218,1440,10922,93754,898484,9508956,110145408,1385996396,18826451052,274552411175,4278441740820,70950825535270,1247552015661833,23183674957715736,454013634588599833,9345113978615346577,201698710038447896953,4555029201701615006211,107422772006796420563144,2640809811833745338843959,67560717686079984918757962,1795989078488292932423649171,49539365414968746719352322972,1416000194777856677061487231631,41890005762178260029735663935753,1281136009559951785909415722035117
mov $1,1
mov $3,1
lpb $0
mul $1,3
mov $2,$0
sub $0,1
mul $2,12
sub $2,5
mul $1,$2
mul $3,36
lpe
div $1,$3
mov $0,$1
| 38.333333 | 481 | 0.814493 |
2db4c2cd9fc857f900fbf1b5d9d8087c144b563c | 418 | asm | Assembly | libsrc/stdio/oz/fgetc_cons.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/stdio/oz/fgetc_cons.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/stdio/oz/fgetc_cons.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; OZ 700 console library
;
; getkey() Wait for keypress
;
; $Id: fgetc_cons.asm,v 1.5 2016-07-14 17:44:18 pauloscustodio Exp $
;
;EXTERN KeyBufGetPos
;EXTERN KeyBufPutPos
;EXTERN EnableKeyboard
SECTION code_clib
PUBLIC fgetc_cons
PUBLIC _fgetc_cons
EXTERN getk
.fgetc_cons
._fgetc_cons
call getk
ld a,l
and a
jr nz,fgetc_cons
.kwait
call getk
ld a,l
and a
jr z,kwait
ret
| 13.0625 | 68 | 0.686603 |
6d07087a8e1f0c18f8f8aebb79ada0df189ee269 | 1,775 | asm | Assembly | programs/oeis/097/A097137.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/097/A097137.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/097/A097137.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A097137: Convolution of 3^n and floor(n/2).
; 0,0,1,4,14,44,135,408,1228,3688,11069,33212,99642,298932,896803,2690416,8071256,24213776,72641337,217924020,653772070,1961316220,5883948671,17651846024,52955538084,158866614264,476599842805,1429799528428,4289398585298,12868195755908,38604587267739,115813761803232,347441285409712,1042323856229152,3126971568687473,9380914706062436,28142744118187326,84428232354561996,253284697063686007,759854091191058040,2279562273573174140,6838686820719522440,20516060462158567341,61548181386475702044,184644544159427106154,553933632478281318484,1661800897434843955475,4985402692304531866448,14956208076913595599368,44868624230740786798128,134605872692222360394409,403817618076667081183252,1211452854230001243549782,3634358562690003730649372,10903075688070011191948143,32709227064210033575844456,98127681192630100727533396,294383043577890302182600216,883149130733670906547800677,2649447392201012719643402060,7948342176603038158930206210,23845026529809114476790618660,71535079589427343430371856011,214605238768282030291115568064,643815716304846090873346704224,1931447148914538272620040112704,5794341446743614817860120338145,17383024340230844453580361014468,52149073020692533360741083043438,156447219062077600082223249130348,469341657186232800246669747391079,1408024971558698400740009242173272,4224074914676095202220027726519852,12672224744028285606660083179559592,38016674232084856819980249538678813,114050022696254570459940748616036476,342150068088763711379822245848109466
lpb $0
mov $2,$0
sub $0,2
seq $2,58809 ; The sequence lambda(3,n), where lambda is defined in A055203. Number of ways of placing n identifiable positive intervals with a total of exactly three starting and/or finishing points.
add $1,$2
lpe
div $1,6
mov $0,$1
| 147.916667 | 1,459 | 0.904225 |
0b37b9d5f01ddc600d293c8b219e5b066d72cdd2 | 20,652 | asm | Assembly | forktest.asm | GuyueFang/xv6 | 5f4cc5dcc1f3644df4982eb370dae13212125e4d | [
"MIT-0"
] | null | null | null | forktest.asm | GuyueFang/xv6 | 5f4cc5dcc1f3644df4982eb370dae13212125e4d | [
"MIT-0"
] | null | null | null | forktest.asm | GuyueFang/xv6 | 5f4cc5dcc1f3644df4982eb370dae13212125e4d | [
"MIT-0"
] | null | null | null |
_forktest: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
printf(1, "fork test OK\n");
}
int
main(void)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 e4 f0 and $0xfffffff0,%esp
forktest();
6: e8 35 00 00 00 call 40 <forktest>
exit();
b: e8 42 03 00 00 call 352 <exit>
00000010 <printf>:
{
10: 55 push %ebp
11: 89 e5 mov %esp,%ebp
13: 53 push %ebx
14: 83 ec 14 sub $0x14,%esp
17: 8b 5d 0c mov 0xc(%ebp),%ebx
write(fd, s, strlen(s));
1a: 89 1c 24 mov %ebx,(%esp)
1d: e8 8e 01 00 00 call 1b0 <strlen>
22: 89 5c 24 04 mov %ebx,0x4(%esp)
26: 89 44 24 08 mov %eax,0x8(%esp)
2a: 8b 45 08 mov 0x8(%ebp),%eax
2d: 89 04 24 mov %eax,(%esp)
30: e8 3d 03 00 00 call 372 <write>
}
35: 83 c4 14 add $0x14,%esp
38: 5b pop %ebx
39: 5d pop %ebp
3a: c3 ret
3b: 90 nop
3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000040 <forktest>:
{
40: 55 push %ebp
41: 89 e5 mov %esp,%ebp
43: 53 push %ebx
for(n=0; n<N; n++){
44: 31 db xor %ebx,%ebx
{
46: 83 ec 14 sub $0x14,%esp
printf(1, "fork test\n");
49: c7 44 24 04 0c 04 00 movl $0x40c,0x4(%esp)
50: 00
51: c7 04 24 01 00 00 00 movl $0x1,(%esp)
58: e8 b3 ff ff ff call 10 <printf>
5d: eb 13 jmp 72 <forktest+0x32>
5f: 90 nop
if(pid == 0)
60: 0f 84 9f 00 00 00 je 105 <forktest+0xc5>
for(n=0; n<N; n++){
66: 83 c3 01 add $0x1,%ebx
69: 81 fb e8 03 00 00 cmp $0x3e8,%ebx
6f: 90 nop
70: 74 56 je c8 <forktest+0x88>
pid = fork();
72: e8 d3 02 00 00 call 34a <fork>
if(pid < 0)
77: 85 c0 test %eax,%eax
79: 79 e5 jns 60 <forktest+0x20>
for(; n > 0; n--){
7b: 85 db test %ebx,%ebx
7d: 8d 76 00 lea 0x0(%esi),%esi
80: 74 1b je 9d <forktest+0x5d>
82: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(wait(0) < 0){
88: c7 04 24 00 00 00 00 movl $0x0,(%esp)
8f: e8 c6 02 00 00 call 35a <wait>
94: 85 c0 test %eax,%eax
96: 78 59 js f1 <forktest+0xb1>
for(; n > 0; n--){
98: 83 eb 01 sub $0x1,%ebx
9b: 75 eb jne 88 <forktest+0x48>
if(wait(0) != -1){
9d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
a4: e8 b1 02 00 00 call 35a <wait>
a9: 83 f8 ff cmp $0xffffffff,%eax
ac: 75 5c jne 10a <forktest+0xca>
printf(1, "fork test OK\n");
ae: c7 44 24 04 3e 04 00 movl $0x43e,0x4(%esp)
b5: 00
b6: c7 04 24 01 00 00 00 movl $0x1,(%esp)
bd: e8 4e ff ff ff call 10 <printf>
}
c2: 83 c4 14 add $0x14,%esp
c5: 5b pop %ebx
c6: 5d pop %ebp
c7: c3 ret
write(fd, s, strlen(s));
c8: c7 04 24 4c 04 00 00 movl $0x44c,(%esp)
cf: e8 dc 00 00 00 call 1b0 <strlen>
d4: c7 44 24 04 4c 04 00 movl $0x44c,0x4(%esp)
db: 00
dc: c7 04 24 01 00 00 00 movl $0x1,(%esp)
e3: 89 44 24 08 mov %eax,0x8(%esp)
e7: e8 86 02 00 00 call 372 <write>
exit();
ec: e8 61 02 00 00 call 352 <exit>
printf(1, "wait stopped early\n");
f1: c7 44 24 04 17 04 00 movl $0x417,0x4(%esp)
f8: 00
f9: c7 04 24 01 00 00 00 movl $0x1,(%esp)
100: e8 0b ff ff ff call 10 <printf>
exit();
105: e8 48 02 00 00 call 352 <exit>
printf(1, "wait got too many\n");
10a: c7 44 24 04 2b 04 00 movl $0x42b,0x4(%esp)
111: 00
112: c7 04 24 01 00 00 00 movl $0x1,(%esp)
119: e8 f2 fe ff ff call 10 <printf>
exit();
11e: e8 2f 02 00 00 call 352 <exit>
123: 66 90 xchg %ax,%ax
125: 66 90 xchg %ax,%ax
127: 66 90 xchg %ax,%ax
129: 66 90 xchg %ax,%ax
12b: 66 90 xchg %ax,%ax
12d: 66 90 xchg %ax,%ax
12f: 90 nop
00000130 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
130: 55 push %ebp
131: 89 e5 mov %esp,%ebp
133: 8b 45 08 mov 0x8(%ebp),%eax
136: 8b 4d 0c mov 0xc(%ebp),%ecx
139: 53 push %ebx
char *os;
os = s;
while((*s++ = *t++) != 0)
13a: 89 c2 mov %eax,%edx
13c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
140: 83 c1 01 add $0x1,%ecx
143: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
147: 83 c2 01 add $0x1,%edx
14a: 84 db test %bl,%bl
14c: 88 5a ff mov %bl,-0x1(%edx)
14f: 75 ef jne 140 <strcpy+0x10>
;
return os;
}
151: 5b pop %ebx
152: 5d pop %ebp
153: c3 ret
154: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
15a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000160 <strcmp>:
int
strcmp(const char *p, const char *q)
{
160: 55 push %ebp
161: 89 e5 mov %esp,%ebp
163: 8b 55 08 mov 0x8(%ebp),%edx
166: 53 push %ebx
167: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
16a: 0f b6 02 movzbl (%edx),%eax
16d: 84 c0 test %al,%al
16f: 74 2d je 19e <strcmp+0x3e>
171: 0f b6 19 movzbl (%ecx),%ebx
174: 38 d8 cmp %bl,%al
176: 74 0e je 186 <strcmp+0x26>
178: eb 2b jmp 1a5 <strcmp+0x45>
17a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
180: 38 c8 cmp %cl,%al
182: 75 15 jne 199 <strcmp+0x39>
p++, q++;
184: 89 d9 mov %ebx,%ecx
186: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
189: 0f b6 02 movzbl (%edx),%eax
p++, q++;
18c: 8d 59 01 lea 0x1(%ecx),%ebx
while(*p && *p == *q)
18f: 0f b6 49 01 movzbl 0x1(%ecx),%ecx
193: 84 c0 test %al,%al
195: 75 e9 jne 180 <strcmp+0x20>
197: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
199: 29 c8 sub %ecx,%eax
}
19b: 5b pop %ebx
19c: 5d pop %ebp
19d: c3 ret
19e: 0f b6 09 movzbl (%ecx),%ecx
while(*p && *p == *q)
1a1: 31 c0 xor %eax,%eax
1a3: eb f4 jmp 199 <strcmp+0x39>
1a5: 0f b6 cb movzbl %bl,%ecx
1a8: eb ef jmp 199 <strcmp+0x39>
1aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
000001b0 <strlen>:
uint
strlen(const char *s)
{
1b0: 55 push %ebp
1b1: 89 e5 mov %esp,%ebp
1b3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
1b6: 80 39 00 cmpb $0x0,(%ecx)
1b9: 74 12 je 1cd <strlen+0x1d>
1bb: 31 d2 xor %edx,%edx
1bd: 8d 76 00 lea 0x0(%esi),%esi
1c0: 83 c2 01 add $0x1,%edx
1c3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
1c7: 89 d0 mov %edx,%eax
1c9: 75 f5 jne 1c0 <strlen+0x10>
;
return n;
}
1cb: 5d pop %ebp
1cc: c3 ret
for(n = 0; s[n]; n++)
1cd: 31 c0 xor %eax,%eax
}
1cf: 5d pop %ebp
1d0: c3 ret
1d1: eb 0d jmp 1e0 <memset>
1d3: 90 nop
1d4: 90 nop
1d5: 90 nop
1d6: 90 nop
1d7: 90 nop
1d8: 90 nop
1d9: 90 nop
1da: 90 nop
1db: 90 nop
1dc: 90 nop
1dd: 90 nop
1de: 90 nop
1df: 90 nop
000001e0 <memset>:
void*
memset(void *dst, int c, uint n)
{
1e0: 55 push %ebp
1e1: 89 e5 mov %esp,%ebp
1e3: 8b 55 08 mov 0x8(%ebp),%edx
1e6: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
1e7: 8b 4d 10 mov 0x10(%ebp),%ecx
1ea: 8b 45 0c mov 0xc(%ebp),%eax
1ed: 89 d7 mov %edx,%edi
1ef: fc cld
1f0: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
1f2: 89 d0 mov %edx,%eax
1f4: 5f pop %edi
1f5: 5d pop %ebp
1f6: c3 ret
1f7: 89 f6 mov %esi,%esi
1f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000200 <strchr>:
char*
strchr(const char *s, char c)
{
200: 55 push %ebp
201: 89 e5 mov %esp,%ebp
203: 8b 45 08 mov 0x8(%ebp),%eax
206: 53 push %ebx
207: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
20a: 0f b6 18 movzbl (%eax),%ebx
20d: 84 db test %bl,%bl
20f: 74 1d je 22e <strchr+0x2e>
if(*s == c)
211: 38 d3 cmp %dl,%bl
213: 89 d1 mov %edx,%ecx
215: 75 0d jne 224 <strchr+0x24>
217: eb 17 jmp 230 <strchr+0x30>
219: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
220: 38 ca cmp %cl,%dl
222: 74 0c je 230 <strchr+0x30>
for(; *s; s++)
224: 83 c0 01 add $0x1,%eax
227: 0f b6 10 movzbl (%eax),%edx
22a: 84 d2 test %dl,%dl
22c: 75 f2 jne 220 <strchr+0x20>
return (char*)s;
return 0;
22e: 31 c0 xor %eax,%eax
}
230: 5b pop %ebx
231: 5d pop %ebp
232: c3 ret
233: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000240 <gets>:
char*
gets(char *buf, int max)
{
240: 55 push %ebp
241: 89 e5 mov %esp,%ebp
243: 57 push %edi
244: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
245: 31 f6 xor %esi,%esi
{
247: 53 push %ebx
248: 83 ec 2c sub $0x2c,%esp
cc = read(0, &c, 1);
24b: 8d 7d e7 lea -0x19(%ebp),%edi
for(i=0; i+1 < max; ){
24e: eb 31 jmp 281 <gets+0x41>
cc = read(0, &c, 1);
250: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
257: 00
258: 89 7c 24 04 mov %edi,0x4(%esp)
25c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
263: e8 02 01 00 00 call 36a <read>
if(cc < 1)
268: 85 c0 test %eax,%eax
26a: 7e 1d jle 289 <gets+0x49>
break;
buf[i++] = c;
26c: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
for(i=0; i+1 < max; ){
270: 89 de mov %ebx,%esi
buf[i++] = c;
272: 8b 55 08 mov 0x8(%ebp),%edx
if(c == '\n' || c == '\r')
275: 3c 0d cmp $0xd,%al
buf[i++] = c;
277: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
27b: 74 0c je 289 <gets+0x49>
27d: 3c 0a cmp $0xa,%al
27f: 74 08 je 289 <gets+0x49>
for(i=0; i+1 < max; ){
281: 8d 5e 01 lea 0x1(%esi),%ebx
284: 3b 5d 0c cmp 0xc(%ebp),%ebx
287: 7c c7 jl 250 <gets+0x10>
break;
}
buf[i] = '\0';
289: 8b 45 08 mov 0x8(%ebp),%eax
28c: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
290: 83 c4 2c add $0x2c,%esp
293: 5b pop %ebx
294: 5e pop %esi
295: 5f pop %edi
296: 5d pop %ebp
297: c3 ret
298: 90 nop
299: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000002a0 <stat>:
int
stat(const char *n, struct stat *st)
{
2a0: 55 push %ebp
2a1: 89 e5 mov %esp,%ebp
2a3: 56 push %esi
2a4: 53 push %ebx
2a5: 83 ec 10 sub $0x10,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
2a8: 8b 45 08 mov 0x8(%ebp),%eax
2ab: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
2b2: 00
2b3: 89 04 24 mov %eax,(%esp)
2b6: e8 d7 00 00 00 call 392 <open>
if(fd < 0)
2bb: 85 c0 test %eax,%eax
fd = open(n, O_RDONLY);
2bd: 89 c3 mov %eax,%ebx
if(fd < 0)
2bf: 78 27 js 2e8 <stat+0x48>
return -1;
r = fstat(fd, st);
2c1: 8b 45 0c mov 0xc(%ebp),%eax
2c4: 89 1c 24 mov %ebx,(%esp)
2c7: 89 44 24 04 mov %eax,0x4(%esp)
2cb: e8 da 00 00 00 call 3aa <fstat>
close(fd);
2d0: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
2d3: 89 c6 mov %eax,%esi
close(fd);
2d5: e8 a0 00 00 00 call 37a <close>
return r;
2da: 89 f0 mov %esi,%eax
}
2dc: 83 c4 10 add $0x10,%esp
2df: 5b pop %ebx
2e0: 5e pop %esi
2e1: 5d pop %ebp
2e2: c3 ret
2e3: 90 nop
2e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
2e8: b8 ff ff ff ff mov $0xffffffff,%eax
2ed: eb ed jmp 2dc <stat+0x3c>
2ef: 90 nop
000002f0 <atoi>:
int
atoi(const char *s)
{
2f0: 55 push %ebp
2f1: 89 e5 mov %esp,%ebp
2f3: 8b 4d 08 mov 0x8(%ebp),%ecx
2f6: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
2f7: 0f be 11 movsbl (%ecx),%edx
2fa: 8d 42 d0 lea -0x30(%edx),%eax
2fd: 3c 09 cmp $0x9,%al
n = 0;
2ff: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
304: 77 17 ja 31d <atoi+0x2d>
306: 66 90 xchg %ax,%ax
n = n*10 + *s++ - '0';
308: 83 c1 01 add $0x1,%ecx
30b: 8d 04 80 lea (%eax,%eax,4),%eax
30e: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
312: 0f be 11 movsbl (%ecx),%edx
315: 8d 5a d0 lea -0x30(%edx),%ebx
318: 80 fb 09 cmp $0x9,%bl
31b: 76 eb jbe 308 <atoi+0x18>
return n;
}
31d: 5b pop %ebx
31e: 5d pop %ebp
31f: c3 ret
00000320 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
320: 55 push %ebp
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
321: 31 d2 xor %edx,%edx
{
323: 89 e5 mov %esp,%ebp
325: 56 push %esi
326: 8b 45 08 mov 0x8(%ebp),%eax
329: 53 push %ebx
32a: 8b 5d 10 mov 0x10(%ebp),%ebx
32d: 8b 75 0c mov 0xc(%ebp),%esi
while(n-- > 0)
330: 85 db test %ebx,%ebx
332: 7e 12 jle 346 <memmove+0x26>
334: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
338: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
33c: 88 0c 10 mov %cl,(%eax,%edx,1)
33f: 83 c2 01 add $0x1,%edx
while(n-- > 0)
342: 39 da cmp %ebx,%edx
344: 75 f2 jne 338 <memmove+0x18>
return vdst;
}
346: 5b pop %ebx
347: 5e pop %esi
348: 5d pop %ebp
349: c3 ret
0000034a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
34a: b8 01 00 00 00 mov $0x1,%eax
34f: cd 40 int $0x40
351: c3 ret
00000352 <exit>:
SYSCALL(exit)
352: b8 02 00 00 00 mov $0x2,%eax
357: cd 40 int $0x40
359: c3 ret
0000035a <wait>:
SYSCALL(wait)
35a: b8 03 00 00 00 mov $0x3,%eax
35f: cd 40 int $0x40
361: c3 ret
00000362 <pipe>:
SYSCALL(pipe)
362: b8 04 00 00 00 mov $0x4,%eax
367: cd 40 int $0x40
369: c3 ret
0000036a <read>:
SYSCALL(read)
36a: b8 05 00 00 00 mov $0x5,%eax
36f: cd 40 int $0x40
371: c3 ret
00000372 <write>:
SYSCALL(write)
372: b8 10 00 00 00 mov $0x10,%eax
377: cd 40 int $0x40
379: c3 ret
0000037a <close>:
SYSCALL(close)
37a: b8 15 00 00 00 mov $0x15,%eax
37f: cd 40 int $0x40
381: c3 ret
00000382 <kill>:
SYSCALL(kill)
382: b8 06 00 00 00 mov $0x6,%eax
387: cd 40 int $0x40
389: c3 ret
0000038a <exec>:
SYSCALL(exec)
38a: b8 07 00 00 00 mov $0x7,%eax
38f: cd 40 int $0x40
391: c3 ret
00000392 <open>:
SYSCALL(open)
392: b8 0f 00 00 00 mov $0xf,%eax
397: cd 40 int $0x40
399: c3 ret
0000039a <mknod>:
SYSCALL(mknod)
39a: b8 11 00 00 00 mov $0x11,%eax
39f: cd 40 int $0x40
3a1: c3 ret
000003a2 <unlink>:
SYSCALL(unlink)
3a2: b8 12 00 00 00 mov $0x12,%eax
3a7: cd 40 int $0x40
3a9: c3 ret
000003aa <fstat>:
SYSCALL(fstat)
3aa: b8 08 00 00 00 mov $0x8,%eax
3af: cd 40 int $0x40
3b1: c3 ret
000003b2 <link>:
SYSCALL(link)
3b2: b8 13 00 00 00 mov $0x13,%eax
3b7: cd 40 int $0x40
3b9: c3 ret
000003ba <mkdir>:
SYSCALL(mkdir)
3ba: b8 14 00 00 00 mov $0x14,%eax
3bf: cd 40 int $0x40
3c1: c3 ret
000003c2 <chdir>:
SYSCALL(chdir)
3c2: b8 09 00 00 00 mov $0x9,%eax
3c7: cd 40 int $0x40
3c9: c3 ret
000003ca <dup>:
SYSCALL(dup)
3ca: b8 0a 00 00 00 mov $0xa,%eax
3cf: cd 40 int $0x40
3d1: c3 ret
000003d2 <getpid>:
SYSCALL(getpid)
3d2: b8 0b 00 00 00 mov $0xb,%eax
3d7: cd 40 int $0x40
3d9: c3 ret
000003da <sbrk>:
SYSCALL(sbrk)
3da: b8 0c 00 00 00 mov $0xc,%eax
3df: cd 40 int $0x40
3e1: c3 ret
000003e2 <sleep>:
SYSCALL(sleep)
3e2: b8 0d 00 00 00 mov $0xd,%eax
3e7: cd 40 int $0x40
3e9: c3 ret
000003ea <uptime>:
SYSCALL(uptime)
3ea: b8 0e 00 00 00 mov $0xe,%eax
3ef: cd 40 int $0x40
3f1: c3 ret
000003f2 <exitS>:
SYSCALL(exitS)
3f2: b8 16 00 00 00 mov $0x16,%eax
3f7: cd 40 int $0x40
3f9: c3 ret
000003fa <waitpid>:
SYSCALL(waitpid)
3fa: b8 17 00 00 00 mov $0x17,%eax
3ff: cd 40 int $0x40
401: c3 ret
00000402 <set_prior>:
SYSCALL(set_prior)
402: b8 18 00 00 00 mov $0x18,%eax
407: cd 40 int $0x40
409: c3 ret
| 31.149321 | 58 | 0.415892 |
0be574662fc38eb66abc62ee356ab695bd1d9ee0 | 45,233 | asm | Assembly | P6/P6Judger - 100 testpoints/testpoint/testpoint38.asm | flyinglandlord/BUAA-CO-2021 | 1aa28b09762dfb2376ed2aac4126839f0e6fcf93 | [
"MIT"
] | 5 | 2021-12-05T12:58:26.000Z | 2022-03-31T02:05:13.000Z | P6/P6Judger - 100 testpoints/testpoint/testpoint38.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | null | null | null | P6/P6Judger - 100 testpoints/testpoint/testpoint38.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | 2 | 2021-12-19T11:49:48.000Z | 2021-12-22T10:25:38.000Z | ori $1, $0, 2
ori $2, $0, 12
ori $3, $0, 15
ori $4, $0, 12
sw $1, 0($0)
sw $1, 4($0)
sw $1, 8($0)
sw $3, 12($0)
sw $3, 16($0)
sw $4, 20($0)
sw $4, 24($0)
sw $3, 28($0)
sw $1, 32($0)
sw $3, 36($0)
sw $3, 40($0)
sw $4, 44($0)
sw $2, 48($0)
sw $3, 52($0)
sw $1, 56($0)
sw $3, 60($0)
sw $3, 64($0)
sw $1, 68($0)
sw $4, 72($0)
sw $1, 76($0)
sw $1, 80($0)
sw $1, 84($0)
sw $3, 88($0)
sw $3, 92($0)
sw $1, 96($0)
sw $2, 100($0)
sw $4, 104($0)
sw $3, 108($0)
sw $3, 112($0)
sw $3, 116($0)
sw $4, 120($0)
sw $1, 124($0)
bltz $2, TAG1
andi $3, $2, 4
lb $3, 0($2)
lui $4, 5
TAG1:
mthi $4
bgez $4, TAG2
mflo $1
lui $4, 3
TAG2:
sll $0, $0, 0
div $4, $4
beq $4, $4, TAG3
sll $0, $0, 0
TAG3:
lui $4, 14
mflo $2
mthi $3
mflo $4
TAG4:
mfhi $1
bltz $4, TAG5
srl $3, $4, 1
bltz $4, TAG5
TAG5:
mthi $3
bne $3, $3, TAG6
mult $3, $3
sll $4, $3, 1
TAG6:
bgtz $4, TAG7
slt $3, $4, $4
srav $3, $3, $4
lhu $2, 0($4)
TAG7:
lbu $3, 0($2)
beq $2, $2, TAG8
sb $2, 0($2)
or $2, $2, $3
TAG8:
div $2, $2
mult $2, $2
lh $1, 0($2)
divu $2, $1
TAG9:
bltz $1, TAG10
sh $1, 0($1)
mthi $1
lui $3, 7
TAG10:
divu $3, $3
lui $1, 6
mthi $3
div $1, $3
TAG11:
bgez $1, TAG12
slti $1, $1, 5
mtlo $1
lui $3, 13
TAG12:
bne $3, $3, TAG13
mult $3, $3
lui $1, 8
mflo $4
TAG13:
addi $4, $4, 11
mflo $2
mthi $4
srl $4, $2, 4
TAG14:
blez $4, TAG15
slti $1, $4, 14
lh $3, 0($1)
mflo $4
TAG15:
beq $4, $4, TAG16
multu $4, $4
multu $4, $4
lw $1, 0($4)
TAG16:
lb $4, 0($1)
lui $3, 5
sb $1, 0($4)
sllv $1, $1, $4
TAG17:
beq $1, $1, TAG18
addu $1, $1, $1
subu $4, $1, $1
sb $4, 0($1)
TAG18:
mult $4, $4
sw $4, 0($4)
beq $4, $4, TAG19
multu $4, $4
TAG19:
mult $4, $4
lh $3, 0($4)
sw $4, 0($3)
blez $4, TAG20
TAG20:
lui $4, 8
mtlo $3
sb $4, 0($3)
lui $1, 15
TAG21:
sll $0, $0, 0
slt $1, $1, $1
lui $4, 5
sll $0, $0, 0
TAG22:
beq $2, $2, TAG23
mult $2, $2
mflo $1
lhu $4, 0($1)
TAG23:
lui $3, 11
beq $4, $4, TAG24
divu $4, $3
xori $4, $4, 5
TAG24:
beq $4, $4, TAG25
lui $1, 11
divu $1, $1
xori $4, $1, 15
TAG25:
beq $4, $4, TAG26
divu $4, $4
sw $4, 0($4)
mthi $4
TAG26:
mult $4, $4
div $4, $4
div $4, $4
lui $3, 3
TAG27:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
lui $4, 10
TAG28:
bgez $4, TAG29
lui $1, 2
mflo $4
lui $4, 4
TAG29:
mult $4, $4
sll $0, $0, 0
mflo $4
mfhi $3
TAG30:
mthi $3
beq $3, $3, TAG31
lui $1, 12
bne $1, $3, TAG31
TAG31:
sll $0, $0, 0
srav $2, $1, $1
blez $1, TAG32
andi $1, $4, 6
TAG32:
sh $1, 0($1)
mthi $1
add $2, $1, $1
mflo $1
TAG33:
beq $1, $1, TAG34
lw $4, 0($1)
and $2, $1, $1
lui $4, 4
TAG34:
sltu $4, $4, $4
lui $1, 7
sll $0, $0, 0
mflo $3
TAG35:
sh $3, 0($3)
lhu $3, 0($3)
multu $3, $3
bgez $3, TAG36
TAG36:
mfhi $4
sll $1, $4, 9
bltz $1, TAG37
sltiu $2, $1, 3
TAG37:
lbu $2, 0($2)
multu $2, $2
beq $2, $2, TAG38
mfhi $3
TAG38:
lhu $2, 0($3)
lhu $1, 0($3)
lhu $2, 0($1)
mthi $1
TAG39:
mthi $2
mthi $2
lui $3, 8
lui $2, 6
TAG40:
lui $3, 5
lui $2, 10
mtlo $3
sll $0, $0, 0
TAG41:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
ori $4, $3, 7
TAG42:
sll $0, $0, 0
mfhi $3
lui $3, 4
mtlo $3
TAG43:
mflo $4
sll $0, $0, 0
subu $4, $3, $3
srl $4, $4, 3
TAG44:
beq $4, $4, TAG45
lui $4, 12
xori $3, $4, 4
sltu $3, $3, $3
TAG45:
mfhi $1
mthi $3
sh $3, 0($1)
mflo $4
TAG46:
sllv $3, $4, $4
sll $0, $0, 0
slti $4, $4, 8
bgtz $4, TAG47
TAG47:
lbu $2, 0($4)
lui $4, 5
mflo $3
nor $2, $3, $2
TAG48:
bltz $2, TAG49
mtlo $2
mult $2, $2
mflo $1
TAG49:
lh $2, 0($1)
mflo $1
mtlo $2
mult $1, $1
TAG50:
lui $3, 14
beq $3, $1, TAG51
mult $3, $3
blez $3, TAG51
TAG51:
mflo $4
sb $4, 0($4)
bne $3, $4, TAG52
mtlo $3
TAG52:
sb $4, 0($4)
multu $4, $4
lui $2, 3
bne $2, $4, TAG53
TAG53:
mflo $3
beq $3, $3, TAG54
sll $0, $0, 0
sw $4, 0($3)
TAG54:
bltz $4, TAG55
subu $1, $4, $4
addiu $2, $4, 14
ori $3, $2, 5
TAG55:
lbu $4, 0($3)
bgez $4, TAG56
mthi $4
addiu $4, $3, 8
TAG56:
sltiu $4, $4, 1
subu $1, $4, $4
sb $4, 0($4)
mfhi $3
TAG57:
blez $3, TAG58
mthi $3
lb $2, 0($3)
mthi $2
TAG58:
multu $2, $2
sltiu $1, $2, 1
mtlo $1
mult $2, $1
TAG59:
sh $1, 0($1)
lw $2, 0($1)
multu $1, $1
mfhi $3
TAG60:
addi $1, $3, 4
lb $2, 0($3)
beq $1, $3, TAG61
lbu $3, 0($1)
TAG61:
sh $3, 0($3)
mtlo $3
mult $3, $3
mfhi $2
TAG62:
slti $1, $2, 8
blez $1, TAG63
slti $3, $1, 4
xor $2, $3, $3
TAG63:
add $2, $2, $2
subu $3, $2, $2
beq $2, $2, TAG64
slt $1, $2, $3
TAG64:
sb $1, 0($1)
add $1, $1, $1
mfhi $2
mfhi $4
TAG65:
lbu $3, 0($4)
lui $3, 7
mtlo $3
mtlo $3
TAG66:
beq $3, $3, TAG67
divu $3, $3
sltiu $4, $3, 8
mtlo $4
TAG67:
xori $1, $4, 14
mult $4, $1
sltiu $4, $4, 3
addu $3, $4, $4
TAG68:
mflo $3
multu $3, $3
lui $3, 8
sll $0, $0, 0
TAG69:
mult $2, $2
mtlo $2
mthi $2
addu $2, $2, $2
TAG70:
sw $2, 0($2)
beq $2, $2, TAG71
lhu $3, 0($2)
lb $2, 0($3)
TAG71:
bltz $2, TAG72
mflo $1
lui $1, 6
xor $1, $1, $1
TAG72:
slt $2, $1, $1
multu $2, $2
lbu $3, 0($1)
lb $4, 0($1)
TAG73:
multu $4, $4
multu $4, $4
lui $2, 7
sb $4, 0($4)
TAG74:
lui $4, 7
div $2, $2
mfhi $3
nor $3, $4, $2
TAG75:
div $3, $3
slti $3, $3, 14
lui $1, 2
sll $0, $0, 0
TAG76:
bgtz $1, TAG77
sltiu $3, $1, 7
lw $1, 0($3)
sh $1, 0($1)
TAG77:
lui $4, 1
mfhi $3
slti $2, $4, 10
sllv $2, $3, $3
TAG78:
sw $2, 0($2)
bgtz $2, TAG79
sb $2, 0($2)
addiu $4, $2, 2
TAG79:
mflo $3
lhu $4, 0($4)
mult $3, $4
sw $4, 0($4)
TAG80:
lb $1, 0($4)
bne $1, $4, TAG81
mtlo $4
sh $1, 0($4)
TAG81:
lui $2, 7
mfhi $2
sw $2, 0($1)
beq $1, $1, TAG82
TAG82:
mthi $2
mthi $2
or $4, $2, $2
mthi $4
TAG83:
multu $4, $4
bne $4, $4, TAG84
slti $2, $4, 4
lb $4, 0($2)
TAG84:
lui $4, 9
sll $0, $0, 0
bltz $3, TAG85
sll $0, $0, 0
TAG85:
lui $2, 13
bne $3, $3, TAG86
lui $2, 8
sll $0, $0, 0
TAG86:
mthi $1
bltz $1, TAG87
sllv $3, $1, $1
add $1, $1, $1
TAG87:
sll $3, $1, 7
mult $1, $3
lui $1, 11
andi $2, $1, 9
TAG88:
mfhi $2
addi $2, $2, 9
sra $1, $2, 12
mult $2, $1
TAG89:
bne $1, $1, TAG90
mthi $1
mfhi $2
bne $1, $1, TAG90
TAG90:
mthi $2
bgtz $2, TAG91
or $3, $2, $2
andi $3, $2, 1
TAG91:
mfhi $3
mfhi $4
mflo $3
mult $3, $4
TAG92:
sltiu $3, $3, 11
srl $2, $3, 10
lui $2, 5
sll $0, $0, 0
TAG93:
mtlo $3
sltu $4, $3, $3
mfhi $1
srl $2, $4, 8
TAG94:
bgtz $2, TAG95
sw $2, 0($2)
sw $2, 0($2)
addi $4, $2, 6
TAG95:
divu $4, $4
mflo $3
bgez $3, TAG96
mfhi $1
TAG96:
sll $2, $1, 7
mfhi $4
beq $2, $1, TAG97
sh $1, 0($4)
TAG97:
lh $3, 0($4)
blez $3, TAG98
sb $3, 0($3)
sltiu $2, $3, 15
TAG98:
sb $2, 0($2)
sh $2, 0($2)
mult $2, $2
mult $2, $2
TAG99:
mthi $2
sb $2, 0($2)
sllv $1, $2, $2
sra $4, $1, 0
TAG100:
mflo $1
multu $4, $4
andi $1, $1, 9
lui $1, 4
TAG101:
mtlo $1
mthi $1
mthi $1
beq $1, $1, TAG102
TAG102:
sll $0, $0, 0
multu $1, $1
sll $0, $0, 0
bltz $1, TAG103
TAG103:
mflo $1
xori $1, $1, 5
bgez $1, TAG104
multu $1, $1
TAG104:
sb $1, 0($1)
divu $1, $1
bne $1, $1, TAG105
div $1, $1
TAG105:
mtlo $1
bgez $1, TAG106
lb $2, 0($1)
xor $3, $2, $1
TAG106:
lh $3, 0($3)
bne $3, $3, TAG107
sb $3, 0($3)
lui $4, 12
TAG107:
sll $0, $0, 0
bne $4, $4, TAG108
srav $1, $4, $4
addu $1, $4, $1
TAG108:
mfhi $4
multu $4, $1
ori $2, $1, 8
sh $1, 0($4)
TAG109:
div $2, $2
xor $3, $2, $2
sh $2, 0($3)
sll $0, $0, 0
TAG110:
mfhi $3
lhu $1, 0($3)
addu $3, $3, $3
blez $3, TAG111
TAG111:
mtlo $3
blez $3, TAG112
sb $3, 0($3)
lui $3, 14
TAG112:
mthi $3
bgtz $3, TAG113
mfhi $3
multu $3, $3
TAG113:
lbu $1, 0($3)
mfhi $1
mtlo $3
nor $1, $3, $1
TAG114:
sll $0, $0, 0
bgez $3, TAG115
lw $4, 0($3)
slt $2, $3, $4
TAG115:
mfhi $3
lui $2, 13
mtlo $3
bne $2, $2, TAG116
TAG116:
sll $0, $0, 0
xori $3, $4, 0
bgez $2, TAG117
sltu $3, $3, $3
TAG117:
lh $1, 0($3)
bltz $3, TAG118
lb $1, 0($3)
slt $3, $1, $1
TAG118:
mult $3, $3
beq $3, $3, TAG119
addi $1, $3, 15
div $3, $1
TAG119:
lb $1, 0($1)
lui $2, 8
lhu $1, 0($1)
slt $3, $2, $2
TAG120:
slt $2, $3, $3
lw $2, 0($3)
lh $3, 0($2)
lw $1, 0($3)
TAG121:
srav $4, $1, $1
mtlo $4
bne $4, $4, TAG122
srl $3, $1, 10
TAG122:
ori $4, $3, 15
add $4, $3, $4
sll $1, $4, 13
lui $3, 6
TAG123:
slt $3, $3, $3
mtlo $3
mthi $3
mthi $3
TAG124:
sllv $4, $3, $3
bne $4, $3, TAG125
lui $3, 5
div $3, $3
TAG125:
div $3, $3
ori $1, $3, 4
multu $3, $3
div $3, $3
TAG126:
div $1, $1
srav $4, $1, $1
sll $0, $0, 0
multu $1, $4
TAG127:
sw $4, -20480($4)
sra $3, $4, 11
divu $4, $4
xor $3, $3, $3
TAG128:
multu $3, $3
mfhi $2
bltz $3, TAG129
sh $3, 0($3)
TAG129:
bgez $2, TAG130
mult $2, $2
mflo $1
sw $1, 0($1)
TAG130:
sll $0, $0, 0
blez $4, TAG131
sll $0, $0, 0
sb $1, -20480($4)
TAG131:
bltz $3, TAG132
sra $3, $3, 0
mthi $3
sll $1, $3, 6
TAG132:
srl $3, $1, 0
addi $1, $3, 12
lui $2, 9
lui $2, 5
TAG133:
lui $2, 0
bgtz $2, TAG134
mthi $2
blez $2, TAG134
TAG134:
mfhi $1
sh $1, 0($1)
lui $1, 8
multu $2, $1
TAG135:
andi $2, $1, 8
bne $1, $2, TAG136
andi $2, $1, 2
mult $1, $2
TAG136:
bne $2, $2, TAG137
mtlo $2
lhu $2, 0($2)
mthi $2
TAG137:
lbu $3, 0($2)
lui $4, 12
mfhi $2
beq $3, $2, TAG138
TAG138:
multu $2, $2
lui $2, 13
sll $0, $0, 0
bgtz $2, TAG139
TAG139:
sll $0, $0, 0
lui $2, 11
mflo $2
mtlo $2
TAG140:
mult $2, $2
sb $2, 0($2)
bne $2, $2, TAG141
lui $4, 7
TAG141:
sltiu $4, $4, 15
sw $4, 0($4)
bne $4, $4, TAG142
mthi $4
TAG142:
mult $4, $4
lui $1, 1
mult $1, $4
lui $1, 7
TAG143:
sll $0, $0, 0
divu $1, $1
sllv $1, $1, $1
div $1, $1
TAG144:
lui $3, 9
srl $4, $3, 10
mtlo $3
beq $3, $4, TAG145
TAG145:
sll $0, $0, 0
mflo $2
lui $1, 13
mfhi $4
TAG146:
sllv $4, $4, $4
multu $4, $4
mult $4, $4
sb $4, 0($4)
TAG147:
beq $4, $4, TAG148
add $3, $4, $4
mtlo $4
bgtz $3, TAG148
TAG148:
lh $1, 0($3)
sh $3, 0($1)
srav $1, $3, $3
slt $4, $1, $3
TAG149:
add $2, $4, $4
lui $2, 11
mflo $2
add $1, $2, $2
TAG150:
sb $1, 0($1)
lui $2, 2
sllv $4, $1, $1
lui $1, 12
TAG151:
sll $0, $0, 0
sra $3, $1, 3
sll $0, $0, 0
multu $3, $1
TAG152:
mfhi $1
sllv $1, $1, $1
div $1, $3
sllv $3, $1, $3
TAG153:
divu $3, $3
mfhi $2
lui $1, 11
srl $1, $1, 8
TAG154:
mult $1, $1
mfhi $4
lhu $2, -2816($1)
nor $4, $4, $2
TAG155:
mult $4, $4
mflo $2
lui $3, 5
blez $2, TAG156
TAG156:
sll $0, $0, 0
blez $4, TAG157
sll $0, $0, 0
blez $3, TAG157
TAG157:
sltu $3, $4, $4
lh $1, 1($4)
mfhi $3
slti $1, $4, 12
TAG158:
lui $4, 3
mthi $1
mtlo $4
beq $4, $1, TAG159
TAG159:
mflo $1
mthi $4
mfhi $2
or $2, $4, $4
TAG160:
multu $2, $2
mtlo $2
addiu $1, $2, 12
lui $4, 9
TAG161:
sll $0, $0, 0
sll $0, $0, 0
mfhi $1
bne $1, $1, TAG162
TAG162:
multu $1, $1
beq $1, $1, TAG163
sb $1, 0($1)
sll $2, $1, 9
TAG163:
lui $3, 11
lui $4, 0
mthi $3
xori $2, $3, 3
TAG164:
lui $2, 2
beq $2, $2, TAG165
mflo $1
lb $4, 0($2)
TAG165:
lh $3, 0($4)
lui $2, 4
multu $3, $3
sh $3, 0($3)
TAG166:
sra $4, $2, 2
sll $0, $0, 0
mtlo $4
mflo $4
TAG167:
addu $3, $4, $4
sll $0, $0, 0
div $2, $3
lui $1, 1
TAG168:
sll $0, $0, 0
lui $2, 4
lui $3, 9
xori $3, $1, 1
TAG169:
nor $1, $3, $3
mflo $2
mthi $2
lui $3, 14
TAG170:
mfhi $4
mult $3, $3
blez $4, TAG171
or $3, $4, $4
TAG171:
mfhi $1
sltu $4, $3, $1
mtlo $3
sb $1, -196($1)
TAG172:
lui $1, 7
andi $1, $4, 12
multu $1, $1
mfhi $1
TAG173:
multu $1, $1
multu $1, $1
lw $2, 0($1)
lb $1, -196($2)
TAG174:
bgez $1, TAG175
addiu $1, $1, 4
subu $4, $1, $1
sw $1, 56($1)
TAG175:
lw $1, 0($4)
lhu $1, 56($1)
multu $1, $4
multu $4, $4
TAG176:
mult $1, $1
sll $0, $0, 0
lui $2, 7
lhu $2, 0($3)
TAG177:
sll $0, $0, 0
bltz $2, TAG178
addu $4, $3, $3
mtlo $4
TAG178:
addu $3, $4, $4
mthi $3
multu $3, $3
bne $3, $3, TAG179
TAG179:
lhu $2, 0($3)
divu $2, $2
bne $2, $3, TAG180
slt $1, $3, $2
TAG180:
srav $1, $1, $1
sb $1, 0($1)
bne $1, $1, TAG181
mthi $1
TAG181:
lui $1, 7
div $1, $1
addu $2, $1, $1
mtlo $1
TAG182:
or $4, $2, $2
blez $4, TAG183
mtlo $2
bltz $4, TAG183
TAG183:
addu $3, $4, $4
bne $4, $3, TAG184
lui $3, 11
lh $3, 0($4)
TAG184:
bne $3, $3, TAG185
lui $4, 6
mtlo $4
bne $3, $3, TAG185
TAG185:
sll $0, $0, 0
bltz $3, TAG186
sll $0, $0, 0
lui $2, 10
TAG186:
bne $2, $2, TAG187
sll $0, $0, 0
lui $4, 5
sll $0, $0, 0
TAG187:
multu $3, $3
sll $0, $0, 0
bgtz $2, TAG188
divu $3, $2
TAG188:
mthi $2
and $2, $2, $2
mtlo $2
bne $2, $2, TAG189
TAG189:
sll $4, $2, 1
mtlo $4
bne $2, $2, TAG190
lui $2, 14
TAG190:
bgtz $2, TAG191
mtlo $2
lui $3, 7
beq $3, $3, TAG191
TAG191:
mflo $2
mtlo $3
divu $2, $2
bgtz $2, TAG192
TAG192:
mfhi $1
bne $2, $2, TAG193
lui $2, 11
bne $1, $1, TAG193
TAG193:
mflo $1
sb $2, 0($1)
addiu $3, $2, 12
mfhi $3
TAG194:
mfhi $2
sh $3, 0($2)
slti $3, $2, 7
sh $2, 0($2)
TAG195:
blez $3, TAG196
sb $3, 0($3)
bgtz $3, TAG196
xori $2, $3, 0
TAG196:
lui $1, 13
mflo $3
sb $2, 0($3)
beq $3, $2, TAG197
TAG197:
divu $3, $3
lb $1, 0($3)
bne $3, $3, TAG198
mflo $2
TAG198:
beq $2, $2, TAG199
mfhi $3
mfhi $2
lui $4, 6
TAG199:
nor $2, $4, $4
mflo $3
blez $3, TAG200
sll $0, $0, 0
TAG200:
multu $3, $3
sb $3, 0($3)
mflo $4
bgez $4, TAG201
TAG201:
sltiu $4, $4, 4
lui $2, 15
lui $3, 8
ori $3, $3, 15
TAG202:
or $3, $3, $3
beq $3, $3, TAG203
sll $0, $0, 0
bltz $3, TAG203
TAG203:
srlv $2, $1, $1
lui $4, 13
sltiu $3, $1, 9
and $4, $1, $3
TAG204:
slti $1, $4, 15
subu $3, $1, $1
mflo $1
mult $1, $3
TAG205:
bne $1, $1, TAG206
addiu $2, $1, 15
sllv $1, $2, $1
mthi $1
TAG206:
lbu $1, 0($1)
bltz $1, TAG207
mfhi $2
slt $1, $2, $2
TAG207:
sb $1, 0($1)
srlv $2, $1, $1
multu $2, $2
srl $4, $2, 10
TAG208:
bltz $4, TAG209
lhu $4, 0($4)
slti $2, $4, 6
bgtz $4, TAG209
TAG209:
lui $3, 0
bne $3, $2, TAG210
xor $3, $3, $2
mflo $2
TAG210:
bgtz $2, TAG211
lui $3, 10
slt $3, $2, $2
beq $3, $3, TAG211
TAG211:
multu $3, $3
mult $3, $3
sb $3, 0($3)
mflo $2
TAG212:
lui $4, 8
lui $2, 0
beq $2, $2, TAG213
mult $2, $2
TAG213:
lui $2, 11
sll $0, $0, 0
mfhi $3
bgez $2, TAG214
TAG214:
mult $3, $3
sw $3, 0($3)
mult $3, $3
mflo $1
TAG215:
mult $1, $1
addu $3, $1, $1
sra $2, $3, 7
mtlo $2
TAG216:
sh $2, 0($2)
lui $4, 11
mult $4, $2
divu $2, $4
TAG217:
lui $2, 5
bne $2, $4, TAG218
lui $1, 10
mult $2, $4
TAG218:
bgez $1, TAG219
mtlo $1
bne $1, $1, TAG219
divu $1, $1
TAG219:
xor $3, $1, $1
sll $0, $0, 0
mthi $1
mult $1, $3
TAG220:
lbu $1, 0($3)
mflo $2
mtlo $3
sll $1, $3, 2
TAG221:
bgtz $1, TAG222
sllv $2, $1, $1
sw $2, 0($1)
mtlo $2
TAG222:
bne $2, $2, TAG223
lbu $3, 0($2)
mtlo $3
sw $3, 0($3)
TAG223:
multu $3, $3
bne $3, $3, TAG224
andi $2, $3, 11
nor $1, $2, $2
TAG224:
sh $1, 1($1)
sb $1, 1($1)
mthi $1
div $1, $1
TAG225:
sra $2, $1, 0
sw $2, 1($1)
beq $1, $1, TAG226
lui $4, 13
TAG226:
beq $4, $4, TAG227
addu $2, $4, $4
mfhi $2
sub $3, $4, $4
TAG227:
lui $2, 6
sll $0, $0, 0
blez $3, TAG228
mflo $3
TAG228:
subu $4, $3, $3
divu $4, $3
mfhi $2
xori $4, $2, 12
TAG229:
blez $4, TAG230
mfhi $4
mtlo $4
or $3, $4, $4
TAG230:
addiu $3, $3, 6
sh $3, 0($3)
mtlo $3
bgez $3, TAG231
TAG231:
mtlo $3
mthi $3
srav $2, $3, $3
sra $4, $2, 10
TAG232:
lw $2, 0($4)
bgtz $4, TAG233
mfhi $4
lui $2, 4
TAG233:
beq $2, $2, TAG234
sll $0, $0, 0
bltz $2, TAG234
mult $2, $2
TAG234:
blez $2, TAG235
sll $0, $0, 0
mult $2, $3
xor $3, $2, $2
TAG235:
mfhi $4
sw $3, 0($3)
mult $4, $3
lw $4, 0($4)
TAG236:
mtlo $4
mult $4, $4
lbu $4, 0($4)
bgez $4, TAG237
TAG237:
sltiu $2, $4, 8
sw $2, 0($4)
mthi $2
lui $2, 1
TAG238:
mflo $1
mfhi $1
mtlo $1
mtlo $1
TAG239:
slti $1, $1, 5
bne $1, $1, TAG240
lui $1, 7
andi $4, $1, 1
TAG240:
mtlo $4
mtlo $4
bgez $4, TAG241
sw $4, 0($4)
TAG241:
bgtz $4, TAG242
sh $4, 0($4)
mult $4, $4
mtlo $4
TAG242:
mflo $3
nor $4, $4, $3
sltiu $1, $3, 6
srlv $1, $3, $4
TAG243:
mflo $2
srl $2, $1, 9
sub $2, $2, $2
mflo $4
TAG244:
mfhi $4
lb $3, 0($4)
mthi $3
bne $4, $3, TAG245
TAG245:
lb $1, 0($3)
mthi $3
bgtz $1, TAG246
nor $3, $1, $1
TAG246:
sll $0, $0, 0
bgtz $3, TAG247
lui $1, 15
bgtz $4, TAG247
TAG247:
sll $0, $0, 0
div $3, $3
bne $3, $3, TAG248
lh $4, 1($3)
TAG248:
bgez $4, TAG249
lw $4, 0($4)
lhu $4, 0($4)
sllv $2, $4, $4
TAG249:
slti $1, $2, 2
lui $3, 6
mflo $2
bltz $3, TAG250
TAG250:
lbu $1, 0($2)
slti $1, $1, 15
sb $2, 0($1)
bgtz $1, TAG251
TAG251:
sb $1, 0($1)
mfhi $1
lb $2, 0($1)
subu $2, $2, $1
TAG252:
mthi $2
mfhi $2
lbu $4, 0($2)
and $1, $2, $2
TAG253:
srl $3, $1, 10
lui $4, 9
lui $3, 7
bltz $4, TAG254
TAG254:
div $3, $3
beq $3, $3, TAG255
ori $2, $3, 9
beq $3, $2, TAG255
TAG255:
divu $2, $2
mflo $2
srlv $2, $2, $2
sltiu $3, $2, 7
TAG256:
lui $2, 1
mfhi $4
or $4, $3, $3
mflo $3
TAG257:
mflo $3
div $3, $3
sb $3, 0($3)
mthi $3
TAG258:
lbu $3, 0($3)
addu $3, $3, $3
lui $2, 6
sll $0, $0, 0
TAG259:
xori $1, $4, 12
mthi $1
xori $1, $4, 2
sltiu $1, $4, 12
TAG260:
lui $1, 1
mtlo $1
bne $1, $1, TAG261
mflo $2
TAG261:
addiu $1, $2, 10
bgtz $1, TAG262
divu $1, $1
sb $2, 0($2)
TAG262:
bltz $1, TAG263
addiu $3, $1, 3
sll $0, $0, 0
bltz $3, TAG263
TAG263:
slti $2, $3, 6
lbu $4, 0($2)
bgtz $3, TAG264
mult $4, $4
TAG264:
mflo $2
lw $4, 0($4)
blez $2, TAG265
div $4, $4
TAG265:
addiu $4, $4, 5
lbu $4, -261($4)
mthi $4
lui $4, 8
TAG266:
bltz $4, TAG267
mtlo $4
sll $0, $0, 0
ori $4, $1, 7
TAG267:
sll $0, $0, 0
sll $0, $0, 0
srlv $1, $4, $4
div $1, $4
TAG268:
beq $1, $1, TAG269
mult $1, $1
bne $1, $1, TAG269
lui $4, 13
TAG269:
lui $2, 7
bgtz $4, TAG270
mfhi $2
slt $4, $2, $2
TAG270:
bgtz $4, TAG271
ori $1, $4, 4
sb $4, 0($4)
lui $4, 9
TAG271:
blez $4, TAG272
lui $1, 3
sltu $1, $4, $1
blez $1, TAG272
TAG272:
sb $1, 0($1)
bgez $1, TAG273
subu $4, $1, $1
bgtz $4, TAG273
TAG273:
xori $3, $4, 13
mthi $4
sll $4, $3, 2
mfhi $3
TAG274:
mtlo $3
lbu $1, 0($3)
subu $2, $3, $3
multu $1, $2
TAG275:
bne $2, $2, TAG276
lui $4, 13
sll $0, $0, 0
sll $0, $0, 0
TAG276:
sll $0, $0, 0
srav $2, $4, $2
mtlo $4
andi $4, $2, 12
TAG277:
mtlo $4
lhu $4, 0($4)
div $4, $4
mfhi $4
TAG278:
beq $4, $4, TAG279
sub $3, $4, $4
bgtz $4, TAG279
lui $2, 7
TAG279:
bne $2, $2, TAG280
mtlo $2
sll $0, $0, 0
lui $1, 4
TAG280:
sll $0, $0, 0
beq $1, $1, TAG281
lui $1, 10
andi $2, $1, 9
TAG281:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
mthi $2
TAG282:
beq $3, $3, TAG283
mfhi $2
mtlo $2
mtlo $3
TAG283:
div $2, $2
beq $2, $2, TAG284
or $4, $2, $2
addiu $4, $2, 5
TAG284:
bltz $4, TAG285
sll $0, $0, 0
sll $0, $0, 0
ori $1, $4, 11
TAG285:
bltz $1, TAG286
mthi $1
slti $4, $1, 14
andi $3, $1, 1
TAG286:
sb $3, 0($3)
andi $3, $3, 6
lb $1, 0($3)
mthi $1
TAG287:
bgtz $1, TAG288
mult $1, $1
lui $1, 6
sll $0, $0, 0
TAG288:
lui $4, 7
sll $0, $0, 0
sll $0, $0, 0
lui $3, 14
TAG289:
mfhi $1
lbu $4, 0($1)
lui $3, 15
mult $3, $3
TAG290:
mflo $3
mtlo $3
mthi $3
lui $3, 12
TAG291:
beq $3, $3, TAG292
mfhi $2
lb $4, 0($3)
lui $2, 12
TAG292:
mfhi $1
sh $2, 0($1)
lui $4, 9
lhu $2, 0($2)
TAG293:
mfhi $2
ori $1, $2, 4
sh $2, 0($2)
mflo $3
TAG294:
mflo $1
mtlo $3
lui $3, 1
lb $1, 0($1)
TAG295:
lhu $1, 0($1)
multu $1, $1
mflo $4
sw $1, 0($1)
TAG296:
mult $4, $4
multu $4, $4
mthi $4
lui $3, 1
TAG297:
mflo $1
bgez $1, TAG298
mthi $1
multu $1, $3
TAG298:
beq $1, $1, TAG299
lb $3, 0($1)
or $2, $3, $3
div $2, $1
TAG299:
mult $2, $2
lui $3, 9
mflo $2
lbu $3, 0($2)
TAG300:
xor $1, $3, $3
lui $2, 6
addiu $3, $1, 1
mflo $1
TAG301:
mult $1, $1
lui $3, 14
addiu $1, $1, 0
subu $4, $3, $1
TAG302:
sll $0, $0, 0
sll $0, $0, 0
nor $4, $2, $4
sll $0, $0, 0
TAG303:
mtlo $4
mthi $4
lui $3, 14
mfhi $2
TAG304:
mfhi $3
bgez $2, TAG305
mfhi $2
sll $0, $0, 0
TAG305:
bne $2, $2, TAG306
mthi $2
mflo $2
sll $0, $0, 0
TAG306:
sll $0, $0, 0
bgez $2, TAG307
mflo $3
sll $0, $0, 0
TAG307:
lui $4, 2
xori $1, $3, 9
mthi $1
xor $2, $4, $1
TAG308:
sll $0, $0, 0
andi $4, $1, 2
divu $4, $1
slti $1, $1, 12
TAG309:
mflo $4
and $2, $4, $1
addiu $1, $1, 13
mthi $1
TAG310:
blez $1, TAG311
or $4, $1, $1
bltz $1, TAG311
mflo $1
TAG311:
lw $1, 0($1)
multu $1, $1
lui $4, 12
sll $0, $0, 0
TAG312:
andi $4, $2, 7
bgtz $2, TAG313
mflo $4
ori $1, $2, 10
TAG313:
div $1, $1
lh $2, 0($1)
sb $1, 0($2)
beq $2, $1, TAG314
TAG314:
srav $1, $2, $2
and $3, $2, $1
mtlo $3
bne $3, $3, TAG315
TAG315:
lui $4, 7
andi $2, $4, 10
lui $4, 3
bne $2, $4, TAG316
TAG316:
lui $3, 15
sll $0, $0, 0
lui $4, 10
sll $0, $0, 0
TAG317:
nor $1, $4, $4
sll $0, $0, 0
sll $0, $0, 0
beq $1, $3, TAG318
TAG318:
andi $2, $3, 7
lui $4, 10
bgtz $3, TAG319
sll $0, $0, 0
TAG319:
mthi $3
subu $1, $3, $3
sll $0, $0, 0
multu $3, $1
TAG320:
mult $1, $1
lh $2, 0($1)
lui $1, 1
mthi $2
TAG321:
sll $0, $0, 0
lui $2, 14
sll $0, $0, 0
and $1, $1, $1
TAG322:
andi $1, $1, 1
slt $1, $1, $1
sltu $1, $1, $1
bltz $1, TAG323
TAG323:
sh $1, 0($1)
bgtz $1, TAG324
xori $1, $1, 11
beq $1, $1, TAG324
TAG324:
mthi $1
lbu $3, 0($1)
sll $2, $3, 9
lb $4, 0($1)
TAG325:
bne $4, $4, TAG326
lui $4, 7
div $4, $4
bgtz $4, TAG326
TAG326:
sll $0, $0, 0
mtlo $4
nor $1, $2, $4
bgtz $1, TAG327
TAG327:
divu $1, $1
sll $0, $0, 0
mthi $1
lui $3, 8
TAG328:
mfhi $1
sll $0, $0, 0
sll $0, $0, 0
or $3, $3, $3
TAG329:
bne $3, $3, TAG330
sll $0, $0, 0
sll $0, $0, 0
lui $2, 15
TAG330:
mfhi $4
bltz $4, TAG331
mflo $4
slti $2, $4, 7
TAG331:
sll $0, $0, 0
sll $3, $2, 13
ori $4, $3, 5
mfhi $4
TAG332:
bgez $4, TAG333
sltiu $1, $4, 13
sll $0, $0, 0
div $1, $4
TAG333:
bgtz $1, TAG334
mthi $1
beq $1, $1, TAG334
lui $4, 13
TAG334:
or $1, $4, $4
bne $4, $4, TAG335
mtlo $4
mthi $4
TAG335:
sll $0, $0, 0
sll $0, $0, 0
mflo $3
beq $1, $1, TAG336
TAG336:
mflo $3
blez $3, TAG337
nor $4, $3, $3
sll $0, $0, 0
TAG337:
addiu $4, $4, 10
blez $4, TAG338
mult $4, $4
lui $1, 2
TAG338:
multu $1, $1
sra $1, $1, 6
lui $3, 13
bne $3, $1, TAG339
TAG339:
srav $3, $3, $3
and $3, $3, $3
sll $0, $0, 0
bne $3, $3, TAG340
TAG340:
lui $2, 7
xor $4, $2, $3
ori $3, $2, 11
blez $2, TAG341
TAG341:
slti $3, $3, 2
mtlo $3
lbu $2, 0($3)
and $3, $3, $2
TAG342:
add $1, $3, $3
lui $2, 14
multu $1, $1
mflo $3
TAG343:
lb $1, 0($3)
bgtz $1, TAG344
sw $3, 0($3)
mthi $1
TAG344:
mfhi $3
sllv $3, $3, $1
mult $3, $3
beq $1, $1, TAG345
TAG345:
mthi $3
lw $4, 0($3)
lhu $4, 0($4)
nor $3, $4, $4
TAG346:
sll $0, $0, 0
bgtz $2, TAG347
subu $4, $3, $2
lb $1, 0($2)
TAG347:
subu $4, $1, $1
lui $1, 6
bgez $1, TAG348
sll $0, $0, 0
TAG348:
bgez $1, TAG349
ori $3, $1, 13
lw $3, 0($1)
lui $1, 1
TAG349:
addiu $4, $1, 14
bne $1, $4, TAG350
sll $0, $0, 0
mfhi $4
TAG350:
sllv $2, $4, $4
sltiu $2, $4, 7
beq $2, $4, TAG351
sll $0, $0, 0
TAG351:
divu $3, $3
bgtz $3, TAG352
mthi $3
bgez $3, TAG352
TAG352:
srlv $1, $3, $3
bgtz $1, TAG353
divu $1, $1
blez $1, TAG353
TAG353:
lw $4, 0($1)
lhu $3, 0($4)
bltz $4, TAG354
sb $4, 0($3)
TAG354:
lui $2, 10
bltz $2, TAG355
divu $3, $2
lui $4, 14
TAG355:
blez $4, TAG356
mfhi $2
srlv $3, $2, $4
sra $1, $2, 8
TAG356:
sub $3, $1, $1
lui $3, 11
multu $3, $3
mfhi $1
TAG357:
mthi $1
bgez $1, TAG358
mthi $1
mtlo $1
TAG358:
bltz $1, TAG359
div $1, $1
andi $1, $1, 10
slti $4, $1, 14
TAG359:
sb $4, 0($4)
lui $4, 12
sll $0, $0, 0
sll $0, $0, 0
TAG360:
sll $0, $0, 0
bgez $3, TAG361
sll $0, $0, 0
lb $3, 0($3)
TAG361:
bne $3, $3, TAG362
andi $4, $3, 4
mflo $1
lbu $1, 0($4)
TAG362:
mflo $3
mtlo $3
lui $4, 12
lui $4, 12
TAG363:
mflo $3
srav $1, $3, $4
sra $1, $1, 5
beq $1, $1, TAG364
TAG364:
mult $1, $1
bgtz $1, TAG365
lhu $3, 0($1)
bgtz $1, TAG365
TAG365:
mflo $3
beq $3, $3, TAG366
sh $3, 0($3)
mthi $3
TAG366:
mult $3, $3
xor $4, $3, $3
sb $3, 0($3)
mflo $1
TAG367:
slt $4, $1, $1
lbu $1, 0($4)
mult $4, $1
or $1, $4, $1
TAG368:
lui $4, 3
lui $2, 10
slti $1, $1, 12
mflo $2
TAG369:
addiu $4, $2, 7
sltiu $3, $2, 11
bne $3, $3, TAG370
and $3, $3, $4
TAG370:
andi $4, $3, 7
andi $2, $4, 10
blez $4, TAG371
multu $4, $2
TAG371:
lui $1, 7
lw $1, 0($2)
lui $4, 2
lui $4, 13
TAG372:
sll $0, $0, 0
mult $4, $4
blez $4, TAG373
addu $4, $4, $4
TAG373:
lui $3, 6
subu $1, $3, $4
srlv $3, $3, $3
mfhi $4
TAG374:
blez $4, TAG375
mflo $4
mflo $3
multu $3, $4
TAG375:
lui $4, 3
mtlo $3
bltz $4, TAG376
lui $2, 14
TAG376:
beq $2, $2, TAG377
addu $2, $2, $2
lb $3, 0($2)
beq $2, $2, TAG377
TAG377:
lbu $3, 0($3)
bgez $3, TAG378
multu $3, $3
mflo $1
TAG378:
sll $0, $0, 0
mtlo $4
mtlo $4
ori $4, $4, 4
TAG379:
beq $4, $4, TAG380
multu $4, $4
multu $4, $4
sltiu $4, $4, 0
TAG380:
bne $4, $4, TAG381
xori $3, $4, 1
addu $3, $3, $3
sltiu $1, $3, 6
TAG381:
multu $1, $1
mult $1, $1
lui $3, 4
blez $3, TAG382
TAG382:
mult $3, $3
slt $4, $3, $3
bne $4, $4, TAG383
lui $4, 10
TAG383:
mthi $4
sll $0, $0, 0
mult $2, $4
beq $2, $4, TAG384
TAG384:
lui $4, 4
mflo $4
multu $4, $2
beq $4, $4, TAG385
TAG385:
andi $1, $4, 1
beq $1, $1, TAG386
sw $1, 0($4)
sh $1, 0($1)
TAG386:
sub $2, $1, $1
mflo $1
mfhi $1
mult $1, $2
TAG387:
beq $1, $1, TAG388
mfhi $4
bltz $4, TAG388
lui $2, 6
TAG388:
xori $1, $2, 4
divu $1, $1
bltz $1, TAG389
sw $1, 0($2)
TAG389:
mflo $4
bltz $1, TAG390
lw $2, 0($1)
sllv $2, $2, $1
TAG390:
sltiu $1, $2, 9
sll $0, $0, 0
mfhi $3
mfhi $3
TAG391:
mult $3, $3
add $2, $3, $3
lw $4, 0($3)
mtlo $2
TAG392:
slti $1, $4, 15
div $4, $1
bgtz $1, TAG393
lb $4, 0($4)
TAG393:
lui $4, 10
bgtz $4, TAG394
mfhi $1
sw $4, 0($4)
TAG394:
mflo $1
xor $1, $1, $1
beq $1, $1, TAG395
sll $1, $1, 8
TAG395:
sb $1, 0($1)
sra $2, $1, 6
sll $4, $2, 8
lui $4, 4
TAG396:
sll $0, $0, 0
xor $2, $4, $4
mfhi $2
lw $2, 0($2)
TAG397:
sh $2, 0($2)
beq $2, $2, TAG398
lui $3, 10
sb $3, 0($2)
TAG398:
sll $0, $0, 0
subu $4, $3, $3
lui $3, 0
mthi $3
TAG399:
bne $3, $3, TAG400
lui $2, 0
mfhi $4
bgez $3, TAG400
TAG400:
mthi $4
beq $4, $4, TAG401
lbu $4, 0($4)
sll $3, $4, 13
TAG401:
add $2, $3, $3
andi $2, $2, 6
mfhi $3
sll $2, $3, 6
TAG402:
mflo $4
or $4, $4, $4
sh $2, 0($4)
sw $4, 0($4)
TAG403:
slti $3, $4, 4
bgez $3, TAG404
mult $4, $3
bne $3, $3, TAG404
TAG404:
lb $3, 0($3)
lb $1, 0($3)
mtlo $3
mtlo $3
TAG405:
mfhi $4
sra $3, $1, 12
mfhi $4
sllv $3, $3, $4
TAG406:
sh $3, 0($3)
beq $3, $3, TAG407
lui $3, 5
sh $3, 0($3)
TAG407:
bne $3, $3, TAG408
mfhi $4
mult $4, $4
mflo $4
TAG408:
lui $2, 12
bgez $4, TAG409
lui $3, 6
blez $3, TAG409
TAG409:
sll $0, $0, 0
slt $4, $3, $3
lui $4, 1
div $4, $4
TAG410:
sltiu $3, $4, 6
mflo $4
bne $3, $3, TAG411
lw $4, 0($3)
TAG411:
mflo $2
addiu $3, $4, 6
mfhi $4
beq $2, $4, TAG412
TAG412:
mflo $4
addiu $2, $4, 8
sb $4, 0($2)
srav $3, $4, $4
TAG413:
lui $4, 6
sll $0, $0, 0
mthi $4
mflo $2
TAG414:
mflo $1
mtlo $2
beq $1, $2, TAG415
or $4, $2, $2
TAG415:
lui $2, 8
sll $0, $0, 0
bgez $3, TAG416
mflo $4
TAG416:
beq $4, $4, TAG417
lbu $3, 0($4)
div $4, $4
nor $1, $4, $3
TAG417:
sb $1, 0($1)
sll $3, $1, 15
subu $1, $3, $1
bgtz $1, TAG418
TAG418:
sll $0, $0, 0
mthi $1
bne $1, $1, TAG419
mtlo $2
TAG419:
sll $0, $0, 0
lui $2, 2
sll $0, $0, 0
sll $0, $0, 0
TAG420:
mtlo $2
subu $2, $2, $2
lbu $4, 0($2)
bltz $2, TAG421
TAG421:
lh $3, 0($4)
bgtz $4, TAG422
mtlo $4
mtlo $4
TAG422:
or $3, $3, $3
lui $2, 4
subu $3, $3, $3
sll $4, $3, 4
TAG423:
sh $4, 0($4)
ori $3, $4, 11
bltz $4, TAG424
xori $1, $3, 14
TAG424:
sltu $1, $1, $1
bgtz $1, TAG425
slt $1, $1, $1
lui $1, 14
TAG425:
bne $1, $1, TAG426
srl $3, $1, 5
beq $1, $1, TAG426
multu $1, $3
TAG426:
sra $1, $3, 1
subu $3, $1, $3
slt $2, $3, $3
sw $3, 0($2)
TAG427:
bltz $2, TAG428
lb $3, 0($2)
lui $4, 4
addu $1, $2, $4
TAG428:
mthi $1
bne $1, $1, TAG429
sll $0, $0, 0
beq $1, $1, TAG429
TAG429:
slti $1, $1, 14
lui $1, 9
lui $3, 2
sll $0, $0, 0
TAG430:
mfhi $3
nor $4, $3, $3
xor $4, $3, $3
mtlo $4
TAG431:
lhu $3, 0($4)
mtlo $4
sll $0, $0, 0
addiu $1, $3, 15
TAG432:
sltu $2, $1, $1
mthi $1
mthi $2
sh $1, 0($2)
TAG433:
sw $2, 0($2)
sb $2, 0($2)
mthi $2
add $1, $2, $2
TAG434:
sb $1, 0($1)
lui $2, 9
bne $1, $2, TAG435
lui $3, 4
TAG435:
mfhi $2
multu $3, $2
mult $2, $3
mthi $3
TAG436:
sll $2, $2, 12
beq $2, $2, TAG437
lhu $4, 0($2)
mthi $2
TAG437:
lb $3, 0($4)
bne $4, $3, TAG438
lb $1, 0($3)
addiu $1, $1, 8
TAG438:
mtlo $1
xor $2, $1, $1
sh $1, 0($1)
sw $1, 0($2)
TAG439:
sh $2, 0($2)
sw $2, 0($2)
mthi $2
mult $2, $2
TAG440:
mtlo $2
beq $2, $2, TAG441
mtlo $2
div $2, $2
TAG441:
sh $2, 0($2)
mflo $2
mthi $2
multu $2, $2
TAG442:
blez $2, TAG443
sb $2, 0($2)
sh $2, 0($2)
lui $1, 9
TAG443:
blez $1, TAG444
sb $1, 0($1)
mflo $2
lbu $4, 0($1)
TAG444:
mfhi $3
beq $4, $3, TAG445
mflo $3
lb $1, 0($3)
TAG445:
and $4, $1, $1
mflo $3
lui $4, 2
multu $1, $1
TAG446:
slt $3, $4, $4
ori $2, $4, 0
mtlo $2
srlv $4, $2, $4
TAG447:
bltz $4, TAG448
and $2, $4, $4
mtlo $4
divu $4, $4
TAG448:
sll $0, $0, 0
lui $3, 10
sll $0, $0, 0
mult $4, $4
TAG449:
multu $3, $3
bne $3, $3, TAG450
andi $4, $3, 0
addu $2, $3, $4
TAG450:
div $2, $2
bne $2, $2, TAG451
sll $0, $0, 0
div $2, $2
TAG451:
beq $2, $2, TAG452
mfhi $1
lui $4, 14
srav $3, $1, $2
TAG452:
lui $4, 8
mtlo $3
lui $4, 5
mthi $4
TAG453:
div $4, $4
sll $0, $0, 0
bgez $3, TAG454
slti $1, $3, 5
TAG454:
sh $1, 0($1)
addiu $2, $1, 12
lui $1, 1
divu $1, $2
TAG455:
bltz $1, TAG456
lui $1, 3
bltz $1, TAG456
multu $1, $1
TAG456:
sll $0, $0, 0
ori $2, $1, 15
mult $1, $2
sll $0, $0, 0
TAG457:
sll $0, $0, 0
addiu $4, $1, 14
sll $0, $0, 0
mfhi $3
TAG458:
bgez $3, TAG459
sll $2, $3, 13
mult $2, $3
lhu $1, 0($3)
TAG459:
bgez $1, TAG460
sll $0, $0, 0
mfhi $3
sw $4, 0($4)
TAG460:
xori $2, $3, 3
sb $2, 0($3)
lh $1, 0($2)
mflo $3
TAG461:
div $3, $3
sll $0, $0, 0
sra $1, $4, 11
lui $1, 11
TAG462:
divu $1, $1
sll $0, $0, 0
sh $1, 0($2)
subu $2, $1, $1
TAG463:
mthi $2
sh $2, 0($2)
srav $2, $2, $2
sh $2, 0($2)
TAG464:
mthi $2
blez $2, TAG465
sltu $2, $2, $2
multu $2, $2
TAG465:
sb $2, 0($2)
sub $1, $2, $2
addi $1, $2, 15
mthi $1
TAG466:
mflo $2
lb $1, 0($1)
srav $3, $1, $1
mtlo $1
TAG467:
lhu $1, 0($3)
lw $2, 0($3)
bgtz $2, TAG468
mflo $2
TAG468:
lbu $4, 0($2)
mflo $2
bgez $4, TAG469
sltiu $3, $4, 11
TAG469:
sh $3, 0($3)
mfhi $1
mthi $1
lbu $3, 0($1)
TAG470:
mfhi $3
mflo $4
lui $2, 0
multu $3, $2
TAG471:
mthi $2
multu $2, $2
multu $2, $2
sh $2, 0($2)
TAG472:
beq $2, $2, TAG473
lw $4, 0($2)
mfhi $2
slt $1, $2, $2
TAG473:
lui $4, 14
bne $4, $4, TAG474
sb $1, 0($1)
andi $1, $4, 5
TAG474:
sh $1, 0($1)
beq $1, $1, TAG475
nor $1, $1, $1
srav $4, $1, $1
TAG475:
mthi $4
mfhi $3
sra $3, $3, 12
div $4, $4
TAG476:
mtlo $3
mfhi $2
blez $3, TAG477
multu $3, $2
TAG477:
subu $4, $2, $2
bgez $4, TAG478
andi $3, $2, 9
lui $3, 4
TAG478:
mtlo $3
bne $3, $3, TAG479
andi $4, $3, 9
mfhi $2
TAG479:
mflo $4
blez $2, TAG480
lui $4, 1
lui $1, 0
TAG480:
sw $1, 1($1)
mult $1, $1
ori $4, $1, 6
blez $4, TAG481
TAG481:
sll $0, $0, 0
srav $1, $4, $3
sll $3, $3, 12
mflo $2
TAG482:
slt $1, $2, $2
mflo $2
mflo $4
sb $2, 0($2)
TAG483:
divu $4, $4
sb $4, 0($4)
mflo $1
lui $4, 9
TAG484:
subu $3, $4, $4
div $4, $4
bgez $4, TAG485
sra $3, $4, 0
TAG485:
sll $0, $0, 0
sll $0, $0, 0
xor $2, $1, $3
mflo $4
TAG486:
lui $4, 5
slti $4, $4, 3
bne $4, $4, TAG487
sw $4, 0($4)
TAG487:
mthi $4
lui $1, 15
sll $0, $0, 0
multu $4, $1
TAG488:
mult $1, $1
bne $1, $1, TAG489
sll $0, $0, 0
beq $1, $2, TAG489
TAG489:
mfhi $3
multu $3, $3
mtlo $2
divu $3, $3
TAG490:
sltu $2, $3, $3
mflo $4
lb $1, 0($2)
nor $4, $2, $2
TAG491:
blez $4, TAG492
sb $4, 1($4)
lui $1, 11
blez $4, TAG492
TAG492:
mthi $1
slti $3, $1, 12
mthi $3
mthi $3
TAG493:
multu $3, $3
sb $3, 0($3)
mult $3, $3
mflo $1
TAG494:
mfhi $3
blez $3, TAG495
nor $1, $3, $3
mtlo $1
TAG495:
beq $1, $1, TAG496
lui $4, 12
mthi $4
mfhi $4
TAG496:
srav $4, $4, $4
addu $1, $4, $4
mflo $1
slt $2, $4, $4
TAG497:
sh $2, 0($2)
sh $2, 0($2)
or $1, $2, $2
slt $2, $2, $2
TAG498:
mtlo $2
ori $1, $2, 5
beq $1, $2, TAG499
mflo $4
TAG499:
mtlo $4
mfhi $4
bgtz $4, TAG500
mtlo $4
TAG500:
sh $4, 0($4)
sw $4, 0($4)
mthi $4
sw $4, 0($4)
TAG501:
mflo $1
multu $4, $1
or $2, $1, $1
bgez $2, TAG502
TAG502:
sltu $4, $2, $2
multu $4, $2
bgtz $4, TAG503
lui $3, 14
TAG503:
sll $0, $0, 0
sll $0, $0, 0
sll $2, $3, 11
nor $2, $3, $3
TAG504:
bgez $2, TAG505
sltu $2, $2, $2
sb $2, 0($2)
addi $3, $2, 13
TAG505:
mflo $1
mthi $3
blez $1, TAG506
sb $1, 0($3)
TAG506:
bgez $1, TAG507
mflo $2
lui $1, 2
sb $1, 0($2)
TAG507:
lb $1, 0($1)
sh $1, 0($1)
bltz $1, TAG508
multu $1, $1
TAG508:
mfhi $1
sw $1, 0($1)
sw $1, 0($1)
multu $1, $1
TAG509:
bgez $1, TAG510
sw $1, 0($1)
bltz $1, TAG510
mflo $2
TAG510:
mtlo $2
bne $2, $2, TAG511
sb $2, 0($2)
subu $3, $2, $2
TAG511:
lh $2, 0($3)
mult $3, $3
mtlo $3
mthi $2
TAG512:
mthi $2
lui $3, 4
lui $2, 11
blez $2, TAG513
TAG513:
subu $2, $2, $2
bne $2, $2, TAG514
mthi $2
mtlo $2
TAG514:
multu $2, $2
sll $2, $2, 5
lh $4, 0($2)
mthi $4
TAG515:
beq $4, $4, TAG516
sltiu $1, $4, 8
bne $1, $4, TAG516
lui $4, 0
TAG516:
sb $4, 0($4)
lb $1, 0($4)
mfhi $2
bltz $2, TAG517
TAG517:
lui $1, 0
lh $2, 0($1)
subu $2, $1, $2
mthi $2
TAG518:
bne $2, $2, TAG519
nor $2, $2, $2
div $2, $2
beq $2, $2, TAG519
TAG519:
mthi $2
subu $2, $2, $2
addi $2, $2, 15
srav $4, $2, $2
TAG520:
blez $4, TAG521
mtlo $4
mthi $4
bltz $4, TAG521
TAG521:
multu $4, $4
lhu $3, 0($4)
mult $4, $3
mtlo $4
TAG522:
sh $3, 0($3)
bgtz $3, TAG523
slti $4, $3, 12
beq $4, $4, TAG523
TAG523:
divu $4, $4
mtlo $4
andi $4, $4, 13
sb $4, 0($4)
TAG524:
sra $1, $4, 14
mthi $4
sh $1, 0($1)
blez $1, TAG525
TAG525:
lui $4, 8
lui $3, 14
sll $0, $0, 0
or $4, $3, $2
TAG526:
mtlo $4
sll $0, $0, 0
lui $1, 2
div $1, $1
TAG527:
lui $3, 4
srl $2, $3, 4
sll $0, $0, 0
mtlo $2
TAG528:
slti $2, $3, 14
beq $2, $2, TAG529
xori $4, $2, 0
mtlo $4
TAG529:
mfhi $2
xor $3, $2, $2
andi $1, $2, 15
mult $4, $2
TAG530:
sw $1, 0($1)
beq $1, $1, TAG531
sb $1, 0($1)
bgtz $1, TAG531
TAG531:
srl $3, $1, 4
mtlo $3
beq $3, $3, TAG532
lb $4, 0($3)
TAG532:
bgez $4, TAG533
lui $1, 9
lh $4, 0($4)
sw $1, 0($1)
TAG533:
lui $4, 6
sll $0, $0, 0
mflo $3
lui $2, 0
TAG534:
multu $2, $2
srl $2, $2, 1
andi $4, $2, 12
lui $1, 10
TAG535:
bne $1, $1, TAG536
lui $2, 13
lui $4, 10
multu $1, $4
TAG536:
sll $0, $0, 0
slt $1, $1, $4
sll $0, $0, 0
mfhi $2
TAG537:
lui $3, 13
sll $0, $0, 0
sw $2, 0($2)
srl $4, $2, 13
TAG538:
subu $2, $4, $4
xori $1, $4, 0
mflo $3
andi $4, $3, 2
TAG539:
lb $4, 0($4)
sll $4, $4, 5
multu $4, $4
mfhi $3
TAG540:
mfhi $4
xori $2, $4, 12
sra $3, $4, 10
lw $2, 0($3)
TAG541:
mthi $2
lh $4, 0($2)
bgez $4, TAG542
mtlo $2
TAG542:
bne $4, $4, TAG543
or $3, $4, $4
slt $4, $4, $3
beq $4, $4, TAG543
TAG543:
addiu $3, $4, 15
subu $2, $3, $3
sb $4, 0($4)
multu $2, $4
TAG544:
beq $2, $2, TAG545
mthi $2
slti $2, $2, 15
beq $2, $2, TAG545
TAG545:
sh $2, 0($2)
blez $2, TAG546
lui $4, 14
mfhi $2
TAG546:
sh $2, 0($2)
multu $2, $2
sh $2, 0($2)
sh $2, 0($2)
TAG547:
and $1, $2, $2
mfhi $2
mfhi $2
beq $1, $1, TAG548
TAG548:
lhu $3, 0($2)
bgez $2, TAG549
and $1, $2, $2
blez $2, TAG549
TAG549:
mfhi $1
beq $1, $1, TAG550
or $3, $1, $1
mflo $3
TAG550:
lb $2, 0($3)
srl $2, $2, 6
mflo $4
multu $3, $2
TAG551:
lbu $2, 0($4)
srl $4, $2, 8
addiu $4, $2, 14
mflo $1
TAG552:
lbu $4, 0($1)
blez $1, TAG553
nor $3, $1, $1
sra $1, $1, 8
TAG553:
bne $1, $1, TAG554
slti $4, $1, 3
mflo $4
addi $1, $1, 8
TAG554:
lui $1, 0
mthi $1
addiu $2, $1, 1
xor $4, $1, $1
TAG555:
mthi $4
mflo $3
sra $3, $3, 4
bne $4, $4, TAG556
TAG556:
multu $3, $3
mtlo $3
sltiu $3, $3, 15
sb $3, 0($3)
TAG557:
xori $2, $3, 8
lb $4, 0($3)
mtlo $3
divu $3, $3
TAG558:
lui $3, 2
mflo $3
subu $4, $4, $4
beq $3, $4, TAG559
TAG559:
lui $2, 1
bne $4, $2, TAG560
div $2, $2
sw $4, 0($2)
TAG560:
sll $0, $0, 0
lui $4, 2
nor $3, $2, $4
xor $1, $4, $2
TAG561:
sltiu $1, $1, 1
lhu $2, 0($1)
lui $4, 7
sltiu $1, $2, 4
TAG562:
beq $1, $1, TAG563
mflo $3
beq $3, $3, TAG563
sll $2, $3, 5
TAG563:
mflo $4
bltz $2, TAG564
addu $3, $2, $2
sw $2, -256($2)
TAG564:
bgtz $3, TAG565
mult $3, $3
xori $4, $3, 1
andi $3, $4, 3
TAG565:
sll $0, $0, 0
bgez $3, TAG566
lui $3, 2
addi $2, $3, 9
TAG566:
blez $2, TAG567
div $2, $2
blez $2, TAG567
sw $2, -256($2)
TAG567:
sll $0, $0, 0
lh $1, -256($2)
lui $1, 0
multu $1, $1
TAG568:
bgtz $1, TAG569
xor $4, $1, $1
mtlo $4
lh $1, 0($4)
TAG569:
sw $1, -256($1)
bgtz $1, TAG570
lui $3, 7
mfhi $1
TAG570:
bgez $1, TAG571
xori $4, $1, 0
mthi $4
lw $2, 0($1)
TAG571:
slt $3, $2, $2
mfhi $2
sltiu $3, $2, 5
mfhi $4
TAG572:
bne $4, $4, TAG573
mthi $4
lui $4, 11
div $4, $4
TAG573:
lui $2, 4
bne $2, $2, TAG574
sll $0, $0, 0
addu $4, $2, $2
TAG574:
sll $0, $0, 0
div $4, $4
sll $0, $0, 0
sll $0, $0, 0
TAG575:
lui $1, 11
bne $2, $2, TAG576
sltiu $1, $1, 4
blez $2, TAG576
TAG576:
nor $1, $1, $1
mtlo $1
addiu $3, $1, 5
sw $1, 0($3)
TAG577:
divu $3, $3
sllv $3, $3, $3
mthi $3
lui $1, 6
TAG578:
lui $1, 8
lui $2, 6
lui $2, 2
subu $2, $1, $2
TAG579:
sll $0, $0, 0
andi $4, $2, 5
beq $2, $2, TAG580
divu $2, $2
TAG580:
sub $1, $4, $4
mthi $4
bltz $4, TAG581
ori $3, $1, 12
TAG581:
lui $2, 10
sh $2, 0($3)
divu $3, $3
slti $4, $2, 8
TAG582:
lui $2, 13
bne $2, $4, TAG583
mthi $4
sllv $2, $2, $2
TAG583:
multu $2, $2
sll $0, $0, 0
sll $0, $0, 0
mtlo $2
TAG584:
and $1, $3, $3
lbu $4, 0($1)
sltu $1, $3, $4
ori $4, $3, 13
TAG585:
bne $4, $4, TAG586
sb $4, 0($4)
bgez $4, TAG586
mfhi $2
TAG586:
mtlo $2
bne $2, $2, TAG587
sb $2, -169($2)
divu $2, $2
TAG587:
sll $2, $2, 4
mtlo $2
addiu $1, $2, 3
mflo $3
TAG588:
sll $0, $0, 0
or $3, $4, $4
beq $3, $3, TAG589
mthi $3
TAG589:
sb $3, 0($3)
mtlo $3
bgtz $3, TAG590
lui $1, 4
TAG590:
sll $0, $0, 0
mtlo $1
nor $4, $1, $1
blez $1, TAG591
TAG591:
addu $1, $4, $4
mtlo $1
xori $4, $4, 9
bgtz $4, TAG592
TAG592:
mtlo $4
bltz $4, TAG593
divu $4, $4
mtlo $4
TAG593:
subu $3, $4, $4
sb $3, 0($3)
lb $3, 0($3)
sub $4, $3, $3
TAG594:
multu $4, $4
sw $4, 0($4)
sub $4, $4, $4
andi $2, $4, 4
TAG595:
sh $2, 0($2)
lui $4, 0
sltiu $3, $2, 12
multu $3, $4
TAG596:
mult $3, $3
lbu $3, 0($3)
lui $1, 3
lb $4, 0($3)
TAG597:
mflo $2
bgez $4, TAG598
lhu $2, 0($4)
beq $2, $4, TAG598
TAG598:
multu $2, $2
multu $2, $2
mthi $2
addu $2, $2, $2
TAG599:
lui $3, 1
mthi $2
lui $1, 15
or $1, $3, $3
TAG600:
addiu $4, $1, 0
bgez $1, TAG601
lui $3, 11
sll $4, $1, 3
TAG601:
bne $4, $4, TAG602
nor $4, $4, $4
sltu $2, $4, $4
sb $4, 0($2)
TAG602:
mult $2, $2
sh $2, 0($2)
lhu $3, 0($2)
bne $2, $3, TAG603
TAG603:
mtlo $3
and $3, $3, $3
blez $3, TAG604
lw $4, 0($3)
TAG604:
lui $2, 8
multu $4, $4
sll $0, $0, 0
xori $1, $4, 4
TAG605:
bltz $1, TAG606
sb $1, 0($1)
and $4, $1, $1
bltz $4, TAG606
TAG606:
mthi $4
mthi $4
lw $2, 0($4)
mult $4, $2
TAG607:
addu $3, $2, $2
lb $2, 252($2)
beq $2, $2, TAG608
multu $3, $3
TAG608:
lb $4, 0($2)
mult $2, $4
xori $1, $4, 11
mfhi $4
TAG609:
mfhi $4
blez $4, TAG610
andi $2, $4, 8
div $4, $2
TAG610:
lui $1, 3
mthi $2
bgez $1, TAG611
sll $0, $0, 0
TAG611:
sb $4, 0($4)
slti $1, $4, 0
lui $3, 10
srlv $2, $3, $4
TAG612:
bne $2, $2, TAG613
addu $1, $2, $2
addu $3, $2, $2
lui $1, 5
TAG613:
lui $3, 8
sll $0, $0, 0
lui $1, 8
and $1, $3, $3
TAG614:
lui $2, 10
slt $2, $2, $1
mfhi $2
sltu $2, $1, $1
TAG615:
bgez $2, TAG616
sw $2, 0($2)
mfhi $3
lbu $1, 0($2)
TAG616:
lui $4, 4
div $1, $1
beq $1, $4, TAG617
lui $4, 9
TAG617:
multu $4, $4
mtlo $4
lui $3, 8
multu $4, $3
TAG618:
beq $3, $3, TAG619
sll $0, $0, 0
sll $2, $3, 11
mtlo $2
TAG619:
mult $2, $2
blez $2, TAG620
subu $3, $2, $2
sw $2, 0($2)
TAG620:
mflo $1
mflo $4
lui $1, 3
mflo $1
TAG621:
mthi $1
mult $1, $1
lhu $3, 0($1)
sh $3, 0($3)
TAG622:
addiu $1, $3, 12
nor $1, $1, $3
lui $4, 9
blez $4, TAG623
TAG623:
sll $1, $4, 13
mthi $1
mfhi $3
bgtz $1, TAG624
TAG624:
sll $2, $3, 12
multu $3, $3
mthi $3
lui $4, 3
TAG625:
subu $3, $4, $4
lui $3, 11
sllv $1, $3, $3
sll $0, $0, 0
TAG626:
bne $1, $1, TAG627
mfhi $3
sll $4, $3, 3
ori $4, $4, 13
TAG627:
bgez $4, TAG628
div $4, $4
divu $4, $4
sh $4, 0($4)
TAG628:
mfhi $2
lui $1, 8
bltz $1, TAG629
lb $1, 0($4)
TAG629:
mtlo $1
mfhi $2
div $2, $1
lh $1, 0($2)
TAG630:
mflo $2
lb $1, 0($1)
lbu $1, 0($1)
ori $1, $1, 0
TAG631:
sll $4, $1, 15
sra $1, $4, 1
bltz $1, TAG632
srav $4, $1, $1
TAG632:
mfhi $1
lui $1, 15
mult $4, $1
bltz $4, TAG633
TAG633:
lui $1, 7
beq $1, $1, TAG634
mfhi $2
mult $1, $2
TAG634:
beq $2, $2, TAG635
srl $4, $2, 11
lw $3, 0($4)
multu $3, $3
TAG635:
andi $2, $3, 9
bne $3, $3, TAG636
lui $3, 3
andi $2, $3, 5
TAG636:
lui $1, 1
mfhi $4
mthi $4
lhu $2, 0($4)
TAG637:
lui $1, 15
mflo $4
lbu $3, 0($2)
addiu $2, $3, 10
TAG638:
mtlo $2
multu $2, $2
sb $2, 0($2)
lui $2, 4
TAG639:
or $2, $2, $2
xor $2, $2, $2
subu $4, $2, $2
multu $4, $4
TAG640:
bne $4, $4, TAG641
lw $4, 0($4)
mflo $1
mfhi $4
TAG641:
lui $3, 2
mult $4, $4
sll $0, $0, 0
sw $3, 0($4)
TAG642:
sll $0, $0, 0
lui $2, 13
div $2, $3
srl $2, $3, 8
TAG643:
srl $3, $2, 14
sra $1, $2, 2
lh $4, -512($2)
mflo $2
TAG644:
srl $3, $2, 3
subu $1, $3, $3
lui $1, 2
sll $0, $0, 0
TAG645:
srlv $1, $2, $2
mtlo $1
mfhi $2
mfhi $1
TAG646:
div $1, $1
addiu $3, $1, 3
sll $0, $0, 0
mthi $1
TAG647:
lui $2, 10
bgez $2, TAG648
sll $0, $0, 0
lbu $4, 0($2)
TAG648:
lui $2, 6
mthi $2
srlv $2, $2, $2
mtlo $2
TAG649:
mthi $2
bltz $2, TAG650
multu $2, $2
sll $0, $0, 0
TAG650:
div $2, $2
sltiu $1, $2, 11
mfhi $3
beq $3, $3, TAG651
TAG651:
lhu $1, 0($3)
mflo $3
mfhi $2
bgez $3, TAG652
TAG652:
sb $2, 0($2)
lhu $2, 0($2)
sh $2, 0($2)
bgtz $2, TAG653
TAG653:
sll $1, $2, 7
mtlo $2
lhu $2, 0($1)
mthi $2
TAG654:
sw $2, 0($2)
bltz $2, TAG655
sw $2, 0($2)
andi $1, $2, 12
TAG655:
addi $4, $1, 12
mult $1, $1
mtlo $1
mfhi $4
TAG656:
srl $2, $4, 13
lui $2, 5
sll $0, $0, 0
beq $4, $2, TAG657
TAG657:
sh $1, 0($1)
ori $3, $1, 14
lhu $2, 0($3)
lw $3, 0($1)
TAG658:
mflo $3
lui $2, 12
bgtz $3, TAG659
mult $3, $3
TAG659:
sll $0, $0, 0
subu $1, $2, $2
bne $1, $1, TAG660
sll $0, $0, 0
TAG660:
multu $4, $4
mult $4, $4
blez $4, TAG661
add $2, $4, $4
TAG661:
mtlo $2
lui $2, 9
mflo $4
mfhi $2
TAG662:
bltz $2, TAG663
mult $2, $2
lh $3, 0($2)
lui $1, 11
TAG663:
lui $3, 4
mfhi $4
lui $3, 4
bgez $1, TAG664
TAG664:
subu $3, $3, $3
mult $3, $3
lui $1, 7
blez $1, TAG665
TAG665:
sll $0, $0, 0
bgtz $1, TAG666
mult $2, $1
lh $3, 0($2)
TAG666:
bne $3, $3, TAG667
sltiu $2, $3, 8
mflo $3
sb $2, 0($2)
TAG667:
lui $2, 5
lui $1, 12
mtlo $2
lui $4, 13
TAG668:
div $4, $4
sll $0, $0, 0
andi $3, $1, 9
mfhi $4
TAG669:
xor $1, $4, $4
mfhi $1
srl $4, $1, 14
mflo $4
TAG670:
lbu $2, 0($4)
srl $3, $4, 3
mult $2, $3
blez $4, TAG671
TAG671:
lui $3, 9
mfhi $2
sll $0, $0, 0
mthi $3
TAG672:
mfhi $3
lui $4, 2
multu $2, $4
mthi $4
TAG673:
mfhi $4
bne $4, $4, TAG674
sltiu $2, $4, 14
multu $2, $2
TAG674:
mflo $2
bne $2, $2, TAG675
sh $2, 0($2)
bltz $2, TAG675
TAG675:
lhu $2, 0($2)
mflo $4
lb $4, 0($2)
add $4, $2, $2
TAG676:
sra $3, $4, 14
beq $4, $3, TAG677
mfhi $4
sllv $4, $4, $3
TAG677:
sh $4, 0($4)
lh $3, 0($4)
lw $2, 0($3)
sra $2, $2, 14
TAG678:
lhu $2, 0($2)
multu $2, $2
lui $3, 1
lbu $1, 0($2)
TAG679:
bne $1, $1, TAG680
lb $2, 0($1)
sltu $2, $1, $1
lb $4, 0($2)
TAG680:
add $3, $4, $4
mtlo $3
sb $3, 0($3)
multu $3, $3
TAG681:
mthi $3
mflo $3
beq $3, $3, TAG682
sw $3, 0($3)
TAG682:
xori $1, $3, 5
slti $2, $1, 13
sb $3, 0($1)
srlv $2, $3, $3
TAG683:
mthi $2
bgez $2, TAG684
mult $2, $2
lbu $2, 0($2)
TAG684:
bgtz $2, TAG685
lbu $2, 0($2)
srav $3, $2, $2
beq $2, $2, TAG685
TAG685:
ori $3, $3, 13
lui $4, 1
lui $2, 15
lb $3, 0($3)
TAG686:
mthi $3
lbu $4, 0($3)
sll $4, $3, 3
div $4, $3
TAG687:
blez $4, TAG688
sb $4, 0($4)
lbu $4, 0($4)
mthi $4
TAG688:
mfhi $2
sb $2, 0($4)
lui $3, 15
xori $2, $4, 11
TAG689:
lb $1, 0($2)
sra $1, $2, 13
lui $4, 15
sll $0, $0, 0
TAG690:
sll $0, $0, 0
ori $3, $4, 14
lui $4, 7
sll $0, $0, 0
TAG691:
mflo $4
mfhi $4
lh $2, 0($4)
sh $4, 0($2)
TAG692:
sw $2, 0($2)
multu $2, $2
mtlo $2
bne $2, $2, TAG693
TAG693:
addiu $4, $2, 2
lui $1, 1
sll $0, $0, 0
bgez $1, TAG694
TAG694:
or $2, $2, $2
mflo $1
and $2, $1, $1
mfhi $1
TAG695:
sltiu $1, $1, 15
bltz $1, TAG696
mflo $3
beq $1, $1, TAG696
TAG696:
sllv $3, $3, $3
bgtz $3, TAG697
subu $4, $3, $3
srav $2, $3, $3
TAG697:
bne $2, $2, TAG698
sb $2, 0($2)
sllv $1, $2, $2
lui $4, 3
TAG698:
lui $1, 4
multu $4, $1
mult $1, $4
mfhi $4
TAG699:
mfhi $3
lbu $3, 0($4)
addiu $2, $3, 9
sb $2, 0($3)
TAG700:
bgtz $2, TAG701
lui $2, 3
blez $2, TAG701
sh $2, 0($2)
TAG701:
lui $1, 1
mtlo $1
slti $1, $1, 7
lui $1, 1
TAG702:
srlv $1, $1, $1
bgez $1, TAG703
mfhi $3
beq $1, $1, TAG703
TAG703:
sll $2, $3, 14
sb $3, 0($3)
beq $3, $3, TAG704
sh $3, 0($3)
TAG704:
bne $2, $2, TAG705
mult $2, $2
sll $0, $0, 0
mflo $4
TAG705:
lbu $4, 0($4)
subu $3, $4, $4
mflo $4
srav $4, $4, $3
TAG706:
mult $4, $4
bne $4, $4, TAG707
nor $4, $4, $4
lw $2, 1($4)
TAG707:
mtlo $2
mtlo $2
sllv $4, $2, $2
sb $2, -4608($4)
TAG708:
slt $2, $4, $4
mfhi $4
lw $3, 0($4)
lui $4, 8
TAG709:
sll $0, $0, 0
sllv $4, $4, $4
bltz $4, TAG710
lui $3, 3
TAG710:
sll $0, $0, 0
sll $0, $0, 0
multu $3, $3
mtlo $3
TAG711:
lui $2, 0
beq $3, $2, TAG712
mult $2, $2
bgtz $3, TAG712
TAG712:
mtlo $2
mtlo $2
slt $3, $2, $2
xori $1, $2, 11
TAG713:
and $1, $1, $1
bgez $1, TAG714
mflo $2
mthi $1
TAG714:
mfhi $3
mfhi $4
beq $3, $4, TAG715
addi $4, $3, 10
TAG715:
beq $4, $4, TAG716
mthi $4
bltz $4, TAG716
sh $4, 0($4)
TAG716:
mult $4, $4
mtlo $4
beq $4, $4, TAG717
sb $4, 0($4)
TAG717:
lui $4, 3
sll $0, $0, 0
bgtz $3, TAG718
and $3, $3, $4
TAG718:
bgez $3, TAG719
multu $3, $3
lui $3, 5
bgtz $3, TAG719
TAG719:
sh $3, 0($3)
mflo $3
lui $2, 9
beq $2, $3, TAG720
TAG720:
sll $0, $0, 0
bgtz $2, TAG721
sll $0, $0, 0
addu $4, $2, $2
TAG721:
mthi $4
bgtz $4, TAG722
ori $1, $4, 10
divu $1, $1
TAG722:
mflo $3
multu $1, $3
and $1, $3, $1
srl $4, $3, 11
TAG723:
lui $2, 9
lui $1, 5
bltz $4, TAG724
sll $0, $0, 0
TAG724:
bne $4, $4, TAG725
multu $4, $4
multu $4, $4
multu $4, $4
TAG725:
lui $1, 9
bgtz $1, TAG726
and $3, $4, $4
mflo $1
TAG726:
mtlo $1
beq $1, $1, TAG727
lui $3, 0
sw $3, 0($1)
TAG727:
mfhi $3
multu $3, $3
lb $2, 0($3)
mflo $3
TAG728:
beq $3, $3, TAG729
sb $3, 0($3)
divu $3, $3
sll $4, $3, 0
TAG729:
addiu $3, $4, 14
mtlo $3
bltz $3, TAG730
sh $4, 0($4)
TAG730:
divu $3, $3
lhu $4, 0($3)
bltz $4, TAG731
lui $2, 0
TAG731:
bgtz $2, TAG732
sb $2, 0($2)
mtlo $2
lui $1, 13
TAG732:
mtlo $1
blez $1, TAG733
mult $1, $1
sll $0, $0, 0
TAG733:
multu $3, $3
mfhi $1
sh $1, 0($3)
blez $1, TAG734
TAG734:
lbu $4, 0($1)
lh $2, 0($4)
bne $1, $1, TAG735
mfhi $4
TAG735:
lui $3, 1
srav $2, $3, $3
sll $0, $0, 0
multu $4, $3
TAG736:
sllv $4, $2, $2
mfhi $4
sw $4, 0($4)
andi $1, $4, 13
TAG737:
mflo $4
mthi $1
mflo $1
mthi $1
TAG738:
lui $2, 8
lui $3, 9
slti $4, $3, 8
sb $1, 0($1)
TAG739:
mfhi $2
bne $2, $2, TAG740
mthi $4
lb $3, 0($2)
TAG740:
sw $3, 0($3)
lhu $4, 0($3)
and $3, $3, $3
mthi $3
TAG741:
beq $3, $3, TAG742
mfhi $4
slt $3, $3, $3
sh $4, 0($3)
TAG742:
mthi $3
mflo $4
andi $2, $3, 7
sh $3, 0($3)
TAG743:
nor $3, $2, $2
mtlo $2
multu $3, $3
sra $4, $2, 5
TAG744:
addiu $1, $4, 3
ori $4, $4, 3
beq $1, $1, TAG745
mtlo $4
TAG745:
lui $2, 4
mult $2, $4
mtlo $2
slti $1, $4, 12
TAG746:
bgtz $1, TAG747
srl $2, $1, 11
beq $2, $1, TAG747
divu $2, $1
TAG747:
lh $1, 0($2)
lb $2, 0($2)
sltiu $1, $1, 10
xor $1, $1, $2
TAG748:
mthi $1
bltz $1, TAG749
lb $3, 0($1)
bgez $3, TAG749
TAG749:
lui $3, 4
sll $0, $0, 0
bne $3, $3, TAG750
lui $1, 12
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop | 11.93168 | 21 | 0.542237 |
88c5ce828859d6a68e2be2d1e99f66bebc894ec5 | 40,236 | asm | Assembly | Library/Kernel/Heap/heapSwap.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Kernel/Heap/heapSwap.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Kernel/Heap/heapSwap.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Kernel/Heap
FILE: heapSwap.asm
AUTHOR: Adam de Boor, Jun 7, 1990
ROUTINES:
Name Description
---- -----------
GLB MemAddSwapDriver Register another swap driver in the system
GLB MemExtendHeap Add more space to the heap from a swap driver
GLB MemGetSwapDriverInfo Returns info about a swap driver
INT MemSwapOut Swap the given block using the current swap
driver
INT MemSwapIn Swap the given block back in
INT MemSwapDelete Free the swap space held by the given block.
REVISION HISTORY:
Name Date Description
---- ---- -----------
Adam 6/ 7/90 Initial revision
DESCRIPTION:
Functions to interface with swap drivers.
$Id: heapSwap.asm,v 1.31 98/03/12 17:37:22 allen Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
kinit segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemAddSwapDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add another swap driver to the system, if possible.
THIS IS ONLY TO BE CALLED DURING INIT CODE SO I DON'T HAVE
TO PROTECT THE TABLE WITH A SEMAPHORE. DIMBULBS NEED NOT
APPLY...
CALLED BY: Swap drivers
PASS: cx:dx = driver strategy routine
al = SwapSpeed giving the speed of the swap device
ah = SwapDriverFlags
RETURN: carry set if driver couldn't be added (driver should return
carry set from its DR_INIT function so it gets
unloaded)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
The Kernel variable heapSize is adjusted here to
account for a larger effective heap.
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 6/ 7/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemAddSwapDriver proc far uses di, ds, es, si, ax
.enter
LoadVarSeg ds, si
mov es, si
;
; See if the table is full.
;
cmp ds:swapNumDrivers, MAX_SWAP_DRIVERS
je fail
;
; Find the proper place in the table for the driver.
;
push cx
mov cx, ds:swapNext
mov si, offset swapTable - size SwapDriver
searchLoop:
add si, size SwapDriver ; point to next
cmp si, cx ; hit the end of the table?
je addDriver ; yes -- just add it here
cmp al, ds:[si].SD_speed ; if slower or same, keep
jae searchLoop ; looking
;
; Need to insert a record into the table by shifting everything up one
; entry.
;
mov di, cx ; di <- end of table
sub cx, si ; cx <- # words to move
shr cx
dec di ; di <- end of record after
dec di ; table in a convoluted manner
mov si, di
add di, size SwapDriver
std
rep movsw
cld
inc si ; point back to the start
inc si ; of the record we just opened
; up...
addDriver:
mov ds:[si].SD_speed, al
mov ds:[si].SD_flags, ah
mov ds:[si].SD_strategy.offset, dx
pop cx ; recover strategy segment
mov ds:[si].SD_strategy.segment, cx
;
; Record another record in the table.
;
add ds:swapNext, size SwapDriver ; clears carry
inc ds:swapNumDrivers
if not NEVER_ENFORCE_HEAPSPACE_LIMITS
;
; OK, now add this contribution to heapSize
;
mov di, DR_SWAP_GET_MAP ; seg in ax
call ds:[si].SD_strategy
mov es, ax
mov ax, es:[SM_page]
mov di, es:[SM_total]
xchg di, dx ; preserve dx in di
mul dx
mov al, ah ; now divide by 1024.. srh 10
mov ah, dl
mov dl, dh
shr dx
rcr ax
shr dx
rcr ax
;
; and scale it (3/4)
;
shr ax
mov dx, ax
shr ax
add ax, dx
MASD_addToHeapSize:: ; showcalls -H
add ds:[heapSize], ax
mov dx, di ; restore dx
clc
endif ; not NEVER_ENFORCE_HEAPSPACE_LIMITS
done:
.leave
ret
fail:
stc
jmp done
MemAddSwapDriver endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MEHBeforeHeap
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add a free block before the current start of the heap.
CALLED BY: (INTERNAL) MemExtendHeap
PASS: ds = dgroup
ax = segment of new free block
bx = distance from this seg to edge of heap in para
cx = size of new free block (paragraphs)
RETURN: si = block to link in with lower address (free block,
for this function)
bx = block to link in with higher address (gap block,
for this function)
cx = routine to call to fixup the links (MEHFixLinks
or MEHFixLinks2)
DESTROYED: ax
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 3/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MEHBeforeHeap proc near
.enter
push ax, cx
clr si ; assume no 2d block needed
cmp bx, cx ; do we need one block or two?
je allocFreeBlock ; => no gap between current
; heap start and new space, so
; don't alloc a handle for it
mov cx, mask HF_FIXED ; must be fixed, to avoid
; death
mov bx, handle 0 ; gap block owned by us
call AllocateMemHandleFar
mov si, bx ; si <- gap block
allocFreeBlock:
clr bx ;handle is free, so owner 0
call AllocateMemHandleFar
pop ax, cx
mov ds:[bx].HM_addr, ax ; bx = handle covering heap
mov ds:[bx].HM_size, cx ; extension
add cx, ax ; cx <- gap addr
xchg ds:[loaderVars].KLV_heapStart, ax
tst si ; any gap to be set up?
jnz setupGapBlock
mov cx, offset MEHFixLinks2 ; if no gap, just want to fix
; up bx
mov si, bx ; si <- bx so setting of
; [si].HM_prev does the
; right thing
jmp fixup
setupGapBlock:
mov ds:[si].HM_addr, cx
sub ax, cx ; ax <- size of gap (from start
; to former heap start)
mov ds:[si].HM_size, ax
mov ds:[si].HM_otherInfo, FAKE_BLOCK_CODE
; dloft 12/9/93 -- stuff
; otherInfo so we can id fakes
mov cx, offset MEHFixLinks ; we'll need to fixup both bx
; and si.
;
; Partially link the two new blocks between the first and the last
; blocks on the heap. We need to set both pointers for the fake
; (locked) block (si) and the HM_next pointer for the extension
; block (bx). FixLinks will deal with si first, pointing bx to it.
; It will then link handleBottomBlock to bx and life will be good.
;
fixup:
xchg bx, si
.leave
ret
MEHBeforeHeap endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MEHAfterHeap
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add a free block beyond the current end of the heap.
CALLED BY: (INTERNAL) MemExtendHeap
PASS: ds = dgroup
ax = segment of new free block
cx = size of new free block (paragraphs)
RETURN: si = block to link in with lower address (gap block,
for this function)
bx = block to link in with higher address (free block,
for this function)
cx = routine to call to fixup the links (MEHFixLinks
or MEHFixLinks2)
DESTROYED: ax
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 3/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if not FULL_EXECUTE_IN_PLACE
MEHAfterHeap proc near
.enter
;
; Allocate two blocks to cover the distance from the current heap
; end to the end of the block being added to the heap. Only allocate
; one block if the block being added follows immediately after the
; heap itself, as can happen with some funky Extended -> Expanded
; memory managers (which use 64K of conventional memory to give
; programs that know nothing of extended memory the ability to access
; that memory).
;
push ax, cx
mov si, 0 ; assume no gap (don't hose
; flags...)
je allocFreeBlock ; => no gap between current
; heap end and new space, so
; don't alloc a handle for it
; (flags still set from cmp
; with heapEnd)
clr cx ; no special allocation flags
mov bx, handle 0
call AllocateMemHandleFar
mov si, bx
mov ds:[si].HM_lockCount, 1 ; si remains locked forever
allocFreeBlock:
clr bx ;handle is free, so owner 0
call AllocateMemHandleFar
pop ax, cx
mov ds:[bx].HM_addr, ax ; bx = handle covering heap
mov ds:[bx].HM_size, cx ; extension
add ax, cx ; ax <- new end of heap
xchg ds:[loaderVars].KLV_heapEnd, ax
; addr of gap block is old
; end
tst si ; any gap to be set up?
jnz setupGapBlock
mov cx, offset MEHFixLinks2 ; if no gap, just want to fix
; up bx
mov si, bx ; si <- bx so setting of
; [si].HM_prev does the
; right thing
jmp done
setupGapBlock:
mov cx, offset MEHFixLinks ; we'll need to fixup both bx
; and si.
mov ds:[si].HM_addr, ax ; gap addr <- old heapEnd
sub ax, ds:[bx].HM_addr ; figure # paragraphs in gap
neg ax ; block
mov ds:[si].HM_size, ax
mov ds:[si].HM_otherInfo, FAKE_BLOCK_CODE
; dloft 12/9/93 -- stuff
; otherInfo so we can identify
; these fake blocks
done:
.leave
ret
MEHAfterHeap endp
endif ; not FULL_EXECUTE_IN_PLACE
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemExtendHeap
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add another block of memory to be managed by the heap code.
CALLED BY: GLOBAL (swap drivers)
PASS: ax = starting segment of block
cx = length of block (paragraphs)
RETURN: nothing
DESTROYED: ax, cx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
This routine has the side effect of adjusting the
Kernel variable heapSize to account for the added heap space.
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 6/ 7/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemExtendHeap proc far uses ds, bx, dx, si, di
.enter
LoadVarSeg ds
EC < call FarPHeap >
;
; Cannot extend the heap above MAX_SEGMENT -- doing so will cause
; extreme pain and agony in various parts of the heap code.
;
; In FXIP, cannot extend the heap above ROM. (There are lots
; of places in the code that assume that ROM resources lie above
; KLV_heapEnd). We know that ROM resources are below MAX_SEGMENT, and
; KLV_xipHeader is the bottommost ROM address.
;
mov bx, ax ; figure the end of the block
NOFXIP < sub bx, MAX_SEGMENT >
FXIP < sub bx, ds:[loaderVars].KLV_xipHeader >
jae ignoreBlock ; => block wholly above MAX_SEGMENT
add bx, cx
jae blockOk ; => block wholly below MAX_SEGMENT
sub cx, bx ; else adjust the added block to
; be within bounds
ja blockOk ; continue if there's still stuff to
; add
ignoreBlock:
jmp done
blockOk:
if not NEVER_ENFORCE_HEAPSPACE_LIMITS
;
; Adjust heapSize.. Translate size from paras to K
;
push ax, cx
mov ax, cx
mov cl, 6
shr ax, cl ; round down - truncate
MEH_addToHeapSize:: ; showcalls -H
add ds:[heapSize], ax
pop ax, cx
endif ; not NEVER_ENFORCE_HEAPSPACE_LIMITS
cmp ax, ds:[loaderVars].KLV_heapEnd
jb checkBelowHeap
if FULL_EXECUTE_IN_PLACE
;
; In FXIP, all the unused space between KLV_heapEnd and the bottom of
; ROM is already covered by a fake block. So here we extend
; KLV_heapEnd to include all the new space being added, and then
; shrink the fake block that is now included (maybe partially) in the
; heap.
;
mov ds:[loaderVars].KLV_heapEnd, ax
add ds:[loaderVars].KLV_heapEnd, cx
jmp shrinkFakeBlock
else
call MEHAfterHeap
endif ; FULL_EXECUTE_IN_PLACE
;
; Partially link the two new blocks between the first and the last
; blocks on the heap. We need to set both pointers for the lower
; block (si) and the HM_next pointer for the higher
; block (bx). FixLinks will deal with si first, pointing bx to it.
; It will then link handleBottomBlock to bx and life will be good.
;
fixup:
mov ds:[si].HM_next, bx
mov di, ds:[loaderVars].KLV_handleBottomBlock
mov ds:[bx].HM_next, di
mov ax, ds:[di].HM_prev
mov ds:[si].HM_prev, ax
call cx
tst ds:[bx].HM_owner
jz officiallyFreeIt
xchg bx, si
officiallyFreeIt:
call DoFreeNoDeleteSwapFar
done:
EC < call FarVHeap >
.leave
ret
checkBelowHeap:
mov bx, ds:[loaderVars].KLV_heapStart
sub bx, ax
jb shrinkFakeBlock ; => already part of the heap,
; but covered by a fake block
je done ; where the hell'd this come
; from? should already be
; part of the heap..
call MEHBeforeHeap
jmp fixup
shrinkFakeBlock:
;
; The new extension has already been incorporated into the heap.
; Find the fake block that must be covering it and free it up.
;
mov bx, ds:[loaderVars].KLV_handleBottomBlock
searchLoop:
; XXX: EC code might be appropriate...
mov bx, ds:[bx].HM_prev
cmp ds:[bx].HM_addr, ax
ja searchLoop
;
; Now have the first block whose address is below or equal to the
; new block. This must be the one we want to split.
;
je simple
sub ax, ds:[bx].HM_addr
push cx
push ax
add ax, cx
cmp ds:[bx].HM_size, ax
mov cl, mask HF_FIXED ; keep bottom allocated
pop ax
jne complex ; double-split needed
;
; Another simple case -- we can just do a SplitBlockFreeRemainder
; keeping the bottom part allocated.
;
call SplitBlockFreeRemainderWithAddr
pop cx
NOAXIP < jmp done >
AXIP < mov si, ds:[bx].HM_next ; si <- new free block >
AXIP < mov si, ds:[si].HM_next ; si <- block above >
AXIP < jmp fixupTopBlock >
complex:
EC < ERROR_B FAKE_BLOCK_DOESNT_COVER_ENTIRE_NEW_HEAP_SEGMENT >
;
; Double-split required. Just do a split without freeing the remainder,
; as part of it must remain allocated and freeing the remainder would
; result in filling that part with 0xcc in the EC version...
;
call SplitBlockWithAddrFar
pop cx
mov bx, si ; split the free part
; Mark block as owned now to prevent attempts at coalescing
; the two pieces when SplitBlockFreeRemainderWithAddr is called
; below. Also fends off rabid EC code (+heapFree and the like)
mov ds:[bx].HM_owner, handle 0
simple:
;
; The part being added is at the bottom of BX. Split it, freeing the
; bottom part.
;
xchg ax, cx ; ax <- size of useful block
sub ax, ds:[bx].HM_size ; ax <- size to keep
neg ax
jnz simpleSplit ; => free only part of fake block
if KERNEL_EXECUTE_IN_PLACE or FULL_EXECUTE_IN_PLACE
;
; We are going to free the whole fake block. Before we do so,
; however, we need to prepare for fixing up xipHandleTopBlock later,
; because after we free the fake block the handle may be freed if
; the block is incorporated into another free block, and we can't find
; where on the heap we are again.
; - If the block above this fake block is not free, it may be another
; block on the heap (below xipHandleTopBlock) or a block in ROM
; (above xipHandleTopBlock). Either way we will compare
; xipHandleTopBlock with the above-block, and update the value if
; the above-block is higher.
; - If the block above is free, xipHandleTopBlock must already be
; higher than the above-block. So we don't need to fixup.
; - If the fake block is the current xipHandleTopBlock, we need to
; fixup now because after we free the fake block, the handle may
; be invalid and we can't do comparison anymore. In this case we
; know that this fake block must be the one that connects the last
; heap block and the first ROM block. Hence the above-block will
; become the new xipHandleTopBlock.
;
mov si, ds:[bx].HM_next ; si <- block above
cmp bx, ds:[xipHandleTopBlock]
jne checkFree ; => top block not this fake block
mov ds:[xipHandleTopBlock], si ; new top <- blk above
jmp noFixupLater
checkFree:
tst ds:[si].HM_owner ; check if blk above is free
jne freeFakeBlock ; => not free block. May need fixup
noFixupLater:
clr si ; no need to fixup xipHandleTopBlock
freeFakeBlock:
endif ; KERNEL_EXECUTE_IN_PLACE or FULL_EXECUTE_IN_PLACE
call DoFreeNoDeleteSwapFar ; free whole fake block
AXIP < tst si ; need to fixup? >
AXIP < jnz fixupTopBlock ; => yes. >
jmp done
simpleSplit:
clr cl ; free the bottom part
call SplitBlockFreeRemainderWithAddr
;
; Make sure the split block is locked and owned by the kernel, to deal
; with fall-thru from the complex double-split case above.
;
; 12/8/93 dloft: Also, let's stuff a unique value into HM_otherInfo so
; that we don't confuse these blocks with something real...
;
mov ds:[bx].HM_lockCount, 1
mov ds:[bx].HM_owner, handle 0
mov ds:[bx].HM_otherInfo, FAKE_BLOCK_CODE
AXIP < mov si, bx ; si <- block above new free block>
if KERNEL_EXECUTE_IN_PLACE or FULL_EXECUTE_IN_PLACE
fixupTopBlock:
; si = block above new free block
;
; Fixup xipHandleTopBlock if the block above the new free block is
; higher than the current xipHandleTopBlock.
;
mov bx, ds:[xipHandleTopBlock]
mov ax, ds:[bx].HM_addr
cmp ax, ds:[si].HM_addr
jae done
mov ds:[xipHandleTopBlock], si
endif ; KERNEL_EXECUTE_IN_PLACE or FULL_EXECUTE_IN_PLACE
jmp done
MemExtendHeap endp
;--------------------
; Copy of FixLinks and FixLinks2 w/o all the EC stuff so I don't
; have to add Far versions of them. These things just fixup the
; double-links. MEHFixLinks2 takes the HM_prev and HM_next pointers
; of ds:bx and makes those handles point to bx. MEHFixLinks does
; likewise for si first, and then for bx.
;
MEHFixLinks proc near
xchg bx, si ; Fix si first
call MEHFixLinks2
xchg bx, si
REAL_FALL_THRU MEHFixLinks2
MEHFixLinks endp
MEHFixLinks2 proc near
push si
mov si, ds:[loaderVars].KLV_heapStart
cmp si, ds:[bx].HM_addr
jne 10$
mov ds:[loaderVars].KLV_handleBottomBlock, bx
10$:
mov si, ds:[bx].HM_prev ; fix link from prev block
mov ds:[si].HM_next, bx
mov si, ds:[bx].HM_next ; fix link from next block
mov ds:[si].HM_prev, bx
pop si
ret
MEHFixLinks2 endp
kinit ends
COMMENT @----------------------------------------------------------------------
FUNCTION: SetOwnerToKernel
DESCRIPTION: Set a block's HG_owner field to be the kernel
CALLED BY: UTILITY
PASS:
ds - idata
bx - handle
RETURN:
none
DESTROYED:
none
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 1/91 Initial version
------------------------------------------------------------------------------@
SetOwnerToKernel proc near
.enter
mov ds:[bx].HG_owner, handle 0
.leave
ret
SetOwnerToKernel endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemSwapOut
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Swap the given block out to the current swap driver
CALLED BY: ThrowOutOne
PASS: bx = block to swap
dx = segment of block being swapped
ds = idata
di = swap driver to use
exclusive access to heap variables
RETURN: carry set if block could not be swapped (swap driver marked
as full)
DESTROYED: ax, cx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 6/10/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemSwapOut proc near uses di, si
.enter
;
; Call the current swap driver to swap the thing out.
;
mov si, di
;
; We can be called when we're full. It's easiest to just check for this
; here and declare an error if so.
;
test ds:[si].SD_flags, mask SDF_FULL
jnz error
retry:
mov di, DR_SWAP_SWAP_OUT
call CallSwapDriver
jc error
;
; Tell the debugger the block has been swapped out.
;
push ax
mov al, DEBUG_SWAPOUT
call FarDebugMemory
;
; Update the statistics.
;
INT_OFF
mov ax, ds:[bx].HM_size
add ds:[curStats].SS_swapOuts.SSI_paragraphs, ax
inc ds:[curStats].SS_swapOuts.SSI_blocks
INT_ON
;
; Release the memory held by the block.
;
mov al, mask HF_SWAPPED
call FreeBlockData
;
; Record the swap ID and driver used to swap the thing out.
;
pop ds:[bx].HSM_swapID
mov ds:[bx].HSM_swapDriver, si
doneGood:
clc ; Signal success
done:
.leave
ret
error:
;
; Couldn't swap it out. If the driver is fast enough to be preferred
; to discarding, biff enough discardable-but-swapped blocks to make
; room for the block.
; XXX: chain blocks swapped to the same driver through the
; HM_usageValue field? Requires link (simple) and unlink (more
; complex) but allows easy traversal...
;
ornf ds:[si].SD_flags, mask SDF_FULL ; assume failure
cmp ds:[si].SD_speed, SS_PRETTY_FAST
ja fail ; => not fast enough to swap
; discardable blocks
push bx ;preserve handle being swapped
mov ds:[bx].HM_addr, dx ;replace address so any heap
; verifies (e.g. by VM code)
; won't choke.
mov bx, ds:[loaderVars].KLV_handleTableStart
scanLoop:
cmp ds:[bx].HM_owner,0 ;test for free
je next
cmp ds:[bx].HM_addr,0 ;test for in memory
jnz next ;branch if so
;
; Nuke the block if it's discardable and swapped to this driver.
;
test ds:[bx].HM_flags,mask HF_SWAPPED or mask HF_DISCARDABLE
jz next ; no if neither set
jpo next ; no if only one set
cmp ds:[bx].HSM_swapDriver, si
jne next
;
; Use MemDiscard.
;
call MemDiscard
next:
add bx,size HandleMem
cmp bx,ds:[loaderVars].KLV_lastHandle
jb scanLoop
pop bx ;recover initial handle and
; its segment
;
; If the block being swapped has now become discarded, swapped, or
; freed, return success. This could happen if the discard loop above
; hits a VM block -- we could go through the whole ThrowOutBlocks shme
; again as we try make room to bring in the VM header during the VM
; block discard.
;
cmp ds:[bx].HM_owner, 0
je doneGood
test ds:[bx].HM_flags, mask HF_DISCARDED or mask HF_SWAPPED
jnz doneGood
;
; Now zero the block's address again and make sure it hasn't become
; locked in the interim. If it has, we can't swap it, but still need
; to return with its address field 0 and dx containing the segment,
; so ThrowOutBlocks can replace it...
;
clr dx
xchg ds:[bx].HM_addr, dx
tst ds:[bx].HM_lockCount
jnz fail
;
; If anything was discarded, then MemSwapDelete will have cleared the
; SDF_FULL flag for the driver. Since we set it at the start, if
; it's still set, nothing got nuked so the device is still full.
;
test ds:[si].SD_flags, mask SDF_FULL
jnz fail
jmp retry
fail:
add si, size SwapDriver
cmp si, ds:[swapNext]
jne returnError
;
; Let the user know that all devices are full. This isn't fatal,
; however. To avoid infinite looping when SysNotify forces a
; screen refresh, and to try (as usual) to be as unannoying as
; possible, we only put up this box if a certain interval has
; passed since last the user saw it. Currently this is 30 seconds.
; (Don't do any of this for Redwood, which has a very small swap
; space and can fill up intermittently at any time.)
;
if not NO_FULL_SWAPFILE_NOTIFICATION
mov ax, ds:[systemCounter].low
push ax
sub ax, ds:[lastSwapFullNotice]
cmp ax, SWAP_FULL_NOTIFICATION_INTERVAL
pop ax
jbe returnError
mov ds:[lastSwapFullNotice], ax
push ds
mov ds, ds:[fixedStringsSegment]
ifdef GPC
mov si, ds:[tooMuchAtOnce]
mov di, ds:[tooMuchAtOncePartTwo]
else
mov si, ds:[swapDevFull]
mov di, ds:[swapDevFull2]
endif
mov ax, mask SNF_CONTINUE
call SysNotify
pop ds
endif
returnError:
stc
jmp done
MemSwapOut endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemSwapIn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Swap a block in from its swap device
CALLED BY: FullLockReload
PASS: ds = idata
bx = block to swap in
RETURN: nothing
DESTROYED: ax, cx, dx, si, di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 6/11/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemSwapIn proc near
.enter
mov dx, NUMBER_OF_ALLOCATION_RETRIES + 1
retry:
clr cx ; allow allocation errors
; from MemSwapInLow
push dx
call MemSwapInLow
pop dx
jnc done ; got it
call AllocationFailure ; else, dec retries and sleep
;
; we want to retry -- since we released the heap
; semaphore in AllocationFailure to sleep, let's see if
; someone else has swapped in the block we are trying to
; swap in
;
test ds:[bx].HM_flags, mask HF_SWAPPED
jnz retry ; still swapped, try again
; (carry clear)
done:
.leave
ret
MemSwapIn endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemSwapInLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Low-level routine to actually swap in a block
CALLED BY: MemSwapIn, MemPreserveVolatileSwapData
PASS: ds:bx = HandleMem to swap in
ch = HeapAllocFlags for allocating the new memory
heap lock grabbed
RETURN: carry set if AllocHandleAndBytes failed
carry clear if block swapped in:
ds:bx.HM_addr set
DESTROYED: ax, cx, dx, si, di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 5/19/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemSwapInLow proc far
.enter
EC < call ECCheckMemHandleFar >
EC < test ds:[bx].HM_flags, mask HF_SWAPPED >
EC < ERROR_Z BLOCK_NOT_SWAPPED >
;
; Prevent MemSwapOut from discarding our block in the swap device while
; we're making room for the thing to be swapped in.
;
push {word}ds:[bx].HM_flags
andnf ds:[bx].HM_flags,not (mask HF_DISCARDABLE or mask HF_SWAPABLE)
;
; Allocate another block big enough to hold the data.
;
push bx ;save handle
mov ax, ds:[bx].HSM_size ;allocate new memory
mov bx, ds:[bx].HSM_owner
call AllocHandleAndBytes
mov si,bx ;save space handle
pop bx ;recover original handle
jc allocErr
call MemSwapInCallDriver
jc swapError
;
; Now give the memory from the new handle to the old. Change the
; handle from swapped to discarded so SwapHandles doesn't double-free
; the swap-space when it frees SI.
;
Assert bitSet, ds:[bx].HM_flags, HF_SWAPPED
Assert bitClear, ds:[bx].HM_flags, HF_DISCARDED
xornf ds:[bx].HM_flags, mask HF_SWAPPED or mask HF_DISCARDED
call SwapHandles
;
; When we pushed the flags above, the lock count was pushed as well.
; While the flags are guaranteed to be unaffected while the heap is P'd,
; the lock count is not, so we need to restore the flags in a manner
; that leaves the lock count unmodified. Otherwise, we may end up
; causing a very rare and hard-to-find bug. -dhunter 8/25/2000
;
pop ax ; al = flags, ah = lock count
andnf al, not mask HF_SWAPPED
mov ds:[bx].HM_flags, al
;
; Update the statistics.
;
INT_OFF
mov ax, ds:[bx].HM_size
add ds:[curStats].SS_swapIns.SSI_paragraphs, ax
inc ds:[curStats].SS_swapIns.SSI_blocks
INT_ON
;
; Notify debugger that block has come back in again.
;
mov al, DEBUG_SWAPIN
call FarDebugMemory
clc ; signal success
done:
.leave
ret
swapError:
allocErr:
;
; We need not worry about popping the lock count with the flags
; at this point. Since the block was never swapped in, HM_addr
; never went non-zero, and no one will touch the lock count while
; HM_addr is zero. (We also don't need to free the swap memory
; after a failed swap since MemSwapInCallDriver will never return.)
; -dhunter 9/5/00
;
pop {word}ds:[bx].HM_flags
jmp done
MemSwapInLow endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemSwapInCallDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Call the appropriate swap driver to swap in a block to
new memory
CALLED BY: (INTERNAL) MemSwapInLow, MemUnlockMoveCallback
PASS: ds = dgroup
bx = swapped handle
si = handle holding new memory as destination
RETURN: carry set on error
DESTROYED: dx, di, ax, cx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 4/17/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemSwapInCallDriver proc near
.enter
push si
EC < inc ds:[si].HM_lockCount ; so disk swap won't die in EC>
;
; Call the proper swap driver to swap the data back into memory
;
mov dx, ds:[si].HM_addr ; dx <- destination
mov si, ds:[bx].HSM_swapDriver
mov di, DR_SWAP_SWAP_IN
call CallSwapDriver
jc swapError
;
; Mark the swap driver as not full again.
;
andnf ds:[si].SD_flags, not mask SDF_FULL
done:
pop si ;recover handle
EC < dec ds:[si].HM_lockCount >
.leave
ret
swapError:
push es
mov al, KS_TE_SYSTEM_ERROR
call AddStringAtMessageBuffer
mov al, KS_SWAP_IN_ERROR
call AddStringAtESDI
mov ax, mask SNF_REBOOT
call SysNotifyWithMessageBuffer
pop es
stc
jmp done
MemSwapInCallDriver endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CallSwapDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Common code to call the swap driver while avoiding death
in the segment EC code
CALLED BY: MemSwapInCallDriver, MemSwapOut
PASS: ds = idata
bx = block whose swap space is being manipulated
dx = segment address of the block
si = offset of SwapDriver structure
di = SwapFunction
RETURN: carry set on error
DESTROYED: di, cx, ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
tony 9/20/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CallSwapDriver proc near uses bx
.enter
;
; Fake out SegmentToHandle by priming its one-level cache
; with the block being swapped. Since we've got the heap semaphore,
; this should allow drivers to call things that check segments
; without difficulty, so long as they use the segment in DX and don't
; adjust it at all...
;
; XXX: Right now, this is only important to avoid death in the
; ECF_SEGMENT error-checking code, but we have it in the non-ec version
; as well, just to be safe, since SegmentToHandle is available for
; use there as well...
;
mov ds:[sthCacheSegment], dx
mov ds:[sthCacheHandle], bx
call GetByteSize ; cx <- size
mov ds:[handleBeingSwappedDontMessWithIt], bx
mov bx, ds:[bx].HSM_swapID ; bx <- swap ID (for read and
; delete, only)
call ds:[si].SD_strategy
mov ds:[handleBeingSwappedDontMessWithIt], 0
.leave
ret
CallSwapDriver endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemSwapDelete
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Free the swap space occupied by a block.
CALLED BY: DeleteSwapFileIfExists
PASS: ds = idata
bx = block whose swap space is to be deleted
RETURN: nothing
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 6/11/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemSwapDelete proc near uses si, di, bx
.enter
mov si, ds:[bx].HSM_swapDriver
mov bx, ds:[bx].HSM_swapID
;
; Mark the device as no longer full, since we're biffing something.
;
andnf ds:[si].SD_flags, not mask SDF_FULL
;
; Now contact the driver to free up the space.
;
mov di, DR_SWAP_DISCARD
call ds:[si].SD_strategy
.leave
ret
MemSwapDelete endp
DosapplCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemPreserveVolatileSwapData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Preserve any data swapped to a volatile swap device before
suspending the system.
CALLED BY: DosExecSuspend
PASS: ds = dgroup
RETURN: carry set if not everything could be swapped in that
needed to be.
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 5/19/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemPreserveVolatileSwapData proc near
uses ax, bx, cx, dx, si, di
.enter
;
; Gain exclusive access to the heap.
;
call FarPHeap
;
; Now work through the swap driver array, looking for things that are
; marked volatile and mark them all endangered. This prevents us from
; swapping stuff out to a later volatile device while bringing things
; in from an earlier one, then having to do it all over again for
; the later device...
;
mov si, offset swapTable - size SwapDriver
clr cx
markEndangeredLoop:
add si, size SwapDriver
cmp si, ds:[swapNext]
je handleMarkedDrivers
test ds:[si].SD_flags, mask SDF_VOLATILE
jz markEndangeredLoop
inc cx
ornf ds:[si].SD_flags, mask SDF_ENDANGERED
jmp markEndangeredLoop
;
; Now look through the entire handle table for memory blocks
; swapped to a driver we marked above. If it's discardable, discard
; it, else swap it into memory.
;
handleMarkedDrivers:
jcxz done ; => no volatile drivers, so don't
; bother... (carry cleared by ==
; comparison w/swapNext)
mov bx, ds:[loaderVars].KLV_handleTableStart
sub bx, size HandleMem
handleLoop:
add bx, size HandleMem
cmp bx, ds:[loaderVars].KLV_lastHandle
je done
tst ds:[bx].HM_addr ; non-memory or resident?
jnz handleLoop ; yes
test ds:[bx].HM_flags, mask HF_SWAPPED
jz handleLoop ; => not swapped, so not our concern
mov si, ds:[bx].HSM_swapDriver
test ds:[si].SD_flags, mask SDF_ENDANGERED
jz handleLoop ; => block is safe where it is
;
; Block is indeed swapped to a volatile device. If it's discardable,
; we discard it now, so as not to overburden the non-volatile swap
; devices in the system.
;
test ds:[bx].HM_flags, mask HF_DISCARDABLE
jnz biffIt
;
; Not discardable, so force it into memory, but allow MemSwapInLow
; to return us an error, in case we've overstressed the system.
;
swapIn:
clr cx ; no special flags (i.e. allow
; errors in allocation)
call MemSwapInLow
jnc handleLoop
error:: ; (a convenient breakpoint for Swat)
;
; Couldn't discard or swap in a block, so clear the SDF_ENDANGERED
; for all drivers before returning carry set.
;
call MemVolatileSwapNowSafeAndSound
stc
done:
;
; All done, for better or for worse.
;
call FarVHeap
.leave
ret
biffIt:
call MemDiscard
jnc handleLoop
;
; Couldn't discard the handle. If it's now on the heap, just
; continue. Otherwise, swap it in.
;
test ds:[bx].HM_flags, mask HF_SWAPPED
jz handleLoop
jmp swapIn
MemPreserveVolatileSwapData endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemVolatileSwapNowSafeAndSound
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Note that the contents of all volatile swap devices are
now safe, happy, etc. etc. etc.
CALLED BY: DosExecUnsuspend, MemPreserveVolatileSwapData
PASS: ds = dgroup
RETURN: nothing
DESTROYED: si
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 5/19/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemVolatileSwapNowSafeAndSound proc near
.enter
mov si, offset swapTable
clearEndangeredLoop:
andnf ds:[si].SD_flags, not mask SDF_ENDANGERED
add si, size SwapDriver
cmp si, ds:[swapNext]
jb clearEndangeredLoop
.leave
ret
MemVolatileSwapNowSafeAndSound endp
DosapplCode ends
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemGetSwapDriverInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns the info about a swap driver that's stored in the
kernel's swap table
CALLED BY: task drivers
PASS: cl = zero-based index of swap driver to get information on
RETURN: carry set if no driver for the passed index
otherwise:
bx:dx = driver strategy routine
al = SwapSpeed giving the speed of the swap device
ah = SwapDriverFlags
di = swap driver id
DESTROYED: nothing
SIDE EFFECTS: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dloft 12/ 1/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemGetSwapDriverInfo proc far
uses ds, cx
.enter
cmp cl, MAX_SWAP_DRIVERS
jge noChance
segmov ds, dgroup, ax
cmp cl, ds:[swapNumDrivers]
jge noChance
mov di, offset swapTable
mov al, size SwapDriver
mul cl
add di, ax ; ds:si -> our driver
movdw bxdx, ds:[di].SD_strategy
mov al, ds:[di].SD_speed
mov ah, ds:[di].SD_flags
clc
done:
.leave
ret
noChance:
stc
jmp done
MemGetSwapDriverInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MemMigrateSwapData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Migrate a swapped block from one swap driver to another.
CALLED BY: GLB (swap drivers)
PASS: bx = handle of block to migrate
di = destination swap driver id
exclusive access to heap variables
RETURN: carry set on error (destination device is full)
DESTROYED: nothing
SIDE EFFECTS: heap modified
PSEUDO CODE/STRATEGY:
MemSwapIn(handle)
MemSwapOut(handle, new driver)
KNOWN BUGS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dloft 12/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MemMigrateSwapData proc far
uses ax, cx, dx, si, di, ds
.enter
push ax, dx, di ; strategy, id
segmov ds, dgroup, cx
clr cx ; no special flags (i.e. allow
; errors in allocation)
; ds:bx = HandleMem
call MemSwapInLow
pop ax, dx, di ; strategy, id
jc done
;
; Stuff the lastSwapFullNotice so that MemSwapOut doesn't try to put up
; a SysNotify box...
;
mov dx, ds:[systemCounter].low
mov ds:[lastSwapFullNotice], dx
mov dx, ds:[bx].HM_addr
call MemSwapOut
done:
.leave
ret
MemMigrateSwapData endp
| 27.186486 | 80 | 0.616413 |
688628f39e01e255ce61d776e3a078750cceb4c7 | 75,763 | asm | Assembly | Objects.asm | ofirrubin/FruitNinja | 2efa9ad4aac99907fa7cc87e67cbbf0eccb051c6 | [
"MIT"
] | null | null | null | Objects.asm | ofirrubin/FruitNinja | 2efa9ad4aac99907fa7cc87e67cbbf0eccb051c6 | [
"MIT"
] | null | null | null | Objects.asm | ofirrubin/FruitNinja | 2efa9ad4aac99907fa7cc87e67cbbf0eccb051c6 | [
"MIT"
] | null | null | null | ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; Life Icon
;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LifeVar db 0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d
db 0d,0d,0d,4d,4d,4d,4d,0d,0d,0d,0d,0d,0d,4d,4d,4d,4d,0d,0d,0d
db 0d,0d,4d,4d,4d,4d,4d,4d,0d,0d,0d,0d,4d,4d,4d,4d,4d,0d,0d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d,4d,4d,4d,4d,4d,4d,4d,4d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d
db 0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d
db 0d,0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d,0d
db 0d,0d,0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d,0d
db 0d,0d,0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d,0d,0d
db 0d,0d,0d,0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d,0d,0d,0d
db 0d,0d,0d,0d,0d,4d,4d,4d,4d,4d,4d,4d,4d,4d,0d,0d,0d,0d,0d,0d
db 0d,0d,0d,0d,0d,0d,0d,4d,4d,4d,4d,4d,4d,0d,0d,0d,0d,0d,0d,0d
db 0d,0d,0d,0d,0d,0d,0d,0d,4d,4d,4d,0d,0d,0d,0d,0d,0d,0d,0d,0d
db 0d,0d,0d,0d,0d,0d,0d,0d,0d,4d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d
db 0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d,0d
;---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;
;
;
; Fruits
;
;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; WaterMelon
;-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
;
WM db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,79h,10d,82h,85h,10d,2h,10d,7Bh,76h,72h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,71h,7Dh,2h,10d,10d,10d,10d,10d,10d,10d,2h,81h,6h,2h,6Ch,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,6Ch,74h,83h,10d,10d,10d,10d,88h,10d,10d,2h,2h,10d,10d,77h,2h,6h,7Ch,82h,73h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Ch,6Ch,78h,85h,10d,10d,10d,2h,81h,10d,10d,10d,84h,10d,10d,10d,7Bh,10d,10d,7Bh,10d,10d,7Ch,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,2h,6Ch,79h,2h,10d,10d,10d,85h,79h,2h,88h,10d,88h,10d,84h,10d,10d,10d,6Ch,2h,75h,2h,10d,10d,7Bh,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Ch,2h,6Ch,79h,2h,10d,10d,10d,82h,73h,10d,10d,10d,10d,85h,76h,80h,10d,10d,82h,10d,2h,6Fh,82h,10d,10d,84h,71h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,2h,6h,78h,2h,10d,10d,10d,10d,6h,2h,73h,10d,10d,10d,10d,6Fh,10d,10d,10d,84h,6h,2h,6h,7Bh,10d,10d,88h,77h,10d,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,2h,10d,76h,10d,10d,10d,10d,10d,6Fh,2h,10d,2h,10d,10d,10d,78h,6h,7Bh,10d,10d,10d,73h,2h,2h,73h,10d,10d,10d,10d,6h,10d,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,2h,10d,73h,84h,10d,10d,10d,10d,6Fh,2h,2h,10d,81h,10d,10d,84h,6h,2h,79h,10d,10d,2h,74h,2h,2h,10d,82h,10d,10d,84h,6h,2h,6Ch,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Ch,2h,2h,6h,81h,10d,10d,10d,80h,6h,2h,2h,2h,73h,10d,10d,10d,10d,6Ch,2h,76h,88h,10d,88h,76h,2h,2h,6h,7Bh,10d,10d,2h,76h,2h,2h,6Fh,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,10d,2h,2h,6Ch,7Dh,10d,10d,10d,83h,71h,2h,2h,2h,6h,7Ch,10d,10d,88h,76h,2h,2h,75h,2h,10d,10d,78h,10d,2h,2h,74h,2h,10d,10d,7Ch,6h,2h,2h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,2h,2h,10d,78h,2h,10d,10d,10d,75h,10d,2h,2h,2h,6h,84h,10d,10d,84h,6h,2h,2h,73h,2h,10d,10d,2h,10d,2h,2h,6Fh,83h,10d,10d,82h,6Fh,2h,2h,6Dh,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,10d,2h,2h,72h,84h,10d,10d,2h,79h,6h,2h,2h,2h,10d,79h,10d,10d,10d,7Bh,6h,2h,2h,72h,10d,10d,10d,7Bh,10d,2h,2h,6h,7Dh,10d,10d,10d,73h,2h,2h,2h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Dh,2h,2h,6Dh,10d,10d,10d,10d,10d,6Dh,2h,2h,2h,2h,6Fh,82h,10d,10d,85h,73h,2h,2h,2h,71h,85h,10d,10d,7Ch,6h,2h,2h,10d,77h,88h,10d,10d,79h,10d,2h,2h,10d,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,2h,2h,10d,78h,2h,10d,10d,84h,71h,2h,2h,2h,2h,10d,77h,88h,10d,10d,10d,6Ch,2h,2h,2h,6h,84h,10d,10d,10d,6h,2h,2h,2h,71h,85h,10d,10d,10d,6Ch,2h,2h,10d,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Ch,2h,2h,71h,84h,10d,10d,2h,78h,10d,2h,2h,2h,2h,6Dh,80h,10d,10d,2h,74h,2h,2h,2h,2h,6Fh,84h,10d,10d,10d,6Ch,2h,2h,2h,6Dh,81h,10d,10d,84h,6h,2h,2h,2h,6Fh,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,2h,2h,6h,7Ch,10d,10d,10d,10d,6Dh,2h,2h,2h,2h,2h,73h,10d,10d,10d,80h,6Dh,2h,2h,2h,2h,6Fh,83h,10d,10d,10d,6Ch,2h,2h,2h,6h,7Bh,10d,10d,2h,74h,2h,2h,2h,6Ch,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6Ch,2h,2h,73h,85h,10d,10d,85h,72h,2h,2h,2h,2h,2h,6h,7Ch,10d,10d,88h,78h,10d,2h,2h,2h,2h,6Fh,83h,10d,10d,10d,6Dh,2h,2h,2h,2h,76h,2h,10d,10d,2h,10d,2h,2h,10d,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,2h,2h,6Ch,7Dh,10d,10d,10d,2h,6h,2h,2h,2h,2h,2h,6h,84h,10d,10d,84h,6h,2h,2h,2h,2h,2h,10d,83h,10d,10d,80h,6Ch,2h,2h,2h,2h,71h,85h,10d,10d,10d,6Ch,2h,2h,2h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,10d,2h,2h,73h,85h,10d,10d,83h,6h,2h,2h,2h,2h,2h,10d,77h,88h,10d,10d,7Bh,6h,2h,2h,2h,2h,2h,10d,82h,10d,10d,80h,6Ch,2h,2h,2h,2h,6Dh,81h,10d,10d,83h,6Fh,2h,2h,2h,6Fh,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,10d,2h,6h,7Bh,10d,10d,10d,2h,10d,2h,2h,2h,2h,2h,6Dh,10d,10d,10d,10d,73h,2h,2h,2h,2h,2h,2h,6Dh,82h,10d,10d,80h,6Dh,2h,2h,2h,2h,6h,7Ch,10d,10d,10d,73h,2h,2h,2h,6Dh,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6Fh,2h,2h,6Fh,83h,10d,10d,84h,6h,2h,2h,2h,2h,2h,2h,71h,85h,10d,10d,81h,6Dh,2h,2h,2h,2h,2h,2h,6Dh,82h,10d,10d,80h,6Dh,2h,2h,2h,2h,10d,78h,10d,10d,88h,76h,2h,2h,2h,6Ch,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6Dh,2h,2h,76h,2h,10d,10d,7Ch,6h,2h,2h,2h,2h,2h,10d,79h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,6Dh,81h,10d,10d,81h,6Dh,2h,2h,2h,2h,2h,73h,2h,10d,10d,7Bh,10d,2h,2h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,2h,6h,7Dh,10d,10d,2h,75h,2h,2h,2h,2h,2h,2h,6Dh,80h,10d,10d,85h,72h,2h,2h,2h,2h,2h,2h,2h,6Dh,82h,10d,10d,80h,6Dh,2h,2h,2h,2h,2h,6h,84h,10d,10d,10d,6Ch,2h,2h,10d,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,2h,2h,6Fh,83h,10d,10d,82h,6Fh,2h,2h,2h,2h,2h,2h,72h,85h,10d,10d,10d,6Ch,2h,2h,2h,2h,2h,2h,2h,10d,82h,10d,10d,80h,6Ch,2h,2h,2h,2h,2h,6Dh,81h,10d,10d,82h,10d,2h,2h,2h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6Fh,2h,2h,73h,10d,10d,10d,7Ch,6h,2h,2h,2h,2h,2h,10d,79h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,6Fh,83h,10d,10d,10d,6Ch,2h,2h,2h,2h,2h,6h,7Dh,10d,10d,85h,71h,2h,2h,2h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,10d,2h,10d,78h,10d,10d,88h,77h,2h,2h,2h,2h,2h,2h,6Dh,80h,10d,10d,85h,72h,2h,2h,2h,2h,2h,2h,2h,2h,71h,85h,10d,10d,7Dh,6h,2h,2h,2h,2h,2h,10d,79h,10d,10d,2h,75h,2h,2h,2h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6Ch,2h,6h,7Bh,10d,10d,10d,73h,2h,2h,2h,2h,2h,2h,72h,85h,10d,10d,80h,6Ch,2h,2h,2h,2h,2h,2h,2h,2h,73h,2h,10d,10d,2h,10d,2h,2h,2h,2h,2h,2h,76h,2h,10d,10d,78h,10d,2h,10d,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,2h,6Ch,10d,10d,10d,84h,6h,2h,2h,2h,2h,2h,10d,79h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,77h,88h,10d,88h,77h,2h,2h,2h,2h,2h,2h,2h,73h,10d,10d,10d,2h,10d,2h,10d,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,10d,2h,10d,82h,10d,10d,81h,6Dh,2h,2h,2h,2h,2h,6Ch,10d,10d,10d,85h,72h,2h,2h,2h,2h,2h,2h,2h,2h,10d,2h,10d,10d,2h,73h,2h,2h,2h,2h,2h,2h,2h,71h,85h,10d,10d,7Ch,6h,2h,10d,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,10d,2h,6h,84h,10d,10d,10d,6h,2h,2h,2h,2h,2h,71h,85h,10d,10d,80h,6Dh,2h,2h,2h,2h,2h,2h,2h,2h,6Ch,10d,10d,10d,85h,6h,2h,2h,2h,2h,2h,2h,2h,6h,84h,10d,10d,10d,6h,2h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,10d,2h,73h,10d,10d,10d,7Bh,10d,2h,2h,2h,2h,10d,78h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,10d,82h,10d,10d,81h,6Dh,2h,2h,2h,2h,2h,2h,2h,6Fh,84h,10d,10d,10d,6Ch,2h,6Ch,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,2h,2h,74h,2h,10d,10d,79h,10d,2h,2h,2h,2h,6Ch,10d,10d,10d,10d,73h,2h,2h,2h,2h,2h,2h,2h,2h,2h,71h,85h,10d,10d,10d,6h,2h,2h,2h,2h,2h,2h,2h,6Fh,83h,10d,10d,10d,6Ch,2h,10d,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,2h,2h,76h,88h,10d,88h,77h,2h,2h,2h,2h,2h,71h,85h,10d,10d,80h,6Dh,2h,2h,2h,2h,2h,2h,2h,2h,2h,75h,2h,10d,10d,2h,10d,2h,2h,2h,2h,2h,2h,2h,6Fh,83h,10d,10d,10d,6Ch,2h,6Fh,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,2h,10d,78h,10d,10d,2h,75h,2h,2h,2h,2h,10d,79h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,10d,2h,10d,10d,2h,75h,2h,2h,2h,2h,2h,2h,2h,2h,6Fh,83h,10d,10d,80h,6Dh,2h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,10d,10d,79h,10d,10d,2h,74h,2h,2h,2h,2h,6Dh,80h,10d,10d,85h,72h,2h,2h,2h,2h,2h,2h,2h,2h,2h,6Ch,80h,10d,10d,85h,71h,2h,2h,2h,2h,2h,2h,2h,2h,10d,83h,10d,10d,80h,6Ch,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,10d,79h,10d,10d,2h,74h,2h,2h,2h,2h,72h,85h,10d,10d,80h,6Ch,2h,2h,2h,2h,2h,2h,2h,2h,2h,71h,85h,10d,10d,80h,6Ch,2h,2h,2h,2h,2h,2h,2h,2h,10d,82h,10d,10d,80h,6Ch,6Dh,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6Ch,10d,79h,10d,10d,2h,73h,2h,2h,2h,10d,79h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,10d,79h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,10d,82h,10d,10d,80h,6Ch,6Fh,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6Dh,10d,79h,10d,10d,2h,73h,2h,2h,2h,6Dh,80h,10d,10d,85h,71h,2h,2h,2h,2h,2h,2h,2h,2h,2h,10d,81h,10d,10d,85h,72h,2h,2h,2h,2h,2h,2h,2h,2h,2h,10d,82h,10d,10d,80h,6Dh,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6Fh,10d,79h,10d,10d,2h,73h,2h,2h,2h,71h,85h,10d,10d,80h,6Ch,2h,2h,2h,2h,2h,2h,2h,2h,2h,76h,2h,10d,10d,10d,6Dh,2h,2h,2h,2h,2h,2h,2h,2h,2h,10d,82h,10d,10d,80h,6Fh,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,10d,79h,10d,10d,2h,73h,2h,2h,10d,78h,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,6Ch,10d,10d,10d,2h,75h,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,6Fh,83h,10d,10d,80h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6Ch,79h,10d,10d,2h,73h,2h,2h,6Ch,10d,10d,10d,10d,73h,2h,2h,2h,2h,2h,2h,2h,2h,2h,73h,10d,10d,10d,81h,10d,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,71h,85h,10d,10d,2h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6Dh,79h,10d,10d,2h,73h,2h,2h,6h,84h,10d,10d,81h,6Dh,2h,2h,2h,2h,2h,2h,2h,2h,6Ch,7Dh,10d,10d,88h,78h,10d,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,73h,2h,10d,10d,72h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6Fh,79h,10d,10d,2h,73h,2h,2h,76h,2h,10d,10d,7Bh,6h,2h,2h,2h,2h,2h,2h,2h,2h,73h,10d,10d,10d,83h,6h,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,10d,79h,10d,10d,80h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,79h,10d,10d,2h,73h,2h,6h,7Ch,10d,10d,2h,74h,2h,2h,2h,2h,2h,2h,2h,2h,6Ch,10d,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,6Dh,10d,10d,10d,72h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,75h,10d,10d,2h,73h,2h,10d,82h,10d,10d,83h,6Fh,2h,2h,2h,2h,2h,2h,2h,2h,73h,10d,10d,10d,83h,6h,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,73h,10d,10d,7Ch,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,2h,10d,2h,73h,2h,73h,10d,10d,10d,10d,6h,2h,2h,2h,2h,2h,2h,2h,6Ch,10d,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,6Ch,10d,10d,10d,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,7Bh,10d,2h,74h,10d,78h,10d,10d,88h,78h,10d,2h,2h,2h,2h,2h,2h,2h,73h,10d,10d,10d,83h,6h,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,10d,75h,2h,10d,73h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,10d,10d,76h,6Ch,10d,10d,10d,85h,72h,2h,2h,2h,2h,2h,2h,2h,6Dh,10d,10d,10d,10d,79h,10d,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,71h,83h,10d,2h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,76h,10d,78h,6Fh,82h,10d,10d,81h,6Dh,2h,2h,2h,2h,2h,2h,10d,76h,2h,10d,10d,82h,6Fh,2h,2h,2h,2h,2h,2h,2h,2h,2h,2h,6h,80h,10d,10d,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,7Dh,77h,73h,10d,10d,10d,7Dh,6h,2h,2h,2h,2h,2h,2h,6Fh,81h,10d,10d,2h,77h,10d,2h,2h,2h,2h,2h,2h,2h,2h,10d,72h,81h,10d,82h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,77h,88h,10d,10d,78h,10d,2h,2h,2h,2h,2h,6h,79h,88h,10d,10d,80h,6Dh,2h,2h,2h,2h,2h,2h,2h,2h,6Dh,77h,84h,10d,83h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,2h,10d,10d,10d,73h,2h,2h,2h,2h,2h,2h,71h,84h,10d,10d,10d,75h,2h,2h,2h,2h,2h,2h,2h,6Dh,75h,10d,2h,10d,81h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,71h,85h,10d,81h,10d,2h,2h,2h,2h,2h,6Ch,7Ch,10d,10d,10d,7Dh,6Ch,2h,2h,2h,2h,2h,6Ch,74h,10d,10d,10d,10d,7Dh,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,7Ch,74h,10d,2h,2h,2h,2h,2h,73h,10d,10d,10d,84h,71h,2h,2h,2h,2h,2h,6Ch,2h,10d,10d,10d,2h,77h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Dh,2h,2h,2h,2h,2h,6Ch,10d,10d,10d,10d,2h,6h,2h,2h,2h,2h,2h,73h,10d,10d,10d,80h,71h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,6h,2h,2h,2h,74h,10d,10d,10d,83h,6Fh,2h,2h,2h,2h,2h,2h,71h,84h,83h,75h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6Fh,6h,6h,7Ch,10d,10d,10d,78h,10d,2h,2h,2h,2h,2h,2h,10d,71h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,73h,7Dh,82h,10d,6Fh,2h,2h,10d,2h,6Dh,6Fh,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
db 6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h,6h
WMB db 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,71h,87h,10d,86h,2d,79h,77h,6,83h,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,10d,81h,10d,10d,10d,10d,85h,88h,87h,82h,87h,6,6,6,6,6,6,6,6,6,6,6,6,10d,76h,6Fh,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,73h,82h,10d,10d,10d,10d,10d,88h,87h,10d,10d,91h,74h,6,6,6,6,6,6,6,6,6,6,6,6,90h,71h,2d,6Eh,10d,6,6,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,74h,83h,10d,10d,10d,88h,10d,10d,87h,84h,10d,10d,94h,6,6,6,6,6,6,6,6,6,6,6,6,77h,8Ch,71h,2d,6Fh,81h,86h,10d,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,6Eh,71h,81h,10d,10d,10d,85h,83h,10d,10d,86h,7Fh,87h,8Fh,87h,6,6,6,6,6,6,6,6,6,6,6,6,8Fh,88h,73h,2d,6Eh,81h,10d,10d,7Eh,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,10d,6Fh,80h,10d,10d,10d,85h,79h,81h,10d,10d,84h,78h,84h,92h,78h,6,6,6,6,6,6,6,6,6,6,6,77h,8Fh,88h,77h,2d,10d,2d,10d,10d,10d,2d,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,2d,10d,7Ch,10d,10d,10d,86h,77h,71h,83h,10d,10d,82h,71h,7Fh,94h,6,6,6,6,6,6,6,6,6,6,6,6,8Eh,10d,10d,2d,10d,2d,72h,85h,10d,10d,82h,6Fh,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,2d,10d,76h,87h,10d,10d,87h,2d,2d,72h,86h,10d,10d,7Fh,10d,7Fh,8Dh,6,6,6,6,6,6,6,6,6,6,6,77h,8Dh,10d,10d,7Dh,2d,2d,10d,7Fh,10d,10d,87h,10d,10d,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,10d,10,71h,83h,10d,10d,10d,7Eh,10d,2d,10d,87h,10d,10d,7Ch,2d,85h,7Eh,6,6,6,6,6,6,6,6,6,6,6,8Bh,85h,10d,10d,80h,10d,2d,10d,78h,10d,10d,10d,7Ch,2d,10d,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,10d,2d,10d,7Ch,10d,10d,10d,82h,6,2d,10d,78h,10d,10d,10d,78h,2d,8Fh,73h,6,6,6,6,6,6,6,6,6,6,76h,2d,83h,10d,10d,81h,6Eh,2d,2d,71h,85h,10d,10d,83h,6Fh,2d,10d,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6Fh,2d,10d,10d,86h,10d,10d,87h,76h,10d,2d,2d,7Ch,10d,10d,87h,10d,6Fh,94h,6,6,6,6,6,6,6,6,6,6,6,85h,10d,81h,10d,10d,83h,6Fh,2d,2d,10d,7Fh,10d,10d,87h,10d,2d,2d,6Fh,6,6,6,6,6
db 6,6,6,6,6,6,6,10d,2d,6Eh,7Fh,10d,10d,10d,7Dh,10d,2d,2d,10d,7Fh,10d,10d,86h,72h,2d,91h,6,6,6,6,6,6,6,6,6,6,6,81h,10d,81h,10d,10d,84h,6,2d,2d,10d,79h,10d,10d,10d,2d,2d,2d,2d,6,6,6,6,6
db 6,6,6,6,6,6,10d,2d,10d,76h,87h,10d,10d,84h,72h,2d,2d,2d,6Fh,83h,10d,10d,83h,6,2d,8Bh,71h,6,6,6,6,6,6,6,6,6,71h,80h,10d,7Fh,10d,10d,85h,72h,2d,2d,2d,72h,86h,10d,10d,81h,10d,2d,2d,10d,6,6,6,6
db 6,6,6,6,6,6Fh,2d,2d,6Eh,80h,10d,10d,10d,2d,2d,2d,2d,2d,72h,86h,10d,10d,80h,10d,2d,86h,74h,6,6,6,6,6,6,6,6,6,71h,7Eh,2d,7Dh,10d,10d,86h,73h,2d,2d,2d,6Eh,81h,10d,10d,85h,72h,2d,2d,2d,6,6,6,6
db 6,6,6,6,6,2d,2d,10d,10d,87h,10d,10d,83h,6,2d,2d,2d,10d,77h,10d,10d,10d,2d,2d,2d,7Fh,79h,6,6,6,6,6,6,6,6,6,73h,7Dh,2d,7Ch,10d,10d,87h,74h,2d,2d,2d,2d,2d,10d,10d,88h,78h,10d,2d,2d,10d,6,6,6
db 6,6,6,6,6Fh,2d,2d,10d,7Fh,10d,10d,10d,2d,2d,2d,2d,2d,2d,7Ch,10d,10d,87h,76h,2d,2d,78h,81h,6,6,6,6,6,6,6,6,6,10d,2d,10d,2d,10d,10d,87h,10d,2d,2d,2d,10d,76h,87h,10d,10d,7Eh,10d,2d,2d,10d,6,6,6
db 6,6,6,6,2d,2d,2d,73h,86h,10d,10d,84h,71h,2d,2d,2d,2d,6Eh,81h,10d,10d,85h,71h,2d,2d,73h,88h,6,6,6,6,6,6,6,6,6,77h,2d,10d,2d,10d,10d,88h,76h,2d,2d,2d,2d,6,84h,10d,10d,83h,6Fh,2d,2d,2d,6Fh,6,6
db 6,6,6,6,2d,2d,2d,7Ch,10d,10d,10d,2d,2d,2d,2d,2d,2d,71h,85h,10d,10d,81h,6Eh,2d,2d,6Eh,8Bh,6,6,6,6,6,6,6,6,6,2d,77h,10d,79h,10d,10d,88h,77h,10d,2d,2d,2d,10d,7Fh,10d,10d,86h,73h,2d,2d,2d,10d,6,6
db 6,6,6,10d,2d,2d,6,83h,10d,10d,85h,72h,2d,2d,2d,2d,2d,10d,87h,10d,10d,7Dh,2d,2d,2d,10d,8Fh,6,6,6,6,6,6,6,6,6,7Eh,76h,10d,78h,10d,10d,10d,78h,10d,2d,2d,2d,10d,2d,10d,10d,10d,78h,10d,2d,2d,10d,6,6
db 6,6,6,10d,2d,10d,77h,88h,10d,10d,7Fh,10d,2d,2d,2d,2d,10d,79h,10d,10d,10d,78h,10d,2d,2d,2d,10d,71h,6,6,6,6,6,6,6,6,82h,74h,10d,78h,10d,10d,10d,78h,10d,2d,2d,2d,2d,10d,87h,10d,10d,7Eh,2d,2d,2d,2d,6Fh,6
db 6,6,6Fh,2d,2d,10d,7Fh,10d,10d,87h,76h,10d,2d,2d,2d,2d,10d,7Eh,10d,10d,87h,74h,2d,2d,2d,2d,83h,73h,6,6,6,6,6,6,6,6,86h,73h,10d,78h,10d,10d,10d,78h,10d,2d,2d,2d,2d,71h,84h,10d,10d,82h,6Eh,2d,2d,2d,6Eh,6
db 6,6,10d,2d,2d,71h,85h,10d,10d,83h,6,2d,2d,2d,2d,2d,6Eh,81h,10d,10d,84h,71h,2d,2d,2d,2d,7Dh,79h,6,6,6,6,6,6,6,6,10d,72h,10d,78h,10d,10d,10d,78h,10d,2d,2d,2d,2d,10d,80h,10d,10d,85h,72h,2d,2d,2d,10d,6
db 6,6,2d,2d,10d,77h,88h,10d,10d,7Ch,2d,2d,2d,2d,2d,2d,6,84h,10d,10d,81h,10d,2d,2d,2d,2d,76h,7Fh,6,6,6,6,6,6,6,6,8Ch,6,10d,77h,88h,10d,10d,78h,10d,2d,2d,2d,2d,2d,7Ch,10d,10d,87h,76h,2d,2d,2d,10d,6
db 6,6,2d,2d,10d,7Eh,10d,10d,87h,76h,10d,2d,2d,2d,2d,2d,73h,86h,10d,10d,7Eh,10d,2d,2d,2d,2d,71h,87h,6,6,6,6,6,6,6,6,8Eh,6Fh,10d,77h,88h,10d,10d,78h,10d,2d,2d,2d,2d,10d,78h,10d,10d,10d,2d,10d,2d,2d,10d,6
db 6,6Fh,2d,2d,6Fh,83h,10d,10d,84h,6,2d,2d,2d,2d,2d,2d,76h,87h,10d,10d,2d,2d,2d,2d,2d,2d,10d,10d,6,6,6,6,6,6,6,6,93h,6Eh,10d,77h,88h,10d,10d,79h,10d,2d,2d,2d,2d,2d,73h,87h,10d,10d,7Eh,10d,2d,2d,2d,6
db 6,6Eh,2d,2d,73h,86h,10d,10d,7Fh,10d,2d,2d,2d,2d,2d,10d,79h,10d,10d,10d,77h,10d,2d,2d,2d,2d,2d,10d,6,6,6,6,6,6,6,6,92h,10d,10d,77h,88h,10d,10d,78h,10d,2d,2d,2d,2d,2d,6,84h,10d,10d,81h,6Eh,2d,2d,2d,6
db 6,10d,2d,10d,76h,88h,10d,10d,2d,2d,2d,2d,2d,2d,2d,2d,7Ch,10d,10d,87h,10d,2d,2d,2d,2d,2d,2d,86h,6,6,6,6,6,6,6,6,91h,10d,10d,78h,10d,10d,10d,78h,10d,2d,2d,2d,2d,2d,6Eh,81h,10d,10d,85h,71h,2d,2d,2d,6
db 6,2d,2d,10d,2d,10d,10d,88h,77h,10d,2d,2d,2d,2d,2d,10d,7Fh,10d,10d,85h,72h,2d,2d,2d,2d,2d,2d,86h,72h,6,6,6,6,6,6,71h,90h,2d,10d,2d,10d,10d,88h,76h,10d,2d,2d,2d,2d,2d,2d,7Dh,10d,10d,87h,74h,2d,2d,2d,6
db 6,10d,2d,2d,7Eh,10d,10d,86h,73h,2d,2d,2d,2d,2d,2d,6Eh,81h,10d,10d,84h,6,2d,2d,2d,2d,2d,10d,8Dh,6,6,6,6,6,6,6,72h,85h,2d,2d,7Ch,10d,10d,87h,10d,2d,2d,2d,2d,2d,2d,10d,79h,10d,10d,10d,77h,10d,2d,2d,6
db 6,10d,2d,10d,80h,10d,10d,85h,71h,2d,2d,2d,2d,2d,2d,6,84h,10d,10d,81h,10d,2d,2d,2d,2d,2d,6,10d,6,6,6,6,6,6,6,80h,72h,2d,10d,7Fh,10d,10d,85h,72h,2d,2d,2d,2d,2d,2d,2d,76h,87h,10d,10d,2d,10d,2d,2d,6
db 6,10d,2d,10d,81h,10d,10d,84h,6,2d,2d,2d,2d,2d,2d,72h,86h,10d,10d,7Fh,10d,2d,2d,2d,2d,2d,78h,7Eh,6,6,6,6,6,6,6,88h,2d,2d,6Fh,82h,10d,10d,83h,6Fh,2d,2d,2d,2d,2d,2d,2d,73h,86h,10d,10d,7Dh,2d,2d,2d,6
db 6,10d,2d,6Eh,81h,10d,10d,83h,6Fh,2d,2d,2d,2d,2d,2d,10d,87h,10d,10d,7Ch,2d,2d,2d,2d,2d,2d,82h,74h,6,6,6,6,6,6,79h,77h,2d,2d,71h,85h,10d,10d,81h,10d,2d,2d,2d,2d,2d,2d,2d,72h,85h,10d,10d,7Fh,10d,2d,2d,6
db 6,10d,2d,6Eh,81h,10d,10d,83h,6Fh,2d,2d,2d,2d,2d,10d,78h,88h,10d,10d,79h,10d,2d,2d,2d,2d,2d,10d,6,6,6,6,6,6,6,10d,2d,2d,2d,10d,87h,10d,10d,7Dh,2d,2d,2d,2d,2d,2d,2d,2d,71h,85h,10d,10d,80h,10d,2d,10d,6
db 6,10d,2d,10d,81h,10d,10d,83h,6Fh,2d,2d,2d,2d,2d,10d,2d,10d,10d,88h,76h,2d,2d,2d,2d,2d,10d,10d,6,6,6,6,6,6,74h,7Eh,2d,2d,10d,78h,10d,10d,10d,78h,10d,2d,2d,2d,2d,2d,2d,2d,6,84h,10d,10d,81h,10d,2d,2d,6
db 6,10d,2d,10d,81h,10d,10d,84h,6,2d,2d,2d,2d,2d,2d,7Ch,10d,10d,87h,74h,2d,2d,2d,2d,2d,73h,80h,6,6,6,6,6,6,87h,10d,2d,2d,2d,7Dh,10d,10d,87h,10d,2d,2d,2d,2d,2d,2d,2d,2d,6,84h,10d,10d,81h,6Eh,2d,10d,6
db 6,10d,2d,10d,80h,10d,10d,84h,71h,2d,2d,2d,2d,2d,10d,7Fh,10d,10d,85h,71h,2d,2d,2d,2d,2d,7Dh,10d,6,6,6,6,6,71h,84h,2d,2d,2d,10d,80h,10d,10d,85h,71h,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,81h,10d,2d,6Eh,6
db 6,2d,2d,10d,7Fh,10d,10d,85h,72h,2d,2d,2d,2d,2d,6Eh,82h,10d,10d,83h,6Fh,2d,2d,2d,2d,2d,86h,6,6,6,6,6,6,82h,71h,2d,2d,2d,71h,84h,10d,10d,81h,6Eh,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,81h,6Eh,2d,6Fh,6
db 6,10d,2d,2d,7Dh,10d,10d,86h,73h,2d,2d,2d,2d,2d,71h,85h,10d,10d,80h,10d,2d,2d,2d,2d,10d,10d,6,6,6,6,6,6,88h,2d,2d,2d,10d,76h,87h,10d,10d,7Dh,2d,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,81h,6Eh,10d,6,6
db 6,6Eh,2d,2d,2d,10d,10d,87h,10d,2d,2d,2d,2d,2d,73h,86h,10d,10d,7Eh,10d,2d,2d,2d,2d,6Fh,82h,6,6,6,6,6,2d,77h,2d,2d,2d,2d,7Dh,10d,10d,88h,77h,10d,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,81h,6Eh,10d,6,6
db 6,6Fh,2d,10d,78h,10d,10d,10d,77h,10d,2d,2d,2d,2d,76h,88h,10d,10d,2d,10d,2d,2d,2d,2d,77h,77h,6,6,6,6,6,8Bh,10d,2d,2d,2d,6,84h,10d,10d,84h,71h,2d,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,82h,6Eh,6Eh,6,6
db 6,6,2d,2d,76h,88h,10d,10d,2d,10d,2d,2d,2d,10d,79h,10d,10d,10d,77h,10d,2d,2d,2d,2d,81h,6,6,6,6,6,10d,7Dh,2d,2d,2d,10d,78h,88h,10d,10d,7Eh,10d,2d,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,82h,6Eh,6,6,6
db 6,6,2d,2d,73h,86h,10d,10d,7Eh,10d,2d,2d,2d,2d,7Ch,10d,10d,87h,10d,2d,2d,2d,2d,2d,86h,6,6,6,6,6,10d,10d,2d,2d,2d,6Eh,81h,10d,10d,87h,76h,10d,2d,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,81h,71h,6,6,6
db 6,6,10d,2d,6,84h,10d,10d,82h,6Eh,2d,2d,2d,10d,7Fh,10d,10d,86h,72h,2d,2d,2d,2d,10d,82h,6,6,6,6,72h,83h,2d,2d,2d,10d,10d,87h,10d,10d,82h,6Fh,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,6Fh,83h,10d,10d,80h,71h,6,6,6
db 6,6,6Fh,2d,6Eh,81h,10d,10d,85h,71h,2d,2d,2d,10d,81h,10d,10d,84h,6,2d,2d,2d,2d,73h,78h,6,6,6,6,85h,71h,2d,2d,2d,10d,7Eh,10d,10d,10d,79h,10d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,71h,85h,10d,10d,80h,6,6,6,6
db 6,6,6,10d,2d,7Dh,10d,10d,87h,10d,2d,2d,2d,6Fh,83h,10d,10d,82h,6Eh,2d,2d,2d,2d,7Ch,71h,6,6,6,6,88h,2d,2d,2d,2d,73h,86h,10d,10d,84h,71h,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,73h,86h,10d,10d,76h,6,6,6,6
db 6,6,6,10d,10d,78h,10d,10d,10d,78h,10d,2d,2d,71h,85h,10d,10d,81h,10d,2d,2d,2d,2d,82h,6,6,6,6,7Eh,76h,2d,2d,2d,10d,7Eh,10d,10d,10d,7Ch,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,10d,78h,88h,10d,86h,6,6,6,6,6
db 6,6,6,6,2d,10d,87h,10d,10d,7Dh,2d,2d,2d,72h,86h,10d,10d,7Eh,10d,2d,2d,2d,10d,82h,6,6,6,6,10d,10d,2d,2d,2d,73h,86h,10d,10d,85h,72h,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,10d,7Eh,10d,10d,76h,6,6,6,6,6
db 6,6,6,6,10d,71h,85h,10d,10d,81h,6Eh,2d,2d,10d,87h,10d,10d,2d,2d,2d,2d,2d,6Fh,79h,6,6,6,77h,2d,2d,2d,2d,10d,7Eh,10d,10d,10d,7Ch,10d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,71h,84h,10d,84h,6,6,6,6,6,6
db 6,6,6,6,6Fh,10d,81h,10d,10d,84h,6,2d,10d,76h,88h,10d,10d,79h,10d,2d,2d,2d,77h,72h,6,6,6,10d,10d,2d,2d,2d,73h,86h,10d,10d,85h,72h,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,10d,10d,72h,6,6,6,6,6,6
db 6,6,6,6,6,6,7Dh,10d,10d,87h,73h,2d,10d,79h,10d,10d,10d,78h,10d,2d,2d,2d,7Eh,6,6,6,73h,82h,2d,2d,2d,10d,7Eh,10d,10d,10d,7Ch,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,72h,84h,10d,2d,6,6,6,6,6,6,6
db 6,6,6,6,6,6,2d,88h,10d,10d,78h,2d,10d,2d,10d,10d,87h,10d,2d,2d,2d,2d,80h,6,6,6,86h,6,2d,2d,10d,10d,86h,10d,10d,85h,72h,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,6Eh,7Eh,10d,84h,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,74h,86h,10d,10d,7Ch,2d,2d,7Ch,10d,10d,86h,73h,2d,2d,2d,10d,2d,6,6,6,87h,2d,2d,2d,6Eh,7Fh,10d,10d,10d,7Ch,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,10d,2d,88h,88h,71h,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,7Eh,10d,10d,81h,10d,2d,7Eh,10d,10d,86h,72h,2d,2d,2d,72h,73h,6,6,80h,10d,2d,2d,10d,77h,87h,10d,10d,84h,71h,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,10d,79h,87h,10d,73h,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,85h,10d,85h,71h,10d,7Fh,10d,10d,85h,71h,2d,2d,2d,2d,6,6,6,8Bh,10d,2d,2d,6Fh,82h,10d,10d,10d,2d,2d,2d,2d,2d,2d,2d,2d,2d,2d,10d,6Fh,2d,87h,10d,10d,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,71h,88h,88h,77h,10d,80h,10d,10d,84h,6,2d,2d,2d,80h,6,6,79h,2d,2d,2d,2d,2d,10d,10d,10d,82h,6,2d,2d,2d,2d,2d,2d,2d,2d,10d,74h,80h,88h,10d,76h,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,72h,88h,2d,6Fh,80h,10d,10d,84h,6,2d,2d,10d,7Dh,6,6,8Bh,10d,2d,2d,73h,84h,10d,10d,87h,77h,10d,2d,2d,2d,2d,2d,2d,10d,73h,7Eh,86h,10d,10d,74h,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,71h,79h,6Fh,81h,10d,10d,83h,6Fh,2d,2d,10d,74h,6,74h,81h,2d,2d,10d,7Eh,10d,10d,10d,7Fh,10d,2d,2d,2d,2d,2d,2d,73h,7Dh,86h,10d,10d,86h,71h,6,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,80h,10d,10d,83h,6Fh,2d,2d,73h,6,6,10d,6Fh,2d,10d,74h,86h,10d,10d,85h,73h,2d,2d,2d,2d,2d,10d,10d,84h,10d,10d,10d,7Fh,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,78h,10d,10d,7Fh,10d,2d,2d,2d,6,73h,87h,2d,2d,10d,7Eh,10d,10d,10d,7Ch,10d,2d,2d,2d,2d,2d,10d,7Eh,10d,10d,86h,74h,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
db 6,6,6,6,6,6,6,6,6,6,6,6,6,6,72h,83h,73h,10d,2d,2d,7Fh,6,96h,72h,2d,10d,10d,86h,10d,10d,84h,71h,2d,2d,2d,2d,2d,2d,2d,2d,88h,10d,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; Apple
;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Apple db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,6d,4d,6d,6d,6d,4d,6d,6d,6d,6d,6d,6d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,6d,4d,4d,4d,4d,6d,4d,6d,6d,4d,6d,6d,6d,2d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,4d,6d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,2d,6d,2d,2d,2d,6d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,2d,2d,2d,4d,2d,6d,4d,4d,6d,4d,6d,4d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,4d,4d,00d,00d,4d,6d,6d,6d,6d,4d,4d,4d,6d,6d,4d,6d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,00d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,00d,00d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,00d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d
db 6d,6d,4d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d
db 6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,4d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,4d,6d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d
db 6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d
db 6d,6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,4d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,6d,4d,6d,4d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,6d,6d,4d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,6d,4d,4d,4d,6d,4d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,4d,4d,6d,6d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
BApple db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,2d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,4d,4d,6d,6d,2d,2d,2d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,2d,2d,2d,2d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,00d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,00d,00d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,4d,4d,00d,00d,00d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,00d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,6d,4d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d
db 6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d,6d,6d
db 6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d,6d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,4d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,4d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d
db 6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d
db 6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d
db 6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,4d,4d,4d,4d,4d,4d,4d,4d,4d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; Lemon
;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Lemon db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
BLemon db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,5Ah,6d,6d,6d,14d,48h,14d,6d,6d,6d,6d,61h,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,61h,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,64h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,64h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,61h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,48h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,14d,6d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,49h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,61h,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,61h,6d,14d,14d,14d,5Ah,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,6d,14d,14d,14d,6d,14d,6d,64h,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,14d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,6d,14d,14d,14d,14d,6d,14d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,61h,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,64h,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,48h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,61h,6d,49h,6d,14d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,62h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,62h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,14d,14d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,61h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,14d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,64h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,48h,6d,6d,6d,6d,14d,14d,49h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,48h,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,14d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,58h,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,64h,6d,6d,6d,6d,64h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,61h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,61h,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,14d,14d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,6d,6d,14d,14d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,64h,6d,14d,14d,14d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,14d,14d,6d,6d,6d,6d,14d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,5Ah,14d,6d,14d,6d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,14d,6d,14d,14d,14d,14d,39h,6d,14d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,14d,14d,14d,14d,6d,14d,14d,6d,14d,14d,14d,14d,14d,14d,6d,14d,48h,14d,6d,61h,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,55h,6d,6d,14d,6d,6d,6d,6d,6d,62h,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
db 6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d,6d
| 95.660354 | 226 | 0.656231 |
ececccf42589f0858bfd28e547fb3b8b9c476c4e | 3,925 | asm | Assembly | test/filters-cases/avr-loop.asm | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 4,668 | 2017-01-02T19:35:10.000Z | 2020-05-16T03:18:45.000Z | test/filters-cases/avr-loop.asm | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 1,750 | 2017-01-02T19:37:06.000Z | 2020-05-16T14:54:29.000Z | test/filters-cases/avr-loop.asm | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 620 | 2017-01-03T00:29:17.000Z | 2020-05-14T09:27:47.000Z | .file "example.cpp"
__SREG__ = 0x3f
__SP_H__ = 0x3e
__SP_L__ = 0x3d
__CCP__ = 0x34
__tmp_reg__ = 0
__zero_reg__ = 1
.stabs "/compiler-explorer/",100,0,4,.Ltext0
.stabs "/tmp/compiler-explorer-compiler116922-97-ldr5x6/example.cpp",100,0,4,.Ltext0
.text
.Ltext0:
.stabs "gcc2_compiled.",60,0,0,0
.stabs "__builtin_va_list:t(0,1)=*(0,2)=(0,2)",128,0,0,0
.stabs "complex long double:t(0,3)=R3;8;0;",128,0,0,0
.stabs "complex double:t(0,4)=R3;8;0;",128,0,0,0
.stabs "complex float:t(0,5)=R3;8;0;",128,0,0,0
.stabs "complex int:t(0,6)=s4real:(0,7)=r(0,7);-32768;32767;,0,16;imag:(0,7),16,16;;",128,0,0,0
.stabs "long long unsigned int:t(0,8)=@s64;r(0,8);0;01777777777777777777777;",128,0,0,0
.stabs "long unsigned int:t(0,9)=@s32;r(0,9);0;037777777777;",128,0,0,0
.stabs "unsigned int:t(0,10)=r(0,10);0;0177777;",128,0,0,0
.stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
.stabs "long long int:t(0,12)=@s64;r(0,12);01000000000000000000000;0777777777777777777777;",128,0,0,0
.stabs "long int:t(0,13)=@s32;r(0,13);020000000000;017777777777;",128,0,0,0
.stabs "int:t(0,7)",128,0,0,0
.stabs "signed char:t(0,14)=@s8;r(0,14);-128;127;",128,0,0,0
.stabs "char:t(0,15)=r(0,15);0;127;",128,0,0,0
.stabs "signed:t(0,7)",128,0,0,0
.stabs "unsigned long:t(0,9)",128,0,0,0
.stabs "long long unsigned:t(0,8)",128,0,0,0
.stabs "short int:t(0,16)=r(0,16);-32768;32767;",128,0,0,0
.stabs "short unsigned int:t(0,17)=r(0,17);0;0177777;",128,0,0,0
.stabs "unsigned short:t(0,17)",128,0,0,0
.stabs "float:t(0,18)=r(0,7);4;0;",128,0,0,0
.stabs "double:t(0,19)=r(0,7);4;0;",128,0,0,0
.stabs "long double:t(0,20)=r(0,7);4;0;",128,0,0,0
.stabs "void:t(0,2)",128,0,0,0
.stabs "wchar_t:t(0,21)=r(0,21);-32768;32767;",128,0,0,0
.stabs "bool:t(0,22)=@s8;-16;",128,0,0,0
.stabs "__vtbl_ptr_type:t(0,23)=*(0,24)=f(0,7)",128,0,0,0
.stabs "foo():F(0,7)",36,0,2,foo()
.global foo()
.type foo(), @function
foo():
.stabd 46,0,0
.stabn 68,0,2,.LM0-.LFBB1
.LM0:
.LFBB1:
push r29
push r28
rcall .
rcall .
in r28,__SP_L__
in r29,__SP_H__
/* prologue: function */
/* frame size = 4 */
/* stack size = 6 */
.L__stack_usage = 6
.LBB2:
.stabn 68,0,3,.LM1-.LFBB1
.LM1:
std Y+2,__zero_reg__
std Y+1,__zero_reg__
.LBB3:
.stabn 68,0,4,.LM2-.LFBB1
.LM2:
std Y+4,__zero_reg__
std Y+3,__zero_reg__
rjmp .L2
.L4:
.stabn 68,0,5,.LM3-.LFBB1
.LM3:
rcall bar()
ldd r18,Y+1
ldd r19,Y+2
add r24,r18
adc r25,r19
std Y+2,r25
std Y+1,r24
.stabn 68,0,4,.LM4-.LFBB1
.LM4:
ldd r24,Y+3
ldd r25,Y+4
adiw r24,1
std Y+4,r25
std Y+3,r24
.L2:
.stabn 68,0,4,.LM5-.LFBB1
.LM5:
ldi r18,lo8(1)
ldd r24,Y+3
ldd r25,Y+4
cpi r24,100
cpc r25,__zero_reg__
brlt .L3
ldi r18,lo8(0)
.L3:
tst r18
brne .L4
.LBE3:
.stabn 68,0,7,.LM6-.LFBB1
.LM6:
ldd r24,Y+1
ldd r25,Y+2
/* epilogue start */
.LBE2:
.stabn 68,0,8,.LM7-.LFBB1
.LM7:
pop __tmp_reg__
pop __tmp_reg__
pop __tmp_reg__
pop __tmp_reg__
pop r28
pop r29
ret
.size foo(), .-foo()
.stabs "a:(0,7)",128,0,3,1
.stabn 192,0,0,.LBB2-.LFBB1
.stabs "i:(0,7)",128,0,4,3
.stabn 192,0,0,.LBB3-.LFBB1
.stabn 224,0,0,.LBE3-.LFBB1
.stabn 224,0,0,.LBE2-.LFBB1
.Lscope1:
.stabs "",36,0,0,.Lscope1-.LFBB1
.stabd 78,0,0
.stabs "",100,0,0,.Letext0
.Letext0:
| 30.905512 | 110 | 0.523057 |
a577d1f86bd76391367cc0ce34eeab845913c0b6 | 252 | asm | Assembly | programs/oeis/008/A008589.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/008/A008589.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/008/A008589.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A008589: Multiples of 7.
; 0,7,14,21,28,35,42,49,56,63,70,77,84,91,98,105,112,119,126,133,140,147,154,161,168,175,182,189,196,203,210,217,224,231,238,245,252,259,266,273,280,287,294,301,308,315,322,329,336,343,350,357,364,371,378
mov $1,$0
mul $1,7
| 42 | 204 | 0.702381 |
8f7b4fe3bd22bdcec0d172f8a5a244f58f91b735 | 6,696 | asm | Assembly | Transynther/x86/_processed/NC/_st_zr_/i9-9900K_12_0xca.log_21829_1385.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_st_zr_/i9-9900K_12_0xca.log_21829_1385.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_st_zr_/i9-9900K_12_0xca.log_21829_1385.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 %r15
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x14a53, %r12
inc %r11
vmovups (%r12), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %r15
nop
nop
nop
nop
cmp $47722, %rcx
lea addresses_D_ht+0x19f5b, %rdi
nop
nop
nop
nop
xor $52195, %rsi
movw $0x6162, (%rdi)
nop
sub %r12, %r12
lea addresses_D_ht+0x120f9, %r15
nop
nop
nop
sub $55461, %rdx
movb $0x61, (%r15)
cmp %rdx, %rdx
lea addresses_D_ht+0x1a1eb, %rsi
nop
nop
nop
and %r12, %r12
and $0xffffffffffffffc0, %rsi
movntdqa (%rsi), %xmm3
vpextrq $1, %xmm3, %r11
and %rdi, %rdi
lea addresses_normal_ht+0x1cd1, %rsi
nop
nop
dec %rdi
and $0xffffffffffffffc0, %rsi
vmovntdqa (%rsi), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $0, %xmm4, %r15
nop
nop
nop
nop
add $57606, %r11
lea addresses_WC_ht+0x535b, %r12
nop
nop
inc %r15
movb $0x61, (%r12)
nop
nop
nop
nop
add %rdx, %rdx
lea addresses_WC_ht+0xdedb, %r15
nop
nop
nop
nop
dec %rsi
mov $0x6162636465666768, %r12
movq %r12, %xmm0
movups %xmm0, (%r15)
nop
nop
nop
nop
nop
add $51754, %rsi
lea addresses_normal_ht+0x1557b, %rdi
clflush (%rdi)
nop
nop
nop
nop
sub %rcx, %rcx
mov (%rdi), %si
nop
nop
nop
nop
cmp %r15, %r15
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r15
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r9
push %rax
push %rbp
push %rdi
push %rdx
// Load
lea addresses_UC+0x5b5b, %rdi
clflush (%rdi)
nop
nop
nop
and $20743, %rdx
movups (%rdi), %xmm5
vpextrq $1, %xmm5, %r11
nop
nop
sub $62458, %r9
// Store
lea addresses_normal+0xcb5b, %r9
clflush (%r9)
nop
nop
sub %rax, %rax
movb $0x51, (%r9)
nop
inc %rbp
// Load
lea addresses_US+0x9e8b, %r11
nop
nop
nop
add %rdi, %rdi
movb (%r11), %al
nop
nop
dec %rbp
// Faulty Load
mov $0x4301ef0000000b5b, %rbp
nop
nop
nop
nop
nop
dec %r10
mov (%rbp), %rdi
lea oracles, %rbp
and $0xff, %rdi
shlq $12, %rdi
mov (%rbp,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rbp
pop %rax
pop %r9
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 3}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WC_ht', 'same': True, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': True, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': True, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'51': 20945, '00': 884}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 00 51 00 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 00 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51
*/
| 34.875 | 2,999 | 0.654719 |
c1fbfb4ee67094eba6967818ff9b615074053a10 | 325 | asm | Assembly | A04/input.asm | HeptaDecane/SPOSL_SEM6 | bee47943e4d9f3fe5e35b8e4c4d3f2fc634f58c7 | [
"MIT"
] | null | null | null | A04/input.asm | HeptaDecane/SPOSL_SEM6 | bee47943e4d9f3fe5e35b8e4c4d3f2fc634f58c7 | [
"MIT"
] | null | null | null | A04/input.asm | HeptaDecane/SPOSL_SEM6 | bee47943e4d9f3fe5e35b8e4c4d3f2fc634f58c7 | [
"MIT"
] | null | null | null | MACRO
INCR &X,&Y,®=AREG
MOVER ®,&X
ADD ®,&Y
MOVEM ®,&X
MEND
MACRO
SWAP &P,&Q,&R
MOVER &Q,&P
ADD &P,&R
MOVEM &R,&Q
MEND
MACRO
DECR &A,®1=BREG,®2=CREG
MOVER ®1,&A
SUB ®1,®2
MOVEM ®1,&A
MEND
START 100
READ N1
READ N2
INCR N1,N2,REG=CREG
DECR N1,N2
STOP
N1 DS 1
N2 DS 1
END | 12.037037 | 30 | 0.624615 |
e44f2dc68181cb01a4496af5b836c32da9e9d203 | 404 | asm | Assembly | oeis/107/A107659.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/107/A107659.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/107/A107659.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A107659: a(n) = Sum_{k=0..n} 2^max(k, n-k).
; Submitted by Christian Krause
; 1,4,10,24,52,112,232,480,976,1984,4000,8064,16192,32512,65152,130560,261376,523264,1047040,2095104,4191232,8384512,16771072,33546240,67096576,134201344,268410880,536838144,1073692672,2147418112
mov $1,1
mov $2,1
mov $4,1
lpb $0
sub $0,1
add $1,$4
mul $1,2
mov $3,$4
mov $4,$2
mov $2,$3
mul $2,2
lpe
mov $0,$1
| 22.444444 | 195 | 0.680693 |
c91244186febab4bba99eef79a48a1fc49ac95d4 | 391 | asm | Assembly | programs/oeis/260/A260192.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/260/A260192.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/260/A260192.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A260192: Kronecker symbol(-6 / 2*n + 7).
; 1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1,0,-1,-1,0,-1,1,0,1,1,0,1,-1
add $0,1
mul $0,9
add $0,9
bin $0,2
mov $1,$0
div $0,9
mul $0,4
sub $0,$1
mov $2,$0
mod $0,3
bin $0,$2
mod $0,3
| 24.4375 | 234 | 0.475703 |
c97bf3f81fdbc408d676ed2e6a079c08f3de6799 | 478 | asm | Assembly | oeis/205/A205371.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/205/A205371.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/205/A205371.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A205371: Ordered differences of odd-indexed Fibonacci numbers.
; Submitted by Jon Maiga
; 1,4,3,12,11,8,33,32,29,21,88,87,84,76,55,232,231,228,220,199,144,609,608,605,597,576,521,377,1596,1595,1592,1584,1563,1508,1364,987,4180,4179,4176,4168,4147,4092,3948,3571,2584,10945,10944,10941
seq $0,130328 ; Triangle of differences between powers of 2, read by rows.
seq $0,36795 ; Integers that can be decomposed into sums of different Fibonacci numbers of even argument.
sub $0,1
| 59.75 | 196 | 0.76569 |
a25d3ad408034fd44f8c152456b8c4dea6385432 | 17,329 | asm | Assembly | base/mvdm/dos/v86/cmd/debug/debuasm.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/mvdm/dos/v86/cmd/debug/debuasm.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/mvdm/dos/v86/cmd/debug/debuasm.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | PAGE 80,132 ;
TITLE DEBUASM.ASM
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
; Code for the UASSEMble command in the debugger
IF1
%OUT COMPONENT=DEBUG, MODULE=DEBUASM
ENDIF
.XLIST
.XCREF
include version.inc ; cas -- missing equates
INCLUDE DOSSYM.INC
INCLUDE debug.inc
.CREF
.LIST
CODE SEGMENT PUBLIC BYTE
CODE ENDS
CONST SEGMENT PUBLIC BYTE
EXTRN SYNERR_PTR:BYTE,UNASSEM_LN_PTR:WORD
EXTRN NSEG:WORD,SISAVE:WORD,BPSAVE:WORD,DISAVE:WORD
EXTRN BXSAVE:WORD,DSSAVE:WORD,ESSAVE:WORD,CSSAVE:WORD,IPSAVE:WORD
EXTRN SSSAVE:WORD,CXSAVE:WORD,SPSAVE:WORD,FLSAVE:WORD
EXTRN DISTAB:WORD,SHFTAB:WORD,IMMTAB:WORD,GRP1TAB:WORD,GRP2TAB:WORD
EXTRN DBMN:BYTE,ESCMN:BYTE,DISPB:WORD,STACK:BYTE,REG8:BYTE
EXTRN REG16:BYTE,SREG:BYTE,SIZ8:BYTE,SEGTAB:WORD,M8087_TAB:BYTE
EXTRN FI_TAB:BYTE,SIZE_TAB:BYTE,MD9_TAB:BYTE,MD9_TAB2:BYTE
EXTRN MDB_TAB:BYTE,MDB_TAB2:BYTE,MDD_TAB:BYTE,MDD_TAB2:BYTE
EXTRN MDF_TAB:BYTE
CONST ENDS
CSTACK SEGMENT STACK
CSTACK ENDS
DATA SEGMENT PUBLIC BYTE
EXTRN DISADD:BYTE,DISCNT:WORD,BYTCNT:BYTE,TEMP:BYTE,AWORD:BYTE
EXTRN MIDFLD:BYTE,MODE:BYTE,REGMEM:BYTE,OPCODE:WORD,OPBUF:BYTE
EXTRN INDEX:WORD,ARG_BUF:BYTE,ARG_BUF_PTR:BYTE,ARG_BUF_INDEX:WORD
EXTRN OPBUF:BYTE,OPCODE:WORD
DATA ENDS
DG GROUP CODE,CONST,CSTACK,DATA
CODE SEGMENT PUBLIC BYTE
ASSUME CS:DG,DS:DG,ES:DG,SS:DG
PUBLIC UNASSEM
PUBLIC DISASLN,MEMIMM,JMPCALL,SIGNIMM,ALUFROMREG,WORDTOALU
PUBLIC GRP2,PREFIX,OUTVARW,GRP1,SSPRE,MOVSEGTO,DSPRE,SHIFT
PUBLIC ESPRE,IMMED,CSPRE,OUTVARB,CHK10,ACCIMM,INT3,INVARB
PUBLIC MOVSEGFROM,LOADACC,OUTFIXB,XCHGAX,REGIMMW,SHORTJMP
PUBLIC SAV8,M8087,M8087_DB,M8087_DF,M8087_D9,M8087_DD
PUBLIC SAV16,SAVHEX,INFIXW,REGIMMB,OUTFIXW,SHIFTV,LONGJMP
PUBLIC INVARW,STOREACC,INFIXB,NOOPERANDS,ALUTOREG
PUBLIC SEGOP,REGOP,GETADDR
EXTRN CRLF:NEAR,BLANK:NEAR,TAB:NEAR,STD_PRINTF:NEAR
EXTRN HEX:NEAR,DEFAULT:NEAR,OUTSI:NEAR,OUTDI:NEAR
EXTRN HEX_ADDRESS_ONLY:NEAR
UNASSEM:
MOV BP,[CSSAVE] ; Default code segment
MOV DI,OFFSET DG:DISADD ; Default address
MOV CX,DISPB ; Default length
SHR CX,1
SHR CX,1
CALL DEFAULT
MOV WORD PTR [DISADD],DX ; Displacement of disassembly
MOV WORD PTR [DISADD+2],AX ; Segment
MOV WORD PTR [DISCNT],CX ; No. of bytes (but whole instructions)
DISLP:
CALL DISASLN ; Disassemble one line
CALL CRLF
TEST [DISCNT],-1 ; See if we've used up the range
JNZ DISLP
RET
GOTDIS:
PUSH DS ; RE-GET LAST BYTE
PUSH SI
LDS SI,DWORD PTR [DISADD]
MOV AL,[SI-1]
POP SI
POP DS
RET
GETDIS:
PUSH DS
LDS SI,DWORD PTR [DISADD]
LODSB ; Get the next byte of code
POP DS
MOV WORD PTR [DISADD],SI ; Update pointer
PUSH AX
PUSH DI
MOV DI,[ARG_BUF_INDEX]
CALL HEX ; Display each code byte
MOV [ARG_BUF_INDEX],DI
POP DI
MOV SI,[DISCNT]
OR SI,SI ; Check if range exhausted
JZ ENDRNG ; If so, don't wrap around
DEC SI ; Count off the bytes
MOV [DISCNT],SI
ENDRNG:
INC BYTE PTR[BYTCNT] ; Keep track of no. of bytes per line
POP AX
RET
DSPRE:
INC BYTE PTR [NSEG+1]
SSPRE:
INC BYTE PTR [NSEG+1]
CSPRE:
INC BYTE PTR [NSEG+1]
ESPRE:
INC BYTE PTR [NSEG+1]
PREFIX:
POP BX ; Dump off return address
CALL FINLN
CALL CRLF
DISASLN:
PUSH DS
LDS SI,DWORD PTR [DISADD]
CALL OUTSI ; Show disassembly address
POP DS
CALL HEX_ADDRESS_ONLY
DISASLN1:
MOV BYTE PTR [BYTCNT],0 ; Count of code bytes per line
; Fill overflow area with zeros
MOV DI,OFFSET DG:OPBUF
MOV CX,50
MOV AL,0
REP STOSB
; fill buffer with spaces
MOV DI,OFFSET DG:OPBUF
MOV CX,OPBUFLEN
MOV AL," "
REP STOSB
MOV DI,OFFSET DG:ARG_BUF
MOV [ARG_BUF_INDEX],DI
CALL GETDIS ; Get opcode
MOV DI,[ARG_BUF_INDEX]
MOV AH,0
MOV BX,AX
AND AL,1 ; Mask to "W" bit
MOV [AWORD],AL
MOV AL,BL ; Restore opcode
SHL BX,1
SHL BX,1 ; Multiply opcode by 4
ADD BX,OFFSET DG:DISTAB
MOV DX,[BX] ; Get pointer to mnemonic from table
MOV [OPCODE],DX
MOV [ARG_BUF_INDEX],DI
MOV DI,OFFSET DG:OPBUF
CALL WORD PTR [BX+2]
FINLN:
MOV AH,[BYTCNT] ; See how many bytes in this instruction
ADD AH,AH ; Each uses two characters
MOV AL,14 ; Amount of space we want to use
SUB AL,AH ; See how many fill characters needed
CBW
XCHG CX,AX ; Parameter for TAB needed in CX
MOV DI,[ARG_BUF_INDEX]
CALL TAB
MOV SI,[OPCODE]
OR SI,SI
JZ GET_TAB
GET_OPCODE:
LODSB
OR AL,AL
JZ GET_TAB
STOSB
JMP GET_OPCODE
GET_TAB:
MOV AL,9
STOSB
MOV BYTE PTR [DI],0 ; nul terminate address buffer
MOV DX,OFFSET DG:UNASSEM_LN_PTR
CALL STD_PRINTF
RET
GETMODE:
CALL GETDIS ; Get the address mode byte
MOV AH,AL
AND AL,7 ; Mask to "r/m" field
MOV [REGMEM],AL
SHR AH,1
SHR AH,1
SHR AH,1
MOV AL,AH
AND AL,7 ; Mask to center 3-bit field
MOV [MIDFLD],AL
SHR AH,1
SHR AH,1
SHR AH,1
MOV [MODE],AH ; Leaving 2-bit "MOD" field
RET
IMMED:
MOV BX,OFFSET DG:IMMTAB
CALL GETMNE
FINIMM:
CALL TESTREG
JMP SHORT IMM
MEMIMM:
CALL GETMODE
JMP SHORT FINIMM
ACCIMM:
XOR AL,AL
IMM1:
CALL SAVREG
IMM:
MOV AL,","
STOSB
TEST BYTE PTR [AWORD],-1
JNZ SAV16
SAV8:
CALL GETDIS
JMP SHORT SAVHEX
LONGJMP:
PUSH DI
MOV DI,OFFSET DG:TEMP
CALL SAV16
POP DI
CALL SAV16
MOV AL,":"
STOSB
MOV SI,OFFSET DG:TEMP
MOV CX,4
MOVDIG:
LODSB
STOSB
LOOP MOVDIG
RET
SAV16:
CALL GETDIS ; Get low byte
MOV DL,AL
CALL GETDIS ; Get high byte
MOV DH,AL
CALL SAVHEX ; Convert and store high byte
MOV AL,DL
SAVHEX:
MOV AH,AL
SHR AL,1
SHR AL,1
SHR AL,1
SHR AL,1
CALL SAVDIG
MOV AL,AH
SAVDIG:
AND AL,0FH
ADD AL,90H
DAA
ADC AL,40H
DAA
STOSB
RET
CHK10:
CALL GETDIS
CMP AL,10
JNZ SAVHEX
RET
SIGNIMM:
MOV BX,OFFSET DG:IMMTAB
CALL GETMNE
CALL TESTREG
MOV AL,","
STOSB
SAVD8:
CALL GETDIS ; Get signed 8-bit number
CBW
MOV DX,AX ; Save true 16-bit value in DX
MOV AH,AL
MOV AL,"+"
OR AH,AH
; JZ NOSIGN
JNS POSITIV ; OK if positive
MOV AL,"-"
NEG AH ; Get magnitude if negative
POSITIV:
STOSB
; NOSIGN:
MOV AL,AH
JMP SHORT SAVHEX
ALUFROMREG:
CALL GETADDR
MOV AL,","
STOSB
REGFLD:
MOV AL,[MIDFLD]
SAVREG:
MOV SI,OFFSET DG:REG8
CMP BYTE PTR [AWORD],1
JNE FNDREG
SAVREG16:
MOV SI,OFFSET DG:REG16
FNDREG:
CBW
ADD SI,AX
ADD SI,AX
MOVSW
RET
SEGOP:
SHR AL,1
SHR AL,1
SHR AL,1
SAVSEG:
AND AL,3
MOV SI,OFFSET DG:SREG
JMP SHORT FNDREG
REGOP:
AND AL,7
JMP SHORT SAVREG16
MOVSEGTO:
MOV BYTE PTR [AWORD],1
CALL GETADDR
MOV AL,","
STOSB
MOV AL,[MIDFLD]
JMP SHORT SAVSEG
MOVSEGFROM:
CALL GETMODE
CALL SAVSEG
MOV BYTE PTR [AWORD],1
JMP SHORT MEMOP2
GETADDR:
CALL GETMODE
JMP SHORT ADDRMOD
WORDTOALU:
MOV BYTE PTR [AWORD],1
ALUTOREG:
CALL GETMODE
CALL REGFLD
MEMOP2:
MOV AL,","
STOSB
ADDRMOD:
CMP BYTE PTR [MODE],3
MOV AL,[REGMEM]
JE SAVREG
XOR BX,BX
MOV BYTE PTR [NSEG],3
MOV BYTE PTR [DI],"["
INC DI
CMP AL,6
JNE NODRCT
CMP BYTE PTR [MODE],0
JE DIRECT ; Mode=0 and R/M=6 means direct addr.
NODRCT:
MOV DL,AL
CMP AL,1
JBE USEBX
CMP AL,7
JE USEBX
CMP AL,3
JBE USEBP
CMP AL,6
JNE CHKPLS
USEBP:
MOV BX,[BPSAVE]
MOV BYTE PTR [NSEG],2 ; Change default to Stack Segment
MOV AX,BPREG
SAVBASE:
STOSW
CHKPLS:
CMP DL,4
JAE NOPLUS
MOV AL,"+"
STOSB
NOPLUS:
CMP DL,6
JAE DOMODE ; No index register
AND DL,1 ; Even for SI, odd for DI
JZ USESI
ADD BX,[DISAVE]
MOV AX,DIREG
SAVINDX:
STOSW
DOMODE:
MOV AL,[MODE]
OR AL,AL
JZ CLOSADD ; If no displacement, then done
CMP AL,2
JZ ADDDIR
CALL SAVD8 ; Signed 8-bit displacement
ADDCLOS:
ADD BX,DX
CLOSADD:
MOV AL,"]"
STOSB
MOV [INDEX],BX
NOOPERANDS:
RET
ADDDIR:
MOV AL,"+"
STOSB
DIRECT:
CALL SAV16
JMP SHORT ADDCLOS
USEBX:
MOV BX,[BXSAVE]
MOV AX,BXREG
JMP SHORT SAVBASE
USESI:
ADD BX,[SISAVE]
MOV AX,SIREG
JMP SHORT SAVINDX
SHORTJMP:
CALL GETDIS
CBW
ADD AX,WORD PTR [DISADD]
XCHG DX,AX
SAVJMP:
MOV AL,DH
CALL SAVHEX
MOV AL,DL
JMP SAVHEX
JMPCALL:
CALL GETDIS
MOV DL,AL
CALL GETDIS
MOV DH,AL
ADD DX,WORD PTR [DISADD]
JMP SHORT SAVJMP
XCHGAX:
AND AL,7
CALL SAVREG16
MOV AL,","
STOSB
XOR AL,AL
JMP SAVREG16
LOADACC:
XOR AL,AL
CALL SAVREG
MOV AL,","
STOSB
MEMDIR:
MOV AL,"["
STOSB
XOR BX,BX
MOV BYTE PTR [NSEG],3
JMP DIRECT
STOREACC:
CALL MEMDIR
MOV AL,","
STOSB
XOR AL,AL
JMP SAVREG
REGIMMB:
MOV BYTE PTR [AWORD],0
JMP SHORT REGIMM
REGIMMW:
MOV BYTE PTR [AWORD],1
REGIMM:
AND AL,7
JMP IMM1
INT3:
MOV BYTE PTR [DI],"3"
INC DI
RET
; 8087 instructions whose first byte is 0dfh
M8087_DF:
CALL GET64F
JZ ISDD3
MOV SI,OFFSET DG:MDF_TAB
JMP short NODB3
; 8087 instructions whose first byte is 0ddh
M8087_DD:
CALL GET64F
JZ ISDD3
MOV SI,OFFSET DG:MDD_TAB
JMP short NOD93
ISDD3:
MOV AL,DL
TEST AL,100B
JZ ISSTI
JMP ESC0
ISSTI:
AND AL,11B
MOV SI,OFFSET DG:MDD_TAB2
MOV CL,AL
CALL MOVBYT
JMP short PUTRST
; 8087 instructions whose first byte is 0dbh
M8087_DB:
CALL GET64F
JZ ISDB3
MOV SI,OFFSET DG:MDB_TAB
NODB3:
CALL PUTOP
CALL PUTSIZE
JMP ADDRMOD
ISDB3:
MOV AL,DL
TEST AL,100B
JNZ ISDBIG
ESC0V:
JMP ESC0
ISDBIG:
CALL GOTDIS
AND AL,11111B
CMP AL,4
JAE ESC0V
MOV SI,OFFSET DG:MDB_TAB2
JMP short DOBIG
; 8087 instructions whose first byte is 0d9h
M8087_D9:
CALL GET64F
JZ ISD93
MOV SI,OFFSET DG:MD9_TAB
NOD93:
CALL PUTOP
AND AL,111B
CMP AL,3
JA NOSHO
MOV AL,DL
CALL PUTSIZE
NOSHO:
JMP ADDRMOD
ISD93:
MOV AL,DL
TEST AL,100B
JNZ ISD9BIG
AND AL,111B
OR AL,AL
JNZ NOTFLD
MOV AX,"DL"
STOSW
JMP SHORT PUTRST
NOTFLD:
CMP AL,1
JNZ NOTFXCH
MOV AX,"CX"
STOSW
MOV AL,"H"
JMP SHORT PUTRST1
NOTFXCH:
CMP AL,3
JNZ NOTFSTP
MOV AX,"TS"
STOSW
MOV AL,"P"
PUTRST1:
STOSB
PUTRST:
MOV AL,9
STOSB
JMP short PUTST0
NOTFSTP:
CALL GOTDIS
CMP AL,11010000B ; CHECK FOR FNOP
JZ GOTFNOP
JMP ESC0
GOTFNOP:
MOV AX,"ON"
STOSW
MOV AL,"P"
STOSB
RET
ISD9BIG:
CALL GOTDIS ; GET THE MODE BYTE
MOV SI,OFFSET DG:MD9_TAB2
DOBIG:
AND AL,11111B
MOV CL,AL
JMP MOVBYT
; entry point for the remaining 8087 instructions
M8087:
CALL GET64
CALL PUTFI ; PUT FIRST PART OF OPCODE
MOV AL,DL
CMP BYTE PTR [MODE],11B ; CHECK FOR REGISTER MODE
JZ MODEIS3
CALL PUTMN ; PUT MIDDLE PART OF OPCODE
NO3:
MOV AL,9 ; OUTPUT A TAB
STOSB
MOV AL,DL
CALL PUTSIZE ; OUTPUT THE OPERAND SIZE
JMP ADDRMOD
MODEIS3:
TEST AL,100000B ; D BIT SET?
JZ MPUT ; NOPE...
TEST AL,000100B ; FDIV OR FSUB?
JZ MPUT ; NOPE...
XOR AL,1 ; REVERSE SENSE OF R
MOV DL,AL ; SAVE CHANGE
MPUT:
CALL PUTMN ; PUT MIDDLE PART OF OPCODE
MOV AL,DL
TEST AL,010000B
JZ NOPSH
MOV AL,"P"
STOSB
NOPSH:
MOV AL,9
STOSB
MOV AL,DL
AND AL,00000111B
CMP AL,2 ; FCOM
JZ PUTST0
CMP AL,3 ; FCOMP
JZ PUTST0
MOV AL,DL
TEST AL,100000B
JZ PUTSTST0
; output 8087 registers in the form st(n),st
PUTST0ST:
CALL PUTST0
MOV AL,','
ISCOMP:
STOSB
PUTST:
MOV AX,"TS"
STOSW
RET
; output 8087 registers in the form st,st(n)
PUTSTST0:
CALL PUTST
MOV AL,','
STOSB
PUTST0:
CALL PUTST
MOV AL,"("
STOSB
MOV AL,[REGMEM]
ADD AL,"0"
STOSB
MOV AL,")"
STOSB
RET
; output an 8087 mnemonic
PUTMN:
MOV SI,OFFSET DG:M8087_TAB
MOV CL,AL
AND CL,00000111B
JMP SHORT MOVBYT
; output either 'FI' or 'F' for first byte of opcode
PUTFI:
MOV SI,OFFSET DG:FI_TAB
JMP SHORT PUTFI2
; output size (dword, tbyte, etc.)
PUTSIZE:
MOV SI,OFFSET DG:SIZE_TAB
PUTFI2:
CMP BYTE PTR [MODE],11B ; check if 8087 register
JNZ PUTFI3
AND AL,111000B ; LOOK FOR INVALID FORM OF 0DAH OPERANDS
CMP AL,010000B
JZ ESC0PJ
MOV AL,DL
CMP AL,110011B ; FCOMPP
JNZ GOFI
CMP BYTE PTR [REGMEM],1
JZ GOFI
ESC0PJ:
jmp short ESC0P ; we could've reached without a
; ; double branch here, but we needed
; ; a bridge for ESC0PJ
GOFI:
XOR CL,CL
JMP SHORT MOVBYT
; Look for qword
PUTFI3:
CMP AL,111101B
JZ GOTQU
CMP AL,111111B
JNZ NOTQU
GOTQU:
MOV CL,2
JMP SHORT MOVBYT
; look for tbyte
NOTQU:
CMP AL,011101B
JZ GOTTB
CMP AL,111100B
JZ GOTTB
CMP AL,111110B
JZ GOTTB
CMP AL,011111B
JNZ NOTTB
GOTTB:
MOV CL,5
JMP SHORT MOVBYT
NOTTB:
MOV CL,4
SHR AL,CL
MOV CL,AL
; SI POINTS TO A TABLE OF TEXT SEPARATED BY "$"
; CL = WHICH ELEMENT IN THE TABLE YOU WISH TO COPY TO [DI]
MOVBYT:
PUSH AX
INC CL
MOVBYT1:
DEC CL
JZ MOVBYT3
MOVBYT2:
LODSB
CMP AL,"$"
JZ MOVBYT1
JMP MOVBYT2
MOVBYT3:
LODSB
CMP AL,'$'
JZ MOVBYT5
CMP AL,'@' ; THIS MEANS RESVERED OP-CODE
JNZ MOVBYT4
POP AX
JMP SHORT ESC0P ; GO DO AN ESCAPE COMMAND
MOVBYT4:
STOSB
JMP MOVBYT3
MOVBYT5:
POP AX
RET
PUTOP:
AND AL,111B
MOV CL,AL
CALL MOVBYT
MOV AL,9
STOSB
MOV AL,DL
RET
GET64F:
CALL GET64
MOV AL,"F"
STOSB
CMP BYTE PTR [MODE],3
MOV AL,DL
RET
GET64:
AND AL,7
MOV DL,AL
CALL GETMODE
SHL DL,1
SHL DL,1
SHL DL,1
OR AL,DL
MOV DL,AL ; SAVE RESULT
RET
ESC0P:
POP DI ; CLEAN UP STACK
ESC0:
MOV WORD PTR [OPCODE],OFFSET DG:ESCMN
MOV AL,DL
MOV DI,OFFSET DG:OPBUF
JMP SHORT ESC1
ESCP:
CALL GET64
ESC1:
CALL SAVHEX
CMP BYTE PTR [MODE],3
JZ SHRTESC
MOV BYTE PTR [AWORD],1
JMP MEMOP2
SHRTESC:
MOV AL,","
STOSB
MOV AL,[REGMEM]
AND AL,7
JMP SAVREG
INVARW:
CALL PUTAX
JMP SHORT INVAR
INVARB:
CALL PUTAL
INVAR:
MOV AL,','
STOSB
JMP short PUTDX
INFIXW:
CALL PUTAX
JMP SHORT INFIX
INFIXB:
CALL PUTAL
INFIX:
MOV AL,','
STOSB
JMP SAV8
STOSW ;IS THIS DEAD CODE? EMK
RET
OUTVARB:
MOV BX,"LA"
JMP SHORT OUTVAR
OUTVARW:
MOV BX,"XA"
OUTVAR:
CALL PUTDX
OUTFV:
MOV AL,','
STOSB
MOV AX,BX
STOSW
RET
OUTFIXB:
MOV BX,"LA"
JMP SHORT OUTFIX
OUTFIXW:
MOV BX,"XA"
OUTFIX:
CALL SAV8
JMP OUTFV
PUTAL:
MOV AX,"A"+4C00H ; "AL"
JMP SHORT PUTX
PUTAX:
MOV AX,"A"+5800H ; "AX"
JMP SHORT PUTX
PUTDX:
MOV AX,"D"+5800H ; "DX"
PUTX:
STOSW
RET
SHFT:
MOV BX,OFFSET DG:SHFTAB
CALL GETMNE
TESTREG:
CMP BYTE PTR [MODE],3
JZ NOFLG
MOV SI,OFFSET DG:SIZE_TAB
MOV CL,3
TEST BYTE PTR [AWORD],-1
JNZ TEST_1
INC CL
TEST_1:
CALL MOVBYT
NOFLG:
JMP ADDRMOD
SHIFTV:
CALL SHFT
MOV AL,","
STOSB
MOV WORD PTR [DI],"C"+4C00H ; "CL"
ADD DI,2
RET
SHIFT:
CALL SHFT
MOV AX,"1,"
STOSW
RET
GETMNE:
CALL GETMODE
MOV DL,AL
CBW
SHL AX,1
ADD BX,AX
MOV AX,[BX]
MOV [OPCODE],AX
MOV AL,DL
RET
GRP1:
MOV BX,OFFSET DG:GRP1TAB
CALL GETMNE
OR AL,AL
JZ FINIMMJ
JMP TESTREG
FINIMMJ:
JMP FINIMM
GRP2:
MOV BX,OFFSET DG:GRP2TAB
CALL GETMNE
CMP AL,2
JB TESTREG
CMP AL,6
JAE INDIRECT
TEST AL,1
JZ INDIRECT
MOV AX,"AF" ; "FAR"
STOSW
MOV AX," R"
STOSW
INDIRECT:
JMP ADDRMOD
CODE ENDS
END UNASSEM
| 18.032258 | 72 | 0.578683 |
d5035c7146b27304735a0d739003d8983d600329 | 545 | asm | Assembly | oeis/192/A192430.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/192/A192430.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/192/A192430.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A192430: Constant term of the reduction by x^2->x+1 of the polynomial p(n,x) defined below in Comments.
; Submitted by Christian Krause
; 1,1,3,9,33,113,403,1409,4977,17489,61619,216809,763377,2686881,9458787,33295297,117206177,412579681,1452347043,5112464521,17996645761,63350804881,223004208243,785007489729,2763341973393,9727369663793
lpb $0
sub $0,1
add $1,$3
add $4,$2
sub $4,$5
add $4,1
add $4,$2
mov $5,$4
mov $4,$2
mov $2,$3
add $4,$1
add $4,$1
add $5,$4
mov $3,$5
add $4,1
lpe
mov $0,$1
mul $0,2
add $0,1
| 22.708333 | 201 | 0.680734 |
9057a654cd123032524334d83c5f6547b14b3f2c | 6,133 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_13414_541.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_13414_541.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_13414_541.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 %r14
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x14593, %rdx
nop
nop
nop
nop
nop
add %rbx, %rbx
vmovups (%rdx), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rcx
nop
nop
nop
nop
sub $45770, %r14
lea addresses_D_ht+0x12883, %rcx
nop
nop
sub $44473, %r9
mov (%rcx), %rdi
nop
nop
nop
and $50830, %rdi
lea addresses_A_ht+0x7c93, %rsi
lea addresses_WT_ht+0x2b93, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
and $28630, %r10
mov $69, %rcx
rep movsw
nop
nop
cmp %rbx, %rbx
lea addresses_UC_ht+0xc793, %rsi
dec %r14
mov $0x6162636465666768, %r10
movq %r10, %xmm5
vmovups %ymm5, (%rsi)
nop
nop
nop
and %r14, %r14
lea addresses_UC_ht+0x199c3, %rdi
dec %rsi
mov (%rdi), %r14d
nop
nop
nop
and $55383, %rcx
lea addresses_UC_ht+0x7a93, %r14
nop
nop
nop
nop
nop
dec %r10
mov (%r14), %dx
nop
nop
xor $44847, %r14
lea addresses_D_ht+0x193d3, %rsi
lea addresses_WC_ht+0x1da24, %rdi
nop
nop
nop
nop
cmp %r9, %r9
mov $124, %rcx
rep movsb
nop
nop
nop
inc %r14
lea addresses_UC_ht+0x76fb, %r10
nop
nop
nop
nop
dec %rdx
movw $0x6162, (%r10)
nop
nop
nop
nop
add $27854, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r9
push %rbp
push %rcx
push %rdi
// Store
lea addresses_WT+0x2f13, %rcx
add %r15, %r15
mov $0x5152535455565758, %rbp
movq %rbp, (%rcx)
dec %rbp
// Faulty Load
lea addresses_UC+0x11193, %rcx
nop
dec %r15
mov (%rcx), %r9d
lea oracles, %rbp
and $0xff, %r9
shlq $12, %r9
mov (%rbp,%r9,1), %r9
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': True, 'NT': True, 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'00': 13414}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 37.625767 | 2,999 | 0.657264 |
ec0bd3e2d55de2b090522a4e3c40f397cadb1b7b | 497 | asm | Assembly | code/seagullbird/t23.asm | KongoHuster/assembly-exercise | 1c4a44c60c0e93a1350ed4f887aeaf1414702a51 | [
"0BSD"
] | 1 | 2021-08-20T03:57:29.000Z | 2021-08-20T03:57:29.000Z | code/seagullbird/t23.asm | KongoHuster/assembly-exercise | 1c4a44c60c0e93a1350ed4f887aeaf1414702a51 | [
"0BSD"
] | null | null | null | code/seagullbird/t23.asm | KongoHuster/assembly-exercise | 1c4a44c60c0e93a1350ed4f887aeaf1414702a51 | [
"0BSD"
] | null | null | null | TITLE seagullbird_t23
.MODEL SMALL
.DATA
M DW 10 DUP (0), 1, -2, 3, -4, 5, -6, 7, -8, 9, -10
N EQU $ - M
.CODE
MAIN PROC FAR
ASSUME CS:_TEXT, DS:_DATA
PUSH DS
XOR AX, AX
PUSH AX
MOV AX, @DATA
MOV DS, AX
XOR BX, BX
XOR AX, AX ; MAX NUMBER
FOR:
CMP BX, N
JGE SAVE
MOV CX, [BX]
CMP CX, 0
JGE POSITIVE
NEG CX
POSITIVE:
CMP CX, AX
JLE NEXT
MOV AX, CX
NEXT:
ADD BX, 2
JMP FOR
SAVE:
ADD BX, N
MOV [BX], AX
MOV [BX+2], BX
RET
MAIN ENDP
END MAIN | 12.425 | 52 | 0.573441 |
f96117ea5a6dfeec57e976eb29ce77a377bcdf3b | 364 | asm | Assembly | oeis/021/A021401.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/021/A021401.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/021/A021401.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A021401: Decimal expansion of 1/397.
; Submitted by Jamie Morken(m2)
; 0,0,2,5,1,8,8,9,1,6,8,7,6,5,7,4,3,0,7,3,0,4,7,8,5,8,9,4,2,0,6,5,4,9,1,1,8,3,8,7,9,0,9,3,1,9,8,9,9,2,4,4,3,3,2,4,9,3,7,0,2,7,7,0,7,8,0,8,5,6,4,2,3,1,7,3,8,0,3,5,2,6,4,4,8,3,6,2,7,2,0,4,0,3,0,2,2,6,7
seq $0,83811 ; Numbers n such that 2n+1 is the digit reversal of n+1.
div $0,1588
mod $0,10
| 45.5 | 199 | 0.593407 |
a294abd3af944849920afa1309b80c7319579956 | 656 | asm | Assembly | programs/oeis/263/A263511.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/263/A263511.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/263/A263511.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A263511: Total number of ON (black) cells after n iterations of the "Rule 155" elementary cellular automaton starting with a single ON (black) cell.
; 1,3,6,12,19,29,40,54,69,87,106,128,151,177,204,234,265,299,334,372,411,453,496,542,589,639,690,744,799,857,916,978,1041,1107,1174,1244,1315,1389,1464,1542,1621,1703,1786,1872,1959,2049,2140,2234,2329,2427,2526,2628,2731,2837,2944,3054,3165,3279,3394,3512,3631,3753,3876,4002,4129,4259,4390,4524,4659,4797,4936,5078,5221,5367,5514,5664,5815,5969,6124,6282,6441,6603,6766,6932,7099,7269,7440,7614,7789,7967,8146,8328,8511,8697,8884,9074,9265,9459,9654,9852
mov $1,$0
add $0,3
div $0,2
pow $1,2
add $0,$1
| 72.888889 | 456 | 0.757622 |
8a31aad427fd61442be847204e2a74da542bb196 | 341 | asm | Assembly | oeis/075/A075576.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/075/A075576.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/075/A075576.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A075576: Smaller of two consecutive squares with a prime sum.
; 1,4,16,25,49,81,144,196,289,361,484,576,625,841,900,1024,1156,1225,1521,1764,2209,2500,3600,4225,4761,4900,5184,6241,6724,7056,7225,7569,8100,9409,9801,10000,10404,10816,11881,12100,13225,14884,16900,18225
seq $0,27861 ; Numbers k such that k^2 + (k+1)^2 is prime.
pow $0,2
| 56.833333 | 207 | 0.744868 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.