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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a16804117e4b5dc8d29d603ffa327514407456d | 862 | asm | Assembly | oeis/232/A232317.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/232/A232317.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/232/A232317.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A232317: Number of (1+1)X(n+1) 0..1 arrays with every element equal to some horizontal or antidiagonal neighbor, with top left element zero
; Submitted by Christian Krause
; 2,5,16,52,169,549,1784,5797,18837,61210,198899,646313,2100164,6824385,22175521,72058322,234150159,760860029,2472379204,8033880997,26105721877,84829326570,275648943179,895708394113,2910562681764,9457737786265,30732478154201,99863755460642,324502619172599,1054456137405909,3426406075081924,11133946851730397,36179241391927917,117562758752702330,382014705499871059,1241338981548854713,4033673167362579364,13107232966131188145,42591342654756401681,138398582967302683762,449719745221939294239
mov $4,2
lpb $4
mov $1,3
add $3,10
sub $4,2
lpb $0
sub $0,1
add $2,1
add $3,$2
div $3,$2
mov $2,$1
add $1,$3
sub $3,1
mul $3,$1
lpe
lpe
mov $0,$2
add $0,2
| 37.478261 | 489 | 0.773782 |
7da14d53b50067d07f0a05850de5fdbb8ca97b97 | 219 | asm | Assembly | src/m3-bg-scx/m3-bg-scx-ds.asm | c-sp/age-test-roms | 3b27d1c1fb149efe71569b1ffe7bc16757a72636 | [
"MIT"
] | null | null | null | src/m3-bg-scx/m3-bg-scx-ds.asm | c-sp/age-test-roms | 3b27d1c1fb149efe71569b1ffe7bc16757a72636 | [
"MIT"
] | null | null | null | src/m3-bg-scx/m3-bg-scx-ds.asm | c-sp/age-test-roms | 3b27d1c1fb149efe71569b1ffe7bc16757a72636 | [
"MIT"
] | null | null | null | ; Verified:
; 2021-12-01: CPU CGB E - CPU-CGB-06
; 2021-12-01: CPU CGB B - CPU-CGB-02
;
INCLUDE "hardware.inc"
DEF CART_COMPATIBILITY EQU CART_COMPATIBLE_GBC
DEF DOUBLE_SPEED EQU 1
INCLUDE "m3-bg-scx/m3-bg-scx.inc"
| 24.333333 | 46 | 0.721461 |
06c6a58c9983f16919063c505e9d6891ac963c05 | 180 | asm | Assembly | programs/oeis/076/A076121.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/076/A076121.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/076/A076121.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A076121: Complete list of possible cribbage hands.
; 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,28,29
mov $1,$0
sub $1,7
trn $1,7
div $1,5
pow $1,2
add $1,$0
| 18 | 69 | 0.633333 |
7e12db1a53b6920cd946e5f3f0b8ac0be884f2f1 | 407 | asm | Assembly | programs/oeis/183/A183003.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/183/A183003.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/183/A183003.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A183003: A183002(n)/2.
; 0,0,0,1,1,2,2,3,4,5,5,7,7,8,9,11,11,13,13,15,16,17,17,20,21,22,23,25,25,28,28,30,31,32,33,37,37,38,39,42,42,45,45,47,49,50,50,54,55,57,58,60,60,63,64,67,68,69,69,74,74,75,77,80,81,84,84,86,87,90,90,95,95,96,98,100,101,104,104,108,110,111,111,116,117,118,119,122,122,127,128,130,131,132,133,138,138,140,142,146
mov $1,$0
seq $0,94820 ; Partial sums of A038548.
sub $0,$1
sub $0,1
| 50.875 | 311 | 0.663391 |
d84d3a3378015be071a2a105d5a87a78f794f28a | 552 | asm | Assembly | oeis/123/A123868.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/123/A123868.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/123/A123868.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A123868: a(n) = n^12 - 1.
; 0,4095,531440,16777215,244140624,2176782335,13841287200,68719476735,282429536480,999999999999,3138428376720,8916100448255,23298085122480,56693912375295,129746337890624,281474976710655,582622237229760,1156831381426175,2213314919066160,4095999999999999,7355827511386640,12855002631049215,21914624432020320,36520347436056575,59604644775390624,95428956661682175,150094635296999120,232218265089212415,353814783205469040,531440999999999999,787662783788549760,1152921504606846975,1667889514952984960
add $0,1
pow $0,12
sub $0,1
| 78.857143 | 494 | 0.88587 |
6b4ea87b7a964e6e6f22a19b2b2cc2438729cc45 | 273 | asm | Assembly | libsrc/_DEVELOPMENT/adt/p_forward_list_alt/c/sdcc_iy/p_forward_list_alt_next_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/p_forward_list_alt/c/sdcc_iy/p_forward_list_alt_next_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/p_forward_list_alt/c/sdcc_iy/p_forward_list_alt_next_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; void *p_forward_list_alt_next_fastcall(void *item)
SECTION code_adt_p_forward_list_alt
PUBLIC _p_forward_list_alt_next_fastcall
defc _p_forward_list_alt_next_fastcall = asm_p_forward_list_alt_next
INCLUDE "adt/p_forward_list_alt/z80/asm_p_forward_list_alt_next.asm"
| 24.818182 | 68 | 0.886447 |
ca85319c11eaf7e70e7399bae13532b713142071 | 232 | asm | Assembly | programs/oeis/191/A191355.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/191/A191355.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/191/A191355.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A191355: Indices of terms in A069748 with two decimal digits 1 and all others 0.
; 5,6,8,9,12,15,18,22,27,31,37,43,49,56,64,71,80
lpb $0
mov $2,$0
sub $0,2
trn $0,1
add $1,$2
div $2,2
add $1,$2
lpe
add $1,5
mov $0,$1
| 16.571429 | 82 | 0.607759 |
9bf4d2a96a17c18da34f7bf0422e2fbab0de9db6 | 10,496 | asm | Assembly | externals/openssl-1.0.2d/ms/uptable.asm | doomdagger/cpython | 02cd3cdaa0a506cbb36820e22390ea5a8ebce40e | [
"PSF-2.0"
] | 13 | 2019-10-19T17:41:19.000Z | 2021-11-04T18:50:03.000Z | externals/openssl-1.0.2d/ms/uptable.asm | doomdagger/cpython | 02cd3cdaa0a506cbb36820e22390ea5a8ebce40e | [
"PSF-2.0"
] | 3 | 2019-12-09T06:22:43.000Z | 2020-05-28T09:33:44.000Z | externals/openssl-1.0.2d/ms/uptable.asm | doomdagger/cpython | 02cd3cdaa0a506cbb36820e22390ea5a8ebce40e | [
"PSF-2.0"
] | 3 | 2018-10-04T09:58:04.000Z | 2022-02-03T23:06:28.000Z | default rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
section .text code align=64
EXTERN OPENSSL_Uplink
global OPENSSL_UplinkTable
ALIGN 16
_lazy1:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,1
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[8+rax]
_lazy1_end:
ALIGN 16
_lazy2:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,2
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[16+rax]
_lazy2_end:
ALIGN 16
_lazy3:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,3
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[24+rax]
_lazy3_end:
ALIGN 16
_lazy4:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,4
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[32+rax]
_lazy4_end:
ALIGN 16
_lazy5:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,5
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[40+rax]
_lazy5_end:
ALIGN 16
_lazy6:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,6
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[48+rax]
_lazy6_end:
ALIGN 16
_lazy7:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,7
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[56+rax]
_lazy7_end:
ALIGN 16
_lazy8:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,8
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[64+rax]
_lazy8_end:
ALIGN 16
_lazy9:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,9
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[72+rax]
_lazy9_end:
ALIGN 16
_lazy10:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,10
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[80+rax]
_lazy10_end:
ALIGN 16
_lazy11:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,11
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[88+rax]
_lazy11_end:
ALIGN 16
_lazy12:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,12
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[96+rax]
_lazy12_end:
ALIGN 16
_lazy13:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,13
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[104+rax]
_lazy13_end:
ALIGN 16
_lazy14:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,14
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[112+rax]
_lazy14_end:
ALIGN 16
_lazy15:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,15
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[120+rax]
_lazy15_end:
ALIGN 16
_lazy16:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,16
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[128+rax]
_lazy16_end:
ALIGN 16
_lazy17:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,17
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[136+rax]
_lazy17_end:
ALIGN 16
_lazy18:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,18
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[144+rax]
_lazy18_end:
ALIGN 16
_lazy19:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,19
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[152+rax]
_lazy19_end:
ALIGN 16
_lazy20:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,20
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[160+rax]
_lazy20_end:
ALIGN 16
_lazy21:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,21
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[168+rax]
_lazy21_end:
ALIGN 16
_lazy22:
DB 0x48,0x83,0xEC,0x28
mov QWORD[48+rsp],rcx
mov QWORD[56+rsp],rdx
mov QWORD[64+rsp],r8
mov QWORD[72+rsp],r9
lea rcx,[OPENSSL_UplinkTable]
mov rdx,22
call OPENSSL_Uplink
mov rcx,QWORD[48+rsp]
mov rdx,QWORD[56+rsp]
mov r8,QWORD[64+rsp]
mov r9,QWORD[72+rsp]
lea rax,[OPENSSL_UplinkTable]
add rsp,40
jmp QWORD[176+rax]
_lazy22_end:
section .data data align=8
OPENSSL_UplinkTable:
DQ 22
DQ _lazy1
DQ _lazy2
DQ _lazy3
DQ _lazy4
DQ _lazy5
DQ _lazy6
DQ _lazy7
DQ _lazy8
DQ _lazy9
DQ _lazy10
DQ _lazy11
DQ _lazy12
DQ _lazy13
DQ _lazy14
DQ _lazy15
DQ _lazy16
DQ _lazy17
DQ _lazy18
DQ _lazy19
DQ _lazy20
DQ _lazy21
DQ _lazy22
section .pdata rdata align=4
ALIGN 4
DD _lazy1 wrt ..imagebase,_lazy1_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy2 wrt ..imagebase,_lazy2_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy3 wrt ..imagebase,_lazy3_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy4 wrt ..imagebase,_lazy4_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy5 wrt ..imagebase,_lazy5_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy6 wrt ..imagebase,_lazy6_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy7 wrt ..imagebase,_lazy7_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy8 wrt ..imagebase,_lazy8_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy9 wrt ..imagebase,_lazy9_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy10 wrt ..imagebase,_lazy10_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy11 wrt ..imagebase,_lazy11_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy12 wrt ..imagebase,_lazy12_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy13 wrt ..imagebase,_lazy13_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy14 wrt ..imagebase,_lazy14_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy15 wrt ..imagebase,_lazy15_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy16 wrt ..imagebase,_lazy16_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy17 wrt ..imagebase,_lazy17_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy18 wrt ..imagebase,_lazy18_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy19 wrt ..imagebase,_lazy19_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy20 wrt ..imagebase,_lazy20_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy21 wrt ..imagebase,_lazy21_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
DD _lazy22 wrt ..imagebase,_lazy22_end wrt ..imagebase,_lazy_unwind_info wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
_lazy_unwind_info:
DB 0x01,0x04,0x01,0x00
DB 0x04,0x42,0x00,0x00
| 20.825397 | 89 | 0.746761 |
c7f61611616bd6167e6e788ced678f60c4375435 | 790 | asm | Assembly | tests/src/Mod.asm | meghanto/tiny_vm | da19e9f4bff3b48349bf13f8dc725d387d01e1f5 | [
"CC-BY-3.0"
] | 2 | 2022-01-12T03:16:07.000Z | 2022-01-15T07:52:48.000Z | tests/src/Mod.asm | meghanto/tiny_vm | da19e9f4bff3b48349bf13f8dc725d387d01e1f5 | [
"CC-BY-3.0"
] | 2 | 2022-01-25T20:52:54.000Z | 2022-01-31T02:46:45.000Z | tests/src/Mod.asm | meghanto/tiny_vm | da19e9f4bff3b48349bf13f8dc725d387d01e1f5 | [
"CC-BY-3.0"
] | 10 | 2022-01-04T04:36:07.000Z | 2022-01-15T00:55:27.000Z | .class Mod:Obj
.field modulus
.method mod forward
.method printModulus forward
.method $constructor
.args modulus
enter
load modulus
load $
store_field $:modulus
load $
return 1
.method mod
.args x
.local y
enter
load $
load_field $:modulus
store y
jump whilecond_1
whileloop_1:
load y
load x
call Int:minus
store x
whilecond_1:
load y
load x
call Int:atleast
jump_if whileloop_1
whileend_1:
jump whilecond_2
whileloop_2:
load y
load x
call Int:plus
store x
whilecond_2:
const 0
load x
call Int:less
jump_if whileloop_2
whileend_2:
load x
return 1
.method printModulus
enter
load $
load_field $:modulus
call Int:print
pop
const none
return 0
| 14.62963 | 28 | 0.646835 |
8d1b5d781e8f383040d797ed9380d3d421e9efc9 | 167 | asm | Assembly | libsrc/_DEVELOPMENT/stdlib/c/sdcc_iy/quick_exit_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/stdlib/c/sdcc_iy/quick_exit_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/stdlib/c/sdcc_iy/quick_exit_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; _Noreturn void quick_exit_fastcall(int status)
SECTION code_stdlib
PUBLIC _quick_exit_fastcall
EXTERN asm_quick_exit
defc _quick_exit_fastcall = asm_quick_exit
| 15.181818 | 48 | 0.856287 |
23693d32b0f60d3cfa06e75a387a3ef3785d23c2 | 1,325 | asm | Assembly | pwnlib/shellcraft/templates/thumb/linux/loader_append.asm | tkmikan/pwntools | 1238fc359eb72313d3f82849b2effdb7063ab429 | [
"MIT"
] | 8,966 | 2015-01-02T11:58:14.000Z | 2022-03-31T21:19:56.000Z | pwnlib/shellcraft/templates/thumb/linux/loader_append.asm | tkmikan/pwntools | 1238fc359eb72313d3f82849b2effdb7063ab429 | [
"MIT"
] | 1,401 | 2015-01-01T00:56:22.000Z | 2022-03-31T16:19:53.000Z | pwnlib/shellcraft/templates/thumb/linux/loader_append.asm | tkmikan/pwntools | 1238fc359eb72313d3f82849b2effdb7063ab429 | [
"MIT"
] | 1,844 | 2015-01-07T04:38:06.000Z | 2022-03-30T03:54:46.000Z | <%
from pwnlib.shellcraft.thumb.linux import loader
from pwnlib.shellcraft import common
%>
<%docstring>
Loads a statically-linked ELF into memory and transfers control.
Similar to loader.asm but loads an appended ELF.
Arguments:
data(str): If a valid filename, the data is loaded from the named file.
Otherwise, this is treated as raw ELF data to append.
If ``None``, it is ignored.
Example:
The following doctest is commented out because it doesn't work on Travis
for reasons I cannot diagnose. However, it should work just fine :-)
>>> payload = shellcraft.echo(b'Hello, world!\n') + shellcraft.exit(0)
>>> payloadELF = ELF.from_assembly(payload)
>>> payloadELF.arch
'arm'
>>> loader = shellcraft.loader_append(payloadELF.data)
>>> loaderELF = ELF.from_assembly(loader, vma=0, shared=True)
>>> loaderELF.process().recvall()
b'Hello, world!\n'
</%docstring>
<%page args="data = None"/>
<%
there = common.label('there')
here = common.label('here')
%>
add r0, pc, #0+(${there} - ${here})
${here}:
${loader('r0')}
${there}:
%if data:
<%
import os
if b'\x00' not in data and os.path.isfile(data):
with open(data, 'rb') as f:
data = f.read()
%>
${'.string "%s"' % ''.join('\\x%02x' % c for c in bytearray(data))}
%endif
| 26.5 | 75 | 0.642264 |
d8bb9a787b3501af9c4bf799e5a97609e9400117 | 2,349 | asm | Assembly | src/shaders/h264/ildb/save_Top_Y_16x4_Mbaff.asm | tizenorg/platform.upstream.libva-intel-driver | 9ffc32731bacbfec2cef3d9fb5eb4c0c43952b90 | [
"MIT"
] | null | null | null | src/shaders/h264/ildb/save_Top_Y_16x4_Mbaff.asm | tizenorg/platform.upstream.libva-intel-driver | 9ffc32731bacbfec2cef3d9fb5eb4c0c43952b90 | [
"MIT"
] | null | null | null | src/shaders/h264/ildb/save_Top_Y_16x4_Mbaff.asm | tizenorg/platform.upstream.libva-intel-driver | 9ffc32731bacbfec2cef3d9fb5eb4c0c43952b90 | [
"MIT"
] | null | null | null | /*
* Copyright © <2010>, Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Eclipse Public License (EPL), version 1.0. The full text of the EPL is at
* http://www.opensource.org/licenses/eclipse-1.0.php.
*
*/
// Module name: save_Top_Y_16x4.asm
//
// Save a Y 16x4 block
//
//----------------------------------------------------------------
// Symbols need to be defined before including this module
//
// Source region in :ud
// SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs
//
// Binding table index:
// BI_DEST_Y: Binding table index of Y surface
//
//----------------------------------------------------------------
#if defined(_DEBUG)
mov (1) EntrySignatureC:w 0xDDD5:w
#endif
and.z.f0.1 (16) NULLREGW DualFieldMode<0;1,0>:w 1:w
// FieldModeCurrentMbFlag determines how to access above MB
and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w
mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w { NoDDClr } // Block origin
mov (1) MSGSRC.2<1>:ud 0x0003000F:ud { NoDDChk } // Block width and height (16x4)
// Pack Y
// Dual field mode
(f0.1) mov (16) MSGPAYLOADD(0)<1> PREV_MB_YD(0) // Compressed inst
(-f0.1) mov (16) MSGPAYLOADD(0)<1> PREV_MB_YD(2) // for dual field mode, write last 4 rows
// Set message descriptor
and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w
(f0.0) if (1) ELSE_Y_16x4_SAVE
// Frame picture
mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y
// Add vertical offset 16 for bot MB in MBAFF mode
(f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w
ELSE_Y_16x4_SAVE:
else (1) ENDIF_Y_16x4_SAVE
asr (1) MSGSRC.1:d ORIY_CUR:w 1:w // Reduce y by half in field access mode
// Field picture
(f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCBF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y bottom field
(-f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCTF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y top field
add (1) MSGSRC.1:d MSGSRC.1:d -4:w // for last 4 rows of above MB
endif
ENDIF_Y_16x4_SAVE:
send (8) WritebackResponse(0)<1> MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC
// End of save_Top_Y_16x4.asm
| 33.557143 | 115 | 0.613027 |
df8a6004c101115dffa8e76e7de295c69b550c1c | 6,989 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_3631_83.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_notsx.log_3631_83.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_notsx.log_3631_83.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0xc186, %r10
nop
nop
nop
nop
nop
add $28921, %r9
movb $0x61, (%r10)
nop
nop
nop
nop
dec %r13
lea addresses_A_ht+0x12ec6, %rdi
nop
inc %rdx
movb (%rdi), %al
and $1957, %r9
lea addresses_WT_ht+0x154c6, %r10
and $21140, %rax
vmovups (%r10), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rdx
nop
sub %rax, %rax
lea addresses_WC_ht+0x1a5a6, %rsi
lea addresses_UC_ht+0x4cc6, %rdi
nop
xor %rdx, %rdx
mov $35, %rcx
rep movsb
xor %r9, %r9
lea addresses_UC_ht+0x2594, %rsi
lea addresses_A_ht+0x4d29, %rdi
nop
nop
nop
nop
xor $32573, %r10
mov $100, %rcx
rep movsq
nop
nop
nop
nop
nop
add $44747, %r9
lea addresses_normal_ht+0x8ac6, %r10
nop
nop
nop
nop
nop
sub $15634, %r15
movw $0x6162, (%r10)
nop
nop
xor $63991, %r9
lea addresses_A_ht+0x152c6, %rsi
lea addresses_D_ht+0x1cec6, %rdi
cmp %rax, %rax
mov $24, %rcx
rep movsw
nop
sub %rsi, %rsi
lea addresses_A_ht+0xb65e, %rsi
lea addresses_A_ht+0x1c646, %rdi
nop
nop
nop
nop
nop
xor %r10, %r10
mov $109, %rcx
rep movsq
add %rax, %rax
lea addresses_WT_ht+0x7c6, %rsi
lea addresses_normal_ht+0x15ec6, %rdi
nop
nop
nop
nop
nop
and %r9, %r9
mov $43, %rcx
rep movsl
nop
nop
and %rcx, %rcx
lea addresses_UC_ht+0x7ac6, %rdx
clflush (%rdx)
nop
nop
nop
dec %r15
mov (%rdx), %r13w
nop
nop
nop
nop
sub $35563, %rax
lea addresses_WC_ht+0x10fbb, %rax
nop
nop
nop
nop
nop
add $30461, %r13
movups (%rax), %xmm6
vpextrq $1, %xmm6, %r15
and $30141, %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %rax
push %rbp
push %rbx
push %rcx
// Store
lea addresses_D+0x1a8c6, %rbp
nop
nop
nop
nop
nop
sub %r13, %r13
movb $0x51, (%rbp)
inc %rbx
// Faulty Load
mov $0x72330f0000000ac6, %rbx
inc %r12
movb (%rbx), %cl
lea oracles, %rbx
and $0xff, %rcx
shlq $12, %rcx
mov (%rbx,%rcx,1), %rcx
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'00': 3631}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 36.025773 | 2,999 | 0.656889 |
24f8f23fd962d54d800b86337777f0581ebd5647 | 798 | asm | Assembly | sw/552tests/inst_tests/beqz_0.asm | JPShen-UWM/ThreadKraken | 849c510531f28e36d3469535737b2120bd774935 | [
"MIT"
] | 1 | 2022-02-15T16:03:25.000Z | 2022-02-15T16:03:25.000Z | sw/552tests/inst_tests/beqz_0.asm | JPShen-UWM/ThreadKraken | 849c510531f28e36d3469535737b2120bd774935 | [
"MIT"
] | null | null | null | sw/552tests/inst_tests/beqz_0.asm | JPShen-UWM/ThreadKraken | 849c510531f28e36d3469535737b2120bd774935 | [
"MIT"
] | null | null | null | // Test provided by Karu
// beqz test.
lbi r1, 1 //set r1 to a constant 1
lbi r2, 2 //set r2 to a constant 2
lbi r4, 1 //set r4 to a constant 1, r4 will be used to indicate our program can be execate currectly or not
slt r3, r1, r2 //set the r3 if r1 is less than r2, it will be set here
beqz r3, .label1 //no jump
addi r4, r4, 1 //if the beqz above didn't branch, r4 will be added 1
.label1:
lbi r1, 2 //set r1 to a constant 2
lbi r2, 1 //set r2 to a constant 1
slt r3, r1,r2 //set the r3 if r1 is less than r2, it won't be set here
beqz r3, .label2 //jump here
addi r4, r4, 4 //if the beqz above didn't branch, r4 will be added 4
halt
.label2:
addi r4, r4, 2 //if the beqz above brance, r4 will be added 2
halt
| 36.272727 | 118 | 0.616541 |
54d576d2439fef33192802911a2a6bc511d0cee9 | 417 | asm | Assembly | test/asm_exe/segnames.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | test/asm_exe/segnames.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | test/asm_exe/segnames.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | IDEAL
ASSUME CS: SEG1
; forward references to segments are not allowed yet
SEGMENT SEG1
ENDS SEG1
SEGMENT SEG2
ENDS SEG2
SEGMENT _STACK STACK
ENDS _STACK
ASSUME CS: SEG1
SEGMENT SEG1
start:
mov ax, SEG1
mov dx, SEG2
mov bx, _STACK
ENDS SEG1
ASSUME CS: SEG2
SEGMENT SEG2
mov ax, SEG1
mov dx, SEG2
mov bx, _STACK
ENDS SEG2
SEGMENT _STACK STACK
DB 20h DUP (0)
ENDS _STACK
END start
| 10.425 | 53 | 0.709832 |
ea1448771a4327d9cee7238153027636c582ed72 | 3,658 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2_notsx.log_8_1573.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_notsx.log_8_1573.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_notsx.log_8_1573.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x11f5c, %rbx
xor %r13, %r13
mov (%rbx), %r14w
and $27922, %rdi
lea addresses_UC_ht+0x4810, %rsi
lea addresses_normal_ht+0x10a1c, %rdi
nop
add $20225, %rax
mov $126, %rcx
rep movsw
nop
sub %r14, %r14
lea addresses_A_ht+0xd10c, %rcx
nop
nop
nop
nop
nop
cmp %rdi, %rdi
mov $0x6162636465666768, %r14
movq %r14, %xmm6
movups %xmm6, (%rcx)
nop
nop
nop
nop
dec %rcx
lea addresses_WT_ht+0x1467c, %r13
nop
nop
nop
nop
xor $51158, %rax
mov (%r13), %ecx
inc %rcx
lea addresses_WC_ht+0x1635c, %rax
nop
nop
nop
nop
cmp $53690, %rsi
mov $0x6162636465666768, %r14
movq %r14, (%rax)
nop
nop
nop
nop
sub %rax, %rax
lea addresses_D_ht+0x24dc, %rcx
add $49581, %r13
mov (%rcx), %esi
nop
nop
nop
inc %rdi
lea addresses_D_ht+0xbadc, %rsi
nop
nop
nop
nop
nop
add %rbx, %rbx
movl $0x61626364, (%rsi)
nop
nop
xor $23191, %r13
lea addresses_WC_ht+0x4ec, %rcx
nop
xor %rdi, %rdi
movups (%rcx), %xmm7
vpextrq $0, %xmm7, %rsi
nop
nop
nop
nop
sub $8248, %rax
lea addresses_A_ht+0x11a7c, %rsi
lea addresses_D_ht+0x14536, %rdi
nop
nop
nop
nop
nop
xor %rbp, %rbp
mov $19, %rcx
rep movsb
nop
nop
nop
nop
nop
and %rax, %rax
lea addresses_WC_ht+0x1d55c, %rsi
nop
cmp $64532, %r13
movb (%rsi), %bl
nop
nop
nop
nop
nop
xor $1333, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r8
push %r9
push %rdi
push %rdx
push %rsi
// Store
lea addresses_D+0x16431, %rsi
clflush (%rsi)
nop
nop
nop
nop
sub $4750, %r12
mov $0x5152535455565758, %rdx
movq %rdx, (%rsi)
nop
nop
xor $8470, %r11
// Faulty Load
lea addresses_US+0xe75c, %r11
sub %r8, %r8
mov (%r11), %r9d
lea oracles, %rdx
and $0xff, %r9
shlq $12, %r9
mov (%rdx,%r9,1), %r9
pop %rsi
pop %rdx
pop %rdi
pop %r9
pop %r8
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'00': 8}
00 00 00 00 00 00 00 00
*/
| 19.772973 | 151 | 0.646528 |
f5c55fc2d7b6648ae585cc7f4027a2f46669b632 | 289 | asm | Assembly | _anim/obj0E.asm | NatsumiFox/AMPS-Sonic-1-2005 | ac8730799f1b96291358c77a4b64529de94ce8a4 | [
"Apache-2.0"
] | 2 | 2020-04-09T19:36:35.000Z | 2021-01-05T14:20:17.000Z | _anim/obj0E.asm | NatsumiFox/AMPS-Sonic-1-2005 | ac8730799f1b96291358c77a4b64529de94ce8a4 | [
"Apache-2.0"
] | null | null | null | _anim/obj0E.asm | NatsumiFox/AMPS-Sonic-1-2005 | ac8730799f1b96291358c77a4b64529de94ce8a4 | [
"Apache-2.0"
] | 1 | 2020-06-17T14:16:35.000Z | 2020-06-17T14:16:35.000Z | ; ---------------------------------------------------------------------------
; Animation script - Sonic on the title screen
; ---------------------------------------------------------------------------
dc.w byte_A706-Ani_obj0E
byte_A706: dc.b 7, 0, 1, 2, 3, 4, 5, 6, 7, $FE, 2, 0
even | 48.166667 | 77 | 0.297578 |
9bc35de523e487c62818907c662522adccf34be2 | 1,492 | asm | Assembly | test.asm | paijp/mplabx | cf161345c353132d00b5c43b9af9b60cf8fe5fb5 | [
"Apache-2.0"
] | null | null | null | test.asm | paijp/mplabx | cf161345c353132d00b5c43b9af9b60cf8fe5fb5 | [
"Apache-2.0"
] | null | null | null | test.asm | paijp/mplabx | cf161345c353132d00b5c43b9af9b60cf8fe5fb5 | [
"Apache-2.0"
] | null | null | null | list p=16f887
#include "p16f887.inc"
__config _CONFIG1, _DEBUG_OFF & _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_ON & _CPD_ON & _CP_ON & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTOSCIO
__config _CONFIG2, _WRT_OFF & _BOR40V
PORTA_LED equ 0
work0 equ 0x20
work1 equ 0x21
work2 equ 0x22
org 0
goto init
wait1ms
clrf work0
wait1ms_loop
nop
nop
nop
nop
nop
decfsz work0, 1
goto wait1ms_loop
retlw 0
wait10ms
movlw 0xa
movwf work1
goto wait100ms_loop
wait50ms
movlw 0x32
movwf work1
goto wait100ms_loop
wait100ms
movlw 0x64
movwf work1
wait100ms_loop
call wait1ms
decfsz work1, 1
goto wait100ms_loop
retlw 0
initport
clrf STATUS ; RP0
movlw 0 ; ra: 00000000
movwf PORTA
movlw 0 ; rb: 00000000
movwf PORTB
movlw 0 ; rc: 00000000
movwf PORTC
movlw 0 ; rd: 00000000
movwf PORTD
movlw 0 ; re: ----0000
movwf PORTE
bsf STATUS, RP0
movlw 0x71 ; 8MHz INTOSC
movwf OSCCON - 0x80
movlw 0 ; ra: OOOOOOOO
movwf PORTA
movlw 0 ; rb: OOOOOOOO
movwf PORTB
movlw 0 ; rc: OOOOOOOO
movwf PORTC
movlw 0 ; rd: OOOOOOOO
movwf PORTD
movlw 8 ; re: ----IOOO
movwf PORTE
movlw 8 ; rbpu TMR0: 1/1
movwf OPTION_REG - 0x80
bsf STATUS, RP1
movlw 0 ; ra: DDDDDDDD
movwf ANSEL - 0x180
movlw 0 ; rb: DDDDDDDD
movwf ANSELH - 0x180
bcf STATUS, RP0
bcf STATUS, RP1
retlw 0
init
clrf STATUS
call initport
main
call wait100ms
bsf PORTA, PORTA_LED
call wait100ms
bcf PORTA, PORTA_LED
goto main
end
| 13.20354 | 143 | 0.699732 |
70ec17c852cdda5d8894a9eb0e3f5d7865c7b396 | 54 | asm | Assembly | src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_plus_vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_plus_vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_plus_vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | clc
adc {c1},x
sta {m1}
lda {c1}+1,x
adc #0
sta {m1}+1 | 9 | 12 | 0.574074 |
86950cd75cd33b5b3b69a79fa7db5bc8e8250d26 | 4,575 | asm | Assembly | testc/cputest/bitshift.asm | krismuad/TOWNSEMU | 49c098ecb4686a506a208e01271ed135c0c3c482 | [
"BSD-3-Clause"
] | 124 | 2020-03-17T05:49:47.000Z | 2022-03-27T00:11:33.000Z | testc/cputest/bitshift.asm | krismuad/TOWNSEMU | 49c098ecb4686a506a208e01271ed135c0c3c482 | [
"BSD-3-Clause"
] | 40 | 2020-05-24T12:50:43.000Z | 2022-02-22T05:32:18.000Z | testc/cputest/bitshift.asm | krismuad/TOWNSEMU | 49c098ecb4686a506a208e01271ed135c0c3c482 | [
"BSD-3-Clause"
] | 11 | 2020-05-26T17:52:04.000Z | 2021-07-31T01:07:31.000Z | .386p
ASSUME CS:CODE
PUBLIC C0_BITSHIFT_R8_I8
PUBLIC C1_BITSHIFT_R_I8
PUBLIC D3_BITSHIFT_R_CL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
EFLAGS_CF EQU 000000001H
EFLAGS_PF EQU 000000004H
EFLAGS_AF EQU 000000010H
EFLAGS_ZF EQU 000000040H
EFLAGS_SF EQU 000000080H
EFLAGS_TF EQU 000000100H
EFLAGS_DF EQU 000000400H
EFLAGS_OF EQU 000000800H
EFLAGS_NF EQU 000004000H
EFLAGS_RF EQU 000010000H
EFLAGS_VF EQU 000020000H
BITSHIFT1_EFLAGS_MASK EQU EFLAGS_OF+EFLAGS_CF
BITSHIFTN_EFLAGS_MASK EQU EFLAGS_CF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CODE SEGMENT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
BITSHIFT MACRO INST,VAL,AL_AX_OR_EAX,CTR
MOV EAX,VAL
INST AL_AX_OR_EAX,CTR
PUSHFD
POP EBX
AND EBX,BITSHIFTN_EFLAGS_MASK
MOV [EDI],EAX
MOV [EDI+4],EBX
LEA EDI,[EDI+8]
ENDM
BITSHIFT_R8_I8_X8 MACRO INST,VAL
BITSHIFT INST,VAL,AL,0
MOV EAX,VAL
INST AL,1
PUSHFD
POP EBX
AND EBX,BITSHIFT1_EFLAGS_MASK
MOV [EDI],EAX
MOV [EDI+4],EBX
LEA EDI,[EDI+8]
BITSHIFT INST,VAL,AL,2
BITSHIFT INST,VAL,AL,3
BITSHIFT INST,VAL,AL,4
BITSHIFT INST,VAL,AL,5
BITSHIFT INST,VAL,AL,6
BITSHIFT INST,VAL,AL,7
ENDM
BITSHIFT_R32_I8_X8 MACRO INST,VAL
BITSHIFT INST,VAL,EAX,0
MOV EAX,VAL
INST EAX,1
PUSHFD
POP EBX
AND EBX,BITSHIFT1_EFLAGS_MASK
MOV [EDI],EAX
MOV [EDI+4],EBX
LEA EDI,[EDI+8]
BITSHIFT INST,VAL,EAX,2
BITSHIFT INST,VAL,EAX,7
BITSHIFT INST,VAL,EAX,15
BITSHIFT INST,VAL,EAX,16
BITSHIFT INST,VAL,EAX,30
BITSHIFT INST,VAL,EAX,63 ; Should be ANDed with 31
ENDM
BITSHIFT_R32_CL_X8 MACRO INST,VAL
XOR CL,CL
BITSHIFT INST,VAL,EAX,CL
MOV CL,1
MOV EAX,VAL
INST EAX,CL
PUSHFD
POP EBX
AND EBX,BITSHIFT1_EFLAGS_MASK
MOV [EDI],EAX
MOV [EDI+4],EBX
LEA EDI,[EDI+8]
INC CL
MOV CL,2
BITSHIFT INST,VAL,EAX,CL
MOV CL,6
BITSHIFT INST,VAL,EAX,CL
MOV CL,16
BITSHIFT INST,VAL,EAX,CL
MOV CL,17
BITSHIFT INST,VAL,EAX,CL
MOV CL,31
BITSHIFT INST,VAL,EAX,CL
MOV CL,63 ; Should be ANDed with 31
BITSHIFT INST,VAL,EAX,CL
ENDM
DEBUG_BREAK_TOWNS_VM MACRO
MOV DX,2386H
MOV AL,0002H
OUT DX,AL
ENDM
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;extern C0_BITSHIFT_R8_I8(unsigned int res[128],unsigned int v0);
C0_BITSHIFT_R8_I8 PROC
PUSH EBP
MOV EBP,ESP
SUB ESP,4
PUSHAD
MOV EDI,[EBP+8]
MOV EDX,[EBP+12]
BITSHIFT_R8_I8_X8 ROL,EDX
BITSHIFT_R8_I8_X8 ROR,EDX
BITSHIFT_R8_I8_X8 RCL,EDX
BITSHIFT_R8_I8_X8 RCR,EDX
BITSHIFT_R8_I8_X8 SAL,EDX
BITSHIFT_R8_I8_X8 SAR,EDX
BITSHIFT_R8_I8_X8 SHL,EDX
BITSHIFT_R8_I8_X8 SHR,EDX
POPAD
ADD ESP,4
POP EBP
RET
C0_BITSHIFT_R8_I8 ENDP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;extern C1_BITSHIFT_R8_I88(unsigned int res[16],unsigned int v0);
C1_BITSHIFT_R_I8 PROC
PUSH EBP
MOV EBP,ESP
SUB ESP,4
PUSHAD
MOV EDI,[EBP+8]
MOV EDX,[EBP+12]
BITSHIFT_R32_I8_X8 ROL,EDX
BITSHIFT_R32_I8_X8 ROR,EDX
BITSHIFT_R32_I8_X8 RCL,EDX
BITSHIFT_R32_I8_X8 RCR,EDX
BITSHIFT_R32_I8_X8 SAL,EDX
BITSHIFT_R32_I8_X8 SAR,EDX
BITSHIFT_R32_I8_X8 SHL,EDX
BITSHIFT_R32_I8_X8 SHR,EDX
POPAD
ADD ESP,4
POP EBP
RET
C1_BITSHIFT_R_I8 ENDP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;extern D3_BITSHIFT_R_CL(unsigned int res[16],unsigned int v0,unsigned int CL);
D3_BITSHIFT_R_CL PROC
PUSH EBP
MOV EBP,ESP
SUB ESP,4
PUSHAD
MOV EDI,[EBP+8]
MOV EDX,[EBP+12]
BITSHIFT_R32_CL_X8 ROL,EDX
BITSHIFT_R32_CL_X8 ROR,EDX
BITSHIFT_R32_CL_X8 RCL,EDX
BITSHIFT_R32_CL_X8 RCR,EDX
BITSHIFT_R32_CL_X8 SAL,EDX
BITSHIFT_R32_CL_X8 SAR,EDX
BITSHIFT_R32_CL_X8 SHL,EDX
BITSHIFT_R32_CL_X8 SHR,EDX
POPAD
ADD ESP,4
POP EBP
RET
D3_BITSHIFT_R_CL ENDP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CODE ENDS
END
| 19.891304 | 79 | 0.55541 |
ad6129e4062656327cf3c2290b981ca06c0fcbb9 | 40,404 | asm | Assembly | gwnum/zmult3ax.asm | Kasual/GIMPS | a09c0d4cc1489558725eef0578613c66bd65a708 | [
"Intel"
] | null | null | null | gwnum/zmult3ax.asm | Kasual/GIMPS | a09c0d4cc1489558725eef0578613c66bd65a708 | [
"Intel"
] | null | null | null | gwnum/zmult3ax.asm | Kasual/GIMPS | a09c0d4cc1489558725eef0578613c66bd65a708 | [
"Intel"
] | null | null | null | ; Copyright 2011-2019 Mersenne Research, Inc. All rights reserved
; Author: George Woltman
; Email: woltman@alum.mit.edu
;
; Additional routines used with zr4dwpn FFTs
;
TITLE setup
INCLUDE unravel.mac
INCLUDE extrn.mac
INCLUDE zarch.mac
INCLUDE zbasics.mac
INCLUDE zmult.mac
INCLUDE znormal.mac
INCLUDE znormal_zpad.mac
_TEXT SEGMENT
;;
;; Add two numbers without carry propagation. Caller can use this for
;; consecutive add or subtract operations. However, the last operation
;; before a multiply must use the routine that will normalize data.
;;
PROCFL gwzaddq3
ad_prolog 0,0,rbx,rsi,rdi,r8
mov rcx, SRCARG ; Address of first number
mov rdx, SRC2ARG ; Address of second number
mov rsi, DESTARG ; Address of destination
mov rdi, fourKBgapsize ; Preload 4KB gap distance
sub rdi, normblkdst4 ; One pass FFTs do not apply a 4KB gap distance
mov ebx, 8 ; Eight pass 2 blks in one pass 1 block
qadd0: mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
qadd1: mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
qaddlp: vmovapd zmm0, [rdx] ; Load second number
vmovapd zmm1, [rdx+64] ; Load second number
vaddpd zmm0, zmm0, [rcx] ; Add in first number
vaddpd zmm1, zmm1, [rcx+64] ; Add in first number
;; bug -- unroll this a bit, use common register naming rsi=src, rbx = dest
zstore [rsi], zmm0 ; Save result
zstore [rsi+64], zmm1 ; Save result
bump rcx, 128 ; Next source
bump rdx, 128 ; Next source
bump rsi, 128 ; Next dest
dec r8 ; Test for end of 4KB chunk
jnz short qaddlp ; Loop if necessary
add rcx, rdi ; Skip 64 to 192 bytes every 4KB
add rdx, rdi ; Skip 64 to 192 bytes every 4KB
add rsi, rdi ; Skip 64 to 192 bytes every 4KB
dec rax ; Check middle loop counter
jnz short qadd1 ; Loop if necessary
add rcx, pass2gapsize ; Next source
add rdx, pass2gapsize ; Next source
add rsi, pass2gapsize ; Next dest
dec rbx ; Check loop counter
jnz qadd0 ; Loop if necessary
ad_epilog 0,0,rbx,rsi,rdi,r8
gwzaddq3 ENDP
;;
;; Add two numbers with carry propagation (four different versions)
;;
; Irrational, not zero-padded
PROCFL gwzadd3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
add0: mov r8, normval2 ; Load count of clms in 4KB chunk
add1: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
add2: znorm_op_wpn vaddpd, exec ; Add and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
bump rdi, 1 ; Next big/lit ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc add2
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust pointers
sub rcx, r9
sub rbx, r9
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz add2
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz add1 ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
dec rax ; Loop until pass 1 block completed
jnz add0
znorm_op_wpn_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzadd3 ENDP
; Rational, not zero-padded
PROCFL gwzaddr3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
add0r: mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
add2r: znorm_op_wpn vaddpd, noexec ; Add and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc add2r
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust pointers
sub rcx, r9
sub rbx, r9
dec r8 ; Loop until 4KB processed
jnz add2r ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz add0r
znorm_op_wpn_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzaddr3 ENDP
; Irrational, zero-padded
PROCFL gwzaddzp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_zpad_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
sub r9, r9 ; Clear register used to alternate the increment of rdi
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
add0zp: mov r8, normval2 ; Load count of clms in 4KB chunk
add1zp: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
add2zp: znorm_op_wpn_zpad vaddpd, exec ; Add and normalize four low/high FFT word pairs (64 values)
add rsi, pass2blkdst ; Next src ptr
add rcx, pass2blkdst ; Next src ptr
add rbx, pass2blkdst ; Next dest ptr
xor r12, 4 ; Bump or unbump pointer into the compressed biglit table
add rdi, r9 ; Increment (or not) the biglit table pointer
xor r9, 1 ; Alternate the increment for rdi
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc add2zp
sub rsi, pass1blkdst ; Adjust source pointers
sub rcx, pass1blkdst
sub rbx, pass1blkdst
bump rsi, 128
bump rcx, 128
bump rbx, 128
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz add2zp
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz add1zp ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rcx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz add0zp
znorm_op_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzaddzp3 ENDP
; Rational, zero-padded
PROCFL gwzaddrzp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_zpad_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
add0rzp:mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
add2rzp:znorm_op_wpn_zpad vaddpd, noexec ; Add and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc add2rzp
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rcx, r9
sub rbx, r9
dec r8 ; Loop until 4KB processed
jnz add2rzp ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz add0rzp
znorm_op_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzaddrzp3 ENDP
;;
;; Subtract two numbers without carry propagation. Caller can use this for
;; consecutive add or subtract operations. However, the last operation
;; before a multiply must use the routine that will normalize data.
;;
PROCFL gwzsubq3
ad_prolog 0,0,rbx,rsi,rdi,r8
mov rcx, SRCARG ; Address of first number
mov rdx, SRC2ARG ; Address of second number
mov rsi, DESTARG ; Address of destination
mov rdi, fourKBgapsize ; Preload 4KB gap distance
sub rdi, normblkdst4 ; One pass FFTs do not apply a 4KB gap distance
mov ebx, 8 ; Eight pass 2 blks in one pass 1 block
qsub0: mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
qsub1: mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
qsublp: vmovapd zmm0, [rdx] ; Load second number
vmovapd zmm1, [rdx+64] ; Load second number
vsubpd zmm0, zmm0, [rcx] ; Subtract first number
vsubpd zmm1, zmm1, [rcx+64] ; Subtract first number
zstore [rsi], zmm0 ; Save result
zstore [rsi+64], zmm1 ; Save result
bump rcx, 128 ; Next source
bump rdx, 128 ; Next source
bump rsi, 128 ; Next dest
dec r8 ; Test for end of 4KB chunk
jnz short qsublp ; Loop if necessary
add rcx, rdi ; Skip 64 to 192 bytes every 4KB
add rdx, rdi ; Skip 64 to 192 bytes every 4KB
add rsi, rdi ; Skip 64 to 192 bytes every 4KB
dec rax ; Check middle loop counter
jnz short qsub1 ; Loop if necessary
add rcx, pass2gapsize ; Next source
add rdx, pass2gapsize ; Next source
add rsi, pass2gapsize ; Next dest
dec rbx ; Check loop counter
jnz qsub0 ; Loop if necessary
ad_epilog 0,0,rbx,rsi,rdi,r8
gwzsubq3 ENDP
;;
;; Subtract two numbers with carry propagation (four different versions)
;;
; Irrational, not zero-padded
PROCFL gwzsub3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
sub0: mov r8, normval2 ; Load count of clms in 4KB chunk
sub1: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
sub2: znorm_op_wpn vsubpd, exec ; Subtract and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
bump rdi, 1 ; Next big/lit ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc sub2
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rcx, r9
sub rbx, r9
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz sub2
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz sub1 ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz sub0
znorm_op_wpn_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzsub3 ENDP
; Rational, not zero-padded
PROCFL gwzsubr3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
sub0r: mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
sub2r: znorm_op_wpn vsubpd, noexec ; Subtract and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc sub2r
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rcx, r9
sub rbx, r9
dec r8 ; Loop until 4KB processed
jnz sub2r ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz sub0r
znorm_op_wpn_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzsubr3 ENDP
; Irrational, zero-padded
PROCFL gwzsubzp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_zpad_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
sub r9, r9 ; Clear register used to alternate the increment of rdi
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
sub0zp: mov r8, normval2 ; Load count of clms in 4KB chunk
sub1zp: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
sub2zp: znorm_op_wpn_zpad vsubpd, exec ; Subtract and normalize four low/high FFT word pairs (64 values)
add rsi, pass2blkdst ; Next src ptr
add rcx, pass2blkdst ; Next src ptr
add rbx, pass2blkdst ; Next dest ptr
xor r12, 4 ; Bump or unbump pointer into the compressed biglit table
add rdi, r9 ; Increment (or not) the biglit table pointer
xor r9, 1 ; Alternate the increment for rdi
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc sub2zp
sub rsi, pass1blkdst ; Adjust source pointers
sub rcx, pass1blkdst
sub rbx, pass1blkdst
bump rsi, 128
bump rcx, 128
bump rbx, 128
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz sub2zp
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz sub1zp ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rcx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz sub0zp
znorm_op_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzsubzp3 ENDP
; Rational, zero-padded
PROCFL gwzsubrzp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_op_wpn_zpad_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
sub0rzp:mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
sub2rzp:znorm_op_wpn_zpad vsubpd, noexec ; Subtract and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc sub2rzp
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rcx, r9
sub rbx, r9
dec r8 ; Loop until 4KB processed
jnz sub2rzp ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz sub0rzp
znorm_op_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzsubrzp3 ENDP
;;
;; Add and subtract two numbers without carry propagation
;;
PROCFL gwzaddsubq3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8
mov rcx, SRCARG ; Address of first number
mov rdx, SRC2ARG ; Address of second number
mov rsi, DESTARG ; Address of destination #1
mov rbp, DEST2ARG ; Address of destination #2
mov rdi, fourKBgapsize ; Preload 4KB gap distance
sub rdi, normblkdst4 ; One pass FFTs do not apply a 4KB gap distance
mov ebx, 8 ; Eight pass 2 blks in one pass 1 block
qaddsub0:mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
qaddsub1:mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
qaddsublp:
vmovapd zmm1, [rcx] ; Load first number
vmovapd zmm3, [rcx+64] ; Load first number
vaddpd zmm0, zmm1, [rdx] ; Add in second number
vsubpd zmm1, zmm1, [rdx] ; Subtract out second number
vaddpd zmm2, zmm3, [rdx+64] ; Add in second number
vsubpd zmm3, zmm3, [rdx+64] ; Subtract out second number
zstore [rsi], zmm0 ; Save result
zstore [rbp], zmm1 ; Save result
zstore [rsi+64], zmm2 ; Save result
zstore [rbp+64], zmm3 ; Save result
bump rcx, 128 ; Next source
bump rdx, 128 ; Next source
bump rsi, 128 ; Next dest
bump rbp, 128 ; Next dest
dec r8 ; Test for end of 4KB chunk
jnz short qaddsublp ; Loop if necessary
add rcx, rdi ; Skip 64 to 192 bytes every 4KB
add rdx, rdi ; Skip 64 to 192 bytes every 4KB
add rsi, rdi ; Skip 64 to 192 bytes every 4KB
add rbp, rdi ; Skip 64 to 192 bytes every 4KB
dec rax ; Check middle loop counter
jnz qaddsub1 ; Loop if necessary
add rcx, pass2gapsize ; Next source
add rdx, pass2gapsize ; Next source
add rsi, pass2gapsize ; Next dest
add rbp, pass2gapsize ; Next dest
dec rbx ; Check loop counter
jnz qaddsub0 ; Loop if necessary
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8
gwzaddsubq3 ENDP
;;
;; Add and subtract two numbers with carry propagation (four different versions)
;;
; Irrational, not zero-padded
PROCFL gwzaddsub3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
mov rbp, DEST2ARG ; Address of destination #2
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_addsub_wpn_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
as0: mov r8, normval2 ; Load count of clms in 4KB chunk
as1: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
as2: znorm_addsub_wpn exec ; Add & subtract and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
add rbp, r9 ; Next dest ptr
bump rdi, 1 ; Next big/lit ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc as2
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rcx, r9
sub rbx, r9
sub rbp, r9
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz as2
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz as1 ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
add rbp, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz as0
znorm_addsub_wpn_save_carries ; Save carries in the two carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzaddsub3 ENDP
; Rational, not zero-padded
PROCFL gwzaddsubr3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
mov rbp, DEST2ARG ; Address of destination #2
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_addsub_wpn_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
as0r: mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
as2r: znorm_addsub_wpn noexec ; Add & subtract and normalize four low/high FFT word pair (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
add rbp, r9 ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc as2r
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rcx, r9
sub rbx, r9
sub rbp, r9
dec r8 ; Loop until 4KB processed
jnz as2r ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
add rbp, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz as0r
znorm_addsub_wpn_save_carries ; Save carries in the two carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzaddsubr3 ENDP
; Irrational, zero-padded
PROCFL gwzaddsubzp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
mov rbp, DEST2ARG ; Address of destination #2
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_addsub_wpn_zpad_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
sub r9, r9 ; Clear register used to alternate the increment of rdi
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
as0zp: mov r8, normval2 ; Load count of clms in 4KB chunk
as1zp: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
as2zp: znorm_addsub_wpn_zpad exec ; Add & subtract and normalize four low/high FFT word pairs (64 values)
add rsi, pass2blkdst ; Next src ptr
add rcx, pass2blkdst ; Next src ptr
add rbx, pass2blkdst ; Next dest ptr
add rbp, pass2blkdst ; Next dest ptr
xor r12, 4 ; Bump or unbump pointer into the compressed biglit table
add rdi, r9 ; Increment (or not) the biglit table pointer
xor r9, 1 ; Alternate the increment for rdi
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc as2zp
sub rsi, pass1blkdst ; Adjust source pointers
sub rcx, pass1blkdst
sub rbx, pass1blkdst
sub rbp, pass1blkdst
bump rsi, 128
bump rcx, 128
bump rbx, 128
bump rbp, 128
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz as2zp
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz as1zp ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rcx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbp, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz as0zp
znorm_addsub_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzaddsubzp3 ENDP
; Rational, zero-padded
PROCFL gwzaddsubrzp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of first number
mov rcx, SRC2ARG ; Address of second number
mov rbx, DESTARG ; Address of destination
mov rbp, DEST2ARG ; Address of destination #2
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_addsub_wpn_zpad_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
as0rzp: mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
as2rzp: znorm_addsub_wpn_zpad noexec ; Add & subtract and normalize four low/high FFT word pairs (64 values)
mov r9, pass2blkdst
add rsi, r9 ; Next src ptr
add rcx, r9 ; Next src ptr
add rbx, r9 ; Next dest ptr
add rbp, r9 ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc as2rzp
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rcx, r9
sub rbx, r9
sub rbp, r9
dec r8 ; Loop until 4KB processed
jnz as2rzp ; Loop til done
mov r9, fourKBgapsize
add rsi, r9 ; Skip 64 to 192 bytes every 4KB
add rcx, r9 ; Skip 64 to 192 bytes every 4KB
add rbx, r9 ; Skip 64 to 192 bytes every 4KB
add rbp, r9 ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz as0rzp
znorm_addsub_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzaddsubrzp3 ENDP
;;
;; Add in a small number with carry propagation (four different versions)
;;
; Irrational version
PROCFL gwzadds3
ad_prolog 0,0,rbx,rsi
mov rsi, DESTARG ; Address of destination
vmovsd xmm5, DBLARG ; Small addin value
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_smalladd_wpn_preload exec
znorm_smalladd_wpn exec
ad_epilog 0,0,rbx,rsi
gwzadds3 ENDP
; Rational version
PROCFL gwzaddsr3
ad_prolog 0,0,rbx,rsi
mov rsi, DESTARG ; Address of destination
vmovsd xmm5, DBLARG ; Small addin value
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_smalladd_wpn_preload noexec
znorm_smalladd_wpn noexec
ad_epilog 0,0,rbx,rsi
gwzaddsr3 ENDP
;;
;; Multiply a number by a small value with carry propagation (four different versions)
;;
; Irrational version, not zero-padded
PROCFL gwzmuls3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of destination
mov rbx, DESTARG ; Address of destination
vbroadcastsd zmm31, DBLARG ; Load small multiplier value
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_smallmul_wpn_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
mul0: mov r8, normval2 ; Load count of clms in 4KB chunk
mul1: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
mul2: znorm_smallmul_wpn exec ; Multiply and normalize four low/high FFT word pairs (64 values)
add rsi, pass2blkdst ; Next src ptr
add rbx, pass2blkdst ; Next dest ptr
bump rdi, 1 ; Next big/lit ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc mul2
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rbx, r9
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz mul2
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz mul1 ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz mul0
znorm_smallmul_wpn_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzmuls3 ENDP
; Rational version, not zero-padded
PROCFL gwzmulsr3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of destination
mov rbx, DESTARG ; Address of destination
vbroadcastsd zmm31, DBLARG ; Load small multiplier value
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_smallmul_wpn_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
mul0r: mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
mul2r: znorm_smallmul_wpn noexec ; Multiply and normalize four low/high FFT word pairs (64 values)
add rsi, pass2blkdst ; Next src ptr
add rbx, pass2blkdst ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc mul2r
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rbx, r9
dec r8 ; Loop until 4KB processed
jnz mul2r ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz mul0r
znorm_smallmul_wpn_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzmulsr3 ENDP
; Irrational version, zero-padded
PROCFL gwzmulszp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of destination
mov rbx, DESTARG ; Address of destination
vbroadcastsd zmm31, DBLARG ; Load small multiplier value
znorm_common_op_wpn_preload exec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_smallmul_wpn_zpad_preload exec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov rdi, norm_ptr1 ; Addr of the big/little flags array
mov r12, compressed_biglits ; Get pointer to compressed biglit table
sub rdx, rdx ; Clear register used to load compressed biglit index
sub r9, r9 ; Clear register used to alternate the increment of rdi
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
mul0zp: mov r8, normval2 ; Load count of clms in 4KB chunk
mul1zp: mov r10d, cache_line_multiplier ; Load clm*8. This affects how we step through the big/lit array.
mul2zp: znorm_smallmul_wpn_zpad exec ; Multiply and normalize four low/high FFT word pairs (64 values)
add rsi, pass2blkdst ; Next src ptr
add rbx, pass2blkdst ; Next dest ptr
xor r12, 4 ; Bump or unbump pointer into the compressed biglit table
add rdi, r9 ; Increment (or not) the biglit table pointer
xor r9, 1 ; Alternate the increment for rdi
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc mul2zp
sub rsi, pass1blkdst ; Adjust source pointers
sub rbx, pass1blkdst
bump rsi, 128
bump rbx, 128
sub r10, 8 ; We just finished 8 of the cache_line_multiplier
jnz mul2zp
add rdi, normval3 ; Next big/lit ptr
dec r8 ; Loop until 4KB processed
jnz mul1zp ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz mul0zp
znorm_smallmul_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzmulszp3 ENDP
; Rational version, zero-padded
PROCFL gwzmulsrzp3
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rsi, SRCARG ; Address of destination
mov rbx, DESTARG ; Address of destination
vbroadcastsd zmm31, DBLARG ; Load small multiplier value
znorm_common_op_wpn_preload noexec ; Preload constants common to add,sub,addsub,smalladd,smallmul,with and without zpad
znorm_smallmul_wpn_zpad_preload noexec ; Preload constants, init carry registers
mov r13, pass1blkdst ; Distance to FFT source #2
lea r14, [r13+r13] ; Distance to FFT source #3
lea r15, [r13+r14] ; Distance to FFT source #4
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
mul0rzp:mov r8d, normval1 ; Load count of loword/highword pairs in 4KB chunk
mul2rzp:znorm_smallmul_wpn_zpad noexec ; Multiply and normalize four low/high FFT word pairs (64 values)
add rsi, pass2blkdst ; Next src ptr
add rbx, pass2blkdst ; Next dest ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc mul2rzp
lea r9, [r13-128] ; pass1blkdst - 128
sub rsi, r9 ; Adjust source pointers
sub rbx, r9
dec r8 ; Loop until 4KB processed
jnz mul2rzp ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rbx, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz mul0rzp
znorm_smallmul_wpn_zpad_save_carries ; Save carries in the carries array
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwzmulsrzp3 ENDP
;;
;; Do final carry propagation for add/sub/addsub/smallmul operations
;;
; Irrational version
PROCFL gwz3_apply_carries
ad_prolog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
mov rax, ZMM_OP_CARRIES_ROUTINE
call rax
ad_epilog 0,0,rbx,rbp,rsi,rdi,r8,r9,r10,r12,r13,r14,r15,zmm6,zmm7,zmm8,zmm9,zmm10,zmm11,zmm12,zmm13,zmm14,zmm15
gwz3_apply_carries ENDP
;;
;; Copy a number zeroing some low order words
;;
PROCFL gwzcopyzero3
ad_prolog 0,0,rbx,rsi,rdi
mov rsi, SRCARG ; Address of first number
mov rdi, DESTARG ; Address of destination
mov rdx, SRC2ARG ; Load address of masks and counts computed in C code
sub ecx, ecx ; Count of iterations before new masks are needed
mov eax, normval4 ; Load count of 4KB chunks in a pass 2 block
cpzlp0: mov ebx, normval1 ; Load count of loword/highword pairs in 4KB chunk
cpzlp2: and ecx, ecx ; Time to load new masks?
jnz short noload ; No, wait for count to reach zero
kmovw k1, [rdx+0] ; Load 2 new masks
kshiftrw k2, k1, 8
mov ecx, [rdx+4] ; Count of iterations these masks are valid
bump rdx, 8 ; Move onto next set of masks
noload: vmovapd zmm0 {k1}{z}, [rsi] ; Load source data
vmovapd zmm2 {k2}{z}, [rsi+64]
zstore [rdi], zmm0 ; Store destination data
zstore [rdi+64], zmm2
bump rcx, -1 ; Decrement mask count
add rsi, pass2blkdst ; Next src ptr
add rdi, pass2blkdst ; Next src ptr
add eax, 0x80000000/4 ; Loop 8 times (8 pass 2 blocks in each pass 1 block)
jnc short cpzlp2
sub rsi, pass1blkdst ; Adjust source pointers
sub rdi, pass1blkdst
bump rsi, 128
bump rdi, 128
dec rbx ; Loop until 4KB processed
jnz short cpzlp2 ; Loop til done
add rsi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
add rdi, fourKBgapsize ; Skip 64 to 192 bytes every 4KB
dec eax ; Loop until pass 1 block completed
jnz cpzlp0
ad_epilog 0,0,rbx,rsi,rdi
gwzcopyzero3 ENDP
_TEXT ENDS
END
| 40.607035 | 120 | 0.735422 |
fa650435ad1522eb01840c5d8275d1daee29499a | 387 | asm | Assembly | oeis/037/A037485.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/037/A037485.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/037/A037485.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A037485: Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 1,2.
; Submitted by Jamie Morken(s2.)
; 1,10,81,650,5201,41610,332881,2663050,21304401,170435210,1363481681,10907853450,87262827601,698102620810,5584820966481,44678567731850,357428541854801,2859428334838410
add $0,1
mov $1,8
pow $1,$0
mul $1,10
div $1,9
mov $0,$1
mul $0,5
div $0,35
| 29.769231 | 168 | 0.767442 |
279c5c5fe9d332baa889d05f8f01ec934f923348 | 9,492 | asm | Assembly | src/shaders/h264/mc/interpolate_Y_4x4.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 192 | 2018-01-26T11:51:55.000Z | 2022-03-25T20:04:19.000Z | src/shaders/h264/mc/interpolate_Y_4x4.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 256 | 2017-01-23T02:10:27.000Z | 2018-01-23T10:00:05.000Z | src/shaders/h264/mc/interpolate_Y_4x4.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 64 | 2018-01-30T19:51:53.000Z | 2021-11-24T01:26:14.000Z | /*
* Interpolation kernel for luminance motion compensation
* Copyright © <2010>, Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* This file was originally licensed under the following license
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// Kernel name: Interpolate_Y_4x4.asm
//
// Interpolation kernel for luminance motion compensation
//
// $Revision: 10 $
// $Date: 10/09/06 4:00p $
//
// Compute the GRF address of the starting position of the reference area
#if 1
(-f0.1) mov (1) pREF:w nOFFSET_REF+2+nGRFWIB:w
(f0.1) mov (1) pREF:w nOFFSET_REF+2:w
mov (1) pRESULT:uw gpINTPY:uw
#else
mov (1) pREF:w nOFFSET_REF+2+nGRFWIB:w {NoDDClr}
mov (1) pRESULT:uw gpINTPY:uw {NoDDChk}
#endif
/*
* | |
* - - 0 1 2 3 + -
* 4 5 6 7
* 8 9 A B
* C D E F
* - - + - - - + -
* | |
*/
// Case 0
or.z.f0.1 (16) null:w gMVY_FRAC<0;1,0>:w gMVX_FRAC<0;1,0>:w
(f0.1) mov (4) r[pRESULT]<1>:uw r[pREF0]<4;4,1>:ub
(f0.1) mov (4) r[pRESULT,16]<1>:uw r[pREF0,16]<4;4,1>:ub
(f0.1) mov (4) r[pRESULT,32]<1>:uw r[pREF0,32]<4;4,1>:ub
(f0.1) mov (4) r[pRESULT,48]<1>:uw r[pREF0,48]<4;4,1>:ub
(f0.1) jmpi INTERLABEL(Exit_Interpolate_Y_4x4)
// Store all address registers
mov (8) gpADDR<1>:w a0<8;8,1>:w
mul.z.f0.0 (1) gW4:w gMVY_FRAC:w gMVX_FRAC:w
and.nz.f0.1 (1) null gW4:w 1:w
add (1) pREF1:uw pREF0:uw nGRFWIB/2:uw
add (2) pREF2<1>:uw pREF0<2;2,1>:uw nGRFWIB:uw
mov (4) gW0<1>:uw pREF0<4;4,1>:uw
(f0.0) jmpi INTERLABEL(Interpolate_Y_H_4x4)
(f0.1) jmpi INTERLABEL(Interpolate_Y_H_4x4)
//-----------------------------------------------------------------------
// CASE: A69BE (H/V interpolation)
//-----------------------------------------------------------------------
// Compute interim horizontal intepolation
add (1) pREF0<1>:uw pREF0<0;1,0>:uw -34:w
add (1) pREF1<1>:uw pREF1<0;1,0>:uw -18:w {NoDDClr}
mov (1) pRESD:ud nOFFSET_INTERIM4x4_5:ud {NoDDChk} // Case 69be
// Check whether this position is 'A'
cmp.e.f0.0 (1) null gW4:w 4:w
$for(0;<2;1) {
add (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1]<16;4,1>:ub r[pREF0,nGRFWIB*2*%1+5]<16;4,1>:ub {Compr}
mac (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1+1]<16;4,1>:ub -5:w {Compr}
mac (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1+2]<16;4,1>:ub 20:w {Compr}
mac (16) acc0<1>:w r[pREF0,nGRFWIB*2*%1+3]<16;4,1>:ub 20:w {Compr}
mac (16) r[pRES,nGRFWIB*%1]<1>:w r[pREF0,nGRFWIB*2*%1+4]<16;4,1>:ub -5:w {Compr}
}
// last line
add (4) acc0<1>:w r[pREF0,nGRFWIB*2*2]<4;4,1>:ub r[pREF0,nGRFWIB*2*2+5]<4;4,1>:ub
mac (4) acc0<1>:w r[pREF0,nGRFWIB*2*2+1]<4;4,1>:ub -5:w
mac (4) acc0<1>:w r[pREF0,nGRFWIB*2*2+2]<4;4,1>:ub 20:w
mac (4) acc0<1>:w r[pREF0,nGRFWIB*2*2+3]<4;4,1>:ub 20:w
mac (4) r[pRES,nGRFWIB*2]<1>:w r[pREF0,nGRFWIB*2*2+4]<4;4,1>:ub -5:w
// Compute interim/output vertical interpolation
mov (1) pREF6D:ud nOFFSET_INTERIM4x4_4:ud {NoDDClr}
mov (1) pREF0D:ud nOFFSET_INTERIM4x4_7:ud {NoDDChk,NoDDClr}
mov (1) pREF2D:ud nOFFSET_INTERIM4x4_8:ud {NoDDChk,NoDDClr}
mov (1) pREF4D:ud nOFFSET_INTERIM4x4_9:ud {NoDDChk}
add (16) acc0<1>:w gwINTERIM4x4_BUF(0)<16;16,1> 512:w
mac (16) acc0<1>:w gwINTERIM4x4_BUF(1)<16;16,1> -5:w
mac (16) acc0<1>:w r[pREF6,0]<8,1>:w 20:w
(f0.0) mov (1) pRES:uw nOFFSET_RES:uw // Case a
(-f0.0) mov (1) pRES:uw nOFFSET_INTERIM4x4:uw // Case 69be
mac (16) acc0<1>:w r[pREF0,0]<4,1>:w -5:w
mac (16) acc0<1>:w r[pREF0,nGRFWIB]<4,1>:w 1:w
mac (16) acc0<1>:w r[pREF2,0]<4,1>:w 20:w
asr.sat (16) r[pRES]<2>:ub acc0<16;16,1>:w 10:w
(f0.0) jmpi INTERLABEL(Return_Interpolate_Y_4x4)
INTERLABEL(Interpolate_Y_H_4x4):
cmp.e.f0.0 (1) null gMVX_FRAC:w 0:w
cmp.e.f0.1 (1) null gMVY_FRAC:w 2:w
(f0.0) jmpi INTERLABEL(Interpolate_Y_V_4x4)
(f0.1) jmpi INTERLABEL(Interpolate_Y_V_4x4)
//-----------------------------------------------------------------------
// CASE: 123567DEF (H interpolation)
//-----------------------------------------------------------------------
add (4) pREF0<1>:uw gW0<4;4,1>:uw -2:w
cmp.g.f0.0 (4) null:w gMVY_FRAC<0;1,0>:w 2:w
cmp.e.f0.1 (1) null gMVX_FRAC:w 2:w
(f0.0) add (4) pREF0<1>:uw pREF0<4;4,1>:uw nGRFWIB/2:uw
cmp.e.f0.0 (1) null:w gMVY_FRAC<0;1,0>:w 0:w
(f0.1) mov (1) pRESULT:uw nOFFSET_RES:uw // Case 26E
(-f0.1) mov (1) pRESULT:uw nOFFSET_INTERIM4x4:uw // Case 1357DF
// Compute interim/output horizontal interpolation
add (16) acc0<1>:w r[pREF0]<4,1>:ub 16:w
mac (16) acc0<1>:w r[pREF0,1]<4,1>:ub -5:w
mac (16) acc0<1>:w r[pREF0,2]<4,1>:ub 20:w
mac (16) acc0<1>:w r[pREF0,3]<4,1>:ub 20:w
mac (16) acc0<1>:w r[pREF0,4]<4,1>:ub -5:w
mac (16) acc0<1>:w r[pREF0,5]<4,1>:ub 1:w
asr.sat (16) r[pRESULT]<2>:ub acc0<16;16,1>:w 5:w
(-f0.1) jmpi INTERLABEL(Interpolate_Y_V_4x4)
(-f0.0) jmpi INTERLABEL(Average_4x4)
jmpi INTERLABEL(Return_Interpolate_Y_4x4)
INTERLABEL(Interpolate_Y_V_4x4):
cmp.e.f0.0 (1) null gMVY_FRAC:w 0:w
(f0.0) jmpi INTERLABEL(Interpolate_Y_I_4x4)
//-----------------------------------------------------------------------
// CASE: 48C59D7BF (V interpolation)
//-----------------------------------------------------------------------
cmp.g.f0.1 (8) null:w gMVX_FRAC<0;1,0>:w 2:w
mov (4) pREF0<1>:uw gW0<4;4,1>:uw {NoDDClr}
add (4) pREF4<1>:w gW0<4;4,1>:uw 16:w {NoDDChk}
(f0.1) add (8) pREF0<1>:uw pREF0<4;4,1>:uw 1:uw
cmp.e.f0.0 (1) null:w gMVX_FRAC<0;1,0>:w 0:w
cmp.e.f0.1 (1) null gMVY_FRAC:w 2:w
// Compute interim/output vertical interpolation
add (16) acc0<1>:w r[pREF0,-nGRFWIB]<4,1>:ub 16:w
mac (16) acc0<1>:w r[pREF0]<4,1>:ub 20:w
mac (16) acc0<1>:w r[pREF0,nGRFWIB]<4,1>:ub -5:w
mac (16) acc0<1>:w r[pREF4,-nGRFWIB]<4,1>:ub -5:w
mac (16) acc0<1>:w r[pREF4]<4,1>:ub 20:w
mac (16) acc0<1>:w r[pREF4,nGRFWIB]<4,1>:ub 1:w
mov (1) pRESULT:uw nOFFSET_RES:uw
(-f0.0) jmpi INTERLABEL(VFILTER_4x4)
(-f0.1) mov (1) pRESULT:uw nOFFSET_INTERIM4x4:uw
INTERLABEL(VFILTER_4x4):
asr.sat (16) r[pRESULT]<2>:ub acc0<16;16,1>:w 5:w
(-f0.0) jmpi INTERLABEL(Average_4x4)
(f0.1) jmpi INTERLABEL(Return_Interpolate_Y_4x4 )
INTERLABEL(Interpolate_Y_I_4x4):
//-----------------------------------------------------------------------
// CASE: 134C (Integer position)
//-----------------------------------------------------------------------
mov (4) pREF0<1>:uw gW0<4;4,1>:uw
cmp.e.f0.0 (4) null:w gMVX_FRAC<0;1,0>:w 3:w
cmp.e.f0.1 (4) null:w gMVY_FRAC<0;1,0>:w 3:w
(f0.0) add (4) pREF0<1>:uw pREF0<4;4,1>:uw 1:uw
(f0.1) add (4) pREF0<1>:uw pREF0<4;4,1>:uw nGRFWIB/2:uw
mov (16) guwINTERIM_BUF2(0)<1> r[pREF0]<4,1>:ub
INTERLABEL(Average_4x4):
//-----------------------------------------------------------------------
// CASE: 13456789BCDEF (Average)
//-----------------------------------------------------------------------
// Average two interim results
avg.sat (16) gubINTERIM_BUF2(0)<2> gubINTERIM_BUF2(0)<32;16,2> gINTERIM4x4<32;16,2>:ub
INTERLABEL(Return_Interpolate_Y_4x4):
// Move result
mov (1) pRES:uw gpINTPY:uw
mov (4) r[pRES,0]<2>:ub gubINTERIM_BUF2(0,0)
mov (4) r[pRES,16]<2>:ub gubINTERIM_BUF2(0,8)
mov (4) r[pRES,32]<2>:ub gubINTERIM_BUF2(0,16)
mov (4) r[pRES,48]<2>:ub gubINTERIM_BUF2(0,24)
// Restore all address registers
mov (8) a0<1>:w gpADDR<8;8,1>:w
INTERLABEL(Exit_Interpolate_Y_4x4):
// end of file
| 38.274194 | 101 | 0.571007 |
e0acef58bce0ecb0a91595ad7c169917db6f7cda | 90,240 | asm | Assembly | target/cos_117/disasm/iop_overlay1/BMXTPO.asm | jrrk2/cray-sim | 52c9639808d6890517092637b188282c00cce4f7 | [
"BSL-1.0"
] | 49 | 2020-10-09T12:29:16.000Z | 2022-03-12T02:33:35.000Z | target/cos_117/disasm/iop_overlay1/BMXTPO.asm | jrrk2/cray-sim | 52c9639808d6890517092637b188282c00cce4f7 | [
"BSL-1.0"
] | 1 | 2021-12-29T15:59:25.000Z | 2021-12-29T15:59:25.000Z | target/cos_117/disasm/iop_overlay1/BMXTPO.asm | jrrk2/cray-sim | 52c9639808d6890517092637b188282c00cce4f7 | [
"BSL-1.0"
] | 6 | 2021-04-12T06:10:32.000Z | 2022-02-08T23:11:19.000Z | 0x0000 (0x000000) 0x211A- f:00020 d: 282 | A = OR[282]
0x0001 (0x000002) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0002 (0x000004) 0x8405- f:00102 d: 5 | P = P + 5 (0x0007), A = 0
0x0003 (0x000006) 0x2119- f:00020 d: 281 | A = OR[281]
0x0004 (0x000008) 0x271D- f:00023 d: 285 | A = A - OR[285]
0x0005 (0x00000A) 0x8602- f:00103 d: 2 | P = P + 2 (0x0007), A # 0
0x0006 (0x00000C) 0x701D- f:00070 d: 29 | P = P + 29 (0x0023)
0x0007 (0x00000E) 0x1058- f:00010 d: 88 | A = 88 (0x0058)
0x0008 (0x000010) 0x2920- f:00024 d: 288 | OR[288] = A
0x0009 (0x000012) 0x7E03-0x02B0 f:00077 d: 3 | R = OR[3]+688 (0x02B0)
0x000B (0x000016) 0x2121- f:00020 d: 289 | A = OR[289]
0x000C (0x000018) 0x291E- f:00024 d: 286 | OR[286] = A
0x000D (0x00001A) 0x211B- f:00020 d: 283 | A = OR[283]
0x000E (0x00001C) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x000F (0x00001E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0010 (0x000020) 0x211E- f:00020 d: 286 | A = OR[286]
0x0011 (0x000022) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0012 (0x000024) 0x211E- f:00020 d: 286 | A = OR[286]
0x0013 (0x000026) 0x1448- f:00012 d: 72 | A = A + 72 (0x0048)
0x0014 (0x000028) 0x2908- f:00024 d: 264 | OR[264] = A
0x0015 (0x00002A) 0x2118- f:00020 d: 280 | A = OR[280]
0x0016 (0x00002C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0017 (0x00002E) 0x2119- f:00020 d: 281 | A = OR[281]
0x0018 (0x000030) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0019 (0x000032) 0x2919- f:00024 d: 281 | OR[281] = A
0x001A (0x000034) 0x211E- f:00020 d: 286 | A = OR[286]
0x001B (0x000036) 0x1416- f:00012 d: 22 | A = A + 22 (0x0016)
0x001C (0x000038) 0x2908- f:00024 d: 264 | OR[264] = A
0x001D (0x00003A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x001E (0x00003C) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0020 (0x000040) 0x2519- f:00022 d: 281 | A = A + OR[281]
0x0021 (0x000042) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0022 (0x000044) 0x7006- f:00070 d: 6 | P = P + 6 (0x0028)
0x0023 (0x000046) 0x211B- f:00020 d: 283 | A = OR[283]
0x0024 (0x000048) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x0025 (0x00004A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0026 (0x00004C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0027 (0x00004E) 0x291E- f:00024 d: 286 | OR[286] = A
0x0028 (0x000050) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0029 (0x000052) 0x2926- f:00024 d: 294 | OR[294] = A
0x002A (0x000054) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x002B (0x000056) 0x292A- f:00024 d: 298 | OR[298] = A
0x002C (0x000058) 0x311B- f:00030 d: 283 | A = (OR[283])
0x002D (0x00005A) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x002E (0x00005C) 0x123F- f:00011 d: 63 | A = A & 63 (0x003F)
0x002F (0x00005E) 0x2929- f:00024 d: 297 | OR[297] = A
0x0030 (0x000060) 0x2129- f:00020 d: 297 | A = OR[297]
0x0031 (0x000062) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x0032 (0x000064) 0x8402- f:00102 d: 2 | P = P + 2 (0x0034), A = 0
0x0033 (0x000066) 0x7011- f:00070 d: 17 | P = P + 17 (0x0044)
0x0034 (0x000068) 0x2118- f:00020 d: 280 | A = OR[280]
0x0035 (0x00006A) 0x141C- f:00012 d: 28 | A = A + 28 (0x001C)
0x0036 (0x00006C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0037 (0x00006E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0038 (0x000070) 0x292A- f:00024 d: 298 | OR[298] = A
0x0039 (0x000072) 0x212A- f:00020 d: 298 | A = OR[298]
0x003A (0x000074) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x003B (0x000076) 0x292A- f:00024 d: 298 | OR[298] = A
0x003C (0x000078) 0x212A- f:00020 d: 298 | A = OR[298]
0x003D (0x00007A) 0x8402- f:00102 d: 2 | P = P + 2 (0x003F), A = 0
0x003E (0x00007C) 0x7006- f:00070 d: 6 | P = P + 6 (0x0044)
0x003F (0x00007E) 0x2118- f:00020 d: 280 | A = OR[280]
0x0040 (0x000080) 0x141A- f:00012 d: 26 | A = A + 26 (0x001A)
0x0041 (0x000082) 0x2908- f:00024 d: 264 | OR[264] = A
0x0042 (0x000084) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0043 (0x000086) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0044 (0x000088) 0x211A- f:00020 d: 282 | A = OR[282]
0x0045 (0x00008A) 0x1614- f:00013 d: 20 | A = A - 20 (0x0014)
0x0046 (0x00008C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0048), A = 0
0x0047 (0x00008E) 0x7070- f:00070 d: 112 | P = P + 112 (0x00B7)
0x0048 (0x000090) 0x2119- f:00020 d: 281 | A = OR[281]
0x0049 (0x000092) 0x271D- f:00023 d: 285 | A = A - OR[285]
0x004A (0x000094) 0x8602- f:00103 d: 2 | P = P + 2 (0x004C), A # 0
0x004B (0x000096) 0x706C- f:00070 d: 108 | P = P + 108 (0x00B7)
0x004C (0x000098) 0x1800-0x0E68 f:00014 d: 0 | A = 3688 (0x0E68)
0x004E (0x00009C) 0x2908- f:00024 d: 264 | OR[264] = A
0x004F (0x00009E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0050 (0x0000A0) 0x251D- f:00022 d: 285 | A = A + OR[285]
0x0051 (0x0000A2) 0x2913- f:00024 d: 275 | OR[275] = A
0x0052 (0x0000A4) 0x3113- f:00030 d: 275 | A = (OR[275])
0x0053 (0x0000A6) 0x2913- f:00024 d: 275 | OR[275] = A
0x0054 (0x0000A8) 0x2113- f:00020 d: 275 | A = OR[275]
0x0055 (0x0000AA) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x0056 (0x0000AC) 0x2908- f:00024 d: 264 | OR[264] = A
0x0057 (0x0000AE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0058 (0x0000B0) 0x2914- f:00024 d: 276 | OR[276] = A
0x0059 (0x0000B2) 0x8602- f:00103 d: 2 | P = P + 2 (0x005B), A # 0
0x005A (0x0000B4) 0x705A- f:00070 d: 90 | P = P + 90 (0x00B4)
0x005B (0x0000B6) 0x2114- f:00020 d: 276 | A = OR[276]
0x005C (0x0000B8) 0x1438- f:00012 d: 56 | A = A + 56 (0x0038)
0x005D (0x0000BA) 0x2908- f:00024 d: 264 | OR[264] = A
0x005E (0x0000BC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x005F (0x0000BE) 0x2920- f:00024 d: 288 | OR[288] = A
0x0060 (0x0000C0) 0x2114- f:00020 d: 276 | A = OR[276]
0x0061 (0x0000C2) 0x1439- f:00012 d: 57 | A = A + 57 (0x0039)
0x0062 (0x0000C4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0063 (0x0000C6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0064 (0x0000C8) 0x2921- f:00024 d: 289 | OR[289] = A
0x0065 (0x0000CA) 0x2120- f:00020 d: 288 | A = OR[288]
0x0066 (0x0000CC) 0x8604- f:00103 d: 4 | P = P + 4 (0x006A), A # 0
0x0067 (0x0000CE) 0x2121- f:00020 d: 289 | A = OR[289]
0x0068 (0x0000D0) 0x8602- f:00103 d: 2 | P = P + 2 (0x006A), A # 0
0x0069 (0x0000D2) 0x7048- f:00070 d: 72 | P = P + 72 (0x00B1)
0x006A (0x0000D4) 0x211E- f:00020 d: 286 | A = OR[286]
0x006B (0x0000D6) 0x1438- f:00012 d: 56 | A = A + 56 (0x0038)
0x006C (0x0000D8) 0x2908- f:00024 d: 264 | OR[264] = A
0x006D (0x0000DA) 0x2120- f:00020 d: 288 | A = OR[288]
0x006E (0x0000DC) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x006F (0x0000DE) 0x211E- f:00020 d: 286 | A = OR[286]
0x0070 (0x0000E0) 0x1439- f:00012 d: 57 | A = A + 57 (0x0039)
0x0071 (0x0000E2) 0x2908- f:00024 d: 264 | OR[264] = A
0x0072 (0x0000E4) 0x2121- f:00020 d: 289 | A = OR[289]
0x0073 (0x0000E6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0074 (0x0000E8) 0x2114- f:00020 d: 276 | A = OR[276]
0x0075 (0x0000EA) 0x1438- f:00012 d: 56 | A = A + 56 (0x0038)
0x0076 (0x0000EC) 0x2908- f:00024 d: 264 | OR[264] = A
0x0077 (0x0000EE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0078 (0x0000F0) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0079 (0x0000F2) 0x2114- f:00020 d: 276 | A = OR[276]
0x007A (0x0000F4) 0x1439- f:00012 d: 57 | A = A + 57 (0x0039)
0x007B (0x0000F6) 0x2908- f:00024 d: 264 | OR[264] = A
0x007C (0x0000F8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x007D (0x0000FA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x007E (0x0000FC) 0x2114- f:00020 d: 276 | A = OR[276]
0x007F (0x0000FE) 0x143A- f:00012 d: 58 | A = A + 58 (0x003A)
0x0080 (0x000100) 0x2908- f:00024 d: 264 | OR[264] = A
0x0081 (0x000102) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0082 (0x000104) 0x2920- f:00024 d: 288 | OR[288] = A
0x0083 (0x000106) 0x2114- f:00020 d: 276 | A = OR[276]
0x0084 (0x000108) 0x143B- f:00012 d: 59 | A = A + 59 (0x003B)
0x0085 (0x00010A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0086 (0x00010C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0087 (0x00010E) 0x2921- f:00024 d: 289 | OR[289] = A
0x0088 (0x000110) 0x211E- f:00020 d: 286 | A = OR[286]
0x0089 (0x000112) 0x143A- f:00012 d: 58 | A = A + 58 (0x003A)
0x008A (0x000114) 0x2908- f:00024 d: 264 | OR[264] = A
0x008B (0x000116) 0x2120- f:00020 d: 288 | A = OR[288]
0x008C (0x000118) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x008D (0x00011A) 0x211E- f:00020 d: 286 | A = OR[286]
0x008E (0x00011C) 0x143B- f:00012 d: 59 | A = A + 59 (0x003B)
0x008F (0x00011E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0090 (0x000120) 0x2121- f:00020 d: 289 | A = OR[289]
0x0091 (0x000122) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0092 (0x000124) 0x2114- f:00020 d: 276 | A = OR[276]
0x0093 (0x000126) 0x143A- f:00012 d: 58 | A = A + 58 (0x003A)
0x0094 (0x000128) 0x2908- f:00024 d: 264 | OR[264] = A
0x0095 (0x00012A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0096 (0x00012C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0097 (0x00012E) 0x2114- f:00020 d: 276 | A = OR[276]
0x0098 (0x000130) 0x143B- f:00012 d: 59 | A = A + 59 (0x003B)
0x0099 (0x000132) 0x2908- f:00024 d: 264 | OR[264] = A
0x009A (0x000134) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x009B (0x000136) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x009C (0x000138) 0x2114- f:00020 d: 276 | A = OR[276]
0x009D (0x00013A) 0x142C- f:00012 d: 44 | A = A + 44 (0x002C)
0x009E (0x00013C) 0x2920- f:00024 d: 288 | OR[288] = A
0x009F (0x00013E) 0x211E- f:00020 d: 286 | A = OR[286]
0x00A0 (0x000140) 0x142C- f:00012 d: 44 | A = A + 44 (0x002C)
0x00A1 (0x000142) 0x2921- f:00024 d: 289 | OR[289] = A
0x00A2 (0x000144) 0x2120- f:00020 d: 288 | A = OR[288]
0x00A3 (0x000146) 0x290D- f:00024 d: 269 | OR[269] = A
0x00A4 (0x000148) 0x2121- f:00020 d: 289 | A = OR[289]
0x00A5 (0x00014A) 0x290E- f:00024 d: 270 | OR[270] = A
0x00A6 (0x00014C) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x00A7 (0x00014E) 0x290F- f:00024 d: 271 | OR[271] = A
0x00A8 (0x000150) 0x7006- f:00070 d: 6 | P = P + 6 (0x00AE)
0x00A9 (0x000152) 0x310D- f:00030 d: 269 | A = (OR[269])
0x00AA (0x000154) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x00AB (0x000156) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1
0x00AC (0x000158) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x00AD (0x00015A) 0x2F0F- f:00027 d: 271 | OR[271] = OR[271] - 1
0x00AE (0x00015C) 0x210F- f:00020 d: 271 | A = OR[271]
0x00AF (0x00015E) 0x8E06- f:00107 d: 6 | P = P - 6 (0x00A9), A # 0
0x00B0 (0x000160) 0x7003- f:00070 d: 3 | P = P + 3 (0x00B3)
0x00B1 (0x000162) 0x7E03-0x0327 f:00077 d: 3 | R = OR[3]+807 (0x0327)
0x00B3 (0x000166) 0x7003- f:00070 d: 3 | P = P + 3 (0x00B6)
0x00B4 (0x000168) 0x7E03-0x0327 f:00077 d: 3 | R = OR[3]+807 (0x0327)
0x00B6 (0x00016C) 0x7005- f:00070 d: 5 | P = P + 5 (0x00BB)
0x00B7 (0x00016E) 0x211A- f:00020 d: 282 | A = OR[282]
0x00B8 (0x000170) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x00B9 (0x000172) 0xBC03-0x0327 f:00136 d: 3 | R = OR[3]+807 (0x0327), A = 0
0x00BB (0x000176) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x00BC (0x000178) 0x2920- f:00024 d: 288 | OR[288] = A
0x00BD (0x00017A) 0x7E03-0x02B0 f:00077 d: 3 | R = OR[3]+688 (0x02B0)
0x00BF (0x00017E) 0x2121- f:00020 d: 289 | A = OR[289]
0x00C0 (0x000180) 0x292B- f:00024 d: 299 | OR[299] = A
0x00C1 (0x000182) 0x2121- f:00020 d: 289 | A = OR[289]
0x00C2 (0x000184) 0x291F- f:00024 d: 287 | OR[287] = A
0x00C3 (0x000186) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00C4 (0x000188) 0x2926- f:00024 d: 294 | OR[294] = A
0x00C5 (0x00018A) 0x2118- f:00020 d: 280 | A = OR[280]
0x00C6 (0x00018C) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E)
0x00C7 (0x00018E) 0x2908- f:00024 d: 264 | OR[264] = A
0x00C8 (0x000190) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00C9 (0x000192) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x00CA (0x000194) 0x2913- f:00024 d: 275 | OR[275] = A
0x00CB (0x000196) 0x2113- f:00020 d: 275 | A = OR[275]
0x00CC (0x000198) 0x8602- f:00103 d: 2 | P = P + 2 (0x00CE), A # 0
0x00CD (0x00019A) 0x7030- f:00070 d: 48 | P = P + 48 (0x00FD)
0x00CE (0x00019C) 0x2118- f:00020 d: 280 | A = OR[280]
0x00CF (0x00019E) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x00D0 (0x0001A0) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D1 (0x0001A2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00D2 (0x0001A4) 0x080B- f:00004 d: 11 | A = A > 11 (0x000B)
0x00D3 (0x0001A6) 0x2914- f:00024 d: 276 | OR[276] = A
0x00D4 (0x0001A8) 0x2118- f:00020 d: 280 | A = OR[280]
0x00D5 (0x0001AA) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x00D6 (0x0001AC) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D7 (0x0001AE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00D8 (0x0001B0) 0x0807- f:00004 d: 7 | A = A > 7 (0x0007)
0x00D9 (0x0001B2) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x00DA (0x0001B4) 0x2915- f:00024 d: 277 | OR[277] = A
0x00DB (0x0001B6) 0x211E- f:00020 d: 286 | A = OR[286]
0x00DC (0x0001B8) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x00DD (0x0001BA) 0x2908- f:00024 d: 264 | OR[264] = A
0x00DE (0x0001BC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00DF (0x0001BE) 0x0E05- f:00007 d: 5 | A = A << 5 (0x0005)
0x00E0 (0x0001C0) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x00E1 (0x0001C2) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x00E2 (0x0001C4) 0x0C06- f:00006 d: 6 | A = A >> 6 (0x0006)
0x00E3 (0x0001C6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00E4 (0x0001C8) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00E5 (0x0001CA) 0x292D- f:00024 d: 301 | OR[301] = A
0x00E6 (0x0001CC) 0x1800-0x0065 f:00014 d: 0 | A = 101 (0x0065)
0x00E8 (0x0001D0) 0x292E- f:00024 d: 302 | OR[302] = A
0x00E9 (0x0001D2) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x00EA (0x0001D4) 0x292F- f:00024 d: 303 | OR[303] = A
0x00EB (0x0001D6) 0x2114- f:00020 d: 276 | A = OR[276]
0x00EC (0x0001D8) 0x2930- f:00024 d: 304 | OR[304] = A
0x00ED (0x0001DA) 0x2119- f:00020 d: 281 | A = OR[281]
0x00EE (0x0001DC) 0x2931- f:00024 d: 305 | OR[305] = A
0x00EF (0x0001DE) 0x2115- f:00020 d: 277 | A = OR[277]
0x00F0 (0x0001E0) 0x2932- f:00024 d: 306 | OR[306] = A
0x00F1 (0x0001E2) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x00F2 (0x0001E4) 0x5800- f:00054 d: 0 | B = A
0x00F3 (0x0001E6) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x00F5 (0x0001EA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00F6 (0x0001EC) 0x8602- f:00103 d: 2 | P = P + 2 (0x00F8), A # 0
0x00F7 (0x0001EE) 0x7006- f:00070 d: 6 | P = P + 6 (0x00FD)
0x00F8 (0x0001F0) 0x1800-0xFFFE f:00014 d: 0 | A = 65534 (0xFFFE)
0x00FA (0x0001F4) 0x2925- f:00024 d: 293 | OR[293] = A
0x00FB (0x0001F6) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x00FD (0x0001FA) 0x211E- f:00020 d: 286 | A = OR[286]
0x00FE (0x0001FC) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x00FF (0x0001FE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0100 (0x000200) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0101 (0x000202) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0102 (0x000204) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0103 (0x000206) 0xAE03-0x0275 f:00127 d: 3 | P = OR[3]+629 (0x0275), A # 0
0x0105 (0x00020A) 0x211E- f:00020 d: 286 | A = OR[286]
0x0106 (0x00020C) 0x1420- f:00012 d: 32 | A = A + 32 (0x0020)
0x0107 (0x00020E) 0x2928- f:00024 d: 296 | OR[296] = A
0x0108 (0x000210) 0x2128- f:00020 d: 296 | A = OR[296]
0x0109 (0x000212) 0x2923- f:00024 d: 291 | OR[291] = A
0x010A (0x000214) 0x2129- f:00020 d: 297 | A = OR[297]
0x010B (0x000216) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x010C (0x000218) 0x8402- f:00102 d: 2 | P = P + 2 (0x010E), A = 0
0x010D (0x00021A) 0x7052- f:00070 d: 82 | P = P + 82 (0x015F)
0x010E (0x00021C) 0x212A- f:00020 d: 298 | A = OR[298]
0x010F (0x00021E) 0x8602- f:00103 d: 2 | P = P + 2 (0x0111), A # 0
0x0110 (0x000220) 0x704F- f:00070 d: 79 | P = P + 79 (0x015F)
0x0111 (0x000222) 0x7E03-0x03E0 f:00077 d: 3 | R = OR[3]+992 (0x03E0)
0x0113 (0x000226) 0x109F- f:00010 d: 159 | A = 159 (0x009F)
0x0114 (0x000228) 0x2913- f:00024 d: 275 | OR[275] = A
0x0115 (0x00022A) 0x1040- f:00010 d: 64 | A = 64 (0x0040)
0x0116 (0x00022C) 0x2914- f:00024 d: 276 | OR[276] = A
0x0117 (0x00022E) 0x211F- f:00020 d: 287 | A = OR[287]
0x0118 (0x000230) 0x2915- f:00024 d: 277 | OR[277] = A
0x0119 (0x000232) 0x1011- f:00010 d: 17 | A = 17 (0x0011)
0x011A (0x000234) 0x2916- f:00024 d: 278 | OR[278] = A
0x011B (0x000236) 0x7E03-0x0305 f:00077 d: 3 | R = OR[3]+773 (0x0305)
0x011D (0x00023A) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x011E (0x00023C) 0x2913- f:00024 d: 275 | OR[275] = A
0x011F (0x00023E) 0x1040- f:00010 d: 64 | A = 64 (0x0040)
0x0120 (0x000240) 0x1420- f:00012 d: 32 | A = A + 32 (0x0020)
0x0121 (0x000242) 0x2914- f:00024 d: 276 | OR[276] = A
0x0122 (0x000244) 0x211F- f:00020 d: 287 | A = OR[287]
0x0123 (0x000246) 0x2915- f:00024 d: 277 | OR[277] = A
0x0124 (0x000248) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0125 (0x00024A) 0x2916- f:00024 d: 278 | OR[278] = A
0x0126 (0x00024C) 0x7E03-0x0305 f:00077 d: 3 | R = OR[3]+773 (0x0305)
0x0128 (0x000250) 0x2128- f:00020 d: 296 | A = OR[296]
0x0129 (0x000252) 0x2923- f:00024 d: 291 | OR[291] = A
0x012A (0x000254) 0x7E03-0x0338 f:00077 d: 3 | R = OR[3]+824 (0x0338)
0x012C (0x000258) 0x2124- f:00020 d: 292 | A = OR[292]
0x012D (0x00025A) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x012E (0x00025C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0130), A = 0
0x012F (0x00025E) 0x7004- f:00070 d: 4 | P = P + 4 (0x0133)
0x0130 (0x000260) 0x7A03-0x0275 f:00075 d: 3 | P = OR[3]+629 (0x0275)
0x0132 (0x000264) 0x7024- f:00070 d: 36 | P = P + 36 (0x0156)
0x0133 (0x000266) 0x2124- f:00020 d: 292 | A = OR[292]
0x0134 (0x000268) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0135 (0x00026A) 0x8602- f:00103 d: 2 | P = P + 2 (0x0137), A # 0
0x0136 (0x00026C) 0x7014- f:00070 d: 20 | P = P + 20 (0x014A)
0x0137 (0x00026E) 0x2124- f:00020 d: 292 | A = OR[292]
0x0138 (0x000270) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x0139 (0x000272) 0x8602- f:00103 d: 2 | P = P + 2 (0x013B), A # 0
0x013A (0x000274) 0x7010- f:00070 d: 16 | P = P + 16 (0x014A)
0x013B (0x000276) 0x2124- f:00020 d: 292 | A = OR[292]
0x013C (0x000278) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x013D (0x00027A) 0x8402- f:00102 d: 2 | P = P + 2 (0x013F), A = 0
0x013E (0x00027C) 0x7004- f:00070 d: 4 | P = P + 4 (0x0142)
0x013F (0x00027E) 0x7E03-0x0340 f:00077 d: 3 | R = OR[3]+832 (0x0340)
0x0141 (0x000282) 0x7007- f:00070 d: 7 | P = P + 7 (0x0148)
0x0142 (0x000284) 0x2124- f:00020 d: 292 | A = OR[292]
0x0143 (0x000286) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x0144 (0x000288) 0x8402- f:00102 d: 2 | P = P + 2 (0x0146), A = 0
0x0145 (0x00028A) 0x7003- f:00070 d: 3 | P = P + 3 (0x0148)
0x0146 (0x00028C) 0x7E03-0x0338 f:00077 d: 3 | R = OR[3]+824 (0x0338)
0x0148 (0x000290) 0x721C- f:00071 d: 28 | P = P - 28 (0x012C)
0x0149 (0x000292) 0x700D- f:00070 d: 13 | P = P + 13 (0x0156)
0x014A (0x000294) 0x2124- f:00020 d: 292 | A = OR[292]
0x014B (0x000296) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x014C (0x000298) 0x8402- f:00102 d: 2 | P = P + 2 (0x014E), A = 0
0x014D (0x00029A) 0x7009- f:00070 d: 9 | P = P + 9 (0x0156)
0x014E (0x00029C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x014F (0x00029E) 0x291F- f:00024 d: 287 | OR[287] = A
0x0150 (0x0002A0) 0x7E03-0x035A f:00077 d: 3 | R = OR[3]+858 (0x035A)
0x0152 (0x0002A4) 0x212B- f:00020 d: 299 | A = OR[299]
0x0153 (0x0002A6) 0x291F- f:00024 d: 287 | OR[287] = A
0x0154 (0x0002A8) 0x7E03-0x0374 f:00077 d: 3 | R = OR[3]+884 (0x0374)
0x0156 (0x0002AC) 0x2118- f:00020 d: 280 | A = OR[280]
0x0157 (0x0002AE) 0x141A- f:00012 d: 26 | A = A + 26 (0x001A)
0x0158 (0x0002B0) 0x2908- f:00024 d: 264 | OR[264] = A
0x0159 (0x0002B2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x015A (0x0002B4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x015B (0x0002B6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x015C (0x0002B8) 0x292A- f:00024 d: 298 | OR[298] = A
0x015D (0x0002BA) 0x2128- f:00020 d: 296 | A = OR[296]
0x015E (0x0002BC) 0x2923- f:00024 d: 291 | OR[291] = A
0x015F (0x0002BE) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x0160 (0x0002C0) 0x2913- f:00024 d: 275 | OR[275] = A
0x0161 (0x0002C2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0162 (0x0002C4) 0x2914- f:00024 d: 276 | OR[276] = A
0x0163 (0x0002C6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0164 (0x0002C8) 0x2915- f:00024 d: 277 | OR[277] = A
0x0165 (0x0002CA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0166 (0x0002CC) 0x2916- f:00024 d: 278 | OR[278] = A
0x0167 (0x0002CE) 0x7E03-0x0305 f:00077 d: 3 | R = OR[3]+773 (0x0305)
0x0169 (0x0002D2) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x016A (0x0002D4) 0x2913- f:00024 d: 275 | OR[275] = A
0x016B (0x0002D6) 0x1040- f:00010 d: 64 | A = 64 (0x0040)
0x016C (0x0002D8) 0x1420- f:00012 d: 32 | A = A + 32 (0x0020)
0x016D (0x0002DA) 0x2914- f:00024 d: 276 | OR[276] = A
0x016E (0x0002DC) 0x211F- f:00020 d: 287 | A = OR[287]
0x016F (0x0002DE) 0x2915- f:00024 d: 277 | OR[277] = A
0x0170 (0x0002E0) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0171 (0x0002E2) 0x2916- f:00024 d: 278 | OR[278] = A
0x0172 (0x0002E4) 0x7E03-0x0305 f:00077 d: 3 | R = OR[3]+773 (0x0305)
0x0174 (0x0002E8) 0x2128- f:00020 d: 296 | A = OR[296]
0x0175 (0x0002EA) 0x2923- f:00024 d: 291 | OR[291] = A
0x0176 (0x0002EC) 0x7E03-0x0338 f:00077 d: 3 | R = OR[3]+824 (0x0338)
0x0178 (0x0002F0) 0x2124- f:00020 d: 292 | A = OR[292]
0x0179 (0x0002F2) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x017A (0x0002F4) 0x8402- f:00102 d: 2 | P = P + 2 (0x017C), A = 0
0x017B (0x0002F6) 0x7029- f:00070 d: 41 | P = P + 41 (0x01A4)
0x017C (0x0002F8) 0x7E03-0x0374 f:00077 d: 3 | R = OR[3]+884 (0x0374)
0x017E (0x0002FC) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x017F (0x0002FE) 0x160C- f:00013 d: 12 | A = A - 12 (0x000C)
0x0180 (0x000300) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0181 (0x000302) 0x5800- f:00054 d: 0 | B = A
0x0182 (0x000304) 0x100C- f:00010 d: 12 | A = 12 (0x000C)
0x0183 (0x000306) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x0184 (0x000308) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0185 (0x00030A) 0x290D- f:00024 d: 269 | OR[269] = A
0x0186 (0x00030C) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0187 (0x00030E) 0x4800- f:00044 d: 0 | A = A > B
0x0188 (0x000310) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0189 (0x000312) 0x8402- f:00102 d: 2 | P = P + 2 (0x018B), A = 0
0x018A (0x000314) 0x7004- f:00070 d: 4 | P = P + 4 (0x018E)
0x018B (0x000316) 0x7E03-0x0388 f:00077 d: 3 | R = OR[3]+904 (0x0388)
0x018D (0x00031A) 0x7290- f:00071 d: 144 | P = P - 144 (0x00FD)
0x018E (0x00031C) 0x1800-0xFEFF f:00014 d: 0 | A = 65279 (0xFEFF)
0x0190 (0x000320) 0x2925- f:00024 d: 293 | OR[293] = A
0x0191 (0x000322) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x0192 (0x000324) 0x160E- f:00013 d: 14 | A = A - 14 (0x000E)
0x0193 (0x000326) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0194 (0x000328) 0x5800- f:00054 d: 0 | B = A
0x0195 (0x00032A) 0x100E- f:00010 d: 14 | A = 14 (0x000E)
0x0196 (0x00032C) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x0197 (0x00032E) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0198 (0x000330) 0x290D- f:00024 d: 269 | OR[269] = A
0x0199 (0x000332) 0x310D- f:00030 d: 269 | A = (OR[269])
0x019A (0x000334) 0x4800- f:00044 d: 0 | A = A > B
0x019B (0x000336) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x019C (0x000338) 0x8602- f:00103 d: 2 | P = P + 2 (0x019E), A # 0
0x019D (0x00033A) 0x7005- f:00070 d: 5 | P = P + 5 (0x01A2)
0x019E (0x00033C) 0x2125- f:00020 d: 293 | A = OR[293]
0x019F (0x00033E) 0x1A00-0xFDFF f:00015 d: 0 | A = A & 65023 (0xFDFF)
0x01A1 (0x000342) 0x2925- f:00024 d: 293 | OR[293] = A
0x01A2 (0x000344) 0x7A03-0x026F f:00075 d: 3 | P = OR[3]+623 (0x026F)
0x01A4 (0x000348) 0x2124- f:00020 d: 292 | A = OR[292]
0x01A5 (0x00034A) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x01A6 (0x00034C) 0x8403- f:00102 d: 3 | P = P + 3 (0x01A9), A = 0
0x01A7 (0x00034E) 0x7A03-0x0260 f:00075 d: 3 | P = OR[3]+608 (0x0260)
0x01A9 (0x000352) 0x2127- f:00020 d: 295 | A = OR[295]
0x01AA (0x000354) 0x1202- f:00011 d: 2 | A = A & 2 (0x0002)
0x01AB (0x000356) 0x2908- f:00024 d: 264 | OR[264] = A
0x01AC (0x000358) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01AD (0x00035A) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x01AE (0x00035C) 0x8603- f:00103 d: 3 | P = P + 3 (0x01B1), A # 0
0x01AF (0x00035E) 0x7A03-0x024C f:00075 d: 3 | P = OR[3]+588 (0x024C)
0x01B1 (0x000362) 0x7E03-0x0374 f:00077 d: 3 | R = OR[3]+884 (0x0374)
0x01B3 (0x000366) 0x211E- f:00020 d: 286 | A = OR[286]
0x01B4 (0x000368) 0x1415- f:00012 d: 21 | A = A + 21 (0x0015)
0x01B5 (0x00036A) 0x2908- f:00024 d: 264 | OR[264] = A
0x01B6 (0x00036C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01B7 (0x00036E) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x01B8 (0x000370) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x01B9 (0x000372) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x01BA (0x000374) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01BB (0x000376) 0x2129- f:00020 d: 297 | A = OR[297]
0x01BC (0x000378) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x01BD (0x00037A) 0x8402- f:00102 d: 2 | P = P + 2 (0x01BF), A = 0
0x01BE (0x00037C) 0x7011- f:00070 d: 17 | P = P + 17 (0x01CF)
0x01BF (0x00037E) 0x211F- f:00020 d: 287 | A = OR[287]
0x01C0 (0x000380) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x01C1 (0x000382) 0x2908- f:00024 d: 264 | OR[264] = A
0x01C2 (0x000384) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01C3 (0x000386) 0x2913- f:00024 d: 275 | OR[275] = A
0x01C4 (0x000388) 0x2113- f:00020 d: 275 | A = OR[275]
0x01C5 (0x00038A) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01C6 (0x00038C) 0x2913- f:00024 d: 275 | OR[275] = A
0x01C7 (0x00038E) 0x2113- f:00020 d: 275 | A = OR[275]
0x01C8 (0x000390) 0x1645- f:00013 d: 69 | A = A - 69 (0x0045)
0x01C9 (0x000392) 0x8402- f:00102 d: 2 | P = P + 2 (0x01CB), A = 0
0x01CA (0x000394) 0x7005- f:00070 d: 5 | P = P + 5 (0x01CF)
0x01CB (0x000396) 0x7E03-0x035A f:00077 d: 3 | R = OR[3]+858 (0x035A)
0x01CD (0x00039A) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x01CF (0x00039E) 0x311F- f:00030 d: 287 | A = (OR[287])
0x01D0 (0x0003A0) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x01D1 (0x0003A2) 0x2913- f:00024 d: 275 | OR[275] = A
0x01D2 (0x0003A4) 0x2113- f:00020 d: 275 | A = OR[275]
0x01D3 (0x0003A6) 0x1240- f:00011 d: 64 | A = A & 64 (0x0040)
0x01D4 (0x0003A8) 0x2908- f:00024 d: 264 | OR[264] = A
0x01D5 (0x0003AA) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01D6 (0x0003AC) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x01D7 (0x0003AE) 0x8402- f:00102 d: 2 | P = P + 2 (0x01D9), A = 0
0x01D8 (0x0003B0) 0x7007- f:00070 d: 7 | P = P + 7 (0x01DF)
0x01D9 (0x0003B2) 0x7E03-0x035A f:00077 d: 3 | R = OR[3]+858 (0x035A)
0x01DB (0x0003B6) 0x2125- f:00020 d: 293 | A = OR[293]
0x01DC (0x0003B8) 0x8CDF- f:00106 d: 223 | P = P - 223 (0x00FD), A = 0
0x01DD (0x0003BA) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x01DF (0x0003BE) 0x1009- f:00010 d: 9 | A = 9 (0x0009)
0x01E0 (0x0003C0) 0x2913- f:00024 d: 275 | OR[275] = A
0x01E1 (0x0003C2) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x01E2 (0x0003C4) 0x2713- f:00023 d: 275 | A = A - OR[275]
0x01E3 (0x0003C6) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x01E4 (0x0003C8) 0x5800- f:00054 d: 0 | B = A
0x01E5 (0x0003CA) 0x2113- f:00020 d: 275 | A = OR[275]
0x01E6 (0x0003CC) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x01E7 (0x0003CE) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x01E8 (0x0003D0) 0x290D- f:00024 d: 269 | OR[269] = A
0x01E9 (0x0003D2) 0x310D- f:00030 d: 269 | A = (OR[269])
0x01EA (0x0003D4) 0x4800- f:00044 d: 0 | A = A > B
0x01EB (0x0003D6) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x01EC (0x0003D8) 0x2920- f:00024 d: 288 | OR[288] = A
0x01ED (0x0003DA) 0x100A- f:00010 d: 10 | A = 10 (0x000A)
0x01EE (0x0003DC) 0x2913- f:00024 d: 275 | OR[275] = A
0x01EF (0x0003DE) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x01F0 (0x0003E0) 0x2713- f:00023 d: 275 | A = A - OR[275]
0x01F1 (0x0003E2) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x01F2 (0x0003E4) 0x5800- f:00054 d: 0 | B = A
0x01F3 (0x0003E6) 0x2113- f:00020 d: 275 | A = OR[275]
0x01F4 (0x0003E8) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x01F5 (0x0003EA) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x01F6 (0x0003EC) 0x290D- f:00024 d: 269 | OR[269] = A
0x01F7 (0x0003EE) 0x310D- f:00030 d: 269 | A = (OR[269])
0x01F8 (0x0003F0) 0x4800- f:00044 d: 0 | A = A > B
0x01F9 (0x0003F2) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x01FA (0x0003F4) 0x2921- f:00024 d: 289 | OR[289] = A
0x01FB (0x0003F6) 0x2129- f:00020 d: 297 | A = OR[297]
0x01FC (0x0003F8) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x01FD (0x0003FA) 0xAC03-0x0206 f:00126 d: 3 | P = OR[3]+518 (0x0206), A = 0
0x01FF (0x0003FE) 0x7018- f:00070 d: 24 | P = P + 24 (0x0217)
0x0200 (0x000400) 0x2120- f:00020 d: 288 | A = OR[288]
0x0201 (0x000402) 0x8602- f:00103 d: 2 | P = P + 2 (0x0203), A # 0
0x0202 (0x000404) 0x7011- f:00070 d: 17 | P = P + 17 (0x0213)
0x0203 (0x000406) 0x1800-0xFFBF f:00014 d: 0 | A = 65471 (0xFFBF)
0x0205 (0x00040A) 0x2925- f:00024 d: 293 | OR[293] = A
0x0206 (0x00040C) 0x75A2- f:00072 d: 418 | R = P + 418 (0x03A8)
0x0207 (0x00040E) 0x211B- f:00020 d: 283 | A = OR[283]
0x0208 (0x000410) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x0209 (0x000412) 0x2908- f:00024 d: 264 | OR[264] = A
0x020A (0x000414) 0x3108- f:00030 d: 264 | A = (OR[264])
0x020B (0x000416) 0x0E0C- f:00007 d: 12 | A = A << 12 (0x000C)
0x020C (0x000418) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x020D (0x00041A) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x020E (0x00041C) 0x0C0D- f:00006 d: 13 | A = A >> 13 (0x000D)
0x020F (0x00041E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0210 (0x000420) 0x752A- f:00072 d: 298 | R = P + 298 (0x033A)
0x0211 (0x000422) 0x7299- f:00071 d: 153 | P = P - 153 (0x0178)
0x0212 (0x000424) 0x7004- f:00070 d: 4 | P = P + 4 (0x0216)
0x0213 (0x000426) 0x7541- f:00072 d: 321 | R = P + 321 (0x0354)
0x0214 (0x000428) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x0216 (0x00042C) 0x702F- f:00070 d: 47 | P = P + 47 (0x0245)
0x0217 (0x00042E) 0x2120- f:00020 d: 288 | A = OR[288]
0x0218 (0x000430) 0x8402- f:00102 d: 2 | P = P + 2 (0x021A), A = 0
0x0219 (0x000432) 0x7014- f:00070 d: 20 | P = P + 20 (0x022D)
0x021A (0x000434) 0x2121- f:00020 d: 289 | A = OR[289]
0x021B (0x000436) 0x8602- f:00103 d: 2 | P = P + 2 (0x021D), A # 0
0x021C (0x000438) 0x7011- f:00070 d: 17 | P = P + 17 (0x022D)
0x021D (0x00043A) 0x1800-0xFFBF f:00014 d: 0 | A = 65471 (0xFFBF)
0x021F (0x00043E) 0x2925- f:00024 d: 293 | OR[293] = A
0x0220 (0x000440) 0x7588- f:00072 d: 392 | R = P + 392 (0x03A8)
0x0221 (0x000442) 0x211B- f:00020 d: 283 | A = OR[283]
0x0222 (0x000444) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x0223 (0x000446) 0x2908- f:00024 d: 264 | OR[264] = A
0x0224 (0x000448) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0225 (0x00044A) 0x0E0C- f:00007 d: 12 | A = A << 12 (0x000C)
0x0226 (0x00044C) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x0227 (0x00044E) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0228 (0x000450) 0x0C0D- f:00006 d: 13 | A = A >> 13 (0x000D)
0x0229 (0x000452) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x022A (0x000454) 0x7510- f:00072 d: 272 | R = P + 272 (0x033A)
0x022B (0x000456) 0x72B3- f:00071 d: 179 | P = P - 179 (0x0178)
0x022C (0x000458) 0x7019- f:00070 d: 25 | P = P + 25 (0x0245)
0x022D (0x00045A) 0x2120- f:00020 d: 288 | A = OR[288]
0x022E (0x00045C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0230), A = 0
0x022F (0x00045E) 0x7008- f:00070 d: 8 | P = P + 8 (0x0237)
0x0230 (0x000460) 0x2121- f:00020 d: 289 | A = OR[289]
0x0231 (0x000462) 0x8402- f:00102 d: 2 | P = P + 2 (0x0233), A = 0
0x0232 (0x000464) 0x7005- f:00070 d: 5 | P = P + 5 (0x0237)
0x0233 (0x000466) 0x7521- f:00072 d: 289 | R = P + 289 (0x0354)
0x0234 (0x000468) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x0236 (0x00046C) 0x700F- f:00070 d: 15 | P = P + 15 (0x0245)
0x0237 (0x00046E) 0x2120- f:00020 d: 288 | A = OR[288]
0x0238 (0x000470) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0239 (0x000472) 0x8402- f:00102 d: 2 | P = P + 2 (0x023B), A = 0
0x023A (0x000474) 0x7008- f:00070 d: 8 | P = P + 8 (0x0242)
0x023B (0x000476) 0x2121- f:00020 d: 289 | A = OR[289]
0x023C (0x000478) 0x8402- f:00102 d: 2 | P = P + 2 (0x023E), A = 0
0x023D (0x00047A) 0x7005- f:00070 d: 5 | P = P + 5 (0x0242)
0x023E (0x00047C) 0x7516- f:00072 d: 278 | R = P + 278 (0x0354)
0x023F (0x00047E) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x0241 (0x000482) 0x7004- f:00070 d: 4 | P = P + 4 (0x0245)
0x0242 (0x000484) 0x7512- f:00072 d: 274 | R = P + 274 (0x0354)
0x0243 (0x000486) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x0245 (0x00048A) 0x7014- f:00070 d: 20 | P = P + 20 (0x0259)
0x0246 (0x00048C) 0x211E- f:00020 d: 286 | A = OR[286]
0x0247 (0x00048E) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0248 (0x000490) 0x2908- f:00024 d: 264 | OR[264] = A
0x0249 (0x000492) 0x3108- f:00030 d: 264 | A = (OR[264])
0x024A (0x000494) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x024B (0x000496) 0x2920- f:00024 d: 288 | OR[288] = A
0x024C (0x000498) 0x7508- f:00072 d: 264 | R = P + 264 (0x0354)
0x024D (0x00049A) 0x2120- f:00020 d: 288 | A = OR[288]
0x024E (0x00049C) 0x1683- f:00013 d: 131 | A = A - 131 (0x0083)
0x024F (0x00049E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0251), A = 0
0x0250 (0x0004A0) 0x7003- f:00070 d: 3 | P = P + 3 (0x0253)
0x0251 (0x0004A2) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x0253 (0x0004A6) 0x2D26- f:00026 d: 294 | OR[294] = OR[294] + 1
0x0254 (0x0004A8) 0x4200- f:00041 d: 0 | C = 1, io 0000 (IOR) = BZ
0x0255 (0x0004AA) 0x160A- f:00013 d: 10 | A = A - 10 (0x000A)
0x0256 (0x0004AC) 0x8959- f:00104 d: 345 | P = P - 345 (0x00FD), C = 0
0x0257 (0x0004AE) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x0259 (0x0004B2) 0x7010- f:00070 d: 16 | P = P + 16 (0x0269)
0x025A (0x0004B4) 0x2124- f:00020 d: 292 | A = OR[292]
0x025B (0x0004B6) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x025C (0x0004B8) 0x8402- f:00102 d: 2 | P = P + 2 (0x025E), A = 0
0x025D (0x0004BA) 0x7003- f:00070 d: 3 | P = P + 3 (0x0260)
0x025E (0x0004BC) 0x7011- f:00070 d: 17 | P = P + 17 (0x026F)
0x025F (0x0004BE) 0x700A- f:00070 d: 10 | P = P + 10 (0x0269)
0x0260 (0x0004C0) 0x2124- f:00020 d: 292 | A = OR[292]
0x0261 (0x0004C2) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x0262 (0x0004C4) 0x8402- f:00102 d: 2 | P = P + 2 (0x0264), A = 0
0x0263 (0x0004C6) 0x7004- f:00070 d: 4 | P = P + 4 (0x0267)
0x0264 (0x0004C8) 0x74CE- f:00072 d: 206 | R = P + 206 (0x0332)
0x0265 (0x0004CA) 0x72ED- f:00071 d: 237 | P = P - 237 (0x0178)
0x0266 (0x0004CC) 0x7003- f:00070 d: 3 | P = P + 3 (0x0269)
0x0267 (0x0004CE) 0x74D3- f:00072 d: 211 | R = P + 211 (0x033A)
0x0268 (0x0004D0) 0x72F0- f:00071 d: 240 | P = P - 240 (0x0178)
0x0269 (0x0004D2) 0x211E- f:00020 d: 286 | A = OR[286]
0x026A (0x0004D4) 0x1418- f:00012 d: 24 | A = A + 24 (0x0018)
0x026B (0x0004D6) 0x2908- f:00024 d: 264 | OR[264] = A
0x026C (0x0004D8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x026D (0x0004DA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x026E (0x0004DC) 0x753A- f:00072 d: 314 | R = P + 314 (0x03A8)
0x026F (0x0004DE) 0x212B- f:00020 d: 299 | A = OR[299]
0x0270 (0x0004E0) 0x2920- f:00024 d: 288 | OR[288] = A
0x0271 (0x0004E2) 0x7485- f:00072 d: 133 | R = P + 133 (0x02F6)
0x0272 (0x0004E4) 0x211C- f:00020 d: 284 | A = OR[284]
0x0273 (0x0004E6) 0x1E00-0x4331 f:00017 d: 0 | A = A - 17201 (0x4331)
0x0275 (0x0004EA) 0x8402- f:00102 d: 2 | P = P + 2 (0x0277), A = 0
0x0276 (0x0004EC) 0x7025- f:00070 d: 37 | P = P + 37 (0x029B)
0x0277 (0x0004EE) 0x211A- f:00020 d: 282 | A = OR[282]
0x0278 (0x0004F0) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0279 (0x0004F2) 0x8405- f:00102 d: 5 | P = P + 5 (0x027E), A = 0
0x027A (0x0004F4) 0x211D- f:00020 d: 285 | A = OR[285]
0x027B (0x0004F6) 0x2719- f:00023 d: 281 | A = A - OR[281]
0x027C (0x0004F8) 0x8602- f:00103 d: 2 | P = P + 2 (0x027E), A # 0
0x027D (0x0004FA) 0x7017- f:00070 d: 23 | P = P + 23 (0x0294)
0x027E (0x0004FC) 0x1017- f:00010 d: 23 | A = 23 (0x0017)
0x027F (0x0004FE) 0x292D- f:00024 d: 301 | OR[301] = A
0x0280 (0x000500) 0x2118- f:00020 d: 280 | A = OR[280]
0x0281 (0x000502) 0x292E- f:00024 d: 302 | OR[302] = A
0x0282 (0x000504) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0283 (0x000506) 0x5800- f:00054 d: 0 | B = A
0x0284 (0x000508) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0285 (0x00050A) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0286 (0x00050C) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x0287 (0x00050E) 0x292D- f:00024 d: 301 | OR[301] = A
0x0288 (0x000510) 0x1800-0x007E f:00014 d: 0 | A = 126 (0x007E)
0x028A (0x000514) 0x292E- f:00024 d: 302 | OR[302] = A
0x028B (0x000516) 0x211E- f:00020 d: 286 | A = OR[286]
0x028C (0x000518) 0x292F- f:00024 d: 303 | OR[303] = A
0x028D (0x00051A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x028E (0x00051C) 0x2930- f:00024 d: 304 | OR[304] = A
0x028F (0x00051E) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0290 (0x000520) 0x5800- f:00054 d: 0 | B = A
0x0291 (0x000522) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0292 (0x000524) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0293 (0x000526) 0x7007- f:00070 d: 7 | P = P + 7 (0x029A)
0x0294 (0x000528) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x0295 (0x00052A) 0x292D- f:00024 d: 301 | OR[301] = A
0x0296 (0x00052C) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0297 (0x00052E) 0x5800- f:00054 d: 0 | B = A
0x0298 (0x000530) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0299 (0x000532) 0x7C09- f:00076 d: 9 | R = OR[9]
0x029A (0x000534) 0x7010- f:00070 d: 16 | P = P + 16 (0x02AA)
0x029B (0x000536) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF)
0x029D (0x00053A) 0x2725- f:00023 d: 293 | A = A - OR[293]
0x029E (0x00053C) 0x2925- f:00024 d: 293 | OR[293] = A
0x029F (0x00053E) 0x2005- f:00020 d: 5 | A = OR[5]
0x02A0 (0x000540) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x02A1 (0x000542) 0x2908- f:00024 d: 264 | OR[264] = A
0x02A2 (0x000544) 0x2125- f:00020 d: 293 | A = OR[293]
0x02A3 (0x000546) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02A4 (0x000548) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x02A5 (0x00054A) 0x292D- f:00024 d: 301 | OR[301] = A
0x02A6 (0x00054C) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x02A7 (0x00054E) 0x5800- f:00054 d: 0 | B = A
0x02A8 (0x000550) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02A9 (0x000552) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02AA (0x000554) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02AB (0x000556) 0x2921- f:00024 d: 289 | OR[289] = A
0x02AC (0x000558) 0x2121- f:00020 d: 289 | A = OR[289]
0x02AD (0x00055A) 0x863D- f:00103 d: 61 | P = P + 61 (0x02EA), A # 0
0x02AE (0x00055C) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x02AF (0x00055E) 0x292D- f:00024 d: 301 | OR[301] = A
0x02B0 (0x000560) 0x2120- f:00020 d: 288 | A = OR[288]
0x02B1 (0x000562) 0x292E- f:00024 d: 302 | OR[302] = A
0x02B2 (0x000564) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02B3 (0x000566) 0x292F- f:00024 d: 303 | OR[303] = A
0x02B4 (0x000568) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02B5 (0x00056A) 0x2930- f:00024 d: 304 | OR[304] = A
0x02B6 (0x00056C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02B7 (0x00056E) 0x2931- f:00024 d: 305 | OR[305] = A
0x02B8 (0x000570) 0x1121- f:00010 d: 289 | A = 289 (0x0121)
0x02B9 (0x000572) 0x2932- f:00024 d: 306 | OR[306] = A
0x02BA (0x000574) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x02BB (0x000576) 0x5800- f:00054 d: 0 | B = A
0x02BC (0x000578) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02BD (0x00057A) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02BE (0x00057C) 0x8602- f:00103 d: 2 | P = P + 2 (0x02C0), A # 0
0x02BF (0x00057E) 0x702A- f:00070 d: 42 | P = P + 42 (0x02E9)
0x02C0 (0x000580) 0x2006- f:00020 d: 6 | A = OR[6]
0x02C1 (0x000582) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x02C2 (0x000584) 0x2908- f:00024 d: 264 | OR[264] = A
0x02C3 (0x000586) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02C4 (0x000588) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x02C5 (0x00058A) 0x290D- f:00024 d: 269 | OR[269] = A
0x02C6 (0x00058C) 0x210D- f:00020 d: 269 | A = OR[269]
0x02C7 (0x00058E) 0x292C- f:00024 d: 300 | OR[300] = A
0x02C8 (0x000590) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x02C9 (0x000592) 0x290D- f:00024 d: 269 | OR[269] = A
0x02CA (0x000594) 0x210D- f:00020 d: 269 | A = OR[269]
0x02CB (0x000596) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x02CC (0x000598) 0x290D- f:00024 d: 269 | OR[269] = A
0x02CD (0x00059A) 0x2006- f:00020 d: 6 | A = OR[6]
0x02CE (0x00059C) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x02CF (0x00059E) 0x2908- f:00024 d: 264 | OR[264] = A
0x02D0 (0x0005A0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02D1 (0x0005A2) 0x1A00-0xFFF0 f:00015 d: 0 | A = A & 65520 (0xFFF0)
0x02D3 (0x0005A6) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02D4 (0x0005A8) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02D5 (0x0005AA) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x02D6 (0x0005AC) 0x292D- f:00024 d: 301 | OR[301] = A
0x02D7 (0x0005AE) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x02D8 (0x0005B0) 0x5800- f:00054 d: 0 | B = A
0x02D9 (0x0005B2) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x02DB (0x0005B6) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02DC (0x0005B8) 0x212C- f:00020 d: 300 | A = OR[300]
0x02DD (0x0005BA) 0x290D- f:00024 d: 269 | OR[269] = A
0x02DE (0x0005BC) 0x210D- f:00020 d: 269 | A = OR[269]
0x02DF (0x0005BE) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x02E0 (0x0005C0) 0x290D- f:00024 d: 269 | OR[269] = A
0x02E1 (0x0005C2) 0x2006- f:00020 d: 6 | A = OR[6]
0x02E2 (0x0005C4) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x02E3 (0x0005C6) 0x2908- f:00024 d: 264 | OR[264] = A
0x02E4 (0x0005C8) 0x3108- f:00030 d: 264 | A = (OR[264])
0x02E5 (0x0005CA) 0x1A00-0xFFF0 f:00015 d: 0 | A = A & 65520 (0xFFF0)
0x02E7 (0x0005CE) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02E8 (0x0005D0) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x02E9 (0x0005D2) 0x723D- f:00071 d: 61 | P = P - 61 (0x02AC)
0x02EA (0x0005D4) 0x2121- f:00020 d: 289 | A = OR[289]
0x02EB (0x0005D6) 0x290E- f:00024 d: 270 | OR[270] = A
0x02EC (0x0005D8) 0x2120- f:00020 d: 288 | A = OR[288]
0x02ED (0x0005DA) 0x290D- f:00024 d: 269 | OR[269] = A
0x02EE (0x0005DC) 0x210D- f:00020 d: 269 | A = OR[269]
0x02EF (0x0005DE) 0x8406- f:00102 d: 6 | P = P + 6 (0x02F5), A = 0
0x02F0 (0x0005E0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02F1 (0x0005E2) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x02F2 (0x0005E4) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1
0x02F3 (0x0005E6) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1
0x02F4 (0x0005E8) 0x7206- f:00071 d: 6 | P = P - 6 (0x02EE)
0x02F5 (0x0005EA) 0x0200- f:00001 d: 0 | EXIT
0x02F6 (0x0005EC) 0x1019- f:00010 d: 25 | A = 25 (0x0019)
0x02F7 (0x0005EE) 0x292D- f:00024 d: 301 | OR[301] = A
0x02F8 (0x0005F0) 0x2120- f:00020 d: 288 | A = OR[288]
0x02F9 (0x0005F2) 0x292E- f:00024 d: 302 | OR[302] = A
0x02FA (0x0005F4) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x02FB (0x0005F6) 0x5800- f:00054 d: 0 | B = A
0x02FC (0x0005F8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x02FD (0x0005FA) 0x7C09- f:00076 d: 9 | R = OR[9]
0x02FE (0x0005FC) 0x0200- f:00001 d: 0 | EXIT
0x02FF (0x0005FE) 0x2114- f:00020 d: 276 | A = OR[276]
0x0300 (0x000600) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0301 (0x000602) 0x2914- f:00024 d: 276 | OR[276] = A
0x0302 (0x000604) 0x3123- f:00030 d: 291 | A = (OR[291])
0x0303 (0x000606) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0304 (0x000608) 0x2514- f:00022 d: 276 | A = A + OR[276]
0x0305 (0x00060A) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0306 (0x00060C) 0x3923- f:00034 d: 291 | (OR[291]) = A
0x0307 (0x00060E) 0x2113- f:00020 d: 275 | A = OR[275]
0x0308 (0x000610) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0309 (0x000612) 0x2913- f:00024 d: 275 | OR[275] = A
0x030A (0x000614) 0x3123- f:00030 d: 291 | A = (OR[291])
0x030B (0x000616) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x030D (0x00061A) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x030E (0x00061C) 0x3923- f:00034 d: 291 | (OR[291]) = A
0x030F (0x00061E) 0x2123- f:00020 d: 291 | A = OR[291]
0x0310 (0x000620) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0311 (0x000622) 0x2908- f:00024 d: 264 | OR[264] = A
0x0312 (0x000624) 0x2115- f:00020 d: 277 | A = OR[277]
0x0313 (0x000626) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0314 (0x000628) 0x2123- f:00020 d: 291 | A = OR[291]
0x0315 (0x00062A) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0316 (0x00062C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0317 (0x00062E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0318 (0x000630) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0319 (0x000632) 0x2123- f:00020 d: 291 | A = OR[291]
0x031A (0x000634) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x031B (0x000636) 0x2908- f:00024 d: 264 | OR[264] = A
0x031C (0x000638) 0x2116- f:00020 d: 278 | A = OR[278]
0x031D (0x00063A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x031E (0x00063C) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x031F (0x00063E) 0x2B23- f:00025 d: 291 | OR[291] = A + OR[291]
0x0320 (0x000640) 0x0200- f:00001 d: 0 | EXIT
0x0321 (0x000642) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0322 (0x000644) 0x292D- f:00024 d: 301 | OR[301] = A
0x0323 (0x000646) 0x1800-0x0072 f:00014 d: 0 | A = 114 (0x0072)
0x0325 (0x00064A) 0x292E- f:00024 d: 302 | OR[302] = A
0x0326 (0x00064C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0327 (0x00064E) 0x292F- f:00024 d: 303 | OR[303] = A
0x0328 (0x000650) 0x211E- f:00020 d: 286 | A = OR[286]
0x0329 (0x000652) 0x2930- f:00024 d: 304 | OR[304] = A
0x032A (0x000654) 0x2118- f:00020 d: 280 | A = OR[280]
0x032B (0x000656) 0x2931- f:00024 d: 305 | OR[305] = A
0x032C (0x000658) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x032D (0x00065A) 0x5800- f:00054 d: 0 | B = A
0x032E (0x00065C) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x0330 (0x000660) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0331 (0x000662) 0x0200- f:00001 d: 0 | EXIT
0x0332 (0x000664) 0x211E- f:00020 d: 286 | A = OR[286]
0x0333 (0x000666) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E)
0x0334 (0x000668) 0x2908- f:00024 d: 264 | OR[264] = A
0x0335 (0x00066A) 0x2123- f:00020 d: 291 | A = OR[291]
0x0336 (0x00066C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0337 (0x00066E) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0338 (0x000670) 0x2913- f:00024 d: 275 | OR[275] = A
0x0339 (0x000672) 0x7003- f:00070 d: 3 | P = P + 3 (0x033C)
0x033A (0x000674) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x033B (0x000676) 0x2913- f:00024 d: 275 | OR[275] = A
0x033C (0x000678) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x033D (0x00067A) 0x292D- f:00024 d: 301 | OR[301] = A
0x033E (0x00067C) 0x1800-0x006A f:00014 d: 0 | A = 106 (0x006A)
0x0340 (0x000680) 0x292E- f:00024 d: 302 | OR[302] = A
0x0341 (0x000682) 0x2113- f:00020 d: 275 | A = OR[275]
0x0342 (0x000684) 0x292F- f:00024 d: 303 | OR[303] = A
0x0343 (0x000686) 0x211E- f:00020 d: 286 | A = OR[286]
0x0344 (0x000688) 0x2930- f:00024 d: 304 | OR[304] = A
0x0345 (0x00068A) 0x2119- f:00020 d: 281 | A = OR[281]
0x0346 (0x00068C) 0x2931- f:00024 d: 305 | OR[305] = A
0x0347 (0x00068E) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0348 (0x000690) 0x5800- f:00054 d: 0 | B = A
0x0349 (0x000692) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x034B (0x000696) 0x7C09- f:00076 d: 9 | R = OR[9]
0x034C (0x000698) 0x2924- f:00024 d: 292 | OR[292] = A
0x034D (0x00069A) 0x211E- f:00020 d: 286 | A = OR[286]
0x034E (0x00069C) 0x1415- f:00012 d: 21 | A = A + 21 (0x0015)
0x034F (0x00069E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0350 (0x0006A0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0351 (0x0006A2) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0352 (0x0006A4) 0x2927- f:00024 d: 295 | OR[295] = A
0x0353 (0x0006A6) 0x0200- f:00001 d: 0 | EXIT
0x0354 (0x0006A8) 0x211C- f:00020 d: 284 | A = OR[284]
0x0355 (0x0006AA) 0x1E00-0x4331 f:00017 d: 0 | A = A - 17201 (0x4331)
0x0357 (0x0006AE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0359), A = 0
0x0358 (0x0006B0) 0x0200- f:00001 d: 0 | EXIT
0x0359 (0x0006B2) 0x211E- f:00020 d: 286 | A = OR[286]
0x035A (0x0006B4) 0x1453- f:00012 d: 83 | A = A + 83 (0x0053)
0x035B (0x0006B6) 0x2908- f:00024 d: 264 | OR[264] = A
0x035C (0x0006B8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x035D (0x0006BA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x035E (0x0006BC) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x035F (0x0006BE) 0x292D- f:00024 d: 301 | OR[301] = A
0x0360 (0x0006C0) 0x1800-0x0076 f:00014 d: 0 | A = 118 (0x0076)
0x0362 (0x0006C4) 0x292E- f:00024 d: 302 | OR[302] = A
0x0363 (0x0006C6) 0x211E- f:00020 d: 286 | A = OR[286]
0x0364 (0x0006C8) 0x292F- f:00024 d: 303 | OR[303] = A
0x0365 (0x0006CA) 0x211F- f:00020 d: 287 | A = OR[287]
0x0366 (0x0006CC) 0x2930- f:00024 d: 304 | OR[304] = A
0x0367 (0x0006CE) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x0368 (0x0006D0) 0x5800- f:00054 d: 0 | B = A
0x0369 (0x0006D2) 0x1800-0x2B18 f:00014 d: 0 | A = 11032 (0x2B18)
0x036B (0x0006D6) 0x7C09- f:00076 d: 9 | R = OR[9]
0x036C (0x0006D8) 0x2925- f:00024 d: 293 | OR[293] = A
0x036D (0x0006DA) 0x0200- f:00001 d: 0 | EXIT
0x036E (0x0006DC) 0x2128- f:00020 d: 296 | A = OR[296]
0x036F (0x0006DE) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0370 (0x0006E0) 0x2923- f:00024 d: 291 | OR[291] = A
0x0371 (0x0006E2) 0x763F- f:00073 d: 63 | R = P - 63 (0x0332)
0x0372 (0x0006E4) 0x2124- f:00020 d: 292 | A = OR[292]
0x0373 (0x0006E6) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x0374 (0x0006E8) 0x8602- f:00103 d: 2 | P = P + 2 (0x0376), A # 0
0x0375 (0x0006EA) 0x700C- f:00070 d: 12 | P = P + 12 (0x0381)
0x0376 (0x0006EC) 0x2124- f:00020 d: 292 | A = OR[292]
0x0377 (0x0006EE) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x0378 (0x0006F0) 0x8C0A- f:00106 d: 10 | P = P - 10 (0x036E), A = 0
0x0379 (0x0006F2) 0x2124- f:00020 d: 292 | A = OR[292]
0x037A (0x0006F4) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x037B (0x0006F6) 0x8D0C- f:00106 d: 268 | P = P - 268 (0x026F), A = 0
0x037C (0x0006F8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x037D (0x0006FA) 0x291F- f:00024 d: 287 | OR[287] = A
0x037E (0x0006FC) 0x762A- f:00073 d: 42 | R = P - 42 (0x0354)
0x037F (0x0006FE) 0x7A03-0x0422 f:00075 d: 3 | P = OR[3]+1058 (0x0422)
0x0381 (0x000702) 0x0200- f:00001 d: 0 | EXIT
0x0382 (0x000704) 0x2128- f:00020 d: 296 | A = OR[296]
0x0383 (0x000706) 0x2923- f:00024 d: 291 | OR[291] = A
0x0384 (0x000708) 0x100F- f:00010 d: 15 | A = 15 (0x000F)
0x0385 (0x00070A) 0x2913- f:00024 d: 275 | OR[275] = A
0x0386 (0x00070C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0387 (0x00070E) 0x2914- f:00024 d: 276 | OR[276] = A
0x0388 (0x000710) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0389 (0x000712) 0x2915- f:00024 d: 277 | OR[277] = A
0x038A (0x000714) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x038B (0x000716) 0x2916- f:00024 d: 278 | OR[278] = A
0x038C (0x000718) 0x768D- f:00073 d: 141 | R = P - 141 (0x02FF)
0x038D (0x00071A) 0x2128- f:00020 d: 296 | A = OR[296]
0x038E (0x00071C) 0x2923- f:00024 d: 291 | OR[291] = A
0x038F (0x00071E) 0x765D- f:00073 d: 93 | R = P - 93 (0x0332)
0x0390 (0x000720) 0x2124- f:00020 d: 292 | A = OR[292]
0x0391 (0x000722) 0x1606- f:00013 d: 6 | A = A - 6 (0x0006)
0x0392 (0x000724) 0x8402- f:00102 d: 2 | P = P + 2 (0x0394), A = 0
0x0393 (0x000726) 0x7003- f:00070 d: 3 | P = P + 3 (0x0396)
0x0394 (0x000728) 0x7212- f:00071 d: 18 | P = P - 18 (0x0382)
0x0395 (0x00072A) 0x7007- f:00070 d: 7 | P = P + 7 (0x039C)
0x0396 (0x00072C) 0x2124- f:00020 d: 292 | A = OR[292]
0x0397 (0x00072E) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0398 (0x000730) 0x8402- f:00102 d: 2 | P = P + 2 (0x039A), A = 0
0x0399 (0x000732) 0x7003- f:00070 d: 3 | P = P + 3 (0x039C)
0x039A (0x000734) 0x7660- f:00073 d: 96 | R = P - 96 (0x033A)
0x039B (0x000736) 0x720B- f:00071 d: 11 | P = P - 11 (0x0390)
0x039C (0x000738) 0x2124- f:00020 d: 292 | A = OR[292]
0x039D (0x00073A) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x039E (0x00073C) 0x8402- f:00102 d: 2 | P = P + 2 (0x03A0), A = 0
0x039F (0x00073E) 0x7003- f:00070 d: 3 | P = P + 3 (0x03A2)
0x03A0 (0x000740) 0x7331- f:00071 d: 305 | P = P - 305 (0x026F)
0x03A1 (0x000742) 0x7006- f:00070 d: 6 | P = P + 6 (0x03A7)
0x03A2 (0x000744) 0x2124- f:00020 d: 292 | A = OR[292]
0x03A3 (0x000746) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x03A4 (0x000748) 0x8402- f:00102 d: 2 | P = P + 2 (0x03A6), A = 0
0x03A5 (0x00074A) 0x7002- f:00070 d: 2 | P = P + 2 (0x03A7)
0x03A6 (0x00074C) 0x7638- f:00073 d: 56 | R = P - 56 (0x036E)
0x03A7 (0x00074E) 0x0200- f:00001 d: 0 | EXIT
0x03A8 (0x000750) 0x211C- f:00020 d: 284 | A = OR[284]
0x03A9 (0x000752) 0x1E00-0x4331 f:00017 d: 0 | A = A - 17201 (0x4331)
0x03AB (0x000756) 0x8402- f:00102 d: 2 | P = P + 2 (0x03AD), A = 0
0x03AC (0x000758) 0x0200- f:00001 d: 0 | EXIT
0x03AD (0x00075A) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF)
0x03AF (0x00075E) 0x2725- f:00023 d: 293 | A = A - OR[293]
0x03B0 (0x000760) 0x2925- f:00024 d: 293 | OR[293] = A
0x03B1 (0x000762) 0x2118- f:00020 d: 280 | A = OR[280]
0x03B2 (0x000764) 0x141A- f:00012 d: 26 | A = A + 26 (0x001A)
0x03B3 (0x000766) 0x2908- f:00024 d: 264 | OR[264] = A
0x03B4 (0x000768) 0x2125- f:00020 d: 293 | A = OR[293]
0x03B5 (0x00076A) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x03B6 (0x00076C) 0x1800-0x0CFF f:00014 d: 0 | A = 3327 (0x0CFF)
0x03B8 (0x000770) 0x2913- f:00024 d: 275 | OR[275] = A
0x03B9 (0x000772) 0x2113- f:00020 d: 275 | A = OR[275]
0x03BA (0x000774) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x03BB (0x000776) 0x2908- f:00024 d: 264 | OR[264] = A
0x03BC (0x000778) 0x3108- f:00030 d: 264 | A = (OR[264])
0x03BD (0x00077A) 0x2914- f:00024 d: 276 | OR[276] = A
0x03BE (0x00077C) 0x2113- f:00020 d: 275 | A = OR[275]
0x03BF (0x00077E) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x03C0 (0x000780) 0x2908- f:00024 d: 264 | OR[264] = A
0x03C1 (0x000782) 0x3108- f:00030 d: 264 | A = (OR[264])
0x03C2 (0x000784) 0x2915- f:00024 d: 277 | OR[277] = A
0x03C3 (0x000786) 0x2114- f:00020 d: 276 | A = OR[276]
0x03C4 (0x000788) 0x2715- f:00023 d: 277 | A = A - OR[277]
0x03C5 (0x00078A) 0x2914- f:00024 d: 276 | OR[276] = A
0x03C6 (0x00078C) 0x2118- f:00020 d: 280 | A = OR[280]
0x03C7 (0x00078E) 0x141F- f:00012 d: 31 | A = A + 31 (0x001F)
0x03C8 (0x000790) 0x2908- f:00024 d: 264 | OR[264] = A
0x03C9 (0x000792) 0x2114- f:00020 d: 276 | A = OR[276]
0x03CA (0x000794) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x03CB (0x000796) 0x2118- f:00020 d: 280 | A = OR[280]
0x03CC (0x000798) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x03CD (0x00079A) 0x2908- f:00024 d: 264 | OR[264] = A
0x03CE (0x00079C) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x03CF (0x00079E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x03D0 (0x0007A0) 0x0400- f:00002 d: 0 | I = 0
0x03D1 (0x0007A2) 0x0000- f:00000 d: 0 | PASS
0x03D2 (0x0007A4) 0x2118- f:00020 d: 280 | A = OR[280]
0x03D3 (0x0007A6) 0x2896- f:00024 d: 150 | OR[150] = A
0x03D4 (0x0007A8) 0x7E00-0x19E9 f:00077 d: 0 | R = OR[0]+6633 (0x19E9)
0x03D6 (0x0007AC) 0x7E00-0x19DD f:00077 d: 0 | R = OR[0]+6621 (0x19DD)
0x03D8 (0x0007B0) 0x0600- f:00003 d: 0 | I = 1
0x03D9 (0x0007B2) 0x0200- f:00001 d: 0 | EXIT
0x03DA (0x0007B4) 0x2118- f:00020 d: 280 | A = OR[280]
0x03DB (0x0007B6) 0x141C- f:00012 d: 28 | A = A + 28 (0x001C)
0x03DC (0x0007B8) 0x2908- f:00024 d: 264 | OR[264] = A
0x03DD (0x0007BA) 0x3108- f:00030 d: 264 | A = (OR[264])
0x03DE (0x0007BC) 0x2913- f:00024 d: 275 | OR[275] = A
0x03DF (0x0007BE) 0x2113- f:00020 d: 275 | A = OR[275]
0x03E0 (0x0007C0) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x03E2 (0x0007C4) 0x391F- f:00034 d: 287 | (OR[287]) = A
0x03E3 (0x0007C6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x03E4 (0x0007C8) 0x2913- f:00024 d: 275 | OR[275] = A
0x03E5 (0x0007CA) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x03E6 (0x0007CC) 0x2915- f:00024 d: 277 | OR[277] = A
0x03E7 (0x0007CE) 0x2118- f:00020 d: 280 | A = OR[280]
0x03E8 (0x0007D0) 0x1414- f:00012 d: 20 | A = A + 20 (0x0014)
0x03E9 (0x0007D2) 0x2914- f:00024 d: 276 | OR[276] = A
0x03EA (0x0007D4) 0x2113- f:00020 d: 275 | A = OR[275]
0x03EB (0x0007D6) 0x1610- f:00013 d: 16 | A = A - 16 (0x0010)
0x03EC (0x0007D8) 0xAC03-0x0421 f:00126 d: 3 | P = OR[3]+1057 (0x0421), A = 0
0x03EE (0x0007DC) 0x2113- f:00020 d: 275 | A = OR[275]
0x03EF (0x0007DE) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x03F0 (0x0007E0) 0x2514- f:00022 d: 276 | A = A + OR[276]
0x03F1 (0x0007E2) 0x290D- f:00024 d: 269 | OR[269] = A
0x03F2 (0x0007E4) 0x310D- f:00030 d: 269 | A = (OR[269])
0x03F3 (0x0007E6) 0x290D- f:00024 d: 269 | OR[269] = A
0x03F4 (0x0007E8) 0x2113- f:00020 d: 275 | A = OR[275]
0x03F5 (0x0007EA) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x03F6 (0x0007EC) 0x2908- f:00024 d: 264 | OR[264] = A
0x03F7 (0x0007EE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x03F8 (0x0007F0) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x03F9 (0x0007F2) 0x8604- f:00103 d: 4 | P = P + 4 (0x03FD), A # 0
0x03FA (0x0007F4) 0x210D- f:00020 d: 269 | A = OR[269]
0x03FB (0x0007F6) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x03FC (0x0007F8) 0x290D- f:00024 d: 269 | OR[269] = A
0x03FD (0x0007FA) 0x210D- f:00020 d: 269 | A = OR[269]
0x03FE (0x0007FC) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x03FF (0x0007FE) 0x2917- f:00024 d: 279 | OR[279] = A
0x0400 (0x000800) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1
0x0401 (0x000802) 0x2117- f:00020 d: 279 | A = OR[279]
0x0402 (0x000804) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0403 (0x000806) 0x290D- f:00024 d: 269 | OR[269] = A
0x0404 (0x000808) 0x2115- f:00020 d: 277 | A = OR[277]
0x0405 (0x00080A) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0406 (0x00080C) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0407 (0x00080E) 0x290E- f:00024 d: 270 | OR[270] = A
0x0408 (0x000810) 0x2115- f:00020 d: 277 | A = OR[277]
0x0409 (0x000812) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x040A (0x000814) 0x2908- f:00024 d: 264 | OR[264] = A
0x040B (0x000816) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x040C (0x000818) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x040D (0x00081A) 0x8607- f:00103 d: 7 | P = P + 7 (0x0414), A # 0
0x040E (0x00081C) 0x310E- f:00030 d: 270 | A = (OR[270])
0x040F (0x00081E) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0410 (0x000820) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0411 (0x000822) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0412 (0x000824) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0413 (0x000826) 0x7006- f:00070 d: 6 | P = P + 6 (0x0419)
0x0414 (0x000828) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0415 (0x00082A) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0417 (0x00082E) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0418 (0x000830) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0419 (0x000832) 0x2D15- f:00026 d: 277 | OR[277] = OR[277] + 1
0x041A (0x000834) 0x7230- f:00071 d: 48 | P = P - 48 (0x03EA)
0x041B (0x000836) 0x0200- f:00001 d: 0 | EXIT
0x041C (0x000838) 0x7674- f:00073 d: 116 | R = P - 116 (0x03A8)
0x041D (0x00083A) 0x211C- f:00020 d: 284 | A = OR[284]
0x041E (0x00083C) 0x1E00-0x4331 f:00017 d: 0 | A = A - 17201 (0x4331)
0x0420 (0x000840) 0x8402- f:00102 d: 2 | P = P + 2 (0x0422), A = 0
0x0421 (0x000842) 0x7014- f:00070 d: 20 | P = P + 20 (0x0435)
0x0422 (0x000844) 0x0400- f:00002 d: 0 | I = 0
0x0423 (0x000846) 0x0000- f:00000 d: 0 | PASS
0x0424 (0x000848) 0x2118- f:00020 d: 280 | A = OR[280]
0x0425 (0x00084A) 0x289C- f:00024 d: 156 | OR[156] = A
0x0426 (0x00084C) 0x7E00-0x2017 f:00077 d: 0 | R = OR[0]+8215 (0x2017)
0x0428 (0x000850) 0x211E- f:00020 d: 286 | A = OR[286]
0x0429 (0x000852) 0x1443- f:00012 d: 67 | A = A + 67 (0x0043)
0x042A (0x000854) 0x289D- f:00024 d: 157 | OR[157] = A
0x042B (0x000856) 0x7E00-0x1FFD f:00077 d: 0 | R = OR[0]+8189 (0x1FFD)
0x042D (0x00085A) 0x209C- f:00020 d: 156 | A = OR[156]
0x042E (0x00085C) 0x2918- f:00024 d: 280 | OR[280] = A
0x042F (0x00085E) 0x8602- f:00103 d: 2 | P = P + 2 (0x0431), A # 0
0x0430 (0x000860) 0x7005- f:00070 d: 5 | P = P + 5 (0x0435)
0x0431 (0x000862) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF)
0x0433 (0x000866) 0x2925- f:00024 d: 293 | OR[293] = A
0x0434 (0x000868) 0x7218- f:00071 d: 24 | P = P - 24 (0x041C)
0x0435 (0x00086A) 0x212B- f:00020 d: 299 | A = OR[299]
0x0436 (0x00086C) 0x2920- f:00024 d: 288 | OR[288] = A
0x0437 (0x00086E) 0x7741- f:00073 d: 321 | R = P - 321 (0x02F6)
0x0438 (0x000870) 0x211A- f:00020 d: 282 | A = OR[282]
0x0439 (0x000872) 0x1603- f:00013 d: 3 | A = A - 3 (0x0003)
0x043A (0x000874) 0x8402- f:00102 d: 2 | P = P + 2 (0x043C), A = 0
0x043B (0x000876) 0x7063- f:00070 d: 99 | P = P + 99 (0x049E)
0x043C (0x000878) 0x211B- f:00020 d: 283 | A = OR[283]
0x043D (0x00087A) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x043E (0x00087C) 0x2908- f:00024 d: 264 | OR[264] = A
0x043F (0x00087E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0440 (0x000880) 0x1A00-0xFF7F f:00015 d: 0 | A = A & 65407 (0xFF7F)
0x0442 (0x000884) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0443 (0x000886) 0x211B- f:00020 d: 283 | A = OR[283]
0x0444 (0x000888) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x0445 (0x00088A) 0x2908- f:00024 d: 264 | OR[264] = A
0x0446 (0x00088C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0447 (0x00088E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0448 (0x000890) 0x211B- f:00020 d: 283 | A = OR[283]
0x0449 (0x000892) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x044A (0x000894) 0x2908- f:00024 d: 264 | OR[264] = A
0x044B (0x000896) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x044C (0x000898) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x044D (0x00089A) 0x211B- f:00020 d: 283 | A = OR[283]
0x044E (0x00089C) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x044F (0x00089E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0450 (0x0008A0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0451 (0x0008A2) 0x0806- f:00004 d: 6 | A = A > 6 (0x0006)
0x0452 (0x0008A4) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0453 (0x0008A6) 0x8602- f:00103 d: 2 | P = P + 2 (0x0455), A # 0
0x0454 (0x0008A8) 0x7031- f:00070 d: 49 | P = P + 49 (0x0485)
0x0455 (0x0008AA) 0x211B- f:00020 d: 283 | A = OR[283]
0x0456 (0x0008AC) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005)
0x0457 (0x0008AE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0458 (0x0008B0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0459 (0x0008B2) 0x1A00-0xFFBF f:00015 d: 0 | A = A & 65471 (0xFFBF)
0x045B (0x0008B6) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x045C (0x0008B8) 0x211B- f:00020 d: 283 | A = OR[283]
0x045D (0x0008BA) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x045E (0x0008BC) 0x2908- f:00024 d: 264 | OR[264] = A
0x045F (0x0008BE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0460 (0x0008C0) 0x2914- f:00024 d: 276 | OR[276] = A
0x0461 (0x0008C2) 0x3114- f:00030 d: 276 | A = (OR[276])
0x0462 (0x0008C4) 0x2914- f:00024 d: 276 | OR[276] = A
0x0463 (0x0008C6) 0x2114- f:00020 d: 276 | A = OR[276]
0x0464 (0x0008C8) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0465 (0x0008CA) 0x2908- f:00024 d: 264 | OR[264] = A
0x0466 (0x0008CC) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0467 (0x0008CE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0468 (0x0008D0) 0x2914- f:00024 d: 276 | OR[276] = A
0x0469 (0x0008D2) 0x1800-0x0E67 f:00014 d: 0 | A = 3687 (0x0E67)
0x046B (0x0008D6) 0x2908- f:00024 d: 264 | OR[264] = A
0x046C (0x0008D8) 0x2114- f:00020 d: 276 | A = OR[276]
0x046D (0x0008DA) 0x1610- f:00013 d: 16 | A = A - 16 (0x0010)
0x046E (0x0008DC) 0x3508- f:00032 d: 264 | A = A + (OR[264])
0x046F (0x0008DE) 0x2914- f:00024 d: 276 | OR[276] = A
0x0470 (0x0008E0) 0x3114- f:00030 d: 276 | A = (OR[276])
0x0471 (0x0008E2) 0x2914- f:00024 d: 276 | OR[276] = A
0x0472 (0x0008E4) 0x2114- f:00020 d: 276 | A = OR[276]
0x0473 (0x0008E6) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x0474 (0x0008E8) 0x290D- f:00024 d: 269 | OR[269] = A
0x0475 (0x0008EA) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0476 (0x0008EC) 0x290E- f:00024 d: 270 | OR[270] = A
0x0477 (0x0008EE) 0x210E- f:00020 d: 270 | A = OR[270]
0x0478 (0x0008F0) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0479 (0x0008F2) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x047A (0x0008F4) 0x290F- f:00024 d: 271 | OR[271] = A
0x047B (0x0008F6) 0x210F- f:00020 d: 271 | A = OR[271]
0x047C (0x0008F8) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x047D (0x0008FA) 0x290F- f:00024 d: 271 | OR[271] = A
0x047E (0x0008FC) 0x210E- f:00020 d: 270 | A = OR[270]
0x047F (0x0008FE) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0481 (0x000902) 0x250F- f:00022 d: 271 | A = A + OR[271]
0x0482 (0x000904) 0x290E- f:00024 d: 270 | OR[270] = A
0x0483 (0x000906) 0x390D- f:00034 d: 269 | (OR[269]) = A
0x0484 (0x000908) 0x210F- f:00020 d: 271 | A = OR[271]
0x0485 (0x00090A) 0x211E- f:00020 d: 286 | A = OR[286]
0x0486 (0x00090C) 0x2920- f:00024 d: 288 | OR[288] = A
0x0487 (0x00090E) 0x7791- f:00073 d: 401 | R = P - 401 (0x02F6)
0x0488 (0x000910) 0x211C- f:00020 d: 284 | A = OR[284]
0x0489 (0x000912) 0x1E00-0x4331 f:00017 d: 0 | A = A - 17201 (0x4331)
0x048B (0x000916) 0x8602- f:00103 d: 2 | P = P + 2 (0x048D), A # 0
0x048C (0x000918) 0x700C- f:00070 d: 12 | P = P + 12 (0x0498)
0x048D (0x00091A) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF)
0x048F (0x00091E) 0x1E00-0xFFEF f:00017 d: 0 | A = A - 65519 (0xFFEF)
0x0491 (0x000922) 0x2925- f:00024 d: 293 | OR[293] = A
0x0492 (0x000924) 0x2005- f:00020 d: 5 | A = OR[5]
0x0493 (0x000926) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x0494 (0x000928) 0x2908- f:00024 d: 264 | OR[264] = A
0x0495 (0x00092A) 0x2125- f:00020 d: 293 | A = OR[293]
0x0496 (0x00092C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x0497 (0x00092E) 0x7006- f:00070 d: 6 | P = P + 6 (0x049D)
0x0498 (0x000930) 0x2005- f:00020 d: 5 | A = OR[5]
0x0499 (0x000932) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x049A (0x000934) 0x2908- f:00024 d: 264 | OR[264] = A
0x049B (0x000936) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x049C (0x000938) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x049D (0x00093A) 0x7012- f:00070 d: 18 | P = P + 18 (0x04AF)
0x049E (0x00093C) 0x211D- f:00020 d: 285 | A = OR[285]
0x049F (0x00093E) 0x2719- f:00023 d: 281 | A = A - OR[281]
0x04A0 (0x000940) 0x8602- f:00103 d: 2 | P = P + 2 (0x04A2), A # 0
0x04A1 (0x000942) 0x700E- f:00070 d: 14 | P = P + 14 (0x04AF)
0x04A2 (0x000944) 0x1029- f:00010 d: 41 | A = 41 (0x0029)
0x04A3 (0x000946) 0x292D- f:00024 d: 301 | OR[301] = A
0x04A4 (0x000948) 0x1800-0x007E f:00014 d: 0 | A = 126 (0x007E)
0x04A6 (0x00094C) 0x292E- f:00024 d: 302 | OR[302] = A
0x04A7 (0x00094E) 0x211E- f:00020 d: 286 | A = OR[286]
0x04A8 (0x000950) 0x292F- f:00024 d: 303 | OR[303] = A
0x04A9 (0x000952) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x04AA (0x000954) 0x2930- f:00024 d: 304 | OR[304] = A
0x04AB (0x000956) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x04AC (0x000958) 0x5800- f:00054 d: 0 | B = A
0x04AD (0x00095A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x04AE (0x00095C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x04AF (0x00095E) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x04B0 (0x000960) 0x292D- f:00024 d: 301 | OR[301] = A
0x04B1 (0x000962) 0x112D- f:00010 d: 301 | A = 301 (0x012D)
0x04B2 (0x000964) 0x5800- f:00054 d: 0 | B = A
0x04B3 (0x000966) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x04B4 (0x000968) 0x7C09- f:00076 d: 9 | R = OR[9]
0x04B5 (0x00096A) 0x0000- f:00000 d: 0 | PASS
0x04B6 (0x00096C) 0x0000- f:00000 d: 0 | PASS
0x04B7 (0x00096E) 0x0000- f:00000 d: 0 | PASS
| 79.929141 | 79 | 0.467963 |
6a624b1702e43187991e4207192b4909673beba6 | 1,445 | asm | Assembly | src/test/ref/function-pointer-noarg-call-6.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/test/ref/function-pointer-noarg-call-6.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/test/ref/function-pointer-noarg-call-6.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | // Tests calling into a function pointer with local variables
// Commodore 64 PRG executable file
.file [name="function-pointer-noarg-call-6.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.segment Code
main: {
.label cols = 4
lda #<$d800
sta.z cols
lda #>$d800
sta.z cols+1
__b1:
// for(byte* cols = (char*)$d800; cols<$d800+1000;cols++)
lda.z cols+1
cmp #>$d800+$3e8
bcc __b2
bne !+
lda.z cols
cmp #<$d800+$3e8
bcc __b2
!:
// }
rts
__b2:
// (*cls)()
jsr fn1
// (*cols)++;
ldy #0
lda (cols),y
clc
adc #1
sta (cols),y
// for(byte* cols = (char*)$d800; cols<$d800+1000;cols++)
inc.z cols
bne !+
inc.z cols+1
!:
jmp __b1
}
fn1: {
.label screen = 2
lda #<$400
sta.z screen
lda #>$400
sta.z screen+1
__b1:
// for(byte* screen=(byte*)$400;screen<$400+1000;screen++)
lda.z screen+1
cmp #>$400+$3e8
bcc __b2
bne !+
lda.z screen
cmp #<$400+$3e8
bcc __b2
!:
// }
rts
__b2:
// (*screen)++;
ldy #0
lda (screen),y
clc
adc #1
sta (screen),y
// for(byte* screen=(byte*)$400;screen<$400+1000;screen++)
inc.z screen
bne !+
inc.z screen+1
!:
jmp __b1
}
| 18.766234 | 80 | 0.550173 |
d19ae0c4912e507d6254e3fde40c6b1913b1a431 | 3,079 | asm | Assembly | MODULE1/5-arithmetic/math2/math2.asm | wetw0rk/SLAE | c78bc5a8559b35fefb0b3302be8d3d1acd712e11 | [
"MIT"
] | 18 | 2017-11-28T01:10:10.000Z | 2020-07-22T13:24:26.000Z | MODULE1/5-arithmetic/math2/math2.asm | wetw0rk/SLAE | c78bc5a8559b35fefb0b3302be8d3d1acd712e11 | [
"MIT"
] | null | null | null | MODULE1/5-arithmetic/math2/math2.asm | wetw0rk/SLAE | c78bc5a8559b35fefb0b3302be8d3d1acd712e11 | [
"MIT"
] | 11 | 2018-12-14T16:18:03.000Z | 2020-12-01T16:37:19.000Z | ; Executable name : math2
; Designed OS : Linux (32-bit)
; Author : wetw0rk
; Version : 1.0
; Created Following : SLAE
; Description : A simple program that shows how arithmetic
; in assembly works. Particularly division
; and multiplication
;
; Build using these commands:
; nasm -f elf32 -o math2.o math2.asm
; ld -o math2 math2.o
;
; How to run and use this program (intention):
; gdb -q ./math2
;
SECTION .data
; dont ask why I called variables buff
buff1: db 0x05
buff2: dw 0x1122
buff3: dd 0x11111111
SECTION .text
global _start
_start:
; Example of unsigned r/m8 multiplication
mov al,0x10 ; MOV 0x10 into AL
mov bl,0x2 ; MOV 0x2 into BL
mul bl ; MUL-tiply BL by AL the answer/sum should be
; stored in AX
mov al,0xff ; MOV 0xff into AL
mul bl ; MUL-tiply BL by AL(0xff). the CF and OF flag should be set.
; The answer/sum should be stored in AX
; Example of unsigned r/m16 multiplication
xor eax,eax ; zero out the 32bit register for next example
xor ebx,ebx ; zero out the 32bit register for next example
mov ax,0x1111 ; MOV 0x1111 into AX
mov bx,0x0003 ; MOV 0x0003 into BX
mul bx ; MUL-tiply BX by AX. The answer/sum should be in AX.
mov ax,0x1337 ; MOV 0x1337 into AX
mov bx,0x1337 ; MOV 0x1337 into BX
mul bx ; MUL-tiply AX by BX. The CF and OF flag should me set.
; since this is hex and 1337h*1337h = 17135D1 the answer/sum
; will be stored in the following way. EDX = 171, EAX = 35d1
; nice eh?
; Example of unsigned r/m32 multiplication
mov eax,0x11111111 ; MOV 0x11111111 into EAX
mov ebx,0x22222222 ; MOV 0x22222222 into EBX
mul ebx ; MUL-tiply EAX by EBX. The answer should ne stored in
; EAX and EDX. Remember hex! EAX should = eca8642 and
; EDX = 2468acf. Making the answer = 2468acf10eca8642
; noice :)
mov eax,0x22222222 ; MOV 0x22222222 into EAX
mov ebx,0x00000005 ; MOV 0x55555555 into EBX
mul ebx ; MUL-tiply EAX by EBX. The answer should be in EAX
; which should be 0xaaaaaaaa
; Example of multiplication using memory locations
mul byte [buff1] ; MUL-tiply ^ (0xaaaaaaaa)*(0x05) which CF and OF will be set
; since = 355555552
mul word [buff2] ; MUL-tiply ^ (0xaaaa0352)*(0x1122) which will active CF and
; OF, since = b6bf4cce2e4
mul dword [buff3] ; Pretty much the same as above. Step through to see where
; the sum is stored although you can guess/know at this point
; Example of division using r/m16
mov dx,0x0 ; zero out 16bits
mov ax,0x7788 ; MOV 0x7788 into AX
mov cx,0x2 ; MOV 0x2 into CX
div cx ; DIV-ide AX by CX, meaning AX should contain 0x3bc4
mov ax,0x8877 + 0x1 ; MOV 0x8877 + 0x1 (0x8878) into AX
mov cx,0x2 ; MOV 0x2 into CX
div cx ; DIV-ide AX by CX which sum will be stored in AX
; answer will be 0x443c
; exit the program cleanly (mr clean-clean) as always
mov eax,1 ; exit() syscall
mov ebx,0 ; 0 for clean exit
int 80h ; call the kernel
| 33.835165 | 80 | 0.667749 |
d8a7f5d52059c49e7216c71038c006b06638a00f | 585 | asm | Assembly | unittests/ASM/PrimaryGroup/5_FF_06.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 628 | 2020-03-06T14:01:32.000Z | 2022-03-31T06:35:14.000Z | unittests/ASM/PrimaryGroup/5_FF_06.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 576 | 2020-03-06T08:25:12.000Z | 2022-03-30T04:05:29.000Z | unittests/ASM/PrimaryGroup/5_FF_06.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 38 | 2020-03-07T06:10:00.000Z | 2022-03-29T09:27:36.000Z | %ifdef CONFIG
{
"RegData": {
"RAX": "0x4142434445464748",
"RBX": "0x5758000000006768",
"RCX": "0xE0000016"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov r15, 0xe0000000
lea rsp, [r15 + 8 * 4]
mov rax, 0x4142434445464748
mov [r15 + 8 * 0], rax
mov rax, 0x5152535455565758
mov [r15 + 8 * 1], rax
mov rax, 0x6768
mov [r15 + 8 * 2], rax
mov [r15 + 8 * 3], rax
; Encoding doesn't exist in x86-64
; push dword [r15 + 8 * 1 + 0]
push qword [r15 + 8 * 0 + 0]
push word [r15 + 8 * 1 + 0]
mov rax, [r15 + 8 * 3]
mov rbx, [r15 + 8 * 2]
mov rcx, rsp
hlt
| 16.714286 | 34 | 0.582906 |
fa89d9e9d67ad2abd9ea24dcfac291b708823ef1 | 69 | asm | Assembly | lib/test/sources/conditions.asm | MircoT/js-pdp8 | de125c6e20b0b7884c6c5e022ac57ec9cd9f40b7 | [
"MIT"
] | 12 | 2016-04-12T15:13:40.000Z | 2021-05-14T09:29:12.000Z | lib/test/sources/conditions.asm | MircoT/js-pdp8 | de125c6e20b0b7884c6c5e022ac57ec9cd9f40b7 | [
"MIT"
] | 2 | 2019-12-30T14:15:34.000Z | 2019-12-30T14:25:18.000Z | lib/test/sources/conditions.asm | MircoT/js-pdp8 | de125c6e20b0b7884c6c5e022ac57ec9cd9f40b7 | [
"MIT"
] | null | null | null | ORG 100
LDA X
SNA
HLT
INC
SZA
HLT
INC
SPA
HLT
FINE, HLT
X, DEC -1
END | 5.307692 | 9 | 0.710145 |
10fd9546c3023f0c06c51619d1cb99f898c25eaf | 1,349 | asm | Assembly | base/crts/crtw32/lowio/i386/outp.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/crts/crtw32/lowio/i386/outp.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/crts/crtw32/lowio/i386/outp.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | page ,132
title outp - output from ports
;***
;outp.asm - _outp, _outpw and _outpd routines
;
; Copyright (c) 1993-2001, Microsoft Corporation. All rights reserved.
;
;Purpose:
; Defines the write-to-a-port functions: _outp(), _outpw() and outpd().
;
;Revision History:
; 04-09-93 GJF Resurrected.
; 04-13-93 GJF Arg/ret types changed slightly.
;
;*******************************************************************************
.xlist
include cruntime.inc
.list
page
;***
;int _outp(port, databyte) - write byte from port
;unsigned short _outpw(port, dataword) - write word from port
;unsigned long _outpd(port, datadword) - write dword from port
;
;Purpose:
; Write single byte/word/dword to the specified port.
;
;Entry:
; unsigned short port - port to write to
;
;Exit:
; returns value written.
;
;Uses:
; EAX, EDX
;
;Exceptions:
;
;*******************************************************************************
CODESEG
public _outp, _outpw, _outpd
_outp proc
xor eax,eax
mov dx,word ptr [esp + 4]
mov al,byte ptr [esp + 8]
out dx,al
ret
_outp endp
_outpw proc
mov dx,word ptr [esp + 4]
mov ax,word ptr [esp + 8]
out dx,ax
ret
_outpw endp
_outpd proc
mov dx,word ptr [esp + 4]
mov eax,[esp + 8]
out dx,eax
ret
_outpd endp
end
| 17.075949 | 81 | 0.564122 |
7d2ebd8dd9bbd01bc989356c7a795548eb9c5488 | 222 | asm | Assembly | windowsAssembly/exit.asm | Jordank321/GaryLang | 5fe4677cf8bf114c74325cc1ad78660dd65340ce | [
"MIT"
] | null | null | null | windowsAssembly/exit.asm | Jordank321/GaryLang | 5fe4677cf8bf114c74325cc1ad78660dd65340ce | [
"MIT"
] | null | null | null | windowsAssembly/exit.asm | Jordank321/GaryLang | 5fe4677cf8bf114c74325cc1ad78660dd65340ce | [
"MIT"
] | null | null | null | ; -----------------------------------------------------------------------------
; Quit
; -----------------------------------------------------------------------------
mov rax,qword 0
ret
; ----
; END ----
; ----
| 22.2 | 80 | 0.099099 |
3d0d083ddb2aee073df8d536ad5181187587d788 | 78,971 | asm | Assembly | oscomp/build/asm/getppid.asm | wei-huan/MyOS | 0592dd73fd9768a9a69975f7d18c758999195774 | [
"MIT"
] | 2 | 2022-02-21T08:37:46.000Z | 2022-03-03T06:01:47.000Z | oscomp/build/asm/getppid.asm | wei-huan/MyOS | 0592dd73fd9768a9a69975f7d18c758999195774 | [
"MIT"
] | null | null | null | oscomp/build/asm/getppid.asm | wei-huan/MyOS | 0592dd73fd9768a9a69975f7d18c758999195774 | [
"MIT"
] | null | null | null |
/home/weihuan/Documents/testsuits-for-oskernel-preliminary/riscv-syscalls-testing/user/build/riscv64/getppid: file format elf64-littleriscv
Disassembly of section .text:
0000000000001000 <_start>:
.section .text.entry
.globl _start
_start:
mv a0, sp
1000: 850a mv a0,sp
tail __start_main
1002: a051 j 1086 <__start_main>
0000000000001004 <test_getppid>:
* 不能通过测试则输出:
* " getppid error."
*/
int test_getppid()
{
1004: 1141 addi sp,sp,-16
TEST_START(__func__);
1006: 00001517 auipc a0,0x1
100a: eaa50513 addi a0,a0,-342 # 1eb0 <__clone+0x2a>
{
100e: e406 sd ra,8(sp)
TEST_START(__func__);
1010: 2e8000ef jal ra,12f8 <puts>
1014: 00001517 auipc a0,0x1
1018: f2c50513 addi a0,a0,-212 # 1f40 <__func__.0>
101c: 2dc000ef jal ra,12f8 <puts>
1020: 00001517 auipc a0,0x1
1024: ea850513 addi a0,a0,-344 # 1ec8 <__clone+0x42>
1028: 2d0000ef jal ra,12f8 <puts>
pid_t ppid = getppid();
102c: 439000ef jal ra,1c64 <getppid>
if(ppid > 0) printf(" getppid success. ppid : %d\n", ppid);
1030: 02a05c63 blez a0,1068 <test_getppid+0x64>
1034: 85aa mv a1,a0
1036: 00001517 auipc a0,0x1
103a: ea250513 addi a0,a0,-350 # 1ed8 <__clone+0x52>
103e: 2dc000ef jal ra,131a <printf>
else printf(" getppid error.\n");
TEST_END(__func__);
1042: 00001517 auipc a0,0x1
1046: ece50513 addi a0,a0,-306 # 1f10 <__clone+0x8a>
104a: 2ae000ef jal ra,12f8 <puts>
104e: 00001517 auipc a0,0x1
1052: ef250513 addi a0,a0,-270 # 1f40 <__func__.0>
1056: 2a2000ef jal ra,12f8 <puts>
}
105a: 60a2 ld ra,8(sp)
TEST_END(__func__);
105c: 00001517 auipc a0,0x1
1060: e6c50513 addi a0,a0,-404 # 1ec8 <__clone+0x42>
}
1064: 0141 addi sp,sp,16
TEST_END(__func__);
1066: ac49 j 12f8 <puts>
else printf(" getppid error.\n");
1068: 00001517 auipc a0,0x1
106c: e9050513 addi a0,a0,-368 # 1ef8 <__clone+0x72>
1070: 2aa000ef jal ra,131a <printf>
1074: b7f9 j 1042 <test_getppid+0x3e>
0000000000001076 <main>:
int main(void) {
1076: 1141 addi sp,sp,-16
1078: e406 sd ra,8(sp)
test_getppid();
107a: f8bff0ef jal ra,1004 <test_getppid>
return 0;
}
107e: 60a2 ld ra,8(sp)
1080: 4501 li a0,0
1082: 0141 addi sp,sp,16
1084: 8082 ret
0000000000001086 <__start_main>:
#include <unistd.h>
extern int main();
int __start_main(long *p)
{
1086: 85aa mv a1,a0
int argc = p[0];
char **argv = (void *)(p+1);
exit(main(argc, argv));
1088: 4108 lw a0,0(a0)
{
108a: 1141 addi sp,sp,-16
exit(main(argc, argv));
108c: 05a1 addi a1,a1,8
{
108e: e406 sd ra,8(sp)
exit(main(argc, argv));
1090: fe7ff0ef jal ra,1076 <main>
1094: 40b000ef jal ra,1c9e <exit>
return 0;
}
1098: 60a2 ld ra,8(sp)
109a: 4501 li a0,0
109c: 0141 addi sp,sp,16
109e: 8082 ret
00000000000010a0 <printint.constprop.0>:
write(f, s, l);
}
static char digits[] = "0123456789abcdef";
static void printint(int xx, int base, int sign)
10a0: 7179 addi sp,sp,-48
10a2: f406 sd ra,40(sp)
{
char buf[16 + 1];
int i;
uint x;
if (sign && (sign = xx < 0))
10a4: 12054b63 bltz a0,11da <printint.constprop.0+0x13a>
buf[16] = 0;
i = 15;
do
{
buf[i--] = digits[x % base];
10a8: 02b577bb remuw a5,a0,a1
10ac: 00001617 auipc a2,0x1
10b0: ea460613 addi a2,a2,-348 # 1f50 <digits>
buf[16] = 0;
10b4: 00010c23 sb zero,24(sp)
buf[i--] = digits[x % base];
10b8: 0005871b sext.w a4,a1
10bc: 1782 slli a5,a5,0x20
10be: 9381 srli a5,a5,0x20
10c0: 97b2 add a5,a5,a2
10c2: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
10c6: 02b5583b divuw a6,a0,a1
buf[i--] = digits[x % base];
10ca: 00f10ba3 sb a5,23(sp)
} while ((x /= base) != 0);
10ce: 1cb56363 bltu a0,a1,1294 <printint.constprop.0+0x1f4>
buf[i--] = digits[x % base];
10d2: 45b9 li a1,14
10d4: 02e877bb remuw a5,a6,a4
10d8: 1782 slli a5,a5,0x20
10da: 9381 srli a5,a5,0x20
10dc: 97b2 add a5,a5,a2
10de: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
10e2: 02e856bb divuw a3,a6,a4
buf[i--] = digits[x % base];
10e6: 00f10b23 sb a5,22(sp)
} while ((x /= base) != 0);
10ea: 0ce86e63 bltu a6,a4,11c6 <printint.constprop.0+0x126>
buf[i--] = digits[x % base];
10ee: 02e6f5bb remuw a1,a3,a4
} while ((x /= base) != 0);
10f2: 02e6d7bb divuw a5,a3,a4
buf[i--] = digits[x % base];
10f6: 1582 slli a1,a1,0x20
10f8: 9181 srli a1,a1,0x20
10fa: 95b2 add a1,a1,a2
10fc: 0005c583 lbu a1,0(a1)
1100: 00b10aa3 sb a1,21(sp)
} while ((x /= base) != 0);
1104: 0007859b sext.w a1,a5
1108: 12e6ec63 bltu a3,a4,1240 <printint.constprop.0+0x1a0>
buf[i--] = digits[x % base];
110c: 02e7f6bb remuw a3,a5,a4
1110: 1682 slli a3,a3,0x20
1112: 9281 srli a3,a3,0x20
1114: 96b2 add a3,a3,a2
1116: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
111a: 02e7d83b divuw a6,a5,a4
buf[i--] = digits[x % base];
111e: 00d10a23 sb a3,20(sp)
} while ((x /= base) != 0);
1122: 12e5e863 bltu a1,a4,1252 <printint.constprop.0+0x1b2>
buf[i--] = digits[x % base];
1126: 02e876bb remuw a3,a6,a4
112a: 1682 slli a3,a3,0x20
112c: 9281 srli a3,a3,0x20
112e: 96b2 add a3,a3,a2
1130: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
1134: 02e855bb divuw a1,a6,a4
buf[i--] = digits[x % base];
1138: 00d109a3 sb a3,19(sp)
} while ((x /= base) != 0);
113c: 12e86463 bltu a6,a4,1264 <printint.constprop.0+0x1c4>
buf[i--] = digits[x % base];
1140: 02e5f6bb remuw a3,a1,a4
1144: 1682 slli a3,a3,0x20
1146: 9281 srli a3,a3,0x20
1148: 96b2 add a3,a3,a2
114a: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
114e: 02e5d83b divuw a6,a1,a4
buf[i--] = digits[x % base];
1152: 00d10923 sb a3,18(sp)
} while ((x /= base) != 0);
1156: 0ce5ec63 bltu a1,a4,122e <printint.constprop.0+0x18e>
buf[i--] = digits[x % base];
115a: 02e876bb remuw a3,a6,a4
115e: 1682 slli a3,a3,0x20
1160: 9281 srli a3,a3,0x20
1162: 96b2 add a3,a3,a2
1164: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
1168: 02e855bb divuw a1,a6,a4
buf[i--] = digits[x % base];
116c: 00d108a3 sb a3,17(sp)
} while ((x /= base) != 0);
1170: 10e86963 bltu a6,a4,1282 <printint.constprop.0+0x1e2>
buf[i--] = digits[x % base];
1174: 02e5f6bb remuw a3,a1,a4
1178: 1682 slli a3,a3,0x20
117a: 9281 srli a3,a3,0x20
117c: 96b2 add a3,a3,a2
117e: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
1182: 02e5d83b divuw a6,a1,a4
buf[i--] = digits[x % base];
1186: 00d10823 sb a3,16(sp)
} while ((x /= base) != 0);
118a: 10e5e763 bltu a1,a4,1298 <printint.constprop.0+0x1f8>
buf[i--] = digits[x % base];
118e: 02e876bb remuw a3,a6,a4
1192: 1682 slli a3,a3,0x20
1194: 9281 srli a3,a3,0x20
1196: 96b2 add a3,a3,a2
1198: 0006c683 lbu a3,0(a3)
} while ((x /= base) != 0);
119c: 02e857bb divuw a5,a6,a4
buf[i--] = digits[x % base];
11a0: 00d107a3 sb a3,15(sp)
} while ((x /= base) != 0);
11a4: 10e86363 bltu a6,a4,12aa <printint.constprop.0+0x20a>
buf[i--] = digits[x % base];
11a8: 1782 slli a5,a5,0x20
11aa: 9381 srli a5,a5,0x20
11ac: 97b2 add a5,a5,a2
11ae: 0007c783 lbu a5,0(a5)
11b2: 4599 li a1,6
11b4: 00f10723 sb a5,14(sp)
if (sign)
11b8: 00055763 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
11bc: 02d00793 li a5,45
11c0: 00f106a3 sb a5,13(sp)
buf[i--] = digits[x % base];
11c4: 4595 li a1,5
write(f, s, l);
11c6: 003c addi a5,sp,8
11c8: 4641 li a2,16
11ca: 9e0d subw a2,a2,a1
11cc: 4505 li a0,1
11ce: 95be add a1,a1,a5
11d0: 27f000ef jal ra,1c4e <write>
i++;
if (i < 0)
puts("printint error");
out(stdout, buf + i, 16 - i);
}
11d4: 70a2 ld ra,40(sp)
11d6: 6145 addi sp,sp,48
11d8: 8082 ret
x = -xx;
11da: 40a0083b negw a6,a0
buf[i--] = digits[x % base];
11de: 02b877bb remuw a5,a6,a1
11e2: 00001617 auipc a2,0x1
11e6: d6e60613 addi a2,a2,-658 # 1f50 <digits>
buf[16] = 0;
11ea: 00010c23 sb zero,24(sp)
buf[i--] = digits[x % base];
11ee: 0005871b sext.w a4,a1
11f2: 1782 slli a5,a5,0x20
11f4: 9381 srli a5,a5,0x20
11f6: 97b2 add a5,a5,a2
11f8: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
11fc: 02b858bb divuw a7,a6,a1
buf[i--] = digits[x % base];
1200: 00f10ba3 sb a5,23(sp)
} while ((x /= base) != 0);
1204: 06b86963 bltu a6,a1,1276 <printint.constprop.0+0x1d6>
buf[i--] = digits[x % base];
1208: 02e8f7bb remuw a5,a7,a4
120c: 1782 slli a5,a5,0x20
120e: 9381 srli a5,a5,0x20
1210: 97b2 add a5,a5,a2
1212: 0007c783 lbu a5,0(a5)
} while ((x /= base) != 0);
1216: 02e8d6bb divuw a3,a7,a4
buf[i--] = digits[x % base];
121a: 00f10b23 sb a5,22(sp)
} while ((x /= base) != 0);
121e: ece8f8e3 bgeu a7,a4,10ee <printint.constprop.0+0x4e>
buf[i--] = '-';
1222: 02d00793 li a5,45
1226: 00f10aa3 sb a5,21(sp)
buf[i--] = digits[x % base];
122a: 45b5 li a1,13
122c: bf69 j 11c6 <printint.constprop.0+0x126>
122e: 45a9 li a1,10
if (sign)
1230: f8055be3 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
1234: 02d00793 li a5,45
1238: 00f108a3 sb a5,17(sp)
buf[i--] = digits[x % base];
123c: 45a5 li a1,9
123e: b761 j 11c6 <printint.constprop.0+0x126>
1240: 45b5 li a1,13
if (sign)
1242: f80552e3 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
1246: 02d00793 li a5,45
124a: 00f10a23 sb a5,20(sp)
buf[i--] = digits[x % base];
124e: 45b1 li a1,12
1250: bf9d j 11c6 <printint.constprop.0+0x126>
1252: 45b1 li a1,12
if (sign)
1254: f60559e3 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
1258: 02d00793 li a5,45
125c: 00f109a3 sb a5,19(sp)
buf[i--] = digits[x % base];
1260: 45ad li a1,11
1262: b795 j 11c6 <printint.constprop.0+0x126>
1264: 45ad li a1,11
if (sign)
1266: f60550e3 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
126a: 02d00793 li a5,45
126e: 00f10923 sb a5,18(sp)
buf[i--] = digits[x % base];
1272: 45a9 li a1,10
1274: bf89 j 11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
1276: 02d00793 li a5,45
127a: 00f10b23 sb a5,22(sp)
buf[i--] = digits[x % base];
127e: 45b9 li a1,14
1280: b799 j 11c6 <printint.constprop.0+0x126>
1282: 45a5 li a1,9
if (sign)
1284: f40551e3 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
1288: 02d00793 li a5,45
128c: 00f10823 sb a5,16(sp)
buf[i--] = digits[x % base];
1290: 45a1 li a1,8
1292: bf15 j 11c6 <printint.constprop.0+0x126>
i = 15;
1294: 45bd li a1,15
1296: bf05 j 11c6 <printint.constprop.0+0x126>
buf[i--] = digits[x % base];
1298: 45a1 li a1,8
if (sign)
129a: f20556e3 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
129e: 02d00793 li a5,45
12a2: 00f107a3 sb a5,15(sp)
buf[i--] = digits[x % base];
12a6: 459d li a1,7
12a8: bf39 j 11c6 <printint.constprop.0+0x126>
12aa: 459d li a1,7
if (sign)
12ac: f0055de3 bgez a0,11c6 <printint.constprop.0+0x126>
buf[i--] = '-';
12b0: 02d00793 li a5,45
12b4: 00f10723 sb a5,14(sp)
buf[i--] = digits[x % base];
12b8: 4599 li a1,6
12ba: b731 j 11c6 <printint.constprop.0+0x126>
00000000000012bc <getchar>:
{
12bc: 1101 addi sp,sp,-32
read(stdin, &byte, 1);
12be: 00f10593 addi a1,sp,15
12c2: 4605 li a2,1
12c4: 4501 li a0,0
{
12c6: ec06 sd ra,24(sp)
char byte = 0;
12c8: 000107a3 sb zero,15(sp)
read(stdin, &byte, 1);
12cc: 179000ef jal ra,1c44 <read>
}
12d0: 60e2 ld ra,24(sp)
12d2: 00f14503 lbu a0,15(sp)
12d6: 6105 addi sp,sp,32
12d8: 8082 ret
00000000000012da <putchar>:
{
12da: 1101 addi sp,sp,-32
12dc: 87aa mv a5,a0
return write(stdout, &byte, 1);
12de: 00f10593 addi a1,sp,15
12e2: 4605 li a2,1
12e4: 4505 li a0,1
{
12e6: ec06 sd ra,24(sp)
char byte = c;
12e8: 00f107a3 sb a5,15(sp)
return write(stdout, &byte, 1);
12ec: 163000ef jal ra,1c4e <write>
}
12f0: 60e2 ld ra,24(sp)
12f2: 2501 sext.w a0,a0
12f4: 6105 addi sp,sp,32
12f6: 8082 ret
00000000000012f8 <puts>:
{
12f8: 1141 addi sp,sp,-16
12fa: e406 sd ra,8(sp)
12fc: e022 sd s0,0(sp)
12fe: 842a mv s0,a0
r = -(write(stdout, s, strlen(s)) < 0);
1300: 56a000ef jal ra,186a <strlen>
1304: 862a mv a2,a0
1306: 85a2 mv a1,s0
1308: 4505 li a0,1
130a: 145000ef jal ra,1c4e <write>
}
130e: 60a2 ld ra,8(sp)
1310: 6402 ld s0,0(sp)
r = -(write(stdout, s, strlen(s)) < 0);
1312: 957d srai a0,a0,0x3f
return r;
1314: 2501 sext.w a0,a0
}
1316: 0141 addi sp,sp,16
1318: 8082 ret
000000000000131a <printf>:
out(stdout, buf, i);
}
// Print to the console. only understands %d, %x, %p, %s.
void printf(const char *fmt, ...)
{
131a: 7171 addi sp,sp,-176
131c: fc56 sd s5,56(sp)
131e: ed3e sd a5,152(sp)
buf[i++] = '0';
1320: 7ae1 lui s5,0xffff8
va_list ap;
int cnt = 0, l = 0;
char *a, *z, *s = (char *)fmt, str;
int f = stdout;
va_start(ap, fmt);
1322: 18bc addi a5,sp,120
{
1324: e8ca sd s2,80(sp)
1326: e4ce sd s3,72(sp)
1328: e0d2 sd s4,64(sp)
132a: f85a sd s6,48(sp)
132c: f486 sd ra,104(sp)
132e: f0a2 sd s0,96(sp)
1330: eca6 sd s1,88(sp)
1332: fcae sd a1,120(sp)
1334: e132 sd a2,128(sp)
1336: e536 sd a3,136(sp)
1338: e93a sd a4,144(sp)
133a: f142 sd a6,160(sp)
133c: f546 sd a7,168(sp)
va_start(ap, fmt);
133e: e03e sd a5,0(sp)
for (;;)
{
if (!*s)
break;
for (a = s; *s && *s != '%'; s++)
1340: 02500913 li s2,37
out(f, a, l);
if (l)
continue;
if (s[1] == 0)
break;
switch (s[1])
1344: 07300a13 li s4,115
case 'p':
printptr(va_arg(ap, uint64));
break;
case 's':
if ((a = va_arg(ap, char *)) == 0)
a = "(null)";
1348: 00001b17 auipc s6,0x1
134c: bd8b0b13 addi s6,s6,-1064 # 1f20 <__clone+0x9a>
buf[i++] = '0';
1350: 830aca93 xori s5,s5,-2000
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
1354: 00001997 auipc s3,0x1
1358: bfc98993 addi s3,s3,-1028 # 1f50 <digits>
if (!*s)
135c: 00054783 lbu a5,0(a0)
1360: 16078a63 beqz a5,14d4 <printf+0x1ba>
1364: 862a mv a2,a0
for (a = s; *s && *s != '%'; s++)
1366: 19278163 beq a5,s2,14e8 <printf+0x1ce>
136a: 00164783 lbu a5,1(a2)
136e: 0605 addi a2,a2,1
1370: fbfd bnez a5,1366 <printf+0x4c>
1372: 84b2 mv s1,a2
l = z - a;
1374: 40a6043b subw s0,a2,a0
write(f, s, l);
1378: 85aa mv a1,a0
137a: 8622 mv a2,s0
137c: 4505 li a0,1
137e: 0d1000ef jal ra,1c4e <write>
if (l)
1382: 18041c63 bnez s0,151a <printf+0x200>
if (s[1] == 0)
1386: 0014c783 lbu a5,1(s1)
138a: 14078563 beqz a5,14d4 <printf+0x1ba>
switch (s[1])
138e: 1d478063 beq a5,s4,154e <printf+0x234>
1392: 18fa6663 bltu s4,a5,151e <printf+0x204>
1396: 06400713 li a4,100
139a: 1ae78063 beq a5,a4,153a <printf+0x220>
139e: 07000713 li a4,112
13a2: 1ce79963 bne a5,a4,1574 <printf+0x25a>
printptr(va_arg(ap, uint64));
13a6: 6702 ld a4,0(sp)
buf[i++] = '0';
13a8: 01511423 sh s5,8(sp)
write(f, s, l);
13ac: 4649 li a2,18
printptr(va_arg(ap, uint64));
13ae: 631c ld a5,0(a4)
13b0: 0721 addi a4,a4,8
13b2: e03a sd a4,0(sp)
for (j = 0; j < (sizeof(uint64) * 2); j++, x <<= 4)
13b4: 00479293 slli t0,a5,0x4
13b8: 00879f93 slli t6,a5,0x8
13bc: 00c79f13 slli t5,a5,0xc
13c0: 01079e93 slli t4,a5,0x10
13c4: 01479e13 slli t3,a5,0x14
13c8: 01879313 slli t1,a5,0x18
13cc: 01c79893 slli a7,a5,0x1c
13d0: 02479813 slli a6,a5,0x24
13d4: 02879513 slli a0,a5,0x28
13d8: 02c79593 slli a1,a5,0x2c
13dc: 03079693 slli a3,a5,0x30
13e0: 03479713 slli a4,a5,0x34
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
13e4: 03c7d413 srli s0,a5,0x3c
13e8: 01c7d39b srliw t2,a5,0x1c
13ec: 03c2d293 srli t0,t0,0x3c
13f0: 03cfdf93 srli t6,t6,0x3c
13f4: 03cf5f13 srli t5,t5,0x3c
13f8: 03cede93 srli t4,t4,0x3c
13fc: 03ce5e13 srli t3,t3,0x3c
1400: 03c35313 srli t1,t1,0x3c
1404: 03c8d893 srli a7,a7,0x3c
1408: 03c85813 srli a6,a6,0x3c
140c: 9171 srli a0,a0,0x3c
140e: 91f1 srli a1,a1,0x3c
1410: 92f1 srli a3,a3,0x3c
1412: 9371 srli a4,a4,0x3c
1414: 96ce add a3,a3,s3
1416: 974e add a4,a4,s3
1418: 944e add s0,s0,s3
141a: 92ce add t0,t0,s3
141c: 9fce add t6,t6,s3
141e: 9f4e add t5,t5,s3
1420: 9ece add t4,t4,s3
1422: 9e4e add t3,t3,s3
1424: 934e add t1,t1,s3
1426: 98ce add a7,a7,s3
1428: 93ce add t2,t2,s3
142a: 984e add a6,a6,s3
142c: 954e add a0,a0,s3
142e: 95ce add a1,a1,s3
1430: 0006c083 lbu ra,0(a3)
1434: 0002c283 lbu t0,0(t0)
1438: 00074683 lbu a3,0(a4)
143c: 000fcf83 lbu t6,0(t6)
1440: 000f4f03 lbu t5,0(t5)
1444: 000ece83 lbu t4,0(t4)
1448: 000e4e03 lbu t3,0(t3)
144c: 00034303 lbu t1,0(t1)
1450: 0008c883 lbu a7,0(a7)
1454: 0003c383 lbu t2,0(t2)
1458: 00084803 lbu a6,0(a6)
145c: 00054503 lbu a0,0(a0)
1460: 0005c583 lbu a1,0(a1)
1464: 00044403 lbu s0,0(s0)
for (j = 0; j < (sizeof(uint64) * 2); j++, x <<= 4)
1468: 03879713 slli a4,a5,0x38
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
146c: 9371 srli a4,a4,0x3c
146e: 8bbd andi a5,a5,15
1470: 974e add a4,a4,s3
1472: 97ce add a5,a5,s3
1474: 005105a3 sb t0,11(sp)
1478: 01f10623 sb t6,12(sp)
147c: 01e106a3 sb t5,13(sp)
1480: 01d10723 sb t4,14(sp)
1484: 01c107a3 sb t3,15(sp)
1488: 00610823 sb t1,16(sp)
148c: 011108a3 sb a7,17(sp)
1490: 00710923 sb t2,18(sp)
1494: 010109a3 sb a6,19(sp)
1498: 00a10a23 sb a0,20(sp)
149c: 00b10aa3 sb a1,21(sp)
14a0: 00110b23 sb ra,22(sp)
14a4: 00d10ba3 sb a3,23(sp)
14a8: 00810523 sb s0,10(sp)
14ac: 00074703 lbu a4,0(a4)
14b0: 0007c783 lbu a5,0(a5)
write(f, s, l);
14b4: 002c addi a1,sp,8
14b6: 4505 li a0,1
buf[i++] = digits[x >> (sizeof(uint64) * 8 - 4)];
14b8: 00e10c23 sb a4,24(sp)
14bc: 00f10ca3 sb a5,25(sp)
buf[i] = 0;
14c0: 00010d23 sb zero,26(sp)
write(f, s, l);
14c4: 78a000ef jal ra,1c4e <write>
// Print unknown % sequence to draw attention.
putchar('%');
putchar(s[1]);
break;
}
s += 2;
14c8: 00248513 addi a0,s1,2
if (!*s)
14cc: 00054783 lbu a5,0(a0)
14d0: e8079ae3 bnez a5,1364 <printf+0x4a>
}
va_end(ap);
}
14d4: 70a6 ld ra,104(sp)
14d6: 7406 ld s0,96(sp)
14d8: 64e6 ld s1,88(sp)
14da: 6946 ld s2,80(sp)
14dc: 69a6 ld s3,72(sp)
14de: 6a06 ld s4,64(sp)
14e0: 7ae2 ld s5,56(sp)
14e2: 7b42 ld s6,48(sp)
14e4: 614d addi sp,sp,176
14e6: 8082 ret
for (z = s; s[0] == '%' && s[1] == '%'; z++, s += 2)
14e8: 00064783 lbu a5,0(a2)
14ec: 84b2 mv s1,a2
14ee: 01278963 beq a5,s2,1500 <printf+0x1e6>
14f2: b549 j 1374 <printf+0x5a>
14f4: 0024c783 lbu a5,2(s1)
14f8: 0605 addi a2,a2,1
14fa: 0489 addi s1,s1,2
14fc: e7279ce3 bne a5,s2,1374 <printf+0x5a>
1500: 0014c783 lbu a5,1(s1)
1504: ff2788e3 beq a5,s2,14f4 <printf+0x1da>
l = z - a;
1508: 40a6043b subw s0,a2,a0
write(f, s, l);
150c: 85aa mv a1,a0
150e: 8622 mv a2,s0
1510: 4505 li a0,1
1512: 73c000ef jal ra,1c4e <write>
if (l)
1516: e60408e3 beqz s0,1386 <printf+0x6c>
151a: 8526 mv a0,s1
151c: b581 j 135c <printf+0x42>
switch (s[1])
151e: 07800713 li a4,120
1522: 04e79963 bne a5,a4,1574 <printf+0x25a>
printint(va_arg(ap, int), 16, 1);
1526: 6782 ld a5,0(sp)
1528: 45c1 li a1,16
152a: 4388 lw a0,0(a5)
152c: 07a1 addi a5,a5,8
152e: e03e sd a5,0(sp)
1530: b71ff0ef jal ra,10a0 <printint.constprop.0>
s += 2;
1534: 00248513 addi a0,s1,2
1538: bf51 j 14cc <printf+0x1b2>
printint(va_arg(ap, int), 10, 1);
153a: 6782 ld a5,0(sp)
153c: 45a9 li a1,10
153e: 4388 lw a0,0(a5)
1540: 07a1 addi a5,a5,8
1542: e03e sd a5,0(sp)
1544: b5dff0ef jal ra,10a0 <printint.constprop.0>
s += 2;
1548: 00248513 addi a0,s1,2
154c: b741 j 14cc <printf+0x1b2>
if ((a = va_arg(ap, char *)) == 0)
154e: 6782 ld a5,0(sp)
1550: 6380 ld s0,0(a5)
1552: 07a1 addi a5,a5,8
1554: e03e sd a5,0(sp)
1556: c031 beqz s0,159a <printf+0x280>
l = strnlen(a, 200);
1558: 0c800593 li a1,200
155c: 8522 mv a0,s0
155e: 3f8000ef jal ra,1956 <strnlen>
write(f, s, l);
1562: 0005061b sext.w a2,a0
1566: 85a2 mv a1,s0
1568: 4505 li a0,1
156a: 6e4000ef jal ra,1c4e <write>
s += 2;
156e: 00248513 addi a0,s1,2
1572: bfa9 j 14cc <printf+0x1b2>
return write(stdout, &byte, 1);
1574: 4605 li a2,1
1576: 002c addi a1,sp,8
1578: 4505 li a0,1
char byte = c;
157a: 01210423 sb s2,8(sp)
return write(stdout, &byte, 1);
157e: 6d0000ef jal ra,1c4e <write>
char byte = c;
1582: 0014c783 lbu a5,1(s1)
return write(stdout, &byte, 1);
1586: 4605 li a2,1
1588: 002c addi a1,sp,8
158a: 4505 li a0,1
char byte = c;
158c: 00f10423 sb a5,8(sp)
return write(stdout, &byte, 1);
1590: 6be000ef jal ra,1c4e <write>
s += 2;
1594: 00248513 addi a0,s1,2
1598: bf15 j 14cc <printf+0x1b2>
a = "(null)";
159a: 845a mv s0,s6
159c: bf75 j 1558 <printf+0x23e>
000000000000159e <isspace>:
#define HIGHS (ONES * (UCHAR_MAX / 2 + 1))
#define HASZERO(x) (((x)-ONES) & ~(x)&HIGHS)
int isspace(int c)
{
return c == ' ' || (unsigned)c - '\t' < 5;
159e: 02000793 li a5,32
15a2: 00f50663 beq a0,a5,15ae <isspace+0x10>
15a6: 355d addiw a0,a0,-9
15a8: 00553513 sltiu a0,a0,5
15ac: 8082 ret
15ae: 4505 li a0,1
}
15b0: 8082 ret
00000000000015b2 <isdigit>:
int isdigit(int c)
{
return (unsigned)c - '0' < 10;
15b2: fd05051b addiw a0,a0,-48
}
15b6: 00a53513 sltiu a0,a0,10
15ba: 8082 ret
00000000000015bc <atoi>:
return c == ' ' || (unsigned)c - '\t' < 5;
15bc: 02000613 li a2,32
15c0: 4591 li a1,4
int atoi(const char *s)
{
int n = 0, neg = 0;
while (isspace(*s))
15c2: 00054703 lbu a4,0(a0)
return c == ' ' || (unsigned)c - '\t' < 5;
15c6: ff77069b addiw a3,a4,-9
15ca: 04c70d63 beq a4,a2,1624 <atoi+0x68>
15ce: 0007079b sext.w a5,a4
15d2: 04d5f963 bgeu a1,a3,1624 <atoi+0x68>
s++;
switch (*s)
15d6: 02b00693 li a3,43
15da: 04d70a63 beq a4,a3,162e <atoi+0x72>
15de: 02d00693 li a3,45
15e2: 06d70463 beq a4,a3,164a <atoi+0x8e>
neg = 1;
case '+':
s++;
}
/* Compute n as a negative number to avoid overflow on INT_MIN */
while (isdigit(*s))
15e6: fd07859b addiw a1,a5,-48
15ea: 4625 li a2,9
15ec: 873e mv a4,a5
15ee: 86aa mv a3,a0
int n = 0, neg = 0;
15f0: 4e01 li t3,0
while (isdigit(*s))
15f2: 04b66a63 bltu a2,a1,1646 <atoi+0x8a>
int n = 0, neg = 0;
15f6: 4501 li a0,0
while (isdigit(*s))
15f8: 4825 li a6,9
15fa: 0016c603 lbu a2,1(a3)
n = 10 * n - (*s++ - '0');
15fe: 0025179b slliw a5,a0,0x2
1602: 9d3d addw a0,a0,a5
1604: fd07031b addiw t1,a4,-48
1608: 0015189b slliw a7,a0,0x1
while (isdigit(*s))
160c: fd06059b addiw a1,a2,-48
n = 10 * n - (*s++ - '0');
1610: 0685 addi a3,a3,1
1612: 4068853b subw a0,a7,t1
while (isdigit(*s))
1616: 0006071b sext.w a4,a2
161a: feb870e3 bgeu a6,a1,15fa <atoi+0x3e>
return neg ? n : -n;
161e: 000e0563 beqz t3,1628 <atoi+0x6c>
}
1622: 8082 ret
s++;
1624: 0505 addi a0,a0,1
1626: bf71 j 15c2 <atoi+0x6>
return neg ? n : -n;
1628: 4113053b subw a0,t1,a7
162c: 8082 ret
while (isdigit(*s))
162e: 00154783 lbu a5,1(a0)
1632: 4625 li a2,9
s++;
1634: 00150693 addi a3,a0,1
while (isdigit(*s))
1638: fd07859b addiw a1,a5,-48
163c: 0007871b sext.w a4,a5
int n = 0, neg = 0;
1640: 4e01 li t3,0
while (isdigit(*s))
1642: fab67ae3 bgeu a2,a1,15f6 <atoi+0x3a>
1646: 4501 li a0,0
}
1648: 8082 ret
while (isdigit(*s))
164a: 00154783 lbu a5,1(a0)
164e: 4625 li a2,9
s++;
1650: 00150693 addi a3,a0,1
while (isdigit(*s))
1654: fd07859b addiw a1,a5,-48
1658: 0007871b sext.w a4,a5
165c: feb665e3 bltu a2,a1,1646 <atoi+0x8a>
neg = 1;
1660: 4e05 li t3,1
1662: bf51 j 15f6 <atoi+0x3a>
0000000000001664 <memset>:
void *memset(void *dest, int c, size_t n)
{
char *p = dest;
for (int i = 0; i < n; ++i, *(p++) = c)
1664: 16060d63 beqz a2,17de <memset+0x17a>
1668: 40a007b3 neg a5,a0
166c: 8b9d andi a5,a5,7
166e: 00778713 addi a4,a5,7
1672: 482d li a6,11
1674: 0ff5f593 zext.b a1,a1
1678: fff60693 addi a3,a2,-1
167c: 17076263 bltu a4,a6,17e0 <memset+0x17c>
1680: 16e6ea63 bltu a3,a4,17f4 <memset+0x190>
1684: 16078563 beqz a5,17ee <memset+0x18a>
1688: 00b50023 sb a1,0(a0)
168c: 4705 li a4,1
168e: 00150e93 addi t4,a0,1
1692: 14e78c63 beq a5,a4,17ea <memset+0x186>
1696: 00b500a3 sb a1,1(a0)
169a: 4709 li a4,2
169c: 00250e93 addi t4,a0,2
16a0: 14e78d63 beq a5,a4,17fa <memset+0x196>
16a4: 00b50123 sb a1,2(a0)
16a8: 470d li a4,3
16aa: 00350e93 addi t4,a0,3
16ae: 12e78b63 beq a5,a4,17e4 <memset+0x180>
16b2: 00b501a3 sb a1,3(a0)
16b6: 4711 li a4,4
16b8: 00450e93 addi t4,a0,4
16bc: 14e78163 beq a5,a4,17fe <memset+0x19a>
16c0: 00b50223 sb a1,4(a0)
16c4: 4715 li a4,5
16c6: 00550e93 addi t4,a0,5
16ca: 12e78c63 beq a5,a4,1802 <memset+0x19e>
16ce: 00b502a3 sb a1,5(a0)
16d2: 471d li a4,7
16d4: 00650e93 addi t4,a0,6
16d8: 12e79763 bne a5,a4,1806 <memset+0x1a2>
16dc: 00750e93 addi t4,a0,7
16e0: 00b50323 sb a1,6(a0)
16e4: 4f1d li t5,7
16e6: 00859713 slli a4,a1,0x8
16ea: 8f4d or a4,a4,a1
16ec: 01059e13 slli t3,a1,0x10
16f0: 01c76e33 or t3,a4,t3
16f4: 01859313 slli t1,a1,0x18
16f8: 006e6333 or t1,t3,t1
16fc: 02059893 slli a7,a1,0x20
1700: 011368b3 or a7,t1,a7
1704: 02859813 slli a6,a1,0x28
1708: 40f60333 sub t1,a2,a5
170c: 0108e833 or a6,a7,a6
1710: 03059693 slli a3,a1,0x30
1714: 00d866b3 or a3,a6,a3
1718: 03859713 slli a4,a1,0x38
171c: 97aa add a5,a5,a0
171e: ff837813 andi a6,t1,-8
1722: 8f55 or a4,a4,a3
1724: 00f806b3 add a3,a6,a5
1728: e398 sd a4,0(a5)
172a: 07a1 addi a5,a5,8
172c: fed79ee3 bne a5,a3,1728 <memset+0xc4>
1730: ff837693 andi a3,t1,-8
1734: 00de87b3 add a5,t4,a3
1738: 01e6873b addw a4,a3,t5
173c: 0ad30663 beq t1,a3,17e8 <memset+0x184>
1740: 00b78023 sb a1,0(a5)
1744: 0017069b addiw a3,a4,1
1748: 08c6fb63 bgeu a3,a2,17de <memset+0x17a>
174c: 00b780a3 sb a1,1(a5)
1750: 0027069b addiw a3,a4,2
1754: 08c6f563 bgeu a3,a2,17de <memset+0x17a>
1758: 00b78123 sb a1,2(a5)
175c: 0037069b addiw a3,a4,3
1760: 06c6ff63 bgeu a3,a2,17de <memset+0x17a>
1764: 00b781a3 sb a1,3(a5)
1768: 0047069b addiw a3,a4,4
176c: 06c6f963 bgeu a3,a2,17de <memset+0x17a>
1770: 00b78223 sb a1,4(a5)
1774: 0057069b addiw a3,a4,5
1778: 06c6f363 bgeu a3,a2,17de <memset+0x17a>
177c: 00b782a3 sb a1,5(a5)
1780: 0067069b addiw a3,a4,6
1784: 04c6fd63 bgeu a3,a2,17de <memset+0x17a>
1788: 00b78323 sb a1,6(a5)
178c: 0077069b addiw a3,a4,7
1790: 04c6f763 bgeu a3,a2,17de <memset+0x17a>
1794: 00b783a3 sb a1,7(a5)
1798: 0087069b addiw a3,a4,8
179c: 04c6f163 bgeu a3,a2,17de <memset+0x17a>
17a0: 00b78423 sb a1,8(a5)
17a4: 0097069b addiw a3,a4,9
17a8: 02c6fb63 bgeu a3,a2,17de <memset+0x17a>
17ac: 00b784a3 sb a1,9(a5)
17b0: 00a7069b addiw a3,a4,10
17b4: 02c6f563 bgeu a3,a2,17de <memset+0x17a>
17b8: 00b78523 sb a1,10(a5)
17bc: 00b7069b addiw a3,a4,11
17c0: 00c6ff63 bgeu a3,a2,17de <memset+0x17a>
17c4: 00b785a3 sb a1,11(a5)
17c8: 00c7069b addiw a3,a4,12
17cc: 00c6f963 bgeu a3,a2,17de <memset+0x17a>
17d0: 00b78623 sb a1,12(a5)
17d4: 2735 addiw a4,a4,13
17d6: 00c77463 bgeu a4,a2,17de <memset+0x17a>
17da: 00b786a3 sb a1,13(a5)
;
return dest;
}
17de: 8082 ret
17e0: 472d li a4,11
17e2: bd79 j 1680 <memset+0x1c>
for (int i = 0; i < n; ++i, *(p++) = c)
17e4: 4f0d li t5,3
17e6: b701 j 16e6 <memset+0x82>
17e8: 8082 ret
17ea: 4f05 li t5,1
17ec: bded j 16e6 <memset+0x82>
17ee: 8eaa mv t4,a0
17f0: 4f01 li t5,0
17f2: bdd5 j 16e6 <memset+0x82>
17f4: 87aa mv a5,a0
17f6: 4701 li a4,0
17f8: b7a1 j 1740 <memset+0xdc>
17fa: 4f09 li t5,2
17fc: b5ed j 16e6 <memset+0x82>
17fe: 4f11 li t5,4
1800: b5dd j 16e6 <memset+0x82>
1802: 4f15 li t5,5
1804: b5cd j 16e6 <memset+0x82>
1806: 4f19 li t5,6
1808: bdf9 j 16e6 <memset+0x82>
000000000000180a <strcmp>:
int strcmp(const char *l, const char *r)
{
for (; *l == *r && *l; l++, r++)
180a: 00054783 lbu a5,0(a0)
180e: 0005c703 lbu a4,0(a1)
1812: 00e79863 bne a5,a4,1822 <strcmp+0x18>
1816: 0505 addi a0,a0,1
1818: 0585 addi a1,a1,1
181a: fbe5 bnez a5,180a <strcmp>
181c: 4501 li a0,0
;
return *(unsigned char *)l - *(unsigned char *)r;
}
181e: 9d19 subw a0,a0,a4
1820: 8082 ret
return *(unsigned char *)l - *(unsigned char *)r;
1822: 0007851b sext.w a0,a5
1826: bfe5 j 181e <strcmp+0x14>
0000000000001828 <strncmp>:
int strncmp(const char *_l, const char *_r, size_t n)
{
const unsigned char *l = (void *)_l, *r = (void *)_r;
if (!n--)
1828: ce05 beqz a2,1860 <strncmp+0x38>
return 0;
for (; *l && *r && n && *l == *r; l++, r++, n--)
182a: 00054703 lbu a4,0(a0)
182e: 0005c783 lbu a5,0(a1)
1832: cb0d beqz a4,1864 <strncmp+0x3c>
if (!n--)
1834: 167d addi a2,a2,-1
1836: 00c506b3 add a3,a0,a2
183a: a819 j 1850 <strncmp+0x28>
for (; *l && *r && n && *l == *r; l++, r++, n--)
183c: 00a68e63 beq a3,a0,1858 <strncmp+0x30>
1840: 0505 addi a0,a0,1
1842: 00e79b63 bne a5,a4,1858 <strncmp+0x30>
1846: 00054703 lbu a4,0(a0)
;
return *l - *r;
184a: 0005c783 lbu a5,0(a1)
for (; *l && *r && n && *l == *r; l++, r++, n--)
184e: cb19 beqz a4,1864 <strncmp+0x3c>
1850: 0005c783 lbu a5,0(a1)
1854: 0585 addi a1,a1,1
1856: f3fd bnez a5,183c <strncmp+0x14>
return *l - *r;
1858: 0007051b sext.w a0,a4
185c: 9d1d subw a0,a0,a5
185e: 8082 ret
return 0;
1860: 4501 li a0,0
}
1862: 8082 ret
1864: 4501 li a0,0
return *l - *r;
1866: 9d1d subw a0,a0,a5
1868: 8082 ret
000000000000186a <strlen>:
size_t strlen(const char *s)
{
const char *a = s;
typedef size_t __attribute__((__may_alias__)) word;
const word *w;
for (; (uintptr_t)s % SS; s++)
186a: 00757793 andi a5,a0,7
186e: cf89 beqz a5,1888 <strlen+0x1e>
1870: 87aa mv a5,a0
1872: a029 j 187c <strlen+0x12>
1874: 0785 addi a5,a5,1
1876: 0077f713 andi a4,a5,7
187a: cb01 beqz a4,188a <strlen+0x20>
if (!*s)
187c: 0007c703 lbu a4,0(a5)
1880: fb75 bnez a4,1874 <strlen+0xa>
for (w = (const void *)s; !HASZERO(*w); w++)
;
s = (const void *)w;
for (; *s; s++)
;
return s - a;
1882: 40a78533 sub a0,a5,a0
}
1886: 8082 ret
for (; (uintptr_t)s % SS; s++)
1888: 87aa mv a5,a0
for (w = (const void *)s; !HASZERO(*w); w++)
188a: 6394 ld a3,0(a5)
188c: 00000597 auipc a1,0x0
1890: 69c5b583 ld a1,1692(a1) # 1f28 <__clone+0xa2>
1894: 00000617 auipc a2,0x0
1898: 69c63603 ld a2,1692(a2) # 1f30 <__clone+0xaa>
189c: a019 j 18a2 <strlen+0x38>
189e: 6794 ld a3,8(a5)
18a0: 07a1 addi a5,a5,8
18a2: 00b68733 add a4,a3,a1
18a6: fff6c693 not a3,a3
18aa: 8f75 and a4,a4,a3
18ac: 8f71 and a4,a4,a2
18ae: db65 beqz a4,189e <strlen+0x34>
for (; *s; s++)
18b0: 0007c703 lbu a4,0(a5)
18b4: d779 beqz a4,1882 <strlen+0x18>
18b6: 0017c703 lbu a4,1(a5)
18ba: 0785 addi a5,a5,1
18bc: d379 beqz a4,1882 <strlen+0x18>
18be: 0017c703 lbu a4,1(a5)
18c2: 0785 addi a5,a5,1
18c4: fb6d bnez a4,18b6 <strlen+0x4c>
18c6: bf75 j 1882 <strlen+0x18>
00000000000018c8 <memchr>:
void *memchr(const void *src, int c, size_t n)
{
const unsigned char *s = src;
c = (unsigned char)c;
for (; ((uintptr_t)s & ALIGN) && n && *s != c; s++, n--)
18c8: 00757713 andi a4,a0,7
{
18cc: 87aa mv a5,a0
c = (unsigned char)c;
18ce: 0ff5f593 zext.b a1,a1
for (; ((uintptr_t)s & ALIGN) && n && *s != c; s++, n--)
18d2: cb19 beqz a4,18e8 <memchr+0x20>
18d4: ce25 beqz a2,194c <memchr+0x84>
18d6: 0007c703 lbu a4,0(a5)
18da: 04b70e63 beq a4,a1,1936 <memchr+0x6e>
18de: 0785 addi a5,a5,1
18e0: 0077f713 andi a4,a5,7
18e4: 167d addi a2,a2,-1
18e6: f77d bnez a4,18d4 <memchr+0xc>
;
s = (const void *)w;
}
for (; n && *s != c; s++, n--)
;
return n ? (void *)s : 0;
18e8: 4501 li a0,0
if (n && *s != c)
18ea: c235 beqz a2,194e <memchr+0x86>
18ec: 0007c703 lbu a4,0(a5)
18f0: 04b70363 beq a4,a1,1936 <memchr+0x6e>
size_t k = ONES * c;
18f4: 00000517 auipc a0,0x0
18f8: 64453503 ld a0,1604(a0) # 1f38 <__clone+0xb2>
for (w = (const void *)s; n >= SS && !HASZERO(*w ^ k); w++, n -= SS)
18fc: 471d li a4,7
size_t k = ONES * c;
18fe: 02a58533 mul a0,a1,a0
for (w = (const void *)s; n >= SS && !HASZERO(*w ^ k); w++, n -= SS)
1902: 02c77a63 bgeu a4,a2,1936 <memchr+0x6e>
1906: 00000897 auipc a7,0x0
190a: 6228b883 ld a7,1570(a7) # 1f28 <__clone+0xa2>
190e: 00000817 auipc a6,0x0
1912: 62283803 ld a6,1570(a6) # 1f30 <__clone+0xaa>
1916: 431d li t1,7
1918: a029 j 1922 <memchr+0x5a>
191a: 1661 addi a2,a2,-8
191c: 07a1 addi a5,a5,8
191e: 02c37963 bgeu t1,a2,1950 <memchr+0x88>
1922: 6398 ld a4,0(a5)
1924: 8f29 xor a4,a4,a0
1926: 011706b3 add a3,a4,a7
192a: fff74713 not a4,a4
192e: 8f75 and a4,a4,a3
1930: 01077733 and a4,a4,a6
1934: d37d beqz a4,191a <memchr+0x52>
1936: 853e mv a0,a5
1938: 97b2 add a5,a5,a2
193a: a021 j 1942 <memchr+0x7a>
for (; n && *s != c; s++, n--)
193c: 0505 addi a0,a0,1
193e: 00f50763 beq a0,a5,194c <memchr+0x84>
1942: 00054703 lbu a4,0(a0)
1946: feb71be3 bne a4,a1,193c <memchr+0x74>
194a: 8082 ret
return n ? (void *)s : 0;
194c: 4501 li a0,0
}
194e: 8082 ret
return n ? (void *)s : 0;
1950: 4501 li a0,0
for (; n && *s != c; s++, n--)
1952: f275 bnez a2,1936 <memchr+0x6e>
}
1954: 8082 ret
0000000000001956 <strnlen>:
size_t strnlen(const char *s, size_t n)
{
1956: 1101 addi sp,sp,-32
1958: e822 sd s0,16(sp)
const char *p = memchr(s, 0, n);
195a: 862e mv a2,a1
{
195c: 842e mv s0,a1
const char *p = memchr(s, 0, n);
195e: 4581 li a1,0
{
1960: e426 sd s1,8(sp)
1962: ec06 sd ra,24(sp)
1964: 84aa mv s1,a0
const char *p = memchr(s, 0, n);
1966: f63ff0ef jal ra,18c8 <memchr>
return p ? p - s : n;
196a: c519 beqz a0,1978 <strnlen+0x22>
}
196c: 60e2 ld ra,24(sp)
196e: 6442 ld s0,16(sp)
return p ? p - s : n;
1970: 8d05 sub a0,a0,s1
}
1972: 64a2 ld s1,8(sp)
1974: 6105 addi sp,sp,32
1976: 8082 ret
1978: 60e2 ld ra,24(sp)
return p ? p - s : n;
197a: 8522 mv a0,s0
}
197c: 6442 ld s0,16(sp)
197e: 64a2 ld s1,8(sp)
1980: 6105 addi sp,sp,32
1982: 8082 ret
0000000000001984 <strcpy>:
char *strcpy(char *restrict d, const char *s)
{
typedef size_t __attribute__((__may_alias__)) word;
word *wd;
const word *ws;
if ((uintptr_t)s % SS == (uintptr_t)d % SS)
1984: 00b547b3 xor a5,a0,a1
1988: 8b9d andi a5,a5,7
198a: eb95 bnez a5,19be <strcpy+0x3a>
{
for (; (uintptr_t)s % SS; s++, d++)
198c: 0075f793 andi a5,a1,7
1990: e7b1 bnez a5,19dc <strcpy+0x58>
if (!(*d = *s))
return d;
wd = (void *)d;
ws = (const void *)s;
for (; !HASZERO(*ws); *wd++ = *ws++)
1992: 6198 ld a4,0(a1)
1994: 00000617 auipc a2,0x0
1998: 59463603 ld a2,1428(a2) # 1f28 <__clone+0xa2>
199c: 00000817 auipc a6,0x0
19a0: 59483803 ld a6,1428(a6) # 1f30 <__clone+0xaa>
19a4: a029 j 19ae <strcpy+0x2a>
19a6: e118 sd a4,0(a0)
19a8: 6598 ld a4,8(a1)
19aa: 05a1 addi a1,a1,8
19ac: 0521 addi a0,a0,8
19ae: 00c707b3 add a5,a4,a2
19b2: fff74693 not a3,a4
19b6: 8ff5 and a5,a5,a3
19b8: 0107f7b3 and a5,a5,a6
19bc: d7ed beqz a5,19a6 <strcpy+0x22>
;
d = (void *)wd;
s = (const void *)ws;
}
for (; (*d = *s); s++, d++)
19be: 0005c783 lbu a5,0(a1)
19c2: 00f50023 sb a5,0(a0)
19c6: c785 beqz a5,19ee <strcpy+0x6a>
19c8: 0015c783 lbu a5,1(a1)
19cc: 0505 addi a0,a0,1
19ce: 0585 addi a1,a1,1
19d0: 00f50023 sb a5,0(a0)
19d4: fbf5 bnez a5,19c8 <strcpy+0x44>
;
return d;
}
19d6: 8082 ret
for (; (uintptr_t)s % SS; s++, d++)
19d8: 0505 addi a0,a0,1
19da: df45 beqz a4,1992 <strcpy+0xe>
if (!(*d = *s))
19dc: 0005c783 lbu a5,0(a1)
for (; (uintptr_t)s % SS; s++, d++)
19e0: 0585 addi a1,a1,1
19e2: 0075f713 andi a4,a1,7
if (!(*d = *s))
19e6: 00f50023 sb a5,0(a0)
19ea: f7fd bnez a5,19d8 <strcpy+0x54>
}
19ec: 8082 ret
19ee: 8082 ret
00000000000019f0 <strncpy>:
char *strncpy(char *restrict d, const char *s, size_t n)
{
typedef size_t __attribute__((__may_alias__)) word;
word *wd;
const word *ws;
if (((uintptr_t)s & ALIGN) == ((uintptr_t)d & ALIGN))
19f0: 00b547b3 xor a5,a0,a1
19f4: 8b9d andi a5,a5,7
19f6: 1a079863 bnez a5,1ba6 <strncpy+0x1b6>
{
for (; ((uintptr_t)s & ALIGN) && n && (*d = *s); n--, s++, d++)
19fa: 0075f793 andi a5,a1,7
19fe: 16078463 beqz a5,1b66 <strncpy+0x176>
1a02: ea01 bnez a2,1a12 <strncpy+0x22>
1a04: a421 j 1c0c <strncpy+0x21c>
1a06: 167d addi a2,a2,-1
1a08: 0505 addi a0,a0,1
1a0a: 14070e63 beqz a4,1b66 <strncpy+0x176>
1a0e: 1a060863 beqz a2,1bbe <strncpy+0x1ce>
1a12: 0005c783 lbu a5,0(a1)
1a16: 0585 addi a1,a1,1
1a18: 0075f713 andi a4,a1,7
1a1c: 00f50023 sb a5,0(a0)
1a20: f3fd bnez a5,1a06 <strncpy+0x16>
1a22: 4805 li a6,1
1a24: 1a061863 bnez a2,1bd4 <strncpy+0x1e4>
1a28: 40a007b3 neg a5,a0
1a2c: 8b9d andi a5,a5,7
1a2e: 4681 li a3,0
1a30: 18061a63 bnez a2,1bc4 <strncpy+0x1d4>
1a34: 00778713 addi a4,a5,7
1a38: 45ad li a1,11
1a3a: 18b76363 bltu a4,a1,1bc0 <strncpy+0x1d0>
1a3e: 1ae6eb63 bltu a3,a4,1bf4 <strncpy+0x204>
1a42: 1a078363 beqz a5,1be8 <strncpy+0x1f8>
for (int i = 0; i < n; ++i, *(p++) = c)
1a46: 00050023 sb zero,0(a0)
1a4a: 4685 li a3,1
1a4c: 00150713 addi a4,a0,1
1a50: 18d78f63 beq a5,a3,1bee <strncpy+0x1fe>
1a54: 000500a3 sb zero,1(a0)
1a58: 4689 li a3,2
1a5a: 00250713 addi a4,a0,2
1a5e: 18d78e63 beq a5,a3,1bfa <strncpy+0x20a>
1a62: 00050123 sb zero,2(a0)
1a66: 468d li a3,3
1a68: 00350713 addi a4,a0,3
1a6c: 16d78c63 beq a5,a3,1be4 <strncpy+0x1f4>
1a70: 000501a3 sb zero,3(a0)
1a74: 4691 li a3,4
1a76: 00450713 addi a4,a0,4
1a7a: 18d78263 beq a5,a3,1bfe <strncpy+0x20e>
1a7e: 00050223 sb zero,4(a0)
1a82: 4695 li a3,5
1a84: 00550713 addi a4,a0,5
1a88: 16d78d63 beq a5,a3,1c02 <strncpy+0x212>
1a8c: 000502a3 sb zero,5(a0)
1a90: 469d li a3,7
1a92: 00650713 addi a4,a0,6
1a96: 16d79863 bne a5,a3,1c06 <strncpy+0x216>
1a9a: 00750713 addi a4,a0,7
1a9e: 00050323 sb zero,6(a0)
1aa2: 40f80833 sub a6,a6,a5
1aa6: ff887593 andi a1,a6,-8
1aaa: 97aa add a5,a5,a0
1aac: 95be add a1,a1,a5
1aae: 0007b023 sd zero,0(a5)
1ab2: 07a1 addi a5,a5,8
1ab4: feb79de3 bne a5,a1,1aae <strncpy+0xbe>
1ab8: ff887593 andi a1,a6,-8
1abc: 9ead addw a3,a3,a1
1abe: 00b707b3 add a5,a4,a1
1ac2: 12b80863 beq a6,a1,1bf2 <strncpy+0x202>
1ac6: 00078023 sb zero,0(a5)
1aca: 0016871b addiw a4,a3,1
1ace: 0ec77863 bgeu a4,a2,1bbe <strncpy+0x1ce>
1ad2: 000780a3 sb zero,1(a5)
1ad6: 0026871b addiw a4,a3,2
1ada: 0ec77263 bgeu a4,a2,1bbe <strncpy+0x1ce>
1ade: 00078123 sb zero,2(a5)
1ae2: 0036871b addiw a4,a3,3
1ae6: 0cc77c63 bgeu a4,a2,1bbe <strncpy+0x1ce>
1aea: 000781a3 sb zero,3(a5)
1aee: 0046871b addiw a4,a3,4
1af2: 0cc77663 bgeu a4,a2,1bbe <strncpy+0x1ce>
1af6: 00078223 sb zero,4(a5)
1afa: 0056871b addiw a4,a3,5
1afe: 0cc77063 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b02: 000782a3 sb zero,5(a5)
1b06: 0066871b addiw a4,a3,6
1b0a: 0ac77a63 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b0e: 00078323 sb zero,6(a5)
1b12: 0076871b addiw a4,a3,7
1b16: 0ac77463 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b1a: 000783a3 sb zero,7(a5)
1b1e: 0086871b addiw a4,a3,8
1b22: 08c77e63 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b26: 00078423 sb zero,8(a5)
1b2a: 0096871b addiw a4,a3,9
1b2e: 08c77863 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b32: 000784a3 sb zero,9(a5)
1b36: 00a6871b addiw a4,a3,10
1b3a: 08c77263 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b3e: 00078523 sb zero,10(a5)
1b42: 00b6871b addiw a4,a3,11
1b46: 06c77c63 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b4a: 000785a3 sb zero,11(a5)
1b4e: 00c6871b addiw a4,a3,12
1b52: 06c77663 bgeu a4,a2,1bbe <strncpy+0x1ce>
1b56: 00078623 sb zero,12(a5)
1b5a: 26b5 addiw a3,a3,13
1b5c: 06c6f163 bgeu a3,a2,1bbe <strncpy+0x1ce>
1b60: 000786a3 sb zero,13(a5)
1b64: 8082 ret
;
if (!n || !*s)
1b66: c645 beqz a2,1c0e <strncpy+0x21e>
1b68: 0005c783 lbu a5,0(a1)
1b6c: ea078be3 beqz a5,1a22 <strncpy+0x32>
goto tail;
wd = (void *)d;
ws = (const void *)s;
for (; n >= sizeof(size_t) && !HASZERO(*ws); n -= sizeof(size_t), ws++, wd++)
1b70: 479d li a5,7
1b72: 02c7ff63 bgeu a5,a2,1bb0 <strncpy+0x1c0>
1b76: 00000897 auipc a7,0x0
1b7a: 3b28b883 ld a7,946(a7) # 1f28 <__clone+0xa2>
1b7e: 00000817 auipc a6,0x0
1b82: 3b283803 ld a6,946(a6) # 1f30 <__clone+0xaa>
1b86: 431d li t1,7
1b88: 6198 ld a4,0(a1)
1b8a: 011707b3 add a5,a4,a7
1b8e: fff74693 not a3,a4
1b92: 8ff5 and a5,a5,a3
1b94: 0107f7b3 and a5,a5,a6
1b98: ef81 bnez a5,1bb0 <strncpy+0x1c0>
*wd = *ws;
1b9a: e118 sd a4,0(a0)
for (; n >= sizeof(size_t) && !HASZERO(*ws); n -= sizeof(size_t), ws++, wd++)
1b9c: 1661 addi a2,a2,-8
1b9e: 05a1 addi a1,a1,8
1ba0: 0521 addi a0,a0,8
1ba2: fec363e3 bltu t1,a2,1b88 <strncpy+0x198>
d = (void *)wd;
s = (const void *)ws;
}
for (; n && (*d = *s); n--, s++, d++)
1ba6: e609 bnez a2,1bb0 <strncpy+0x1c0>
1ba8: a08d j 1c0a <strncpy+0x21a>
1baa: 167d addi a2,a2,-1
1bac: 0505 addi a0,a0,1
1bae: ca01 beqz a2,1bbe <strncpy+0x1ce>
1bb0: 0005c783 lbu a5,0(a1)
1bb4: 0585 addi a1,a1,1
1bb6: 00f50023 sb a5,0(a0)
1bba: fbe5 bnez a5,1baa <strncpy+0x1ba>
;
tail:
1bbc: b59d j 1a22 <strncpy+0x32>
memset(d, 0, n);
return d;
}
1bbe: 8082 ret
1bc0: 472d li a4,11
1bc2: bdb5 j 1a3e <strncpy+0x4e>
1bc4: 00778713 addi a4,a5,7
1bc8: 45ad li a1,11
1bca: fff60693 addi a3,a2,-1
1bce: e6b778e3 bgeu a4,a1,1a3e <strncpy+0x4e>
1bd2: b7fd j 1bc0 <strncpy+0x1d0>
1bd4: 40a007b3 neg a5,a0
1bd8: 8832 mv a6,a2
1bda: 8b9d andi a5,a5,7
1bdc: 4681 li a3,0
1bde: e4060be3 beqz a2,1a34 <strncpy+0x44>
1be2: b7cd j 1bc4 <strncpy+0x1d4>
for (int i = 0; i < n; ++i, *(p++) = c)
1be4: 468d li a3,3
1be6: bd75 j 1aa2 <strncpy+0xb2>
1be8: 872a mv a4,a0
1bea: 4681 li a3,0
1bec: bd5d j 1aa2 <strncpy+0xb2>
1bee: 4685 li a3,1
1bf0: bd4d j 1aa2 <strncpy+0xb2>
1bf2: 8082 ret
1bf4: 87aa mv a5,a0
1bf6: 4681 li a3,0
1bf8: b5f9 j 1ac6 <strncpy+0xd6>
1bfa: 4689 li a3,2
1bfc: b55d j 1aa2 <strncpy+0xb2>
1bfe: 4691 li a3,4
1c00: b54d j 1aa2 <strncpy+0xb2>
1c02: 4695 li a3,5
1c04: bd79 j 1aa2 <strncpy+0xb2>
1c06: 4699 li a3,6
1c08: bd69 j 1aa2 <strncpy+0xb2>
1c0a: 8082 ret
1c0c: 8082 ret
1c0e: 8082 ret
0000000000001c10 <open>:
#include <unistd.h>
#include "syscall.h"
int open(const char *path, int flags)
{
1c10: 87aa mv a5,a0
1c12: 862e mv a2,a1
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
}
static inline long __syscall4(long n, long a, long b, long c, long d)
{
register long a7 __asm__("a7") = n;
1c14: 03800893 li a7,56
register long a0 __asm__("a0") = a;
1c18: f9c00513 li a0,-100
register long a1 __asm__("a1") = b;
1c1c: 85be mv a1,a5
register long a2 __asm__("a2") = c;
register long a3 __asm__("a3") = d;
1c1e: 4689 li a3,2
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1c20: 00000073 ecall
return syscall(SYS_openat, AT_FDCWD, path, flags, O_RDWR);
}
1c24: 2501 sext.w a0,a0
1c26: 8082 ret
0000000000001c28 <openat>:
register long a7 __asm__("a7") = n;
1c28: 03800893 li a7,56
register long a3 __asm__("a3") = d;
1c2c: 18000693 li a3,384
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1c30: 00000073 ecall
int openat(int dirfd,const char *path, int flags)
{
return syscall(SYS_openat, dirfd, path, flags, 0600);
}
1c34: 2501 sext.w a0,a0
1c36: 8082 ret
0000000000001c38 <close>:
register long a7 __asm__("a7") = n;
1c38: 03900893 li a7,57
__asm_syscall("r"(a7), "0"(a0))
1c3c: 00000073 ecall
int close(int fd)
{
return syscall(SYS_close, fd);
}
1c40: 2501 sext.w a0,a0
1c42: 8082 ret
0000000000001c44 <read>:
register long a7 __asm__("a7") = n;
1c44: 03f00893 li a7,63
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1c48: 00000073 ecall
ssize_t read(int fd, void *buf, size_t len)
{
return syscall(SYS_read, fd, buf, len);
}
1c4c: 8082 ret
0000000000001c4e <write>:
register long a7 __asm__("a7") = n;
1c4e: 04000893 li a7,64
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1c52: 00000073 ecall
ssize_t write(int fd, const void *buf, size_t len)
{
return syscall(SYS_write, fd, buf, len);
}
1c56: 8082 ret
0000000000001c58 <getpid>:
register long a7 __asm__("a7") = n;
1c58: 0ac00893 li a7,172
__asm_syscall("r"(a7))
1c5c: 00000073 ecall
pid_t getpid(void)
{
return syscall(SYS_getpid);
}
1c60: 2501 sext.w a0,a0
1c62: 8082 ret
0000000000001c64 <getppid>:
register long a7 __asm__("a7") = n;
1c64: 0ad00893 li a7,173
__asm_syscall("r"(a7))
1c68: 00000073 ecall
pid_t getppid(void)
{
return syscall(SYS_getppid);
}
1c6c: 2501 sext.w a0,a0
1c6e: 8082 ret
0000000000001c70 <sched_yield>:
register long a7 __asm__("a7") = n;
1c70: 07c00893 li a7,124
__asm_syscall("r"(a7))
1c74: 00000073 ecall
int sched_yield(void)
{
return syscall(SYS_sched_yield);
}
1c78: 2501 sext.w a0,a0
1c7a: 8082 ret
0000000000001c7c <fork>:
register long a7 __asm__("a7") = n;
1c7c: 0dc00893 li a7,220
register long a0 __asm__("a0") = a;
1c80: 4545 li a0,17
register long a1 __asm__("a1") = b;
1c82: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1c84: 00000073 ecall
pid_t fork(void)
{
return syscall(SYS_clone, SIGCHLD, 0);
}
1c88: 2501 sext.w a0,a0
1c8a: 8082 ret
0000000000001c8c <clone>:
pid_t clone(int (*fn)(void *arg), void *arg, void *stack, size_t stack_size, unsigned long flags)
{
1c8c: 85b2 mv a1,a2
1c8e: 863a mv a2,a4
if (stack)
1c90: c191 beqz a1,1c94 <clone+0x8>
stack += stack_size;
1c92: 95b6 add a1,a1,a3
return __clone(fn, stack, flags, NULL, NULL, NULL);
1c94: 4781 li a5,0
1c96: 4701 li a4,0
1c98: 4681 li a3,0
1c9a: 2601 sext.w a2,a2
1c9c: a2ed j 1e86 <__clone>
0000000000001c9e <exit>:
register long a7 __asm__("a7") = n;
1c9e: 05d00893 li a7,93
__asm_syscall("r"(a7), "0"(a0))
1ca2: 00000073 ecall
//return syscall(SYS_clone, fn, stack, flags, NULL, NULL, NULL);
}
void exit(int code)
{
syscall(SYS_exit, code);
}
1ca6: 8082 ret
0000000000001ca8 <waitpid>:
register long a7 __asm__("a7") = n;
1ca8: 10400893 li a7,260
register long a3 __asm__("a3") = d;
1cac: 4681 li a3,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1cae: 00000073 ecall
int waitpid(int pid, int *code, int options)
{
return syscall(SYS_wait4, pid, code, options, 0);
}
1cb2: 2501 sext.w a0,a0
1cb4: 8082 ret
0000000000001cb6 <exec>:
register long a7 __asm__("a7") = n;
1cb6: 0dd00893 li a7,221
__asm_syscall("r"(a7), "0"(a0))
1cba: 00000073 ecall
int exec(char *name)
{
return syscall(SYS_execve, name);
}
1cbe: 2501 sext.w a0,a0
1cc0: 8082 ret
0000000000001cc2 <execve>:
register long a7 __asm__("a7") = n;
1cc2: 0dd00893 li a7,221
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1cc6: 00000073 ecall
int execve(const char *name, char *const argv[], char *const argp[])
{
return syscall(SYS_execve, name, argv, argp);
}
1cca: 2501 sext.w a0,a0
1ccc: 8082 ret
0000000000001cce <times>:
register long a7 __asm__("a7") = n;
1cce: 09900893 li a7,153
__asm_syscall("r"(a7), "0"(a0))
1cd2: 00000073 ecall
int times(void *mytimes)
{
return syscall(SYS_times, mytimes);
}
1cd6: 2501 sext.w a0,a0
1cd8: 8082 ret
0000000000001cda <get_time>:
int64 get_time()
{
1cda: 1141 addi sp,sp,-16
register long a7 __asm__("a7") = n;
1cdc: 0a900893 li a7,169
register long a0 __asm__("a0") = a;
1ce0: 850a mv a0,sp
register long a1 __asm__("a1") = b;
1ce2: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1ce4: 00000073 ecall
TimeVal time;
int err = sys_get_time(&time, 0);
if (err == 0)
1ce8: 2501 sext.w a0,a0
1cea: ed09 bnez a0,1d04 <get_time+0x2a>
{
return ((time.sec & 0xffff) * 1000 + time.usec / 1000);
1cec: 67a2 ld a5,8(sp)
1cee: 3e800713 li a4,1000
1cf2: 00015503 lhu a0,0(sp)
1cf6: 02e7d7b3 divu a5,a5,a4
1cfa: 02e50533 mul a0,a0,a4
1cfe: 953e add a0,a0,a5
}
else
{
return -1;
}
}
1d00: 0141 addi sp,sp,16
1d02: 8082 ret
return -1;
1d04: 557d li a0,-1
1d06: bfed j 1d00 <get_time+0x26>
0000000000001d08 <sys_get_time>:
register long a7 __asm__("a7") = n;
1d08: 0a900893 li a7,169
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d0c: 00000073 ecall
int sys_get_time(TimeVal *ts, int tz)
{
return syscall(SYS_gettimeofday, ts, tz);
}
1d10: 2501 sext.w a0,a0
1d12: 8082 ret
0000000000001d14 <time>:
register long a7 __asm__("a7") = n;
1d14: 42600893 li a7,1062
__asm_syscall("r"(a7), "0"(a0))
1d18: 00000073 ecall
int time(unsigned long *tloc)
{
return syscall(SYS_time, tloc);
}
1d1c: 2501 sext.w a0,a0
1d1e: 8082 ret
0000000000001d20 <sleep>:
int sleep(unsigned long long time)
{
1d20: 1141 addi sp,sp,-16
TimeVal tv = {.sec = time, .usec = 0};
1d22: e02a sd a0,0(sp)
register long a0 __asm__("a0") = a;
1d24: 850a mv a0,sp
1d26: e402 sd zero,8(sp)
register long a7 __asm__("a7") = n;
1d28: 06500893 li a7,101
register long a1 __asm__("a1") = b;
1d2c: 85aa mv a1,a0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d2e: 00000073 ecall
if (syscall(SYS_nanosleep, &tv, &tv)) return tv.sec;
1d32: e501 bnez a0,1d3a <sleep+0x1a>
return 0;
1d34: 4501 li a0,0
}
1d36: 0141 addi sp,sp,16
1d38: 8082 ret
if (syscall(SYS_nanosleep, &tv, &tv)) return tv.sec;
1d3a: 4502 lw a0,0(sp)
}
1d3c: 0141 addi sp,sp,16
1d3e: 8082 ret
0000000000001d40 <set_priority>:
register long a7 __asm__("a7") = n;
1d40: 08c00893 li a7,140
__asm_syscall("r"(a7), "0"(a0))
1d44: 00000073 ecall
int set_priority(int prio)
{
return syscall(SYS_setpriority, prio);
}
1d48: 2501 sext.w a0,a0
1d4a: 8082 ret
0000000000001d4c <mmap>:
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
}
static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
{
register long a7 __asm__("a7") = n;
1d4c: 0de00893 li a7,222
register long a1 __asm__("a1") = b;
register long a2 __asm__("a2") = c;
register long a3 __asm__("a3") = d;
register long a4 __asm__("a4") = e;
register long a5 __asm__("a5") = f;
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5))
1d50: 00000073 ecall
void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t off)
{
return syscall(SYS_mmap, start, len, prot, flags, fd, off);
}
1d54: 8082 ret
0000000000001d56 <munmap>:
register long a7 __asm__("a7") = n;
1d56: 0d700893 li a7,215
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d5a: 00000073 ecall
int munmap(void *start, size_t len)
{
return syscall(SYS_munmap, start, len);
}
1d5e: 2501 sext.w a0,a0
1d60: 8082 ret
0000000000001d62 <wait>:
int wait(int *code)
{
1d62: 85aa mv a1,a0
register long a7 __asm__("a7") = n;
1d64: 10400893 li a7,260
register long a0 __asm__("a0") = a;
1d68: 557d li a0,-1
register long a2 __asm__("a2") = c;
1d6a: 4601 li a2,0
register long a3 __asm__("a3") = d;
1d6c: 4681 li a3,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3))
1d6e: 00000073 ecall
return waitpid((int)-1, code, 0);
}
1d72: 2501 sext.w a0,a0
1d74: 8082 ret
0000000000001d76 <spawn>:
register long a7 __asm__("a7") = n;
1d76: 19000893 li a7,400
__asm_syscall("r"(a7), "0"(a0))
1d7a: 00000073 ecall
int spawn(char *file)
{
return syscall(SYS_spawn, file);
}
1d7e: 2501 sext.w a0,a0
1d80: 8082 ret
0000000000001d82 <mailread>:
register long a7 __asm__("a7") = n;
1d82: 19100893 li a7,401
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d86: 00000073 ecall
int mailread(void *buf, int len)
{
return syscall(SYS_mailread, buf, len);
}
1d8a: 2501 sext.w a0,a0
1d8c: 8082 ret
0000000000001d8e <mailwrite>:
register long a7 __asm__("a7") = n;
1d8e: 19200893 li a7,402
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1d92: 00000073 ecall
int mailwrite(int pid, void *buf, int len)
{
return syscall(SYS_mailwrite, pid, buf, len);
}
1d96: 2501 sext.w a0,a0
1d98: 8082 ret
0000000000001d9a <fstat>:
register long a7 __asm__("a7") = n;
1d9a: 05000893 li a7,80
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1d9e: 00000073 ecall
int fstat(int fd, struct kstat *st)
{
return syscall(SYS_fstat, fd, st);
}
1da2: 2501 sext.w a0,a0
1da4: 8082 ret
0000000000001da6 <sys_linkat>:
register long a4 __asm__("a4") = e;
1da6: 1702 slli a4,a4,0x20
register long a7 __asm__("a7") = n;
1da8: 02500893 li a7,37
register long a4 __asm__("a4") = e;
1dac: 9301 srli a4,a4,0x20
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
1dae: 00000073 ecall
int sys_linkat(int olddirfd, char *oldpath, int newdirfd, char *newpath, unsigned int flags)
{
return syscall(SYS_linkat, olddirfd, oldpath, newdirfd, newpath, flags);
}
1db2: 2501 sext.w a0,a0
1db4: 8082 ret
0000000000001db6 <sys_unlinkat>:
register long a2 __asm__("a2") = c;
1db6: 1602 slli a2,a2,0x20
register long a7 __asm__("a7") = n;
1db8: 02300893 li a7,35
register long a2 __asm__("a2") = c;
1dbc: 9201 srli a2,a2,0x20
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1dbe: 00000073 ecall
int sys_unlinkat(int dirfd, char *path, unsigned int flags)
{
return syscall(SYS_unlinkat, dirfd, path, flags);
}
1dc2: 2501 sext.w a0,a0
1dc4: 8082 ret
0000000000001dc6 <link>:
int link(char *old_path, char *new_path)
{
1dc6: 87aa mv a5,a0
1dc8: 86ae mv a3,a1
register long a7 __asm__("a7") = n;
1dca: 02500893 li a7,37
register long a0 __asm__("a0") = a;
1dce: f9c00513 li a0,-100
register long a1 __asm__("a1") = b;
1dd2: 85be mv a1,a5
register long a2 __asm__("a2") = c;
1dd4: f9c00613 li a2,-100
register long a4 __asm__("a4") = e;
1dd8: 4701 li a4,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
1dda: 00000073 ecall
return sys_linkat(AT_FDCWD, old_path, AT_FDCWD, new_path, 0);
}
1dde: 2501 sext.w a0,a0
1de0: 8082 ret
0000000000001de2 <unlink>:
int unlink(char *path)
{
1de2: 85aa mv a1,a0
register long a7 __asm__("a7") = n;
1de4: 02300893 li a7,35
register long a0 __asm__("a0") = a;
1de8: f9c00513 li a0,-100
register long a2 __asm__("a2") = c;
1dec: 4601 li a2,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1dee: 00000073 ecall
return sys_unlinkat(AT_FDCWD, path, 0);
}
1df2: 2501 sext.w a0,a0
1df4: 8082 ret
0000000000001df6 <uname>:
register long a7 __asm__("a7") = n;
1df6: 0a000893 li a7,160
__asm_syscall("r"(a7), "0"(a0))
1dfa: 00000073 ecall
int uname(void *buf)
{
return syscall(SYS_uname, buf);
}
1dfe: 2501 sext.w a0,a0
1e00: 8082 ret
0000000000001e02 <brk>:
register long a7 __asm__("a7") = n;
1e02: 0d600893 li a7,214
__asm_syscall("r"(a7), "0"(a0))
1e06: 00000073 ecall
int brk(void *addr)
{
return syscall(SYS_brk, addr);
}
1e0a: 2501 sext.w a0,a0
1e0c: 8082 ret
0000000000001e0e <getcwd>:
register long a7 __asm__("a7") = n;
1e0e: 48c5 li a7,17
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1e10: 00000073 ecall
char *getcwd(char *buf, size_t size){
return syscall(SYS_getcwd, buf, size);
}
1e14: 8082 ret
0000000000001e16 <chdir>:
register long a7 __asm__("a7") = n;
1e16: 03100893 li a7,49
__asm_syscall("r"(a7), "0"(a0))
1e1a: 00000073 ecall
int chdir(const char *path){
return syscall(SYS_chdir, path);
}
1e1e: 2501 sext.w a0,a0
1e20: 8082 ret
0000000000001e22 <mkdir>:
int mkdir(const char *path, mode_t mode){
1e22: 862e mv a2,a1
1e24: 87aa mv a5,a0
register long a2 __asm__("a2") = c;
1e26: 1602 slli a2,a2,0x20
register long a7 __asm__("a7") = n;
1e28: 02200893 li a7,34
register long a0 __asm__("a0") = a;
1e2c: f9c00513 li a0,-100
register long a1 __asm__("a1") = b;
1e30: 85be mv a1,a5
register long a2 __asm__("a2") = c;
1e32: 9201 srli a2,a2,0x20
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1e34: 00000073 ecall
return syscall(SYS_mkdirat, AT_FDCWD, path, mode);
}
1e38: 2501 sext.w a0,a0
1e3a: 8082 ret
0000000000001e3c <getdents>:
register long a7 __asm__("a7") = n;
1e3c: 03d00893 li a7,61
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1e40: 00000073 ecall
int getdents(int fd, struct linux_dirent64 *dirp64, unsigned long len){
//return syscall(SYS_getdents64, fd, dirp64, len);
return syscall(SYS_getdents64, fd, dirp64, len);
}
1e44: 2501 sext.w a0,a0
1e46: 8082 ret
0000000000001e48 <pipe>:
register long a7 __asm__("a7") = n;
1e48: 03b00893 li a7,59
register long a1 __asm__("a1") = b;
1e4c: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1e4e: 00000073 ecall
int pipe(int fd[2]){
return syscall(SYS_pipe2, fd, 0);
}
1e52: 2501 sext.w a0,a0
1e54: 8082 ret
0000000000001e56 <dup>:
register long a7 __asm__("a7") = n;
1e56: 48dd li a7,23
__asm_syscall("r"(a7), "0"(a0))
1e58: 00000073 ecall
int dup(int fd){
return syscall(SYS_dup, fd);
}
1e5c: 2501 sext.w a0,a0
1e5e: 8082 ret
0000000000001e60 <dup2>:
register long a7 __asm__("a7") = n;
1e60: 48e1 li a7,24
register long a2 __asm__("a2") = c;
1e62: 4601 li a2,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2))
1e64: 00000073 ecall
int dup2(int old, int new){
return syscall(SYS_dup3, old, new, 0);
}
1e68: 2501 sext.w a0,a0
1e6a: 8082 ret
0000000000001e6c <mount>:
register long a7 __asm__("a7") = n;
1e6c: 02800893 li a7,40
__asm_syscall("r"(a7), "0"(a0), "r"(a1), "r"(a2), "r"(a3), "r"(a4))
1e70: 00000073 ecall
int mount(const char *special, const char *dir, const char *fstype, unsigned long flags, const void *data)
{
return syscall(SYS_mount, special, dir, fstype, flags, data);
}
1e74: 2501 sext.w a0,a0
1e76: 8082 ret
0000000000001e78 <umount>:
register long a7 __asm__("a7") = n;
1e78: 02700893 li a7,39
register long a1 __asm__("a1") = b;
1e7c: 4581 li a1,0
__asm_syscall("r"(a7), "0"(a0), "r"(a1))
1e7e: 00000073 ecall
int umount(const char *special)
{
return syscall(SYS_umount2, special, 0);
}
1e82: 2501 sext.w a0,a0
1e84: 8082 ret
0000000000001e86 <__clone>:
.global __clone
.type __clone, %function
__clone:
# Save func and arg to stack
addi a1, a1, -16
1e86: 15c1 addi a1,a1,-16
sd a0, 0(a1)
1e88: e188 sd a0,0(a1)
sd a3, 8(a1)
1e8a: e594 sd a3,8(a1)
# Call SYS_clone
mv a0, a2
1e8c: 8532 mv a0,a2
mv a2, a4
1e8e: 863a mv a2,a4
mv a3, a5
1e90: 86be mv a3,a5
mv a4, a6
1e92: 8742 mv a4,a6
li a7, 220 # SYS_clone
1e94: 0dc00893 li a7,220
ecall
1e98: 00000073 ecall
beqz a0, 1f
1e9c: c111 beqz a0,1ea0 <__clone+0x1a>
# Parent
ret
1e9e: 8082 ret
# Child
1: ld a1, 0(sp)
1ea0: 6582 ld a1,0(sp)
ld a0, 8(sp)
1ea2: 6522 ld a0,8(sp)
jalr a1
1ea4: 9582 jalr a1
# Exit
li a7, 93 # SYS_exit
1ea6: 05d00893 li a7,93
ecall
1eaa: 00000073 ecall
| 35.717322 | 143 | 0.476631 |
ae722d089307eae9ccb8430212873cb6d21876ba | 193 | asm | Assembly | ffight/lcs/boss/44.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | 6 | 2020-10-14T15:29:10.000Z | 2022-02-12T18:58:54.000Z | ffight/lcs/boss/44.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | null | null | null | ffight/lcs/boss/44.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | a4a0c86c200241494b3f1834cd0aef8dc02f7683 | [
"Apache-2.0"
] | 1 | 2020-12-17T08:59:10.000Z | 2020-12-17T08:59:10.000Z | copyright zengfr site:http://github.com/zengfr/romhack
007520 move.w A1, ($44,A3) [boss+40, enemy+40]
007524 rts [boss+44, enemy+44]
copyright zengfr site:http://github.com/zengfr/romhack
| 27.571429 | 54 | 0.735751 |
4418b368ed689e263dc565db5615b3bbd3724a3e | 1,157 | asm | Assembly | _build/dispatcher/jmp_ippsECCPInitStd256r1_2cf70954.asm | zyktrcn/ippcp | b0bbe9bbb750a7cf4af5914dd8e6776a8d544466 | [
"Apache-2.0"
] | 1 | 2021-10-04T10:21:54.000Z | 2021-10-04T10:21:54.000Z | _build/dispatcher/jmp_ippsECCPInitStd256r1_2cf70954.asm | zyktrcn/ippcp | b0bbe9bbb750a7cf4af5914dd8e6776a8d544466 | [
"Apache-2.0"
] | null | null | null | _build/dispatcher/jmp_ippsECCPInitStd256r1_2cf70954.asm | zyktrcn/ippcp | b0bbe9bbb750a7cf4af5914dd8e6776a8d544466 | [
"Apache-2.0"
] | null | null | null | extern m7_ippsECCPInitStd256r1:function
extern n8_ippsECCPInitStd256r1:function
extern y8_ippsECCPInitStd256r1:function
extern e9_ippsECCPInitStd256r1:function
extern l9_ippsECCPInitStd256r1:function
extern n0_ippsECCPInitStd256r1:function
extern k0_ippsECCPInitStd256r1:function
extern ippcpJumpIndexForMergedLibs
extern ippcpSafeInit:function
segment .data
align 8
dq .Lin_ippsECCPInitStd256r1
.Larraddr_ippsECCPInitStd256r1:
dq m7_ippsECCPInitStd256r1
dq n8_ippsECCPInitStd256r1
dq y8_ippsECCPInitStd256r1
dq e9_ippsECCPInitStd256r1
dq l9_ippsECCPInitStd256r1
dq n0_ippsECCPInitStd256r1
dq k0_ippsECCPInitStd256r1
segment .text
global ippsECCPInitStd256r1:function (ippsECCPInitStd256r1.LEndippsECCPInitStd256r1 - ippsECCPInitStd256r1)
.Lin_ippsECCPInitStd256r1:
db 0xf3, 0x0f, 0x1e, 0xfa
call ippcpSafeInit wrt ..plt
align 16
ippsECCPInitStd256r1:
db 0xf3, 0x0f, 0x1e, 0xfa
mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc]
movsxd rax, dword [rax]
lea r11, [rel .Larraddr_ippsECCPInitStd256r1]
mov r11, qword [r11+rax*8]
jmp r11
.LEndippsECCPInitStd256r1:
| 29.666667 | 107 | 0.809853 |
d2a6bd6297fd4ef5e3f6058a8c6d059e4c9e15d5 | 691 | asm | Assembly | SLIDE_Why.asm | XlogicX/CactusCon2017 | d4cc716169dc8c6c2956c57079eb64342d5432bf | [
"BSD-2-Clause"
] | 2 | 2018-12-23T17:19:34.000Z | 2019-08-23T16:15:57.000Z | SLIDE_Why.asm | XlogicX/CactusCon2017 | d4cc716169dc8c6c2956c57079eb64342d5432bf | [
"BSD-2-Clause"
] | null | null | null | SLIDE_Why.asm | XlogicX/CactusCon2017 | d4cc716169dc8c6c2956c57079eb64342d5432bf | [
"BSD-2-Clause"
] | null | null | null | %include 'textmode.h'
call draw_border
mov di, 160 * 2 + 8 ;where to place cursor
mov si, line01 ;fetch the text
mov ah, 0x0A ;color
call slide_line
call wait_loop
mov di, 160 * 4 + 8 ;where to place cursor
mov si, line02 ;fetch the text
call slide_line
call wait_loop
mov di, 160 * 6 + 8 ;where to place cursor
mov si, line03 ;fetch the text
call slide_line
jmp endloop
endloop:
jmp endloop
%include 'slide_frame.h'
%include 'pause.h'
line01 db 0x11, 0x07, ' Because its fun'
line02 db 0x22, 0x07, ' Limitations encourage creativity'
line03 db 0x14, 0x07, ' Ring-0 programming'
titlemessage db 0x03, 'Why'
;BIOS sig and padding
times 510-($-$$) db 0
dw 0xAA55 | 19.194444 | 57 | 0.70767 |
be0eeb5cb2323b9216c8dd84d0f6d983596c7d3a | 18,607 | asm | Assembly | src/room_battle/level_sequence.asm | gbcompo21/shock-lobster | 28e7fb19c671b9086c07eabfb96dff4945e5ceac | [
"Zlib"
] | 7 | 2021-11-20T12:41:42.000Z | 2021-12-07T21:16:58.000Z | src/room_battle/level_sequence.asm | gbcompo21/shock-lobster | 28e7fb19c671b9086c07eabfb96dff4945e5ceac | [
"Zlib"
] | 1 | 2021-11-22T05:59:40.000Z | 2021-11-22T05:59:40.000Z | src/room_battle/level_sequence.asm | gbcompo21/shock-lobster | 28e7fb19c671b9086c07eabfb96dff4945e5ceac | [
"Zlib"
] | 1 | 2021-10-02T17:49:19.000Z | 2021-10-02T17:49:19.000Z | ;
; Level sequence handling for Shock Lobster
;
; Copyright 2021 Dave VanEe
;
; This software is provided 'as-is', without any express or implied
; warranty. In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Permission is granted to anyone to use this software for any purpose,
; including commercial applications, and to alter it and redistribute it
; freely, subject to the following restrictions:
;
; 1. The origin of this software must not be misrepresented; you must not
; claim that you wrote the original software. If you use this software
; in a product, an acknowledgment in the product documentation would be
; appreciated but is not required.
; 2. Altered source versions must be plainly marked as such, and must not be
; misrepresented as being the original software.
; 3. This notice may not be removed or altered from any source distribution.
;
;INCLUDE "charmap.asm"
DEF TEXT_WIDTH_TILES EQU 18
DEF TEXT_HEIGHT_TILES EQU 3
; Exports for vwf TextScroll
EXPORT TEXT_WIDTH_TILES
EXPORT TEXT_HEIGHT_TILES
EXPORT TOP_MESSAGE_TILEMAP
EXPORT BOTTOM_MESSAGE_TILEMAP
SECTION "Level Sequence Code", ROM0
; Advance through the level sequence as required
UpdateLevelSequence:
ld a, [wLevelSequenceAddr]
ld l, a
ld a, [wLevelSequenceAddr+1]
ld h, a
.nextEvent
ld a, [hl]
or a
ASSERT(SEQ_ENEMY == 0)
jr z, EventEnemy
dec a
ASSERT(SEQ_BACKGROUND == 1)
jr z, EventBackground
dec a
ASSERT(SEQ_OBSTACLE_LOOKUP == 2)
jr z, EventObstacleLookup
dec a
ASSERT(SEQ_MESSAGE_TOP == 3)
jr z, EventMessageTop
dec a
ASSERT(SEQ_MESSAGE_BOTTOM == 4)
jp z, EventMessageBottom
dec a
ASSERT(SEQ_SCROLL_DELTA == 5)
jr z, EventScrollDelta
dec a
ASSERT(SEQ_SKILL_MASK == 6)
jr z, EventSkillMask
dec a
ASSERT(SEQ_LEVEL_CLEAR == 7)
EventLevelClear:
ret
EventScrollDelta:
inc hl
ld a, [hli]
ld [wPhysicsUpdateDelta], a
jr UpdateLevelSequence.nextEvent
EventSkillMask:
inc hl
ld a, [hli]
ldh [hLevelSkillMask], a
jr UpdateLevelSequence.nextEvent
EventBackground:
inc hl
ld a, [hli]
ld [wBGTilemapPrimary], a
ld a, [hli]
ld [wBGTilemapPrimary+1], a
; The problem is we flip to using the new BG tilemap at a specific point,
; but the player can still collect pearls from 3 columns, which may include
; a mix of old/new columns. Not sure if I want to just accept this or base
; while tilemap to use on which of the 3 columns we're operating on.
; The +2 offset gives the correct result when comparing wBGHandoffTimer to
; the pearl column loop counter to seamlessly transition between backgrounds.
ld a, PEARL_INDEX_COLLISION_OFFSET + 2
ld [wBGHandoffTimer], a
jr UpdateLevelSequence.nextEvent
EventObstacleLookup:
inc hl
; Note: It would take more bytes to move HL to DE, rst MemcpySmall,
; recover HL, and advance HL 8 bytes than just duplicating MemcpySmall
; with a HL->DE copy direction, so we do that instead!
ld de, wObstacleSpawnLookup
ld c, 8
.copyLoop
ld a, [hli]
ld [de], a
inc de
dec c
jr nz, .copyLoop
jr UpdateLevelSequence.nextEvent
EventEnemy:
ldh a, [hEnemyState]
or a
ASSERT(STATE_NONE == 0)
jr z, .spawn
dec a
ASSERT(STATE_DESPAWNED == 1)
ret nz
; Enemy despawned and we're at that enemy event, advance to the next event
; and continue level sequence processing.
; Set new state as STATE_NONE so future enemies can spawn
ldh [hEnemyState], a
; Note: As the length of the event arguments changes, adjust the hl incrementing
inc hl
inc hl
inc hl
inc hl
jr UpdateLevelSequence.nextEvent
.spawn
; No enemy present and we're at an enemy event, spawn this enemy
push hl
inc l ; advance to enemy index
ld a, [hli] ; get enemy index
push hl
; Copy enemy tiles to VRAM
ld de, EnemyTiles
add d ; each 32x32 enemy tile set is 256 bytes, so this is easy!
ld d, a
ld hl, vEnemyTiles
ld c, 0
; This is a brutal amount to copy at once... do we need to queue up a popslide
; for VBlank, possibly in multiple passes?
call LCDMemcpySmall
pop hl
; Initialize enemy health
xor a ; low byte always starts at zero
ld [wEnemyHealth], a
ld a, [hli]
ld [wEnemyHealth+1], a
ld a, [hl]
ld [wEnemyHealthShift], a
pop hl
; Set enemy as spawning
ld a, STATE_SPAWNING
ldh [hEnemyState], a
; Point to spawning animation path
ld a, LOW(EnemyAnimationPaths.spawning)
ld [wEnemyAnimationPath], a
ld a, HIGH(EnemyAnimationPaths.spawning)
ld [wEnemyAnimationPath+1], a
; Store level sequence pointer 'stalled' at this enemy event
ld a, l
ld [wLevelSequenceAddr], a
ld a, h
ld [wLevelSequenceAddr+1], a
ret
EventMessageTop:
push hl
; Rebuild dialog border and clear lingering dialog contents
ld hl, TOP_DIALOG_TILEMAP
call DrawDialogBox
; Cache current raster entries we're going to overwrite for restoration later
ld de, wRasterLookup.bgEnable + 1
ld hl, wRasterCache
ld c, wRasterCache.end - wRasterCache
rst MemcpySmall
; Ensure we're early in the frame so the raster table is setup before
; we're in the middle of it to prevent flicker
call _hUGE_dosound
rst WaitVBlank
; Alter raster entries to show message dialog over battlefield
ld hl, wRasterLookup.bgEnable + 1
ld d, SCX_TOP_DIALOG
ld e, WX_RIGHT_EDGE
ld c, LCDC_TOP_MESSAGE_DIALOG_ON
ld a, LY_BG_START+1
ld b, 3
.rasterLoop
ld [hl], d ; SCX
inc l
ld [hl], e ; WX
inc l
ld [hl], c ; LCDC
inc l
ld [hli], a ; LY
inc a
dec b
jr nz, .rasterLoop
; battlefield2
; Disable enemy so window tilemap advancement is correct
dec l ; backtrack
ld a, LY_BG_START+$20
ld [hli], a ; LY
inc a
ld [hl], d ; SCX
inc l
ld [hl], e ; WX
inc l
ld c, LCDC_TOP_MESSAGE_DIALOG_ON_NO_ENEMY
ld [hl], c ; LCDC
inc l
; battlefield3
; return to 'normal' at end of dialog
ld a, LY_BG_START + 40 ; LY to end dialog
ld [hli], a ; LY
call SetupTextEngine
; Recover and then re-store event pointer
pop hl
inc hl ; advance to message text
push hl
ld a, TEXT_NEW_STR
call PrintVWFText
ld hl, TOP_MESSAGE_TILEMAP
call SetPenPosition
call DisplayMessage
; Restore laser tilemap
ld hl, TOP_DIALOG_TILEMAP
ld de, SCRN_VX_B - 8
REPT 5
lb bc, LOW(vTerrainTiles / 16), 4
call LCDMemsetSmallFromB
lb bc, 0, 4
call LCDMemsetSmallFromB
add hl, de
ENDR
; Restore battle raster entries
ld de, wRasterCache
ld hl, wRasterLookup.bgEnable + 1
ld c, wRasterCache.end - wRasterCache
rst MemcpySmall
pop hl
; Advance to end of message string so the next event is lined up
.messageEndLoop
ld a, [hli]
cp "<END>"
jr nz, .messageEndLoop
jp UpdateLevelSequence.nextEvent
EventMessageBottom:
; Alter raster entries to show message dialog over lower HUD
push hl
; Clear lingering old dialog contents
ld hl, BOTTOM_DIALOG_TILEMAP
call DrawDialogBox
ldh a, [hEnemyState]
ASSERT(STATE_NONE == 0)
or a
jr nz, .showEnemy
; Hide enemy since the 2-pixel strip will be static for a while
ld hl, wRasterLookup.battlefield0+3
ld a, LCDC_HIDE_ENEMY ; switch to tilemap with blank entries in enemy region
ld c, 3
.hideLoop
ld [hli], a
inc l
inc l
inc l
dec c
jr nz, .hideLoop
.showEnemy
call ShowLowerMessageBox
call SetupTextEngine
; Recover and then re-store event pointer
pop hl
inc hl ; advance to message text
push hl
ld a, TEXT_NEW_STR
call PrintVWFText
ld hl, BOTTOM_MESSAGE_TILEMAP
call SetPenPosition
call DisplayMessage
; Restore battle raster entries
; Just do this regardless of enemy state to save space on the enemy check
ld hl, wRasterLookup.battlefield0+3
ld a, LCDC_HIDE_ENEMY
ld c, 3
.showLoop
ld [hli], a
inc l
inc l
inc l
dec c
jr nz, .showLoop
call HideLowerMessageBox
pop hl
jr EventMessageTop.messageEndLoop
ShowLowerMessageBox::
ld b, LCDC_BOTTOM_MESSAGE_DIALOG_ON
.overrideLCDC::
ld hl, wRasterLookup.barInvigorate
ld a, LY_BOTTOM_MESSAGE
ld [hli], a ; LY (8 pixels early)
inc l ; skip SCX
ld a, WX_LEFT_EDGE
ld [hli], a ; WX
ld [hl], b ; LCDC
inc l
ld a, $FF ; Disable following raster entry for now
ld [hl], a
ret
HideLowerMessageBox::
ld hl, wRasterLookup.barInvigorate
ld a, LY_BAR_INVIGORATE
ld [hli], a ; LY (8 pixels early)
inc l ; skip SCX
ld a, WX_LOWER_HUD
ld [hli], a ; WX
ld a, LCDC_BOTTOM_MESSAGE_DIALOG_OFF
ld [hli], a ; LCDC
ld a, LY_BAR_FOCUS
ld [hli], a
ret
SetupTextEngine:
; Setup VWF engine for message text
ld a, TEXT_WIDTH_TILES * 8 + 1
lb bc, LOW(vMessageTiles / 16), LOW(vMessageTiles.end / 16) - 1
lb de, TEXT_HEIGHT_TILES, $80
call TextInit
ld a, 2
ld [wTextLetterDelay], a
ret
DisplayMessage:
; Print message in dedicated loop with sound still playing
.messageLoop
call PrintVWFChar
call DrawVWFChars
ld hl, wTextFlags
bit 7, [hl]
jr z, .continueSlowly
res 7, [hl]
; Toggle text speed
; TODO: Figure out why this isn't working!
ld a, [wTextLetterDelay]
xor 8
ld [wTextLetterDelay], a
.continueSlowly
call _hUGE_dosound
rst WaitVBlank
; Check if the text is done
ld a, [wTextSrcPtr + 1]
inc a
jr nz, .messageLoop
; Wait for a final button press
.waitClose
call _hUGE_dosound
rst WaitVBlank
ldh a, [hPressedKeys]
and PADF_A
jr z, .waitClose
ret
; Event constants
RSRESET
DEF SEQ_ENEMY RB 1 ; sequence always pauses after enemy unti it's dead
DEF SEQ_BACKGROUND RB 1 ; set a new background tilemap base address
DEF SEQ_OBSTACLE_LOOKUP RB 1 ; control which obstacles spawn
DEF SEQ_MESSAGE_TOP RB 1 ; message dialogs pause gameplay until dismissed
DEF SEQ_MESSAGE_BOTTOM RB 1 ; message dialogs pause gameplay until dismissed
DEF SEQ_SCROLL_DELTA RB 1 ; scroll delta is adjustable to adjust tension
DEF SEQ_SKILL_MASK RB 1 ; skill masks can be used to limit player skill selection
DEF SEQ_LEVEL_CLEAR RB 1 ; all levels must end with a level clear event
;DEF SEQ_SET_TIMER RB 1 ; set the battle timer
; Enemy constants
RSRESET
DEF ENEMY_SNAIL RB 1
DEF ENEMY_SQUID RB 1
DEF ENEMY_JELLYFISH RB 1
DEF ENEMY_TURTLE RB 1
DEF ENEMY_CAT RB 1
DEF ENEMY_DRAGON RB 1
DEF ENEMY_TREANT RB 1
DEF ENEMY_EYEBALL RB 1
; Obstacle constants
RSRESET
DEF OBSTACLE_NONE RB 1
DEF OBSTACLE_ANCHOR RB 1
DEF OBSTACLE_CRATE RB 1
DEF OBSTACLE_EYEBALL RB 1
; Health constants
; Due to the current simplified way the health bar is rendered, all health
; values are powers of two which can be easily shifted up/down to 64 (which
; is the number of pixels in the enemy health bar).
; Note: The low byte of health is always 0, so these contain only the high byte
RSRESET
DEF HEALTH_256 EQU %00000001
DEF HEALTH_512 EQU %00000010
DEF HEALTH_1024 EQU %00000100
DEF HEALTH_2048 EQU %00001000
DEF HEALTH_4096 EQU %00010000
DEF HEALTH_8192 EQU %00100000
DEF HEALTH_16384 EQU %01000000
DEF HEALTH_32768 EQU %10000000
; Background Tilemap Offsets
DEF BG_OCEAN_FLOOR EQU 16 * SCRN_VX_B
DEF BG_OCEAN_DEPTHS EQU 13 * SCRN_VX_B
DEF BG_OCEAN_MID EQU 12 * SCRN_VX_B
DEF BG_FOREST_FLOOR EQU 8 * SCRN_VX_B
DEF BG_FOREST_MID EQU 7 * SCRN_VX_B
DEF BG_FOREST_HIGH EQU 6 * SCRN_VX_B
DEF BG_SKY EQU 0 * SCRN_VX_B
SECTION "Level Sequence", ROMX
LevelSequence::
db SEQ_SKILL_MASK, $FF
db SEQ_OBSTACLE_LOOKUP, 20, OBSTACLE_ANCHOR, 255, OBSTACLE_NONE, 0, 0, 0, 0
db SEQ_ENEMY, ENEMY_SNAIL, HEALTH_1024, HEALTH_SHIFT_1024
db SEQ_BACKGROUND
dw BackgroundTilemap + BG_OCEAN_FLOOR
db SEQ_OBSTACLE_LOOKUP, 30, OBSTACLE_ANCHOR, 255, OBSTACLE_NONE, 0, 0, 0, 0
db SEQ_ENEMY, ENEMY_SQUID, HEALTH_1024, HEALTH_SHIFT_1024
db SEQ_BACKGROUND
dw BackgroundTilemap + BG_OCEAN_DEPTHS
db SEQ_OBSTACLE_LOOKUP, 20, OBSTACLE_ANCHOR, 40, OBSTACLE_CRATE, 255, OBSTACLE_NONE, 0, 0
db SEQ_ENEMY, ENEMY_JELLYFISH, HEALTH_2048, HEALTH_SHIFT_2048
db SEQ_BACKGROUND
dw BackgroundTilemap + BG_OCEAN_MID
db SEQ_OBSTACLE_LOOKUP, 10, OBSTACLE_ANCHOR, 40, OBSTACLE_CRATE, 255, OBSTACLE_NONE, 0, 0
db SEQ_ENEMY, ENEMY_TURTLE, HEALTH_2048, HEALTH_SHIFT_2048
db SEQ_BACKGROUND
dw BackgroundTilemap + BG_FOREST_FLOOR
db SEQ_OBSTACLE_LOOKUP, 20, OBSTACLE_CRATE, 255, OBSTACLE_NONE, 0, 0, 0, 0
db SEQ_ENEMY, ENEMY_CAT, HEALTH_4096, HEALTH_SHIFT_4096
db SEQ_BACKGROUND
dw BackgroundTilemap + BG_FOREST_MID
db SEQ_OBSTACLE_LOOKUP, 30, OBSTACLE_CRATE, 255, OBSTACLE_NONE, 0, 0, 0, 0
db SEQ_ENEMY, ENEMY_DRAGON, HEALTH_4096, HEALTH_SHIFT_4096
db SEQ_BACKGROUND
dw BackgroundTilemap + BG_FOREST_HIGH
db SEQ_OBSTACLE_LOOKUP, 20, OBSTACLE_CRATE, 40, OBSTACLE_EYEBALL, 255, OBSTACLE_NONE, 0, 0
db SEQ_ENEMY, ENEMY_TREANT, HEALTH_8192, HEALTH_SHIFT_8192
db SEQ_BACKGROUND
dw BackgroundTilemap + BG_SKY
db SEQ_OBSTACLE_LOOKUP, 10, OBSTACLE_CRATE, 40, OBSTACLE_EYEBALL, 255, OBSTACLE_NONE, 0, 0
db SEQ_ENEMY, ENEMY_EYEBALL, HEALTH_32768, HEALTH_SHIFT_32768
db SEQ_LEVEL_CLEAR
.end
SECTION "Level Sequence Variables", WRAM0
wLevelSequenceAddr:: ds 2 ; address of current level sequence event
SECTION "Pearl Sequence Index", ROMX, ALIGN[8]
DEF DEBUG_PEARL_COLLISIONS EQU 0
DEF PEARL_SEQUENCE_TERMINATOR EQU $FF
IF DEBUG_PEARL_COLLISIONS
DEF PEARL_SEQUENCE_COUNT EQU 1
ELSE
DEF PEARL_SEQUENCE_COUNT EQU 32 ; Note: Must be a power of 2!
ENDC
; Pearl sequences are blocks of pearls which can appear in the battlefield
; for collection by the player. Only the lower 6 bits matter, with the
; LSB appearing at the top of the battlefield, and the first row appearing
; on the left (leading) edge of the sequence.
; I ended making a lot which are horizontal/vertical flip variations, which
; could likely be done in code pretty easily, but it'll do for now.
PearlSequenceIndex:
dw PearlSequences.blocks
dw PearlSequences.blocks_flipped
dw PearlSequences.dot_pairs
dw PearlSequences.dots_narrow
dw PearlSequences.zigzag
dw PearlSequences.zigzag_flipped
dw PearlSequences.slashes
dw PearlSequences.slashes_flipped
dw PearlSequences.broken_x
dw PearlSequences.step_down
dw PearlSequences.step_up
dw PearlSequences.ramp_up_down
dw PearlSequences.criss_cross
dw PearlSequences.flowers
dw PearlSequences.gate
dw PearlSequences.gate_flipped
dw PearlSequences.ticks
dw PearlSequences.ticks_flipped
dw PearlSequences.tets
dw PearlSequences.tets_flipped
dw PearlSequences.speckles
dw PearlSequences.speckles_flipped
dw PearlSequences.flip_flop
dw PearlSequences.flip_flop_flipped
dw PearlSequences.chevrons
dw PearlSequences.chevrons_flipped
dw PearlSequences.zigzag_broken
dw PearlSequences.zigzag_broken_flipped
dw PearlSequences.cups
dw PearlSequences.cups_flipped
dw PearlSequences.facing
dw PearlSequences.shock
.endIndex
ASSERT(PearlSequenceIndex.endIndex - PearlSequenceIndex <= 128)
SECTION "Pearl Sequences", ROMX
PearlSequences:
.blocks
IF DEBUG_PEARL_COLLISIONS
INCBIN "res/pearls/solid.pearls"
ELSE
INCBIN "res/pearls/blocks.pearls"
ENDC
.blocks_flipped
INCBIN "res/pearls/blocks_flipped.pearls"
.dot_pairs
INCBIN "res/pearls/dot_pairs.pearls"
.dots_narrow
INCBIN "res/pearls/dots_narrow.pearls"
.zigzag
INCBIN "res/pearls/zigzag.pearls"
.zigzag_flipped
INCBIN "res/pearls/zigzag_flipped.pearls"
.slashes
INCBIN "res/pearls/slashes.pearls"
.slashes_flipped
INCBIN "res/pearls/slashes_flipped.pearls"
.broken_x
INCBIN "res/pearls/broken_x.pearls"
.step_down
INCBIN "res/pearls/step_down.pearls"
.step_up
INCBIN "res/pearls/step_up.pearls"
.ramp_up_down
INCBIN "res/pearls/ramp_up_down.pearls"
.criss_cross
INCBIN "res/pearls/criss_cross.pearls"
.flowers
INCBIN "res/pearls/flowers.pearls"
.gate
INCBIN "res/pearls/gate.pearls"
.gate_flipped
INCBIN "res/pearls/gate_flipped.pearls"
.ticks
INCBIN "res/pearls/ticks.pearls"
.ticks_flipped
INCBIN "res/pearls/ticks_flipped.pearls"
.tets
INCBIN "res/pearls/tets.pearls"
.tets_flipped
INCBIN "res/pearls/tets_flipped.pearls"
.speckles
INCBIN "res/pearls/speckles.pearls"
.speckles_flipped
INCBIN "res/pearls/speckles_flipped.pearls"
.flip_flop
INCBIN "res/pearls/flip_flop.pearls"
.flip_flop_flipped
INCBIN "res/pearls/flip_flop_flipped.pearls"
.chevrons
INCBIN "res/pearls/chevrons.pearls"
.chevrons_flipped
INCBIN "res/pearls/chevrons_flipped.pearls"
.zigzag_broken
INCBIN "res/pearls/zigzag_broken.pearls"
.zigzag_broken_flipped
INCBIN "res/pearls/zigzag_broken_flipped.pearls"
.cups
INCBIN "res/pearls/cups.pearls"
.cups_flipped
INCBIN "res/pearls/cups_flipped.pearls"
.facing
INCBIN "res/pearls/facing.pearls"
.shock
INCBIN "res/pearls/shock.pearls" | 29.073438 | 94 | 0.667759 |
4fc53d116ccc1f9126ae2ec25f5a25104f1766dd | 473 | asm | Assembly | src/keyboard/ps2_ascii_keymaps.asm | Q-Bert-Reynolds/gun-hockey-gb | 360eae9adfffc9f619f891facf0c83e846f372b5 | [
"MIT"
] | 1 | 2021-06-04T15:47:25.000Z | 2021-06-04T15:47:25.000Z | src/keyboard/ps2_ascii_keymaps.asm | Q-Bert-Reynolds/gbedit | d74e7f3527531ae1e4f34df794ba1cd1c5fe2069 | [
"MIT"
] | null | null | null | src/keyboard/ps2_ascii_keymaps.asm | Q-Bert-Reynolds/gbedit | d74e7f3527531ae1e4f34df794ba1cd1c5fe2069 | [
"MIT"
] | null | null | null | PS2toASCIIKeymap:
DB "??????????????`?";00-0F
DB "?????q1???zsaw2?";10-1F
DB "?cxde43?? vftr5?";20-2F
DB "?nbhgy6???mju78?";30-3F
DB "?,kio09??./l;p-?";40-4F
DB "??'?[=????\n]?\\??";50-5F
;keypad
DB "?????????1?47???";60-6F
DB "0.2568???+3-*9??";70-7F
PS2toASCIIShiftedKeymap:
DB "??????????????~?";00-0F
DB "?????Q!???ZSAW@?";10-1F
DB "?CXDE$#?? VFTR%?";20-2F
DB "?NBHGY^???MJU&*?";30-3F
DB "?<KIO)(??>?L:P_?";40-4F
DB "??\"?\{+????\n}?|??";50-5F
;keypad can't be shifted | 24.894737 | 30 | 0.471459 |
41210bb8fe0509a414e08b626f26a18128143ad4 | 879 | asm | Assembly | programs/oeis/283/A283049.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/283/A283049.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/283/A283049.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A283049: Numbers of configurations of A'Campo forests with co-dimension 1 and degree n>0.
; 0,4,48,480,4560,42504,393120,3624768,33390720,307618740,2835722032,26162863584,241614915360,2233533229200,20667453710400,191422799835264,1774573628661504,16465220088660432,152894968403313600,1420856831349155200,13213537097286612240,122964781793406010920,1145032213561132834080,10668751226149520462400,99461081225018641564800,927731628466549144481880,8657810744692706761915296,80834780188740934458349632,755060394298834049197549120,7055828342997489608805668640,65961055843881323795231270016,616867017096681010456139270400,5771006680929141324138310141440,54008234317101872322461764263600,505602935515902426628678725211200,4734713641795005541193461797816960,44351277786194808542949374451232320,415566966063467015412218047550506400
mov $2,$0
add $0,1
mul $0,4
sub $2,1
bin $0,$2
mul $0,4
| 87.9 | 729 | 0.901024 |
41c6beee606d93870a653c336b4e997786935123 | 7,746 | asm | Assembly | from-c-to-opcode/addition.asm | kopytjuk/learn-8051 | 2ce33d84aa07e122b3c3479b723d0219aa763923 | [
"MIT"
] | null | null | null | from-c-to-opcode/addition.asm | kopytjuk/learn-8051 | 2ce33d84aa07e122b3c3479b723d0219aa763923 | [
"MIT"
] | null | null | null | from-c-to-opcode/addition.asm | kopytjuk/learn-8051 | 2ce33d84aa07e122b3c3479b723d0219aa763923 | [
"MIT"
] | 1 | 2021-11-30T09:45:09.000Z | 2021-11-30T09:45:09.000Z | ;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.9.0 #11195 (MINGW64)
;--------------------------------------------------------
.module addition
.optsdcc -mmcs51 --model-small
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _main
.globl _CY
.globl _AC
.globl _F0
.globl _RS1
.globl _RS0
.globl _OV
.globl _F1
.globl _P
.globl _PS
.globl _PT1
.globl _PX1
.globl _PT0
.globl _PX0
.globl _RD
.globl _WR
.globl _T1
.globl _T0
.globl _INT1
.globl _INT0
.globl _TXD
.globl _RXD
.globl _P3_7
.globl _P3_6
.globl _P3_5
.globl _P3_4
.globl _P3_3
.globl _P3_2
.globl _P3_1
.globl _P3_0
.globl _EA
.globl _ES
.globl _ET1
.globl _EX1
.globl _ET0
.globl _EX0
.globl _P2_7
.globl _P2_6
.globl _P2_5
.globl _P2_4
.globl _P2_3
.globl _P2_2
.globl _P2_1
.globl _P2_0
.globl _SM0
.globl _SM1
.globl _SM2
.globl _REN
.globl _TB8
.globl _RB8
.globl _TI
.globl _RI
.globl _P1_7
.globl _P1_6
.globl _P1_5
.globl _P1_4
.globl _P1_3
.globl _P1_2
.globl _P1_1
.globl _P1_0
.globl _TF1
.globl _TR1
.globl _TF0
.globl _TR0
.globl _IE1
.globl _IT1
.globl _IE0
.globl _IT0
.globl _P0_7
.globl _P0_6
.globl _P0_5
.globl _P0_4
.globl _P0_3
.globl _P0_2
.globl _P0_1
.globl _P0_0
.globl _B
.globl _ACC
.globl _PSW
.globl _IP
.globl _P3
.globl _IE
.globl _P2
.globl _SBUF
.globl _SCON
.globl _P1
.globl _TH1
.globl _TH0
.globl _TL1
.globl _TL0
.globl _TMOD
.globl _TCON
.globl _PCON
.globl _DPH
.globl _DPL
.globl _SP
.globl _P0
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
.area RSEG (ABS,DATA)
.org 0x0000
_P0 = 0x0080
_SP = 0x0081
_DPL = 0x0082
_DPH = 0x0083
_PCON = 0x0087
_TCON = 0x0088
_TMOD = 0x0089
_TL0 = 0x008a
_TL1 = 0x008b
_TH0 = 0x008c
_TH1 = 0x008d
_P1 = 0x0090
_SCON = 0x0098
_SBUF = 0x0099
_P2 = 0x00a0
_IE = 0x00a8
_P3 = 0x00b0
_IP = 0x00b8
_PSW = 0x00d0
_ACC = 0x00e0
_B = 0x00f0
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
.area RSEG (ABS,DATA)
.org 0x0000
_P0_0 = 0x0080
_P0_1 = 0x0081
_P0_2 = 0x0082
_P0_3 = 0x0083
_P0_4 = 0x0084
_P0_5 = 0x0085
_P0_6 = 0x0086
_P0_7 = 0x0087
_IT0 = 0x0088
_IE0 = 0x0089
_IT1 = 0x008a
_IE1 = 0x008b
_TR0 = 0x008c
_TF0 = 0x008d
_TR1 = 0x008e
_TF1 = 0x008f
_P1_0 = 0x0090
_P1_1 = 0x0091
_P1_2 = 0x0092
_P1_3 = 0x0093
_P1_4 = 0x0094
_P1_5 = 0x0095
_P1_6 = 0x0096
_P1_7 = 0x0097
_RI = 0x0098
_TI = 0x0099
_RB8 = 0x009a
_TB8 = 0x009b
_REN = 0x009c
_SM2 = 0x009d
_SM1 = 0x009e
_SM0 = 0x009f
_P2_0 = 0x00a0
_P2_1 = 0x00a1
_P2_2 = 0x00a2
_P2_3 = 0x00a3
_P2_4 = 0x00a4
_P2_5 = 0x00a5
_P2_6 = 0x00a6
_P2_7 = 0x00a7
_EX0 = 0x00a8
_ET0 = 0x00a9
_EX1 = 0x00aa
_ET1 = 0x00ab
_ES = 0x00ac
_EA = 0x00af
_P3_0 = 0x00b0
_P3_1 = 0x00b1
_P3_2 = 0x00b2
_P3_3 = 0x00b3
_P3_4 = 0x00b4
_P3_5 = 0x00b5
_P3_6 = 0x00b6
_P3_7 = 0x00b7
_RXD = 0x00b0
_TXD = 0x00b1
_INT0 = 0x00b2
_INT1 = 0x00b3
_T0 = 0x00b4
_T1 = 0x00b5
_WR = 0x00b6
_RD = 0x00b7
_PX0 = 0x00b8
_PT0 = 0x00b9
_PX1 = 0x00ba
_PT1 = 0x00bb
_PS = 0x00bc
_P = 0x00d0
_F1 = 0x00d1
_OV = 0x00d2
_RS0 = 0x00d3
_RS1 = 0x00d4
_F0 = 0x00d5
_AC = 0x00d6
_CY = 0x00d7
;--------------------------------------------------------
; overlayable register banks
;--------------------------------------------------------
.area REG_BANK_0 (REL,OVR,DATA)
.ds 8
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
.area DSEG (DATA)
;--------------------------------------------------------
; overlayable items in internal ram
;--------------------------------------------------------
.area OSEG (OVR,DATA)
;--------------------------------------------------------
; Stack segment in internal ram
;--------------------------------------------------------
.area SSEG
__start__stack:
.ds 1
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
.area ISEG (DATA)
;--------------------------------------------------------
; absolute internal ram data
;--------------------------------------------------------
.area IABS (ABS,DATA)
.area IABS (ABS,DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
.area BSEG (BIT)
;--------------------------------------------------------
; paged external ram data
;--------------------------------------------------------
.area PSEG (PAG,XDATA)
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
.area XSEG (XDATA)
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area XABS (ABS,XDATA)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
.area XISEG (XDATA)
.area HOME (CODE)
.area GSINIT0 (CODE)
.area GSINIT1 (CODE)
.area GSINIT2 (CODE)
.area GSINIT3 (CODE)
.area GSINIT4 (CODE)
.area GSINIT5 (CODE)
.area GSINIT (CODE)
.area GSFINAL (CODE)
.area CSEG (CODE)
;--------------------------------------------------------
; interrupt vector
;--------------------------------------------------------
.area HOME (CODE)
__interrupt_vect:
ljmp __sdcc_gsinit_startup
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area HOME (CODE)
.area GSINIT (CODE)
.area GSFINAL (CODE)
.area GSINIT (CODE)
.globl __sdcc_gsinit_startup
.globl __sdcc_program_startup
.globl __start__stack
.globl __mcs51_genXINIT
.globl __mcs51_genXRAMCLEAR
.globl __mcs51_genRAMCLEAR
.area GSFINAL (CODE)
ljmp __sdcc_program_startup
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area HOME (CODE)
.area HOME (CODE)
__sdcc_program_startup:
ljmp _main
; return from main will return to caller
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area CSEG (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function 'main'
;------------------------------------------------------------
;i Allocated to registers r6 r7
;x Allocated to registers
;------------------------------------------------------------
; .\from-c-to-opcode\addition.c:5: void main(void)
; -----------------------------------------
; function main
; -----------------------------------------
_main:
ar7 = 0x07
ar6 = 0x06
ar5 = 0x05
ar4 = 0x04
ar3 = 0x03
ar2 = 0x02
ar1 = 0x01
ar0 = 0x00
; .\from-c-to-opcode\addition.c:7: for (int i=0; i<3; i++){
mov r6,#0x00
mov r7,#0x00
00103$:
clr c
mov a,r6
subb a,#0x03
mov a,r7
xrl a,#0x80
subb a,#0x80
jnc 00105$
; .\from-c-to-opcode\addition.c:8: char x = P1;
; .\from-c-to-opcode\addition.c:9: x = x - 5;
mov a,_P1
add a,#0xfb
mov _P1,a
; .\from-c-to-opcode\addition.c:7: for (int i=0; i<3; i++){
inc r6
cjne r6,#0x00,00103$
inc r7
sjmp 00103$
00105$:
; .\from-c-to-opcode\addition.c:12: }
ret
.area CSEG (CODE)
.area CONST (CODE)
.area XINIT (CODE)
.area CABS (ABS,CODE)
| 21.943343 | 61 | 0.469533 |
a460c50b3116af285d2b07cd7d3de9969ae94f78 | 753 | asm | Assembly | tests/docs_examples/po_mmu.asm | cizo2000/sjasmplus | 615d7c0e09a44aa2a923095fc9ed6dca6ecae4a4 | [
"BSD-3-Clause"
] | 220 | 2016-10-22T19:44:39.000Z | 2022-03-29T20:57:04.000Z | tests/docs_examples/po_mmu.asm | ped7g/sjasmplus | 487635c8057cd5594c372d9b70bc00a3f3a1ecc4 | [
"BSD-3-Clause"
] | 153 | 2018-05-07T10:31:23.000Z | 2022-03-30T04:35:59.000Z | tests/docs_examples/po_mmu.asm | ped7g/sjasmplus | 487635c8057cd5594c372d9b70bc00a3f3a1ecc4 | [
"BSD-3-Clause"
] | 51 | 2016-05-12T21:27:36.000Z | 2022-03-27T15:16:16.000Z | DEVICE ZXSPECTRUM128 : LABELSLIST "po_mmu.lbl" ; to check label pages
MMU 1 3, 5 ; maps slots 1, 2, 3 with pages 5, 6, 7
ORG 0xBFFF
label1_p6: scf ; last byte of page 6 (in slot 2)
label2_p7: scf ; first byte of page 7 (in slot 3)
MMU 3 e, 0 ; page 0 into slot 3, write beyond slot will cause error
ORG 0xFFFF
ld a,1 ; error: Write outside of memory slot: 65536 (65536 = address outside)
MMU 3 n, 1 ; page 1 into slot 3, make it wrap + map next page automatically
ORG 0xFFFF ; ! also the $ address was truncated by MMU from $10001 to $0001 !
label3_p1: scf ; last byte of page 1, then wrapping back to 0xC000 with page 2
label4_p2: scf ; first byte of page 2 at 0xC000
| 50.2 | 90 | 0.641434 |
3b38f095c152469201e6ebd5860001cd8ed73d1c | 980 | asm | Assembly | programs/oeis/051/A051124.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/051/A051124.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/051/A051124.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A051124: a(n) = Fibonacci(n) XOR Fibonacci(n+1).
; Coded manually 2021-03-30 by Simon Strandgaard, https://github.com/neoneye
; 1,0,3,1,6,13,5,24,55,21,110,201,121,400,795,441,1510,3109,6733,2616,12463,28653,10974,56017,102449,65312,206195,402993,197062,748189,1587445,3520472,1374951,6472453,14403630,7282041,26431433
add $0,1
mov $5,$0
seq $5,45 ; Fibonacci
; Now $5 holds Fibonacci(n+1).
sub $0,1
seq $0,45 ; Fibonacci
; Now $0 holds Fibonacci(n).
; Determine the number of times to loop
mov $2,$5
seq $2,70939 ; Length of binary representation of Fibonacci(n+1).
mov $4,1 ; Inital scale factor
lpb $2
; Do xor with the lowest bit
mov $3,$0
add $3,$5
mod $3,2
; Now $3 holds the bitwise xor with $0 and $5
; Scale up the bit, and add to result
mul $3,$4
add $1,$3
div $0,2 ; Remove the lowest bit from Fibonacci(n)
div $5,2 ; Remove the lowest bit from Fibonacci(n+1)
mul $4,2 ; Double the scale factor. Example: 1,2,4,8,16,32
sub $2,1
lpe
mov $0,$1
| 31.612903 | 192 | 0.688776 |
dab40e5e870b5dd3e3b2a476083108142cb9f0b4 | 311 | asm | Assembly | s2/sfx-original/A0 - Jump.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 9 | 2017-10-09T20:28:45.000Z | 2021-06-29T21:19:20.000Z | s2/sfx-original/A0 - Jump.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 12 | 2018-08-01T13:52:20.000Z | 2022-02-21T02:19:37.000Z | s2/sfx-original/A0 - Jump.asm | Cancer52/flamedriver | 9ee6cf02c137dcd63e85a559907284283421e7ba | [
"0BSD"
] | 2 | 2018-02-17T19:50:36.000Z | 2019-10-30T19:28:06.000Z | Sound20_Jump_Header:
smpsHeaderStartSong 2
smpsHeaderVoiceNull
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cPSG1, Sound20_Jump_PSG1, $F4, $00
; PSG1 Data
Sound20_Jump_PSG1:
smpsPSGvoice $00
dc.b nF2, $05
smpsModSet $02, $01, $F8, $65
dc.b nBb2, $15
smpsStop
| 19.4375 | 56 | 0.723473 |
29c0396e1cd975f3c3e7f34d58f2061387ccb3a4 | 2,254 | asm | Assembly | programs/oeis/168/A168631.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/168/A168631.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/168/A168631.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A168631: a(n) = n^6*(n^7 + 1)/2.
; 0,1,4128,797526,33556480,610359375,6530370336,48444564028,274878038016,1270933179885,5000000500000,17261356957746,53496604182528,151437555709531,396857390391840,973097539875000,2251799822073856,4952289028521753,10411482449841696,21026491754651470,40960000032000000,77236188912442791,141405028998231328,252018181042251636,438244169328230400,745058059814453125,1240576436756326176,2026277576703198378,3251055711489918976,5130314356776712755,7971615000364500000,12208773149166273136,18446744074246422528,27520176997369985841,40569151623555120160,59136358891910343750,85290864090877495296,121784612109323515903,172249020262910381856,241440374285499661740,335544320002048000000,462551551159881866781,632718859222177828128,859132062144306074146,1158389997092735109120,1551431779990113796875,2064532938496507549216,2730499853065681196328,3590096234360220942336,4693740168830797796425,6103515625007812500000,7895548281587144241726,10162802168652390320128,13018360962814325278551,16599265906778124245280,21070991298799851062500,26632648386567014055936,33523019376265178761653,42027535208297468912416,52486323838087305414810,65303470080023328000000,80957643716102138015971,100014269634363294570528,123139432347114339961056,151115727451863006576640,184860294550973378390625,225445289957206398183456,274121083305245943533878,332342490093885459204096,401798382335871202814895,484445052035058824500000,582543737292812845407516,698702758623621998051328,835924753696970110083661,997659542389151130151200,1187863200903027832031250,1411063973981525402699776,1672435708095702181635003,1977879546132513054329376,2334114685751250602294680,2748779069440131072000000,3230540944613477864234361,3789222307082447829034528,4435935321154600133208366,5183232894725773343016960,6045274678287503638234375,7038009853060465339972896,8179378175765365571987028,9489530856154196354400256,10991072958654413734152165,12709329141645265720500000,14672634677319301545914506,16912653832124886300592128,19464727832791059814497171,22368254796270253629221920,25667104163975623283250000,29410068351829224839970816,33651354508279159500311953,38451119463005644557128736,43876051149948870132685350
mov $1,$0
pow $0,6
mov $2,$1
pow $2,7
mul $2,$0
add $0,$2
div $0,2
| 204.909091 | 2,150 | 0.931233 |
c24432b16ba37b6ceafbc750e250908113cef53d | 1,067 | asm | Assembly | src/util/icon/asm_digit.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/icon/asm_digit.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/icon/asm_digit.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | * Sprite digit
*
* Mode 4
* +|-------------------+
* -w w wwwww w-
* |ww ww www w ww|
* |ww ww ww ww|
* |ww ww ww ww|
* |ww ww ww ww|
* |w www w ww ww|
* | wwwww wwww w w |
* | ww w wwww w|
* | ww ww ww|
* | ww ww ww|
* | ww ww ww|
* | ww ww ww|
* | ww w www ww ww|
* | w wwwww ww w |
* +|-------------------+
*
section sprite
xdef mes_digit
xref mes_zero
mes_digit
dc.w $0100,$0000
dc.w 20,14,0,0
dc.l mcs_digit-*
dc.l mes_zero-*
dc.l 0
mcs_digit
dc.w $8282,$7C7C
dc.w $1010,$0000
dc.w $C6C6,$3A3A
dc.w $3030,$0000
dc.w $C6C6,$0606
dc.w $3030,$0000
dc.w $C6C6,$0606
dc.w $3030,$0000
dc.w $C6C6,$0606
dc.w $3030,$0000
dc.w $BABA,$0606
dc.w $3030,$0000
dc.w $7C7C,$7A7A
dc.w $2020,$0000
dc.w $0606,$BCBC
dc.w $1010,$0000
dc.w $0606,$C0C0
dc.w $3030,$0000
dc.w $0606,$C0C0
dc.w $3030,$0000
dc.w $0606,$C0C0
dc.w $3030,$0000
dc.w $0606,$C0C0
dc.w $3030,$0000
dc.w $0606,$B9B9
dc.w $B0B0,$0000
dc.w $0404,$7D7D
dc.w $A0A0,$0000
*
end
| 17.209677 | 24 | 0.508903 |
959d9c12ee467dc6d74c086d59f6452041c67ec1 | 358 | asm | Assembly | oeis/128/A128174.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/128/A128174.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/128/A128174.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A128174: Transform, (1,0,1,...) in every column.
; Submitted by Jamie Morken(m3)
; 1,0,1,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0
lpb $0
add $1,1
sub $0,$1
lpe
sub $1,$0
mov $0,$1
add $0,1
mod $0,2
| 27.538462 | 201 | 0.539106 |
677a0cc839e925e8e7670cc543e73ca82c50fd91 | 40,908 | asm | Assembly | user/ls.asm | Pallavi-Pamulapati/Modified-xv6 | 5365a34dc7d755d61d0de9b3f2d5a68d052d57de | [
"MIT-0"
] | null | null | null | user/ls.asm | Pallavi-Pamulapati/Modified-xv6 | 5365a34dc7d755d61d0de9b3f2d5a68d052d57de | [
"MIT-0"
] | null | null | null | user/ls.asm | Pallavi-Pamulapati/Modified-xv6 | 5365a34dc7d755d61d0de9b3f2d5a68d052d57de | [
"MIT-0"
] | null | null | null |
user/_ls: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <fmtname>:
0: 7179 addi sp,sp,-48
2: f406 sd ra,40(sp)
4: f022 sd s0,32(sp)
6: ec26 sd s1,24(sp)
8: e84a sd s2,16(sp)
a: e44e sd s3,8(sp)
c: 1800 addi s0,sp,48
e: 84aa mv s1,a0
10: 00000097 auipc ra,0x0
14: 30c080e7 jalr 780(ra) # 31c <strlen>
18: 02051793 slli a5,a0,0x20
1c: 9381 srli a5,a5,0x20
1e: 97a6 add a5,a5,s1
20: 02f00693 li a3,47
24: 0097e963 bltu a5,s1,36 <fmtname+0x36>
28: 0007c703 lbu a4,0(a5)
2c: 00d70563 beq a4,a3,36 <fmtname+0x36>
30: 17fd addi a5,a5,-1
32: fe97fbe3 bgeu a5,s1,28 <fmtname+0x28>
36: 00178493 addi s1,a5,1
3a: 8526 mv a0,s1
3c: 00000097 auipc ra,0x0
40: 2e0080e7 jalr 736(ra) # 31c <strlen>
44: 2501 sext.w a0,a0
46: 47b5 li a5,13
48: 00a7fa63 bgeu a5,a0,5c <fmtname+0x5c>
4c: 8526 mv a0,s1
4e: 70a2 ld ra,40(sp)
50: 7402 ld s0,32(sp)
52: 64e2 ld s1,24(sp)
54: 6942 ld s2,16(sp)
56: 69a2 ld s3,8(sp)
58: 6145 addi sp,sp,48
5a: 8082 ret
5c: 8526 mv a0,s1
5e: 00000097 auipc ra,0x0
62: 2be080e7 jalr 702(ra) # 31c <strlen>
66: 00001997 auipc s3,0x1
6a: aaa98993 addi s3,s3,-1366 # b10 <buf.1107>
6e: 0005061b sext.w a2,a0
72: 85a6 mv a1,s1
74: 854e mv a0,s3
76: 00000097 auipc ra,0x0
7a: 41e080e7 jalr 1054(ra) # 494 <memmove>
7e: 8526 mv a0,s1
80: 00000097 auipc ra,0x0
84: 29c080e7 jalr 668(ra) # 31c <strlen>
88: 0005091b sext.w s2,a0
8c: 8526 mv a0,s1
8e: 00000097 auipc ra,0x0
92: 28e080e7 jalr 654(ra) # 31c <strlen>
96: 1902 slli s2,s2,0x20
98: 02095913 srli s2,s2,0x20
9c: 4639 li a2,14
9e: 9e09 subw a2,a2,a0
a0: 02000593 li a1,32
a4: 01298533 add a0,s3,s2
a8: 00000097 auipc ra,0x0
ac: 29e080e7 jalr 670(ra) # 346 <memset>
b0: 84ce mv s1,s3
b2: bf69 j 4c <fmtname+0x4c>
00000000000000b4 <ls>:
b4: d9010113 addi sp,sp,-624
b8: 26113423 sd ra,616(sp)
bc: 26813023 sd s0,608(sp)
c0: 24913c23 sd s1,600(sp)
c4: 25213823 sd s2,592(sp)
c8: 25313423 sd s3,584(sp)
cc: 25413023 sd s4,576(sp)
d0: 23513c23 sd s5,568(sp)
d4: 1c80 addi s0,sp,624
d6: 892a mv s2,a0
d8: 4581 li a1,0
da: 00000097 auipc ra,0x0
de: 4b0080e7 jalr 1200(ra) # 58a <open>
e2: 06054f63 bltz a0,160 <ls+0xac>
e6: 84aa mv s1,a0
e8: d9840593 addi a1,s0,-616
ec: 00000097 auipc ra,0x0
f0: 4b6080e7 jalr 1206(ra) # 5a2 <fstat>
f4: 08054163 bltz a0,176 <ls+0xc2>
f8: da041783 lh a5,-608(s0)
fc: 0007869b sext.w a3,a5
100: 4705 li a4,1
102: 08e68a63 beq a3,a4,196 <ls+0xe2>
106: 4709 li a4,2
108: 02e69663 bne a3,a4,134 <ls+0x80>
10c: 854a mv a0,s2
10e: 00000097 auipc ra,0x0
112: ef2080e7 jalr -270(ra) # 0 <fmtname>
116: 85aa mv a1,a0
118: da843703 ld a4,-600(s0)
11c: d9c42683 lw a3,-612(s0)
120: da041603 lh a2,-608(s0)
124: 00001517 auipc a0,0x1
128: 98450513 addi a0,a0,-1660 # aa8 <malloc+0x118>
12c: 00000097 auipc ra,0x0
130: 7a6080e7 jalr 1958(ra) # 8d2 <printf>
134: 8526 mv a0,s1
136: 00000097 auipc ra,0x0
13a: 43c080e7 jalr 1084(ra) # 572 <close>
13e: 26813083 ld ra,616(sp)
142: 26013403 ld s0,608(sp)
146: 25813483 ld s1,600(sp)
14a: 25013903 ld s2,592(sp)
14e: 24813983 ld s3,584(sp)
152: 24013a03 ld s4,576(sp)
156: 23813a83 ld s5,568(sp)
15a: 27010113 addi sp,sp,624
15e: 8082 ret
160: 864a mv a2,s2
162: 00001597 auipc a1,0x1
166: 91658593 addi a1,a1,-1770 # a78 <malloc+0xe8>
16a: 4509 li a0,2
16c: 00000097 auipc ra,0x0
170: 738080e7 jalr 1848(ra) # 8a4 <fprintf>
174: b7e9 j 13e <ls+0x8a>
176: 864a mv a2,s2
178: 00001597 auipc a1,0x1
17c: 91858593 addi a1,a1,-1768 # a90 <malloc+0x100>
180: 4509 li a0,2
182: 00000097 auipc ra,0x0
186: 722080e7 jalr 1826(ra) # 8a4 <fprintf>
18a: 8526 mv a0,s1
18c: 00000097 auipc ra,0x0
190: 3e6080e7 jalr 998(ra) # 572 <close>
194: b76d j 13e <ls+0x8a>
196: 854a mv a0,s2
198: 00000097 auipc ra,0x0
19c: 184080e7 jalr 388(ra) # 31c <strlen>
1a0: 2541 addiw a0,a0,16
1a2: 20000793 li a5,512
1a6: 00a7fb63 bgeu a5,a0,1bc <ls+0x108>
1aa: 00001517 auipc a0,0x1
1ae: 90e50513 addi a0,a0,-1778 # ab8 <malloc+0x128>
1b2: 00000097 auipc ra,0x0
1b6: 720080e7 jalr 1824(ra) # 8d2 <printf>
1ba: bfad j 134 <ls+0x80>
1bc: 85ca mv a1,s2
1be: dc040513 addi a0,s0,-576
1c2: 00000097 auipc ra,0x0
1c6: 112080e7 jalr 274(ra) # 2d4 <strcpy>
1ca: dc040513 addi a0,s0,-576
1ce: 00000097 auipc ra,0x0
1d2: 14e080e7 jalr 334(ra) # 31c <strlen>
1d6: 02051913 slli s2,a0,0x20
1da: 02095913 srli s2,s2,0x20
1de: dc040793 addi a5,s0,-576
1e2: 993e add s2,s2,a5
1e4: 00190993 addi s3,s2,1
1e8: 02f00793 li a5,47
1ec: 00f90023 sb a5,0(s2)
1f0: 00001a17 auipc s4,0x1
1f4: 8e0a0a13 addi s4,s4,-1824 # ad0 <malloc+0x140>
1f8: 00001a97 auipc s5,0x1
1fc: 898a8a93 addi s5,s5,-1896 # a90 <malloc+0x100>
200: a801 j 210 <ls+0x15c>
202: dc040593 addi a1,s0,-576
206: 8556 mv a0,s5
208: 00000097 auipc ra,0x0
20c: 6ca080e7 jalr 1738(ra) # 8d2 <printf>
210: 4641 li a2,16
212: db040593 addi a1,s0,-592
216: 8526 mv a0,s1
218: 00000097 auipc ra,0x0
21c: 34a080e7 jalr 842(ra) # 562 <read>
220: 47c1 li a5,16
222: f0f519e3 bne a0,a5,134 <ls+0x80>
226: db045783 lhu a5,-592(s0)
22a: d3fd beqz a5,210 <ls+0x15c>
22c: 4639 li a2,14
22e: db240593 addi a1,s0,-590
232: 854e mv a0,s3
234: 00000097 auipc ra,0x0
238: 260080e7 jalr 608(ra) # 494 <memmove>
23c: 000907a3 sb zero,15(s2)
240: d9840593 addi a1,s0,-616
244: dc040513 addi a0,s0,-576
248: 00000097 auipc ra,0x0
24c: 1bc080e7 jalr 444(ra) # 404 <stat>
250: fa0549e3 bltz a0,202 <ls+0x14e>
254: dc040513 addi a0,s0,-576
258: 00000097 auipc ra,0x0
25c: da8080e7 jalr -600(ra) # 0 <fmtname>
260: 85aa mv a1,a0
262: da843703 ld a4,-600(s0)
266: d9c42683 lw a3,-612(s0)
26a: da041603 lh a2,-608(s0)
26e: 8552 mv a0,s4
270: 00000097 auipc ra,0x0
274: 662080e7 jalr 1634(ra) # 8d2 <printf>
278: bf61 j 210 <ls+0x15c>
000000000000027a <main>:
27a: 1101 addi sp,sp,-32
27c: ec06 sd ra,24(sp)
27e: e822 sd s0,16(sp)
280: e426 sd s1,8(sp)
282: e04a sd s2,0(sp)
284: 1000 addi s0,sp,32
286: 4785 li a5,1
288: 02a7d963 bge a5,a0,2ba <main+0x40>
28c: 00858493 addi s1,a1,8
290: ffe5091b addiw s2,a0,-2
294: 1902 slli s2,s2,0x20
296: 02095913 srli s2,s2,0x20
29a: 090e slli s2,s2,0x3
29c: 05c1 addi a1,a1,16
29e: 992e add s2,s2,a1
2a0: 6088 ld a0,0(s1)
2a2: 00000097 auipc ra,0x0
2a6: e12080e7 jalr -494(ra) # b4 <ls>
2aa: 04a1 addi s1,s1,8
2ac: ff249ae3 bne s1,s2,2a0 <main+0x26>
2b0: 4501 li a0,0
2b2: 00000097 auipc ra,0x0
2b6: 298080e7 jalr 664(ra) # 54a <exit>
2ba: 00001517 auipc a0,0x1
2be: 82650513 addi a0,a0,-2010 # ae0 <malloc+0x150>
2c2: 00000097 auipc ra,0x0
2c6: df2080e7 jalr -526(ra) # b4 <ls>
2ca: 4501 li a0,0
2cc: 00000097 auipc ra,0x0
2d0: 27e080e7 jalr 638(ra) # 54a <exit>
00000000000002d4 <strcpy>:
2d4: 1141 addi sp,sp,-16
2d6: e422 sd s0,8(sp)
2d8: 0800 addi s0,sp,16
2da: 87aa mv a5,a0
2dc: 0585 addi a1,a1,1
2de: 0785 addi a5,a5,1
2e0: fff5c703 lbu a4,-1(a1)
2e4: fee78fa3 sb a4,-1(a5)
2e8: fb75 bnez a4,2dc <strcpy+0x8>
2ea: 6422 ld s0,8(sp)
2ec: 0141 addi sp,sp,16
2ee: 8082 ret
00000000000002f0 <strcmp>:
2f0: 1141 addi sp,sp,-16
2f2: e422 sd s0,8(sp)
2f4: 0800 addi s0,sp,16
2f6: 00054783 lbu a5,0(a0)
2fa: cb91 beqz a5,30e <strcmp+0x1e>
2fc: 0005c703 lbu a4,0(a1)
300: 00f71763 bne a4,a5,30e <strcmp+0x1e>
304: 0505 addi a0,a0,1
306: 0585 addi a1,a1,1
308: 00054783 lbu a5,0(a0)
30c: fbe5 bnez a5,2fc <strcmp+0xc>
30e: 0005c503 lbu a0,0(a1)
312: 40a7853b subw a0,a5,a0
316: 6422 ld s0,8(sp)
318: 0141 addi sp,sp,16
31a: 8082 ret
000000000000031c <strlen>:
31c: 1141 addi sp,sp,-16
31e: e422 sd s0,8(sp)
320: 0800 addi s0,sp,16
322: 00054783 lbu a5,0(a0)
326: cf91 beqz a5,342 <strlen+0x26>
328: 0505 addi a0,a0,1
32a: 87aa mv a5,a0
32c: 4685 li a3,1
32e: 9e89 subw a3,a3,a0
330: 00f6853b addw a0,a3,a5
334: 0785 addi a5,a5,1
336: fff7c703 lbu a4,-1(a5)
33a: fb7d bnez a4,330 <strlen+0x14>
33c: 6422 ld s0,8(sp)
33e: 0141 addi sp,sp,16
340: 8082 ret
342: 4501 li a0,0
344: bfe5 j 33c <strlen+0x20>
0000000000000346 <memset>:
346: 1141 addi sp,sp,-16
348: e422 sd s0,8(sp)
34a: 0800 addi s0,sp,16
34c: ce09 beqz a2,366 <memset+0x20>
34e: 87aa mv a5,a0
350: fff6071b addiw a4,a2,-1
354: 1702 slli a4,a4,0x20
356: 9301 srli a4,a4,0x20
358: 0705 addi a4,a4,1
35a: 972a add a4,a4,a0
35c: 00b78023 sb a1,0(a5)
360: 0785 addi a5,a5,1
362: fee79de3 bne a5,a4,35c <memset+0x16>
366: 6422 ld s0,8(sp)
368: 0141 addi sp,sp,16
36a: 8082 ret
000000000000036c <strchr>:
36c: 1141 addi sp,sp,-16
36e: e422 sd s0,8(sp)
370: 0800 addi s0,sp,16
372: 00054783 lbu a5,0(a0)
376: cb99 beqz a5,38c <strchr+0x20>
378: 00f58763 beq a1,a5,386 <strchr+0x1a>
37c: 0505 addi a0,a0,1
37e: 00054783 lbu a5,0(a0)
382: fbfd bnez a5,378 <strchr+0xc>
384: 4501 li a0,0
386: 6422 ld s0,8(sp)
388: 0141 addi sp,sp,16
38a: 8082 ret
38c: 4501 li a0,0
38e: bfe5 j 386 <strchr+0x1a>
0000000000000390 <gets>:
390: 711d addi sp,sp,-96
392: ec86 sd ra,88(sp)
394: e8a2 sd s0,80(sp)
396: e4a6 sd s1,72(sp)
398: e0ca sd s2,64(sp)
39a: fc4e sd s3,56(sp)
39c: f852 sd s4,48(sp)
39e: f456 sd s5,40(sp)
3a0: f05a sd s6,32(sp)
3a2: ec5e sd s7,24(sp)
3a4: 1080 addi s0,sp,96
3a6: 8baa mv s7,a0
3a8: 8a2e mv s4,a1
3aa: 892a mv s2,a0
3ac: 4481 li s1,0
3ae: 4aa9 li s5,10
3b0: 4b35 li s6,13
3b2: 89a6 mv s3,s1
3b4: 2485 addiw s1,s1,1
3b6: 0344d863 bge s1,s4,3e6 <gets+0x56>
3ba: 4605 li a2,1
3bc: faf40593 addi a1,s0,-81
3c0: 4501 li a0,0
3c2: 00000097 auipc ra,0x0
3c6: 1a0080e7 jalr 416(ra) # 562 <read>
3ca: 00a05e63 blez a0,3e6 <gets+0x56>
3ce: faf44783 lbu a5,-81(s0)
3d2: 00f90023 sb a5,0(s2)
3d6: 01578763 beq a5,s5,3e4 <gets+0x54>
3da: 0905 addi s2,s2,1
3dc: fd679be3 bne a5,s6,3b2 <gets+0x22>
3e0: 89a6 mv s3,s1
3e2: a011 j 3e6 <gets+0x56>
3e4: 89a6 mv s3,s1
3e6: 99de add s3,s3,s7
3e8: 00098023 sb zero,0(s3)
3ec: 855e mv a0,s7
3ee: 60e6 ld ra,88(sp)
3f0: 6446 ld s0,80(sp)
3f2: 64a6 ld s1,72(sp)
3f4: 6906 ld s2,64(sp)
3f6: 79e2 ld s3,56(sp)
3f8: 7a42 ld s4,48(sp)
3fa: 7aa2 ld s5,40(sp)
3fc: 7b02 ld s6,32(sp)
3fe: 6be2 ld s7,24(sp)
400: 6125 addi sp,sp,96
402: 8082 ret
0000000000000404 <stat>:
404: 1101 addi sp,sp,-32
406: ec06 sd ra,24(sp)
408: e822 sd s0,16(sp)
40a: e426 sd s1,8(sp)
40c: e04a sd s2,0(sp)
40e: 1000 addi s0,sp,32
410: 892e mv s2,a1
412: 4581 li a1,0
414: 00000097 auipc ra,0x0
418: 176080e7 jalr 374(ra) # 58a <open>
41c: 02054563 bltz a0,446 <stat+0x42>
420: 84aa mv s1,a0
422: 85ca mv a1,s2
424: 00000097 auipc ra,0x0
428: 17e080e7 jalr 382(ra) # 5a2 <fstat>
42c: 892a mv s2,a0
42e: 8526 mv a0,s1
430: 00000097 auipc ra,0x0
434: 142080e7 jalr 322(ra) # 572 <close>
438: 854a mv a0,s2
43a: 60e2 ld ra,24(sp)
43c: 6442 ld s0,16(sp)
43e: 64a2 ld s1,8(sp)
440: 6902 ld s2,0(sp)
442: 6105 addi sp,sp,32
444: 8082 ret
446: 597d li s2,-1
448: bfc5 j 438 <stat+0x34>
000000000000044a <atoi>:
44a: 1141 addi sp,sp,-16
44c: e422 sd s0,8(sp)
44e: 0800 addi s0,sp,16
450: 00054603 lbu a2,0(a0)
454: fd06079b addiw a5,a2,-48
458: 0ff7f793 andi a5,a5,255
45c: 4725 li a4,9
45e: 02f76963 bltu a4,a5,490 <atoi+0x46>
462: 86aa mv a3,a0
464: 4501 li a0,0
466: 45a5 li a1,9
468: 0685 addi a3,a3,1
46a: 0025179b slliw a5,a0,0x2
46e: 9fa9 addw a5,a5,a0
470: 0017979b slliw a5,a5,0x1
474: 9fb1 addw a5,a5,a2
476: fd07851b addiw a0,a5,-48
47a: 0006c603 lbu a2,0(a3)
47e: fd06071b addiw a4,a2,-48
482: 0ff77713 andi a4,a4,255
486: fee5f1e3 bgeu a1,a4,468 <atoi+0x1e>
48a: 6422 ld s0,8(sp)
48c: 0141 addi sp,sp,16
48e: 8082 ret
490: 4501 li a0,0
492: bfe5 j 48a <atoi+0x40>
0000000000000494 <memmove>:
494: 1141 addi sp,sp,-16
496: e422 sd s0,8(sp)
498: 0800 addi s0,sp,16
49a: 02b57663 bgeu a0,a1,4c6 <memmove+0x32>
49e: 02c05163 blez a2,4c0 <memmove+0x2c>
4a2: fff6079b addiw a5,a2,-1
4a6: 1782 slli a5,a5,0x20
4a8: 9381 srli a5,a5,0x20
4aa: 0785 addi a5,a5,1
4ac: 97aa add a5,a5,a0
4ae: 872a mv a4,a0
4b0: 0585 addi a1,a1,1
4b2: 0705 addi a4,a4,1
4b4: fff5c683 lbu a3,-1(a1)
4b8: fed70fa3 sb a3,-1(a4)
4bc: fee79ae3 bne a5,a4,4b0 <memmove+0x1c>
4c0: 6422 ld s0,8(sp)
4c2: 0141 addi sp,sp,16
4c4: 8082 ret
4c6: 00c50733 add a4,a0,a2
4ca: 95b2 add a1,a1,a2
4cc: fec05ae3 blez a2,4c0 <memmove+0x2c>
4d0: fff6079b addiw a5,a2,-1
4d4: 1782 slli a5,a5,0x20
4d6: 9381 srli a5,a5,0x20
4d8: fff7c793 not a5,a5
4dc: 97ba add a5,a5,a4
4de: 15fd addi a1,a1,-1
4e0: 177d addi a4,a4,-1
4e2: 0005c683 lbu a3,0(a1)
4e6: 00d70023 sb a3,0(a4)
4ea: fee79ae3 bne a5,a4,4de <memmove+0x4a>
4ee: bfc9 j 4c0 <memmove+0x2c>
00000000000004f0 <memcmp>:
4f0: 1141 addi sp,sp,-16
4f2: e422 sd s0,8(sp)
4f4: 0800 addi s0,sp,16
4f6: ca05 beqz a2,526 <memcmp+0x36>
4f8: fff6069b addiw a3,a2,-1
4fc: 1682 slli a3,a3,0x20
4fe: 9281 srli a3,a3,0x20
500: 0685 addi a3,a3,1
502: 96aa add a3,a3,a0
504: 00054783 lbu a5,0(a0)
508: 0005c703 lbu a4,0(a1)
50c: 00e79863 bne a5,a4,51c <memcmp+0x2c>
510: 0505 addi a0,a0,1
512: 0585 addi a1,a1,1
514: fed518e3 bne a0,a3,504 <memcmp+0x14>
518: 4501 li a0,0
51a: a019 j 520 <memcmp+0x30>
51c: 40e7853b subw a0,a5,a4
520: 6422 ld s0,8(sp)
522: 0141 addi sp,sp,16
524: 8082 ret
526: 4501 li a0,0
528: bfe5 j 520 <memcmp+0x30>
000000000000052a <memcpy>:
52a: 1141 addi sp,sp,-16
52c: e406 sd ra,8(sp)
52e: e022 sd s0,0(sp)
530: 0800 addi s0,sp,16
532: 00000097 auipc ra,0x0
536: f62080e7 jalr -158(ra) # 494 <memmove>
53a: 60a2 ld ra,8(sp)
53c: 6402 ld s0,0(sp)
53e: 0141 addi sp,sp,16
540: 8082 ret
0000000000000542 <fork>:
# generated by usys.pl - do not edit
#include "kernel/syscall.h"
.global fork
fork:
li a7, SYS_fork
542: 4885 li a7,1
ecall
544: 00000073 ecall
ret
548: 8082 ret
000000000000054a <exit>:
.global exit
exit:
li a7, SYS_exit
54a: 4889 li a7,2
ecall
54c: 00000073 ecall
ret
550: 8082 ret
0000000000000552 <wait>:
.global wait
wait:
li a7, SYS_wait
552: 488d li a7,3
ecall
554: 00000073 ecall
ret
558: 8082 ret
000000000000055a <pipe>:
.global pipe
pipe:
li a7, SYS_pipe
55a: 4891 li a7,4
ecall
55c: 00000073 ecall
ret
560: 8082 ret
0000000000000562 <read>:
.global read
read:
li a7, SYS_read
562: 4895 li a7,5
ecall
564: 00000073 ecall
ret
568: 8082 ret
000000000000056a <write>:
.global write
write:
li a7, SYS_write
56a: 48c1 li a7,16
ecall
56c: 00000073 ecall
ret
570: 8082 ret
0000000000000572 <close>:
.global close
close:
li a7, SYS_close
572: 48d5 li a7,21
ecall
574: 00000073 ecall
ret
578: 8082 ret
000000000000057a <kill>:
.global kill
kill:
li a7, SYS_kill
57a: 4899 li a7,6
ecall
57c: 00000073 ecall
ret
580: 8082 ret
0000000000000582 <exec>:
.global exec
exec:
li a7, SYS_exec
582: 489d li a7,7
ecall
584: 00000073 ecall
ret
588: 8082 ret
000000000000058a <open>:
.global open
open:
li a7, SYS_open
58a: 48bd li a7,15
ecall
58c: 00000073 ecall
ret
590: 8082 ret
0000000000000592 <mknod>:
.global mknod
mknod:
li a7, SYS_mknod
592: 48c5 li a7,17
ecall
594: 00000073 ecall
ret
598: 8082 ret
000000000000059a <unlink>:
.global unlink
unlink:
li a7, SYS_unlink
59a: 48c9 li a7,18
ecall
59c: 00000073 ecall
ret
5a0: 8082 ret
00000000000005a2 <fstat>:
.global fstat
fstat:
li a7, SYS_fstat
5a2: 48a1 li a7,8
ecall
5a4: 00000073 ecall
ret
5a8: 8082 ret
00000000000005aa <link>:
.global link
link:
li a7, SYS_link
5aa: 48cd li a7,19
ecall
5ac: 00000073 ecall
ret
5b0: 8082 ret
00000000000005b2 <mkdir>:
.global mkdir
mkdir:
li a7, SYS_mkdir
5b2: 48d1 li a7,20
ecall
5b4: 00000073 ecall
ret
5b8: 8082 ret
00000000000005ba <chdir>:
.global chdir
chdir:
li a7, SYS_chdir
5ba: 48a5 li a7,9
ecall
5bc: 00000073 ecall
ret
5c0: 8082 ret
00000000000005c2 <dup>:
.global dup
dup:
li a7, SYS_dup
5c2: 48a9 li a7,10
ecall
5c4: 00000073 ecall
ret
5c8: 8082 ret
00000000000005ca <getpid>:
.global getpid
getpid:
li a7, SYS_getpid
5ca: 48ad li a7,11
ecall
5cc: 00000073 ecall
ret
5d0: 8082 ret
00000000000005d2 <sbrk>:
.global sbrk
sbrk:
li a7, SYS_sbrk
5d2: 48b1 li a7,12
ecall
5d4: 00000073 ecall
ret
5d8: 8082 ret
00000000000005da <sleep>:
.global sleep
sleep:
li a7, SYS_sleep
5da: 48b5 li a7,13
ecall
5dc: 00000073 ecall
ret
5e0: 8082 ret
00000000000005e2 <uptime>:
.global uptime
uptime:
li a7, SYS_uptime
5e2: 48b9 li a7,14
ecall
5e4: 00000073 ecall
ret
5e8: 8082 ret
00000000000005ea <set_priority>:
.global set_priority
set_priority:
li a7, SYS_set_priority
5ea: 48d9 li a7,22
ecall
5ec: 00000073 ecall
ret
5f0: 8082 ret
00000000000005f2 <trace>:
.global trace
trace:
li a7, SYS_trace
5f2: 48dd li a7,23
ecall
5f4: 00000073 ecall
ret
5f8: 8082 ret
00000000000005fa <putc>:
5fa: 1101 addi sp,sp,-32
5fc: ec06 sd ra,24(sp)
5fe: e822 sd s0,16(sp)
600: 1000 addi s0,sp,32
602: feb407a3 sb a1,-17(s0)
606: 4605 li a2,1
608: fef40593 addi a1,s0,-17
60c: 00000097 auipc ra,0x0
610: f5e080e7 jalr -162(ra) # 56a <write>
614: 60e2 ld ra,24(sp)
616: 6442 ld s0,16(sp)
618: 6105 addi sp,sp,32
61a: 8082 ret
000000000000061c <printint>:
61c: 7139 addi sp,sp,-64
61e: fc06 sd ra,56(sp)
620: f822 sd s0,48(sp)
622: f426 sd s1,40(sp)
624: f04a sd s2,32(sp)
626: ec4e sd s3,24(sp)
628: 0080 addi s0,sp,64
62a: 84aa mv s1,a0
62c: c299 beqz a3,632 <printint+0x16>
62e: 0805c863 bltz a1,6be <printint+0xa2>
632: 2581 sext.w a1,a1
634: 4881 li a7,0
636: fc040693 addi a3,s0,-64
63a: 4701 li a4,0
63c: 2601 sext.w a2,a2
63e: 00000517 auipc a0,0x0
642: 4b250513 addi a0,a0,1202 # af0 <digits>
646: 883a mv a6,a4
648: 2705 addiw a4,a4,1
64a: 02c5f7bb remuw a5,a1,a2
64e: 1782 slli a5,a5,0x20
650: 9381 srli a5,a5,0x20
652: 97aa add a5,a5,a0
654: 0007c783 lbu a5,0(a5)
658: 00f68023 sb a5,0(a3)
65c: 0005879b sext.w a5,a1
660: 02c5d5bb divuw a1,a1,a2
664: 0685 addi a3,a3,1
666: fec7f0e3 bgeu a5,a2,646 <printint+0x2a>
66a: 00088b63 beqz a7,680 <printint+0x64>
66e: fd040793 addi a5,s0,-48
672: 973e add a4,a4,a5
674: 02d00793 li a5,45
678: fef70823 sb a5,-16(a4)
67c: 0028071b addiw a4,a6,2
680: 02e05863 blez a4,6b0 <printint+0x94>
684: fc040793 addi a5,s0,-64
688: 00e78933 add s2,a5,a4
68c: fff78993 addi s3,a5,-1
690: 99ba add s3,s3,a4
692: 377d addiw a4,a4,-1
694: 1702 slli a4,a4,0x20
696: 9301 srli a4,a4,0x20
698: 40e989b3 sub s3,s3,a4
69c: fff94583 lbu a1,-1(s2)
6a0: 8526 mv a0,s1
6a2: 00000097 auipc ra,0x0
6a6: f58080e7 jalr -168(ra) # 5fa <putc>
6aa: 197d addi s2,s2,-1
6ac: ff3918e3 bne s2,s3,69c <printint+0x80>
6b0: 70e2 ld ra,56(sp)
6b2: 7442 ld s0,48(sp)
6b4: 74a2 ld s1,40(sp)
6b6: 7902 ld s2,32(sp)
6b8: 69e2 ld s3,24(sp)
6ba: 6121 addi sp,sp,64
6bc: 8082 ret
6be: 40b005bb negw a1,a1
6c2: 4885 li a7,1
6c4: bf8d j 636 <printint+0x1a>
00000000000006c6 <vprintf>:
6c6: 7119 addi sp,sp,-128
6c8: fc86 sd ra,120(sp)
6ca: f8a2 sd s0,112(sp)
6cc: f4a6 sd s1,104(sp)
6ce: f0ca sd s2,96(sp)
6d0: ecce sd s3,88(sp)
6d2: e8d2 sd s4,80(sp)
6d4: e4d6 sd s5,72(sp)
6d6: e0da sd s6,64(sp)
6d8: fc5e sd s7,56(sp)
6da: f862 sd s8,48(sp)
6dc: f466 sd s9,40(sp)
6de: f06a sd s10,32(sp)
6e0: ec6e sd s11,24(sp)
6e2: 0100 addi s0,sp,128
6e4: 0005c903 lbu s2,0(a1)
6e8: 18090f63 beqz s2,886 <vprintf+0x1c0>
6ec: 8aaa mv s5,a0
6ee: 8b32 mv s6,a2
6f0: 00158493 addi s1,a1,1
6f4: 4981 li s3,0
6f6: 02500a13 li s4,37
6fa: 06400c13 li s8,100
6fe: 06c00c93 li s9,108
702: 07800d13 li s10,120
706: 07000d93 li s11,112
70a: 00000b97 auipc s7,0x0
70e: 3e6b8b93 addi s7,s7,998 # af0 <digits>
712: a839 j 730 <vprintf+0x6a>
714: 85ca mv a1,s2
716: 8556 mv a0,s5
718: 00000097 auipc ra,0x0
71c: ee2080e7 jalr -286(ra) # 5fa <putc>
720: a019 j 726 <vprintf+0x60>
722: 01498f63 beq s3,s4,740 <vprintf+0x7a>
726: 0485 addi s1,s1,1
728: fff4c903 lbu s2,-1(s1)
72c: 14090d63 beqz s2,886 <vprintf+0x1c0>
730: 0009079b sext.w a5,s2
734: fe0997e3 bnez s3,722 <vprintf+0x5c>
738: fd479ee3 bne a5,s4,714 <vprintf+0x4e>
73c: 89be mv s3,a5
73e: b7e5 j 726 <vprintf+0x60>
740: 05878063 beq a5,s8,780 <vprintf+0xba>
744: 05978c63 beq a5,s9,79c <vprintf+0xd6>
748: 07a78863 beq a5,s10,7b8 <vprintf+0xf2>
74c: 09b78463 beq a5,s11,7d4 <vprintf+0x10e>
750: 07300713 li a4,115
754: 0ce78663 beq a5,a4,820 <vprintf+0x15a>
758: 06300713 li a4,99
75c: 0ee78e63 beq a5,a4,858 <vprintf+0x192>
760: 11478863 beq a5,s4,870 <vprintf+0x1aa>
764: 85d2 mv a1,s4
766: 8556 mv a0,s5
768: 00000097 auipc ra,0x0
76c: e92080e7 jalr -366(ra) # 5fa <putc>
770: 85ca mv a1,s2
772: 8556 mv a0,s5
774: 00000097 auipc ra,0x0
778: e86080e7 jalr -378(ra) # 5fa <putc>
77c: 4981 li s3,0
77e: b765 j 726 <vprintf+0x60>
780: 008b0913 addi s2,s6,8
784: 4685 li a3,1
786: 4629 li a2,10
788: 000b2583 lw a1,0(s6)
78c: 8556 mv a0,s5
78e: 00000097 auipc ra,0x0
792: e8e080e7 jalr -370(ra) # 61c <printint>
796: 8b4a mv s6,s2
798: 4981 li s3,0
79a: b771 j 726 <vprintf+0x60>
79c: 008b0913 addi s2,s6,8
7a0: 4681 li a3,0
7a2: 4629 li a2,10
7a4: 000b2583 lw a1,0(s6)
7a8: 8556 mv a0,s5
7aa: 00000097 auipc ra,0x0
7ae: e72080e7 jalr -398(ra) # 61c <printint>
7b2: 8b4a mv s6,s2
7b4: 4981 li s3,0
7b6: bf85 j 726 <vprintf+0x60>
7b8: 008b0913 addi s2,s6,8
7bc: 4681 li a3,0
7be: 4641 li a2,16
7c0: 000b2583 lw a1,0(s6)
7c4: 8556 mv a0,s5
7c6: 00000097 auipc ra,0x0
7ca: e56080e7 jalr -426(ra) # 61c <printint>
7ce: 8b4a mv s6,s2
7d0: 4981 li s3,0
7d2: bf91 j 726 <vprintf+0x60>
7d4: 008b0793 addi a5,s6,8
7d8: f8f43423 sd a5,-120(s0)
7dc: 000b3983 ld s3,0(s6)
7e0: 03000593 li a1,48
7e4: 8556 mv a0,s5
7e6: 00000097 auipc ra,0x0
7ea: e14080e7 jalr -492(ra) # 5fa <putc>
7ee: 85ea mv a1,s10
7f0: 8556 mv a0,s5
7f2: 00000097 auipc ra,0x0
7f6: e08080e7 jalr -504(ra) # 5fa <putc>
7fa: 4941 li s2,16
7fc: 03c9d793 srli a5,s3,0x3c
800: 97de add a5,a5,s7
802: 0007c583 lbu a1,0(a5)
806: 8556 mv a0,s5
808: 00000097 auipc ra,0x0
80c: df2080e7 jalr -526(ra) # 5fa <putc>
810: 0992 slli s3,s3,0x4
812: 397d addiw s2,s2,-1
814: fe0914e3 bnez s2,7fc <vprintf+0x136>
818: f8843b03 ld s6,-120(s0)
81c: 4981 li s3,0
81e: b721 j 726 <vprintf+0x60>
820: 008b0993 addi s3,s6,8
824: 000b3903 ld s2,0(s6)
828: 02090163 beqz s2,84a <vprintf+0x184>
82c: 00094583 lbu a1,0(s2)
830: c9a1 beqz a1,880 <vprintf+0x1ba>
832: 8556 mv a0,s5
834: 00000097 auipc ra,0x0
838: dc6080e7 jalr -570(ra) # 5fa <putc>
83c: 0905 addi s2,s2,1
83e: 00094583 lbu a1,0(s2)
842: f9e5 bnez a1,832 <vprintf+0x16c>
844: 8b4e mv s6,s3
846: 4981 li s3,0
848: bdf9 j 726 <vprintf+0x60>
84a: 00000917 auipc s2,0x0
84e: 29e90913 addi s2,s2,670 # ae8 <malloc+0x158>
852: 02800593 li a1,40
856: bff1 j 832 <vprintf+0x16c>
858: 008b0913 addi s2,s6,8
85c: 000b4583 lbu a1,0(s6)
860: 8556 mv a0,s5
862: 00000097 auipc ra,0x0
866: d98080e7 jalr -616(ra) # 5fa <putc>
86a: 8b4a mv s6,s2
86c: 4981 li s3,0
86e: bd65 j 726 <vprintf+0x60>
870: 85d2 mv a1,s4
872: 8556 mv a0,s5
874: 00000097 auipc ra,0x0
878: d86080e7 jalr -634(ra) # 5fa <putc>
87c: 4981 li s3,0
87e: b565 j 726 <vprintf+0x60>
880: 8b4e mv s6,s3
882: 4981 li s3,0
884: b54d j 726 <vprintf+0x60>
886: 70e6 ld ra,120(sp)
888: 7446 ld s0,112(sp)
88a: 74a6 ld s1,104(sp)
88c: 7906 ld s2,96(sp)
88e: 69e6 ld s3,88(sp)
890: 6a46 ld s4,80(sp)
892: 6aa6 ld s5,72(sp)
894: 6b06 ld s6,64(sp)
896: 7be2 ld s7,56(sp)
898: 7c42 ld s8,48(sp)
89a: 7ca2 ld s9,40(sp)
89c: 7d02 ld s10,32(sp)
89e: 6de2 ld s11,24(sp)
8a0: 6109 addi sp,sp,128
8a2: 8082 ret
00000000000008a4 <fprintf>:
8a4: 715d addi sp,sp,-80
8a6: ec06 sd ra,24(sp)
8a8: e822 sd s0,16(sp)
8aa: 1000 addi s0,sp,32
8ac: e010 sd a2,0(s0)
8ae: e414 sd a3,8(s0)
8b0: e818 sd a4,16(s0)
8b2: ec1c sd a5,24(s0)
8b4: 03043023 sd a6,32(s0)
8b8: 03143423 sd a7,40(s0)
8bc: fe843423 sd s0,-24(s0)
8c0: 8622 mv a2,s0
8c2: 00000097 auipc ra,0x0
8c6: e04080e7 jalr -508(ra) # 6c6 <vprintf>
8ca: 60e2 ld ra,24(sp)
8cc: 6442 ld s0,16(sp)
8ce: 6161 addi sp,sp,80
8d0: 8082 ret
00000000000008d2 <printf>:
8d2: 711d addi sp,sp,-96
8d4: ec06 sd ra,24(sp)
8d6: e822 sd s0,16(sp)
8d8: 1000 addi s0,sp,32
8da: e40c sd a1,8(s0)
8dc: e810 sd a2,16(s0)
8de: ec14 sd a3,24(s0)
8e0: f018 sd a4,32(s0)
8e2: f41c sd a5,40(s0)
8e4: 03043823 sd a6,48(s0)
8e8: 03143c23 sd a7,56(s0)
8ec: 00840613 addi a2,s0,8
8f0: fec43423 sd a2,-24(s0)
8f4: 85aa mv a1,a0
8f6: 4505 li a0,1
8f8: 00000097 auipc ra,0x0
8fc: dce080e7 jalr -562(ra) # 6c6 <vprintf>
900: 60e2 ld ra,24(sp)
902: 6442 ld s0,16(sp)
904: 6125 addi sp,sp,96
906: 8082 ret
0000000000000908 <free>:
908: 1141 addi sp,sp,-16
90a: e422 sd s0,8(sp)
90c: 0800 addi s0,sp,16
90e: ff050693 addi a3,a0,-16
912: 00000797 auipc a5,0x0
916: 1f67b783 ld a5,502(a5) # b08 <freep>
91a: a805 j 94a <free+0x42>
91c: 4618 lw a4,8(a2)
91e: 9db9 addw a1,a1,a4
920: feb52c23 sw a1,-8(a0)
924: 6398 ld a4,0(a5)
926: 6318 ld a4,0(a4)
928: fee53823 sd a4,-16(a0)
92c: a091 j 970 <free+0x68>
92e: ff852703 lw a4,-8(a0)
932: 9e39 addw a2,a2,a4
934: c790 sw a2,8(a5)
936: ff053703 ld a4,-16(a0)
93a: e398 sd a4,0(a5)
93c: a099 j 982 <free+0x7a>
93e: 6398 ld a4,0(a5)
940: 00e7e463 bltu a5,a4,948 <free+0x40>
944: 00e6ea63 bltu a3,a4,958 <free+0x50>
948: 87ba mv a5,a4
94a: fed7fae3 bgeu a5,a3,93e <free+0x36>
94e: 6398 ld a4,0(a5)
950: 00e6e463 bltu a3,a4,958 <free+0x50>
954: fee7eae3 bltu a5,a4,948 <free+0x40>
958: ff852583 lw a1,-8(a0)
95c: 6390 ld a2,0(a5)
95e: 02059713 slli a4,a1,0x20
962: 9301 srli a4,a4,0x20
964: 0712 slli a4,a4,0x4
966: 9736 add a4,a4,a3
968: fae60ae3 beq a2,a4,91c <free+0x14>
96c: fec53823 sd a2,-16(a0)
970: 4790 lw a2,8(a5)
972: 02061713 slli a4,a2,0x20
976: 9301 srli a4,a4,0x20
978: 0712 slli a4,a4,0x4
97a: 973e add a4,a4,a5
97c: fae689e3 beq a3,a4,92e <free+0x26>
980: e394 sd a3,0(a5)
982: 00000717 auipc a4,0x0
986: 18f73323 sd a5,390(a4) # b08 <freep>
98a: 6422 ld s0,8(sp)
98c: 0141 addi sp,sp,16
98e: 8082 ret
0000000000000990 <malloc>:
990: 7139 addi sp,sp,-64
992: fc06 sd ra,56(sp)
994: f822 sd s0,48(sp)
996: f426 sd s1,40(sp)
998: f04a sd s2,32(sp)
99a: ec4e sd s3,24(sp)
99c: e852 sd s4,16(sp)
99e: e456 sd s5,8(sp)
9a0: e05a sd s6,0(sp)
9a2: 0080 addi s0,sp,64
9a4: 02051493 slli s1,a0,0x20
9a8: 9081 srli s1,s1,0x20
9aa: 04bd addi s1,s1,15
9ac: 8091 srli s1,s1,0x4
9ae: 0014899b addiw s3,s1,1
9b2: 0485 addi s1,s1,1
9b4: 00000517 auipc a0,0x0
9b8: 15453503 ld a0,340(a0) # b08 <freep>
9bc: c515 beqz a0,9e8 <malloc+0x58>
9be: 611c ld a5,0(a0)
9c0: 4798 lw a4,8(a5)
9c2: 02977f63 bgeu a4,s1,a00 <malloc+0x70>
9c6: 8a4e mv s4,s3
9c8: 0009871b sext.w a4,s3
9cc: 6685 lui a3,0x1
9ce: 00d77363 bgeu a4,a3,9d4 <malloc+0x44>
9d2: 6a05 lui s4,0x1
9d4: 000a0b1b sext.w s6,s4
9d8: 004a1a1b slliw s4,s4,0x4
9dc: 00000917 auipc s2,0x0
9e0: 12c90913 addi s2,s2,300 # b08 <freep>
9e4: 5afd li s5,-1
9e6: a88d j a58 <malloc+0xc8>
9e8: 00000797 auipc a5,0x0
9ec: 13878793 addi a5,a5,312 # b20 <base>
9f0: 00000717 auipc a4,0x0
9f4: 10f73c23 sd a5,280(a4) # b08 <freep>
9f8: e39c sd a5,0(a5)
9fa: 0007a423 sw zero,8(a5)
9fe: b7e1 j 9c6 <malloc+0x36>
a00: 02e48b63 beq s1,a4,a36 <malloc+0xa6>
a04: 4137073b subw a4,a4,s3
a08: c798 sw a4,8(a5)
a0a: 1702 slli a4,a4,0x20
a0c: 9301 srli a4,a4,0x20
a0e: 0712 slli a4,a4,0x4
a10: 97ba add a5,a5,a4
a12: 0137a423 sw s3,8(a5)
a16: 00000717 auipc a4,0x0
a1a: 0ea73923 sd a0,242(a4) # b08 <freep>
a1e: 01078513 addi a0,a5,16
a22: 70e2 ld ra,56(sp)
a24: 7442 ld s0,48(sp)
a26: 74a2 ld s1,40(sp)
a28: 7902 ld s2,32(sp)
a2a: 69e2 ld s3,24(sp)
a2c: 6a42 ld s4,16(sp)
a2e: 6aa2 ld s5,8(sp)
a30: 6b02 ld s6,0(sp)
a32: 6121 addi sp,sp,64
a34: 8082 ret
a36: 6398 ld a4,0(a5)
a38: e118 sd a4,0(a0)
a3a: bff1 j a16 <malloc+0x86>
a3c: 01652423 sw s6,8(a0)
a40: 0541 addi a0,a0,16
a42: 00000097 auipc ra,0x0
a46: ec6080e7 jalr -314(ra) # 908 <free>
a4a: 00093503 ld a0,0(s2)
a4e: d971 beqz a0,a22 <malloc+0x92>
a50: 611c ld a5,0(a0)
a52: 4798 lw a4,8(a5)
a54: fa9776e3 bgeu a4,s1,a00 <malloc+0x70>
a58: 00093703 ld a4,0(s2)
a5c: 853e mv a0,a5
a5e: fef719e3 bne a4,a5,a50 <malloc+0xc0>
a62: 8552 mv a0,s4
a64: 00000097 auipc ra,0x0
a68: b6e080e7 jalr -1170(ra) # 5d2 <sbrk>
a6c: fd5518e3 bne a0,s5,a3c <malloc+0xac>
a70: 4501 li a0,0
a72: bf45 j a22 <malloc+0x92>
| 35.448873 | 62 | 0.470348 |
ed351656d8114db58dd277ee2530208c2900ceed | 219 | asm | Assembly | libsrc/_DEVELOPMENT/target/zx/driver/terminal/zx_01_output_fzx_tty_z88dk/zx_01_output_fzx_tty_z88dk_29_right.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/target/zx/driver/terminal/zx_01_output_fzx_tty_z88dk/zx_01_output_fzx_tty_z88dk_29_right.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/target/zx/driver/terminal/zx_01_output_fzx_tty_z88dk/zx_01_output_fzx_tty_z88dk_29_right.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC zx_01_output_fzx_tty_z88dk_29_right
EXTERN zx_01_output_fzx_proc_move_right
defc zx_01_output_fzx_tty_z88dk_29_right = zx_01_output_fzx_proc_move_right
| 21.9 | 75 | 0.922374 |
1ace8f2cadbe66dac65f91fb7857c553e8f879ed | 8,253 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1568.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1568.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1568.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 %r9
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x19f71, %rbp
nop
nop
nop
nop
nop
and $60096, %rdx
mov $0x6162636465666768, %r11
movq %r11, %xmm2
vmovups %ymm2, (%rbp)
nop
nop
nop
nop
nop
add $24680, %r9
lea addresses_D_ht+0x393e, %r9
sub %rdi, %rdi
movb (%r9), %r10b
dec %r10
lea addresses_normal_ht+0xde26, %r11
nop
nop
nop
nop
nop
add $40973, %rsi
movl $0x61626364, (%r11)
nop
nop
nop
inc %r9
lea addresses_D_ht+0x781e, %rsi
nop
nop
nop
add %rbp, %rbp
movb (%rsi), %dl
nop
nop
nop
and $15383, %r10
lea addresses_D_ht+0x5a42, %rdx
nop
nop
nop
nop
nop
xor $53429, %r11
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
vmovups %ymm6, (%rdx)
nop
nop
nop
nop
add %r9, %r9
lea addresses_normal_ht+0x19c63, %rsi
lea addresses_UC_ht+0x1b71e, %rdi
nop
nop
nop
nop
nop
and %rdx, %rdx
mov $21, %rcx
rep movsb
nop
nop
nop
nop
nop
add $59629, %rdi
lea addresses_WT_ht+0x12f9e, %rbp
nop
nop
xor $21360, %rdi
mov $0x6162636465666768, %r9
movq %r9, %xmm4
vmovups %ymm4, (%rbp)
nop
nop
nop
xor %rcx, %rcx
lea addresses_WC_ht+0x1981e, %rdx
nop
nop
nop
nop
nop
add $57153, %rbp
and $0xffffffffffffffc0, %rdx
vmovaps (%rdx), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %rsi
nop
nop
nop
nop
nop
xor %r11, %r11
lea addresses_normal_ht+0x1061e, %rsi
lea addresses_WC_ht+0xef9e, %rdi
nop
dec %r10
mov $124, %rcx
rep movsb
nop
nop
sub %rdx, %rdx
lea addresses_A_ht+0x19c1e, %r11
xor $63990, %rsi
movb $0x61, (%r11)
sub %r9, %r9
lea addresses_normal_ht+0x11e1e, %rsi
lea addresses_WT_ht+0x1301e, %rdi
nop
nop
nop
nop
xor $12905, %rbp
mov $90, %rcx
rep movsq
nop
sub %rdx, %rdx
lea addresses_A_ht+0x801e, %rdi
nop
nop
nop
nop
cmp $47150, %rdx
movups (%rdi), %xmm2
vpextrq $0, %xmm2, %r9
sub %rdx, %rdx
lea addresses_WT_ht+0xcf8a, %rsi
lea addresses_WC_ht+0x951e, %rdi
nop
nop
add $25675, %r9
mov $106, %rcx
rep movsl
nop
nop
nop
nop
nop
add $36863, %rbp
lea addresses_WT_ht+0x1781e, %rsi
lea addresses_A_ht+0x19352, %rdi
sub %r11, %r11
mov $119, %rcx
rep movsw
nop
lfence
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r15
push %rbp
push %rcx
// Store
mov $0x25ce20000000e1e, %rcx
add %r12, %r12
mov $0x5152535455565758, %r11
movq %r11, (%rcx)
nop
nop
nop
nop
cmp %r12, %r12
// Store
lea addresses_UC+0xcb5e, %r15
nop
nop
nop
nop
sub $56809, %rcx
mov $0x5152535455565758, %r12
movq %r12, %xmm3
movups %xmm3, (%r15)
nop
nop
nop
dec %r12
// Faulty Load
lea addresses_D+0xd01e, %rbp
nop
nop
nop
inc %r10
vmovups (%rbp), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %r11
lea oracles, %rcx
and $0xff, %r11
shlq $12, %r11
mov (%rcx,%r11,1), %r11
pop %rcx
pop %rbp
pop %r15
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_UC', 'AVXalign': False, 'size': 16}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 7, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 32}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1}}
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_WC_ht'}}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_A_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
*/
| 32.11284 | 2,999 | 0.659639 |
18acff6bf19b129f9f612a3adf2847c36611d028 | 132,423 | asm | Assembly | Appl/Bindery/Article/articleArticle.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/Bindery/Article/articleArticle.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/Bindery/Article/articleArticle.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-1994 -- All Rights Reserved
PROJECT: GEOS
MODULE: Studio
FILE: articleArticle.asm
ROUTINES:
Name Description
---- -----------
INT GetRegionPos Get the position of a region
INT AppendDeleteCommon Add another region to an article
INT ToAttrMgrCommon Substitute a text attribute token
METHODS:
Name Description
---- -----------
StudioArticleReplaceParams Filter replace operations to prevent
page name chacters from being replaced.
MSG_VIS_TEXT_FILTER_VIA_REPLACE_PARAMS
StudioArticleClass
StudioArticleSetDisplayMode Handle change of display mode
MSG_VIS_LARGE_TEXT_SET_DISPLAY_MODE
StudioArticleClass
StudioArticleCurrentRegionChanged
Generate additional notifications for the
article
MSG_VIS_LARGE_TEXT_CURRENT_REGION_CHANGED
StudioArticleClass
StudioArticleRegionIsLast Handle notification that a region is the
last region
MSG_VIS_LARGE_TEXT_REGION_IS_LAST
StudioArticleClass
StudioArticleAppendRegion Add another region to an article
MSG_VIS_LARGE_TEXT_APPEND_REGION
StudioArticleClass
StudioArticleSubstAttrToken Substitute a text attribute token
MSG_VIS_TEXT_SUBST_ATTR_TOKEN
StudioArticleClass
StudioArticleRecalcForAttrChange
Recalculate for an attribute change
MSG_VIS_TEXT_RECALC_FOR_ATTR_CHANGE
StudioArticleClass
StudioArticleGetObjectForSearchSpell
Get the next object for search/spell
MSG_META_GET_OBJECT_FOR_SEARCH_SPELL
StudioArticleClass
StudioArticleSetVisParent Set the vis parent for an article
MSG_STUDIO_ARTICLE_SET_VIS_PARENT
StudioArticleClass
StudioArticleDisplayObjectForSearchSpell
Display the object
MSG_META_DISPLAY_OBJECT_FOR_SEARCH_SPELL
StudioArticleClass
StudioArticleCrossSectionReplaceAborted
Notification that a cross section change
has been aborted
MSG_VIS_TEXT_CROSS_SECTION_REPLACE_ABORTED
StudioArticleClass
StudioArticleSetHyperlinkTextStyle
Tell the document to remember the
new ShowAllHyperlinks setting.
MSG_VIS_TEXT_SET_HYPERLINK_TEXT_STYLE
StudioArticleClass
StudioArticleDescribeAttrs Check for indeterminate style and set
global flag.
MSG_META_STYLED_OBJECT_DESCRIBE_ATTRS
StudioArticleClass
StudioArticleDefineStyle
Check for indeterminate style and for the
Boxed char attribute.
MSG_META_STYLED_OBJECT_DEFINE_STYLE
MSG_META_STYLED_OBJECT_REDEFINE_STYLE
StudioArticleClass
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 3/92 Initial version
DESCRIPTION:
This file contains the code for StudioArticleClass.
$Id: articleArticle.asm,v 1.1 97/04/04 14:38:31 newdeal Exp $
------------------------------------------------------------------------------@
idata segment
StudioArticleClass
styleIndeterminate BooleanByte BB_FALSE
; styleIndeterminate is BB_FALSE if the described style
; is NOT indeterminate. styleIndeterminate MUST be initialized
; to BB_FALSE.
idata ends
DocNotify segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleReplaceWithTransferFormat
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Fixup pasted page name chars.
CALLED BY: MSG_VIS_TEXT_REPLACE_WITH_TEXT_TRANSFER_FORMAT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
ss:bp - CommonTransferParams
RETURN: bp - unchanged
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 12/ 2/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleReplaceWithTransferFormat method dynamic StudioArticleClass,
MSG_VIS_TEXT_REPLACE_WITH_TEXT_TRANSFER_FORMAT
mov di, bp ; ss:di <- CommonTransferParams
uses bp
params local EnumPageNameGraphicsLocals
.enter
;
; Suspend the text, because if it tries to draw a page name
; before the tokens have been updated, it could crash.
;
call SuspendObject
;
; Make a note of the text object optr
;
mov ax, ds:[LMBH_handle]
movdw ss:[params].EPNGL_textObj, axsi
push bp ; save locals
;
; Lock the transfer block header, get the HugeArray block
; containing the text, and get the number of chars being pasted.
;
push di, es
mov bx, ss:[di].CTP_vmFile
mov ax, ss:[di].CTP_vmBlock
call VMLock
mov es, ax
mov di, es:[TTBH_text].high ;^vbx:di <- text
call VMUnlock
call HugeArrayGetCount
pop bp, es
;
; Go ahead and paste the text
;
pushdw dxax
mov ax, MSG_VIS_TEXT_REPLACE_WITH_TEXT_TRANSFER_FORMAT
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
;
; Now find out what the selection is, we will use the range end
; as the end position of the fixup range.
;
sub sp, size VisTextRange
mov bp, sp
mov dx, ss
mov ax, MSG_VIS_TEXT_GET_SELECTION_RANGE
call ObjCallInstanceNoLock
movdw cxbx, ss:[bp].VTR_end
add sp, size VisTextRange
;
; Calculate the end range by adding the number of chars
; that were pasted, less the NULL.
;
popdw dxax ;get the #chars being pasted
tstdw dxax
pop bp ; restore locals
jz noText
decdw dxax ;subtract the NULL
pushdw cxbx ;save the range end
subdw cxbx, dxax ;subtract #chars pasted
movdw dxax, cxbx ;dx.ax <- range start
popdw cxbx ;cx.bx <- range end
push dx, ax, cx, bx
;
; Make each page name graphic unique.
;
mov di, offset FixupPageNameGraphic
call EnumPageNameGraphics
;
; If we've pasted text containing a context run but no graphic,
; the hyperlink controller will confusingly show the associated
; page name in black. We avoid this by clearing the context over
; the whole pasted range, then going through the page name
; graphics and setting the context appropriately.
;
mov di, bx ; di <- range end
mov bx, ss:[params].EPNGL_textObj.handle
call MemDerefDS ; ds:si <- text object
mov bx, di ; bx <- range end
mov di, CA_NULL_ELEMENT
call SetContextCallSuperNoLock
clrdw ss:[params].EPNGL_count
mov di, offset SetStoredContextOnPageNameGraphic
call EnumPageNameGraphics
;
; Store the number of contexts set in vardata so as to tell
; StudioArticleSetContext to just pass the context-setting
; message to its superclass.
;
tstdw ss:params.EPNGL_count
jz setHyperlinkStyle
mov cx, size dword
mov ax, ATTR_SA_SET_STORED_CONTEXT_COUNT
call ObjVarAddData ;ds:bx - ptr to count
movdw dxax, ss:params.EPNGL_count
movdw ds:[bx], dxax
setHyperlinkStyle:
;
; Update the pasted text to have the same hyperlink style
; as is set in this Article.
;
movdw bxsi, ss:[params].EPNGL_textObj
call MemDerefDS
pop dx, ax, cx, bx ; restore range
call SetHyperlinkStyleOnPastedText
noText:
call UnsuspendObject
.leave
ret
StudioArticleReplaceWithTransferFormat endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetStoredContextOnPageNameGraphic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the context on a PNG using the token stored in it.
CALLED BY: INTERNAL StudioArticleReplaceWithTransferFormat
(via EnumPageNameGraphic)
PASS: ds:si = graphic TextRunArrayElement
es = segment of graphic element array
ss:bp = optr of text object
RETURN: nothing
DESTROYED: ax, bx, cx, dx, di, si, ds
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/12/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetStoredContextOnPageNameGraphic proc near
.enter inherit StudioArticleReplaceWithTransferFormat
;
; First get the token for the context which should be set on
; this graphic.
;
pushdw dssi
mov ax, ds:[si].TRAE_token
segmov ds, es
mov si, VM_ELEMENT_ARRAY_CHUNK
call ChunkArrayElementToPtr ; ds:di <- graphic
mov di,
{word} ds:[di].VTG_data.VTGD_variable.VTGV_privateData[2]
popdw dssi
;
; Now get the graphic's position and set the context. Do this
; on the queue since the article is currently suspended, so the
; text hasn't been recalculated since the paste.
;
clr dh
mov dl, ds:[si].TRAE_position.WAAH_high
mov ax, ds:[si].TRAE_position.WAAH_low
movdw bxsi, ss:[params].EPNGL_textObj
call MemDerefDS ; ds:si <- text object
movdw cxbx, dxax
incdw cxbx
call SetContextQueue
incdw ss:[params].EPNGL_count
;
; Keep enumerating.
;
clc
.leave
ret
SetStoredContextOnPageNameGraphic endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FixupPageNameGraphic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Fixup stored page name token in pasted page name graphics
CALLED BY: StudioArticleReplaceWithTransferFormat, via
EnumPageNameGraphics
PASS: ds:si - graphic TextRunArrayElement
ss:bp = inherited EnumPageNameGraphicLocals
bx - stored name token
es - segment of graphic element array
RETURN:
DESTROYED: ax, bx, cx, dx, si, di, es
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 12/ 2/94 Initial version
jenny 12/ 9/94 Store a unique ID in the privateData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTypeParams struct
GTP_params VisTextGetAttrParams
GTP_attrs VisTextType
GTP_diffs VisTextTypeDiffs
GetTypeParams ends
FixupPageNameGraphic proc near
uses ds, bp
.enter inherit StudioArticleReplaceWithTransferFormat
;
; Get the position of this graphic
;
clr dh
mov dl, ds:[si].TRAE_position.WAAH_high
mov ax, ds:[si].TRAE_position.WAAH_low
push ds:[si].TRAE_token ;save graphic token
movdw bxsi, ss:[params].EPNGL_textObj
push bp ; save ptr into stack
;
; Get the type run on this graphic character
;
sub sp, size GetTypeParams
mov bp, sp
movdw ss:[bp].VTGAP_range.VTR_start, dxax
incdw dxax
movdw ss:[bp].VTGAP_range.VTR_end, dxax
mov ax, ss
lea dx, ss:[bp].GTP_attrs
movdw ss:[bp].VTGAP_attr, axdx
lea dx, ss:[bp].GTP_diffs
movdw ss:[bp].VTGAP_return, axdx
clr ss:[bp].VTGAP_flags
mov ax, MSG_VIS_TEXT_GET_TYPE
mov di, mask MF_CALL
call ObjMessage
;
; Get the context token that is set on this character, and
; check if it is different from that which is stored in the
; graphic's variable data (it was passed in bx)
;
EC < test ss:[bp].GTP_diffs, mask VTTD_MULTIPLE_CONTEXTS >
EC < ERROR_NZ -1 >
mov bx, ss:[bp].GTP_attrs.VTT_context
EC < cmp bx, CA_NULL_ELEMENT >
EC < ERROR_E -1 >
add sp, size GetTypeParams
pop bp ;ss:bp <- text optr
pop ax ;restore graphic token
;
; The name token has changed. Update the value stored in
; the page name graphic variable data.
;
segmov ds, es, si
mov si, VM_ELEMENT_ARRAY_CHUNK
call ChunkArrayElementToPtr ; ds:di - graphic
EC < cmp ds:[di].VTG_type, VTGT_VARIABLE >
EC < ERROR_NE -1 >
EC < cmp ds:[di].VTG_data.VTGD_variable.VTGV_type, VTVT_CONTEXT_NAME >
EC < ERROR_NE -1 >
;
; Store the name token in the graphic's privateData.
;
mov {word} \
ds:[di].VTG_data.VTGD_variable.VTGV_privateData[2], bx
;
; Now get the fileID and unique page name graphic ID and store
; them in the privateData too.
;
push ds
movdw bxsi, ss:[params].EPNGL_textObj
call MemDerefDS
call GetWholePageNameGraphicID ; dx:ax <- FileID
; cx <- ID unique
; within file
pop ds
mov {word} \
ds:[di].VTG_data.VTGD_variable.VTGV_privateData[4], dx
mov {word} \
ds:[di].VTG_data.VTGD_variable.VTGV_privateData[6], ax
mov {word} \
ds:[di].VTG_data.VTGD_variable.VTGV_privateData[8], cx
call VMDirtyDS
clc
.leave
ret
FixupPageNameGraphic endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetHyperlinkStyleOnPastedText
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Remove the Boxed char attr and set the hyperlink style
on the passed range of text.
CALLED BY: (INTERNAL) StudioArticleReplaceWithTransferFormat
PASS: *ds:si - article
dx:ax - start pos
cx:bx - end pos
RETURN: nothing
DESTROYED: ax, bx, cx, dx, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 12/ 3/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetHyperlinkStyleOnPastedText proc near
uses bp
.enter
;
; Set up VisTextRange with the passed positions.
;
pushdw cxbx
pushdw dxax
mov bp, sp ;ss:bp <- VisTextRange
;
; Don't want article to draw itself until after the
; style change has completed.
;
; Can't do this without causing a crash when QuickCopy between two
; files. When suspend count reaches 0 (which is in UPATE_HYPERLINK
; handler if object is suspended here and unsuspended there),
; undo chain is ended and undo chain start count would go to 0.
; The problem is that UPDATE_HYPERLINK is received after the
; document loses the model exclusive, and at that point it calls
; MSG_GEN_PROCESS_UNDO_SET_CONTEXT, which expects the start count
; to be zero. -- cassie 12/12/94
;
;; call SuspendObject
;
; Queue this message, as it must be handled after
; MSG_HSTEXT_UPDATE_HOT_SPOT_ARRAY which gets sent during
; the text replace. Updating the hyperlink style causes
; MSG_VIS_TEXT_ATTRIBUTE_CHANGE to be sent, which the HotSpot
; library intercepts as a sign that it might need to move some
; hotspots, eg. if justification changed. If hotspots are moved
; before the hotspot array has been updated, it will be out of synch.
;
mov ax, MSG_STUDIO_ARTICLE_UPDATE_HYPERLINK_STYLE_FOR_PASTE
mov dx, size VisTextRange
call SA_ObjMessageQueueStackDS
add sp, size VisTextRange
.leave
ret
SetHyperlinkStyleOnPastedText endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleUpdateHyperlinkStyleForPaste
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Some text has been pasted. Need to update the hyperlink
style on the updated text to agree with the state of the
Show All Hyperlinks button.
CALLED BY: MSG_STUDIO_ARTICLE_UPDATE_HYPERLINK_STYLE_FOR_PASTE
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
ss:bp - VisTextRange
article is suspended
RETURN: nothing, but unsuspend the article
DESTROYED: ax, cx, dx, bp
bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
unsuspends the article
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 12/11/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleUpdateHyperlinkStyleForPaste method dynamic StudioArticleClass,
MSG_STUDIO_ARTICLE_UPDATE_HYPERLINK_STYLE_FOR_PASTE
;
; Since object can't be suspended by SetHyperlinkStyleOnPastedText,
; we do it here. Unfortunately, this means that the text is
; visible after it is pasted but before the hyperlink style is set.
;
call SuspendObject
mov di, bp
;
; Start setting up the VisTextSetTextStyleParams
;
sub sp, (size VisTextSetTextStyleParams)
mov bp, sp ; ss:bp <- params
movdw ss:[bp].VTSTSP_range.VTR_start, ss:[di].VTR_start, ax
movdw ss:[bp].VTSTSP_range.VTR_end, ss:[di].VTR_end, ax
;
; We don't want any undo chains for the style changes below.
; This is because things will get out of synch if the user undo'es
; and redo'es the paste/move/copy.
;
push bp
clr cx ; cx <- clear nothing
mov dx, mask VTF_ALLOW_UNDO ; dx <- clear undo
mov ax, MSG_VIS_TEXT_SET_FEATURES
call ObjCallInstanceNoLock
pop bp
;
; The text could have the Boxed char attr used on non hyperlinks
; if we are paste/move/copy'ing from a different app so we need
; to remove the Boxed char attr from the paste/move/copy'ed text.
;
clr ax
mov ss:[bp].VTSTSP_styleBitsToSet, ax
mov ss:[bp].VTSTSP_styleBitsToClear, ax
mov ss:[bp].VTSTSP_extendedBitsToSet, ax
mov ss:[bp].VTSTSP_extendedBitsToClear, mask VTES_BOXED
mov ax, MSG_VIS_TEXT_SET_TEXT_STYLE
call ObjCallInstanceNoLock
;
; The status of ShowAllHyperlinks can be different between the
; source and destination documents, so we need to check the status
; and set the hyperlink style.
;
mov ax, MSG_STUDIO_DOCUMENT_GET_MISC_FLAGS
call VisCallParent ; dx <- MiscStudioDocumentFlags
; Set the hyperlink style.
; We can use the params set up above except we may need to change
; the extendedBitsTo[Set/Clear]
;
; We send the MSG_TEXT_SET_HYPERLINK_TEXT_STYLE to our superclass
; because we don't want to intercept it ourself.
;
test dx, mask MSDF_SHOW_HYPERLINKS
jz dontShowHyperlinks
mov ss:[bp].VTSTSP_extendedBitsToSet, mask VTES_BOXED
clr ss:[bp].VTSTSP_extendedBitsToClear
dontShowHyperlinks:
mov ax, MSG_VIS_TEXT_SET_HYPERLINK_TEXT_STYLE
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
add sp, (size VisTextSetTextStyleParams)
;
; Resume allowing undo.
;
mov cx, mask VTF_ALLOW_UNDO ; dx <- set undo
clr dx ; cx <- clear nothing
mov ax, MSG_VIS_TEXT_SET_FEATURES
call ObjCallInstanceNoLock
;
; Unsuspend the article, so it will draw itself.
;
call UnsuspendObject
ret
StudioArticleUpdateHyperlinkStyleForPaste endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleFilterViaReplaceParams
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Prevent single page name chars from being replaced.
CALLED BY: MSG_VIS_TEXT_FILTER_VIA_REPLACE_PARAMS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
ss:bp pp- VisTextReplaceParameters
RETURN: carry clear to accept replacement,
carry set to deny it
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/ 8/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleFilterViaReplaceParams method dynamic StudioArticleClass,
MSG_VIS_TEXT_FILTER_VIA_REPLACE_PARAMS
;
; Check for a one character replace range.
;
movdw dxax, ss:[bp].VTRP_range.VTR_end
subdw dxax, ss:[bp].VTRP_range.VTR_start
tst dx
LONG jnz accept
cmp ax, 1
LONG jne accept
;
; Check for a page name graphic at this position
;
movdw dxax, ss:[bp].VTRP_range.VTR_start
movdw cxbx, ss:[bp].VTRP_range.VTR_end
mov di, offset IsPageNameGraphicHere
call EnumPageNameGraphics ;carry set if pnc found
LONG jnc accept
;
; Check for a simple delete, as opposed to a replace. We don't
; deal with replaces here, so just fail the replace.
;
tstdw ss:[bp].VTRP_insCount
LONG jnz fail
EC <modifyReplace:: >
;
; We know that a single page name character is about to be
; deleted. If it is being deleted because the user has chosen
; to clear some or all page names, we don't want to filter or
; modify the replace. The number of deletions to ignore is stored
; in vardata.
;
mov ax, ATTR_SA_CLEAR_PAGE_NAME_CHAR_COUNT
call ObjVarFindData ;ds:bx - ptr to count
jnc notClearingPageName
subdw ds:[bx], 1
tstdw ds:[bx] ;more to ignore?
LONG jnz accept
call ObjVarDeleteData ;this is last, so
LONG jmp accept ; delete vardata
notClearingPageName:
;
; Check whether there is a selection. If so, don't allow the
; replace.
;
mov di, ds:[si]
add di, ds:[di].StudioArticle_offset
movdw dxax, ds:[di].VTI_selectStart
cmpdw dxax, ds:[di].VTI_selectEnd
je isSelection
;
; Beep if the user is trying to cut a page name char
;
mov ax, SST_ERROR
call UserStandardSound
LONG jmp fail
isSelection:
;
; Save the current message's range start. We will modify it
; below, before sending out a new replace message.
;
pushdw ss:[bp].VTRP_range.VTR_start
;
; If the current cursor position is after the replace range start
; position, we must be in the process of backspacing over the char.
; If the cursor position is at or before the replace range start,
; the char is being deleted. Adjust the replace range so that
; we delete the next or backspace over the previous char.
;
cmpdw dxax, ss:[bp].VTRP_range.VTR_start
mov ax, -1 ;subtract 1 to backspace prev
ja adjustRange
mov ax, 1 ;add 1 to delete the next
adjustRange:
;
; Add the adjustment, and check for falling off the end of the text
;
cwd
adddw ss:[bp].VTRP_range.VTR_start, dxax
cmpdw ss:[bp].VTRP_range.VTR_start, -1 ;start is < 0?
je failReset
mov ax, MSG_VIS_TEXT_GET_TEXT_SIZE
call ObjCallInstanceNoLock
cmpdw ss:[bp].VTRP_range.VTR_start, dxax ;start == end?
je failReset
;
; Force queue a message to move the cursor to the new position
; so that after the subsequent replace, the cursor is in the
; position, visually.
;
movdw dxax, ss:[bp].VTRP_range.VTR_start
movdw ss:[bp].VTRP_range.VTR_end, dxax
push bp
mov dx, size VisTextRange
mov ax, MSG_VIS_TEXT_SELECT_RANGE
call SA_ObjMessageQueueStackDS
pop bp
;
; Force queue a replace message with the new params.
;
incdw ss:[bp].VTRP_range.VTR_end
mov dx, size VisTextReplaceParameters
mov ax, MSG_VIS_TEXT_REPLACE_TEXT
call SA_ObjMessageQueueStack
failReset:
;
; Restore the original params range.
;
popdw dxax
movdw ss:[bp].VTRP_range.VTR_start, dxax
incdw dxax
movdw ss:[bp].VTRP_range.VTR_end, dxax
fail:
stc
ret
accept:
;
; Let our superclass handle this.
;
mov ax, MSG_VIS_TEXT_FILTER_VIA_REPLACE_PARAMS
mov di, offset StudioArticleClass
GOTO ObjCallSuperNoLock
StudioArticleFilterViaReplaceParams endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleKbdChar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Clear context on page break after it's inserted.
CALLED BY: MSG_META_KBD_CHAR
PASS: *ds:si = StudioArticleClass object
ax = message #
cx = character
dh = ShiftState
RETURN: nothing
DESTROYED:
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/23/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleKbdChar method dynamic StudioArticleClass,
MSG_META_KBD_CHAR
;
; First have the superclass go ahead so the text gets modified.
;
push cx, dx
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
pop cx, dx
;
; Now see if the character was a page break.
;
SBCS < cmp cx, (VC_ISCTRL shl 8) or VC_ENTER >
DBCS < cmp cx, C_SYS_ENTER >
jne done
test dh, mask SS_LCTRL or mask SS_RCTRL
jz done
test dh, not (mask SS_LCTRL or mask SS_RCTRL)
jnz done
;
; It was a page break. Find its position in the text.
;
sub sp, size VisTextSetContextParams
mov bp, sp ; ss:bp <- VTSCXP_range
mov dx, ss ; dx:bp <- ditto
mov ax, MSG_VIS_TEXT_GET_SELECTION_RANGE
call ObjCallInstanceNoLock
;
; Note that VTSCXP_range.VTR_start = VTSCXP_range.VTR_end
; since we just entered a character. Tweak range.
;
call GetWholeArticleRange ; cx:bx <- end of article
cmpdw ss:[bp].VTSCXP_range.VTR_end, cxbx
je decStart
incdw ss:[bp].VTSCXP_range.VTR_end
clearContext:
;
; Clear the context on the page break so as to prevent any
; context currently set on it from expanding across the page
; boundary.
;
mov ss:[bp].VTSCXP_flags, mask VTCF_TOKEN
mov ss:[bp].VTSCXP_context, CA_NULL_ELEMENT
call SetContextCallSuperNoLockLow
add sp, size VisTextSetContextParams
done:
ret
decStart:
decdw ss:[bp].VTSCXP_range.VTR_start
jmp clearContext
StudioArticleKbdChar endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleRecalcHotspots
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: A page has been added or deleted. Recalc the position
of hotspots on adjacent pages.
CALLED BY: MSG_STUDIO_ARTICLE_RECALC_HOTSPOTS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
cx - first page to recalc
dx - last page to recalc
RETURN: nothing
DESTROYED: bx, si, di, ds, es (method handler)
ax, cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/16/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleRecalcHotspots method dynamic StudioArticleClass,
MSG_STUDIO_ARTICLE_RECALC_HOTSPOTS
sub sp, size VisTextRange
mov bp, sp
push dx ;save end page number
call GetPageRangeFromPageNumber ;dx:ax = start offset
movdw ss:[bp].VTR_start, dxax
pop cx
call GetPageRangeFromPageNumber ;cx:bx = end offset
movdw ss:[bp].VTR_end, cxbx
mov ax, MSG_HSTEXT_RECALC_HOT_SPOTS
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
add sp, size VisTextRange
ret
StudioArticleRecalcHotspots endm
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleCurrentRegionChanged --
MSG_VIS_LARGE_TEXT_CURRENT_REGION_CHANGED for StudioArticleClass
DESCRIPTION: Generate additional notifications for the article
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
cx - region number
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 3/31/92 Initial version
------------------------------------------------------------------------------@
StudioArticleCurrentRegionChanged method dynamic StudioArticleClass,
MSG_VIS_LARGE_TEXT_CURRENT_REGION_CHANGED
mov dx, cx
mov ax, MSG_STUDIO_ARTICLE_PAGE_CHANGED
call ObjCallInstanceNoLock
call GetRegionPos
mov ax, MSG_STUDIO_DOCUMENT_SET_POSITION_ABS
call VisCallParent
ret
StudioArticleCurrentRegionChanged endm
COMMENT @----------------------------------------------------------------------
FUNCTION: GetRegionPos
DESCRIPTION: Get the position of a region
CALLED BY: INTERNAL
PASS:
*ds:si - StudioArticle
cx - region number
RETURN:
cx - x position
dxbp - y position
DESTROYED:
ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 9/16/92 Initial version
------------------------------------------------------------------------------@
GetRegionPos proc far uses si, di
.enter
mov_tr ax, cx
mov si, offset ArticleRegionArray
call ChunkArrayElementToPtr
mov cx, ds:[di].VLTRAE_spatialPosition.PD_x.low
movdw dxbp, ds:[di].VLTRAE_spatialPosition.PD_y
.leave
ret
GetRegionPos endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleNotifyWithDataBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check for and handle deleting graphic variables of type
VTVT_CONTEXT_NAME
CALLED BY: MSG_META_NOTIFY_WITH_DATA_BLOCK
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
cx - ManufacturerID
dx - notification type
bp - notification specific data
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/19/94 Initial version
jenny 9/11/94 Fixed page name change notification
jenny 11/09/94 Now deals with insertions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleNotifyWithDataBlock method dynamic StudioArticleClass,
MSG_META_NOTIFY_WITH_DATA_BLOCK
;
; We're interested only in variable graphic insertions/deletions.
;
cmp cx, MANUFACTURER_ID_GEOWORKS
LONG jne callSuper
cmp dx, GWNT_DELETE_VARIABLE_GRAPHIC
LONG jne callSuper
;
; Lock the data block.
;
push ax, cx, dx, bp, es
mov bx, bp
call MemLock
mov es, ax ; es:0 <- NotifyDeleteVariableGraphic
;
; If the variable graphic wasn't associated with a context
; name, never mind.
;
cmp es:[NDVG_type], VTVT_CONTEXT_NAME
jne unlockBlock
;
; Handle insertion or deletion.
;
movdw dxax, es:[NDVG_position]
cmp es:[NDVG_action], VGAT_INSERT
je handleInsertion
EC < cmp es:[NDVG_action], VGAT_DELETE >
EC < ERROR_NE INVALID_VARIABLE_GRAPHIC_ACTION_TYPE >
call HandleVariableGraphicDeletion
unlockBlock:
pop ax, cx, dx, bp, es
mov bx, bp
call MemUnlock
call MemDecRefCount
callSuper:
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
ret
handleInsertion:
call HandleVariableGraphicInsertion
jmp unlockBlock
StudioArticleNotifyWithDataBlock endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HandleVariableGraphicDeletion
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Clean up after the deletion of a page name graphic
CALLED BY: INTERNAL StudioArticleNotifyWithDataBlock
PASS: *ds:si = article
dx:ax = position of variable graphic
RETURN: nothing
DESTROYED: bp
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 9/94 Broke out of StudioArticleNotifyWithDataBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
HandleVariableGraphicDeletion proc near
class VisTextClass
graphicPos local dword push dx, ax
pageStart local dword
pageEnd local dword
.enter
;
; If we've kept a count of variable graphic deletions that
; we've already handled and can here ignore, decrement it.
;
mov_tr cx, ax ; dx:cx <- graphic position
mov ax, ATTR_SA_IGNORE_DELETE_VARIABLE_GRAPHICS
call ObjVarFindData ;ds:bx - ptr to count
jnc noIgnore
subdw ds:[bx], 1
tstdw ds:[bx]
LONG jnz ignore ;more to ignore?
call ObjVarDeleteData ;this is last, so
jmp ignore ; delete vardata
noIgnore:
;
; get the run bounds for the page name char's context type run
;
movdw dxax, ss:graphicPos
call GetTypeRunBounds ; dx:ax <- run start
; cx:bx <- run end
;
; now clear the context on that run - call super because we don't
; want StudioArticle to get the message and try to delete the
; page name character again - it is in the process of being deleted
; by some user action.
;
mov di, CA_NULL_ELEMENT
call SetContextCallSuperNoLock
;
; First see if there is a page name character before the one
; being deleted.
;
movdw dxax, ss:graphicPos
call GetPageRangeAndNumber ; di <- page number
movdw ss:pageStart, dxax ; start at page start
movdw ss:pageEnd, cxbx ; save page end
movdw cxbx, ss:graphicPos ; stop at this page name char
call GetPageName ; ax <- token
cmp ax, CA_NULL_ELEMENT ; any page name char there?
jne notify ; yes, send the notification
;
; Then check for a page name char after the one being deleted.
;
movdw dxax, ss:graphicPos
incdw dxax ; start after page name char
movdw cxbx, ss:pageEnd ; stop at page end
call GetPageName ; ax <- token
notify:
;
; Notify the world that the page name has changed.
;
call NameTokenToListIndex ; ax <- index
mov dl, PNCT_DELETE_VARIABLE_GRAPHIC
call GenerateAndSendPageNameNotification
ignore:
.leave
ret
HandleVariableGraphicDeletion endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HandleVariableGraphicInsertion
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Tell the world that the current page has a new name.
CALLED BY: INTERNAL StudioArticleNotifyWithDataBlock
PASS: *ds:si = article
dx:ax = position of variable graphic
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 9/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
HandleVariableGraphicInsertion proc near
params local EnumPageNameGraphicsLocals
warnString local word
pageName local word
.enter
;
; Get the page range, needed to get the name and count the graphics.
;
pushdw dxax
call GetPageRangeAndNumber ; dx:ax <- start offset
; cx:bx <- end offset
;
; Get the name of the page to use for the notification.
;
push ax
call GetPageName
mov ss:[pageName], ax
pop ax
;
; If there's more than one page name graphic on this page, then
; we'll be putting up a warning later.
;
clr ss:[warnString]
clrdw ss:[params].EPNGL_count
mov di, offset CountPageNameGraphicsCallback
call EnumPageNameGraphics
cmpdw ss:[params].EPNGL_count, 1
je getName
EC < ERROR_B PAGE_NAME_GRAPHIC_MYSTERIOUSLY_MISSING >
mov ss:[warnString], offset TooManyNamesOnPageWarningString
getName:
;
; Get graphic's range and name token so as to set the context on it.
; The context may be set already (e.g. if pasting), but it may
; not (e.g. if undoing a delete).
;
popdw dxax ; dx:ax <- start position of graphic
push ax
movdw cxbx, dxax
incdw cxbx
call GetPageName
mov_tr di, ax ; di <- token
pop ax
call SetContextCallSuperNoLock
;
; Do we have more than one page with this graphic's name?
;
mov ss:[params].EPNGL_name, di
call GetWholeArticleRange
clrdw ss:[params].EPNGL_count
mov di, offset MatchPageNameTwiceCallback
call EnumPageNameGraphics ; carry <- set if two
; matches found
;
; Select an appropriate warning string if so.
;
mov ax, ss:[params].EPNGL_name
mov di, ss:[warnString]
jnc warnIfNecessary
tst di
mov cx, offset PageNameAlreadyUsedWarningString
jz gotString
mov cx, offset TooManyOnPageAndAlreadyUsedWarningString
gotString:
mov di, cx
warnIfNecessary:
;
; Warn the user if something's up with the page names.
;
tst di ; any warning string?
jz sendNotification
mov cx, (CDT_WARNING shl offset CDBF_DIALOG_TYPE) or \
(GIT_NOTIFICATION shl offset CDBF_INTERACTION_TYPE)
call DoPageNameAlreadyUsedDialog
sendNotification:
;
; Send a page name change notification, after first sending
; one to "clear" the status event in case this insertion is
; the result of a quick copy between to documents. This is
; done to ensure that the status bar gets updated. (If the
; page name in the originating document is the same as the page
; name char being pasted, the notification sent below would be
; the same as the last one sent from the originating document,
; and the page name controller would never receive it, leaving
; the status bar blank because it was cleared out by the
; document change notification.)
;
mov ax, CA_NULL_ELEMENT
call PageChangedLow
mov ax, ss:[pageName] ; ax <- name of page
; (might not be name of
; inserted graphic)
call PageChangedLow
.leave
ret
HandleVariableGraphicInsertion endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MatchPageNameTwiceCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Look for two page name tokens matching token passed on stack
CALLED BY: HandleVariableGraphicInsertion (via EnumPageNameGraphics)
PASS: ss:bp = inherited EnumPageNameGraphicsLocals
EPNGL_name = page name token to match
EPNGL_count = # matching tokens
bx = page name token
RETURN: carry set if two matches found (stops enumeration)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/23/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MatchPageNameTwiceCallback proc near
.enter inherit HandleVariableGraphicInsertion
cmp ss:params.EPNGL_name, bx
clc
jne done
incdw ss:params.EPNGL_count
cmpdw ss:params.EPNGL_count, 2
clc
jne done
stc ; stop hunting
done:
.leave
ret
MatchPageNameTwiceCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CountPageNameGraphicsCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Add one to the count of page name graphics.
CALLED BY: HandleVariableGraphicInsertion (via EnumPageNameGraphics)
PASS: ss:bp = inherited EnumPageNameGraphicsLocals
EPNGL_count = number counted so far
bx = page name token
RETURN: carry clear
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/23/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CountPageNameGraphicsCallback proc near
.enter inherit HandleVariableGraphicInsertion
incdw ss:params.EPNGL_count
clc
.leave
ret
CountPageNameGraphicsCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetContextCallSuperNoLock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set up the stack frame and set the context.
CALLED BY: INTERNAL HandleVariableGraphicDeletion
HandleVariableGraphicInsertion
PASS: *ds:si = article
di = context token
dx:ax = start of range
cx:bx = end of range
RETURN: nothing
DESTROYED: es
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/21/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetContextCallSuperNoLock proc near
uses ax, bx, cx, dx, bp, di
.enter
sub sp, size VisTextSetContextParams
mov bp, sp ;ss:bp <- VTSCXP
movdw ss:[bp].VTSCXP_range.VTR_start, dxax
movdw ss:[bp].VTSCXP_range.VTR_end, cxbx
mov ss:[bp].VTSCXP_flags, mask VTCF_TOKEN
mov ss:[bp].VTSCXP_context, di
GetResourceSegmentNS StudioArticleClass, es
call SetContextCallSuperNoLockLow
add sp, size VisTextSetContextParams
.leave
ret
SetContextCallSuperNoLock endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetContextCallSuperNoLockLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Call the text object's superclass to set a context.
CALLED BY: INTERNAL StudioArticleClearContextLow
StudioArticleSetContext
StudioArticleNotifyWithDataBlock
PASS: *ds:si = text object
es = segment of text object
ss:bp = VisTextSetContextParams
RETURN: nothing
DESTROYED: ax, bx, cx, dx, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 9/12/94 Broke out of a couple places
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetContextCallSuperNoLockLow proc near
mov ax, MSG_VIS_TEXT_SET_CONTEXT
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
ret
SetContextCallSuperNoLockLow endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetContextQueue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the context via the queue
CALLED BY: INTERNAL SetStoredContextOnPageNameGraphic
PASS: *ds:si = article
di = context token
dx:ax = start of range
cx:bx = end of range
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/12/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetContextQueue proc near
uses bp
.enter
sub sp, size VisTextSetContextParams
mov bp, sp ;ss:bp <- VTSCXP
movdw ss:[bp].VTSCXP_range.VTR_start, dxax
movdw ss:[bp].VTSCXP_range.VTR_end, cxbx
mov ss:[bp].VTSCXP_flags, mask VTCF_TOKEN
mov ss:[bp].VTSCXP_context, di
mov ax, MSG_VIS_TEXT_SET_CONTEXT
mov dx, size VisTextSetContextParams
call SA_ObjMessageQueueStackDS
add sp, dx
.leave
ret
SetContextQueue endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTypeRunBounds
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the bounds for the type run to which the passed
position belongs
CALLED BY: INTERNAL HandleVariableGraphicDeletion
PASS: *ds:si = article
dx:ax = position
RETURN: dx:ax = type run start
cx:bx = type run end
DESTROYED: di
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/23/94 Broke out of HandleVariableGraphicDeletion
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTypeRunBounds proc near
;
; Get bounds onto stack and return them in registers.
;
sub sp, size VisTextRange
mov di, sp
call GetTypeRunBoundsLow
movdw dxax, ss:[di].VTR_start
movdw cxbx, ss:[di].VTR_end
add sp, size VisTextRange
ret
GetTypeRunBounds endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTypeRunBoundsLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the bounds for the run to which the passed
position belongs
CALLED BY: INTERNAL GetTypeRunBounds
FigureRangeAndSetContextThere
PASS: *ds:si = article
ss:di = VisTextRange to fill with bounds
dx:ax = position
RETURN: ss:di = VisTextRange filled in
DESTROYED: ax, cx, dx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/10/94 Broke out of HandleVariableGraphicDeletion
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTypeRunBoundsLow proc near
uses bp
.enter
;
; Get the type run bounds for the passed position.
;
sub sp, size VisTextGetRunBoundsParams
mov bp, sp
movdw ss:[bp].VTGRBP_position, dxax
mov dx, ss
mov ss:[bp].VTGRBP_retVal.high, dx
mov ss:[bp].VTGRBP_retVal.low, di
mov ss:[bp].VTGRBP_type, OFFSET_FOR_TYPE_RUNS
mov ax, MSG_VIS_TEXT_GET_RUN_BOUNDS
call ObjCallInstanceNoLock
add sp, size VisTextGetRunBoundsParams
.leave
ret
GetTypeRunBoundsLow endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticlePageChanged
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: The visible page has changed. Send a page name notification.
CALLED BY: MSG_STUDIO_ARTICLE_PAGE_CHANGED
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
dx - page 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 7/15/94 Initial version
jenny 11/ 9/94 Broke out PageChanged
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticlePageChanged method dynamic StudioArticleClass,
MSG_STUDIO_ARTICLE_PAGE_CHANGED
uses cx, dx, bp
.enter
mov cx, dx
call GetPageRangeFromPageNumber ;dx:ax = start offset
;cx:bx = end offset
call PageChanged
.leave
ret
StudioArticlePageChanged endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PageChanged
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: The current page has changed. Tell the world.
CALLED BY: INTERNAL StudioArticlePageChanged
PASS: *ds:si = article
dx:ax = start of page
cx:bx = end of page
RETURN: nothing
DESTROYED: ax, dx, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 9/94 Broke out of StudioArticlePageChanged
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PageChanged proc near
call GetPageName ; ax <- page name
; convert the token to a list index and send a notification
FALL_THRU PageChangedLow
PageChanged endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PageChangedLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send out notification of page change.
CALLED BY: INTERNAL PageChanged
HandleVariableGraphicInsertion
PASS: *ds:si = article
ax = page name (context token)
RETURN: nothing
DESTROYED: ax, bx, cx, es, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/21/94 Broke out of PageChanged
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PageChangedLow proc near
call NameTokenToListIndex ;ax = name index
mov dl, PNCT_CHANGE_PAGE
call GenerateAndSendPageNameNotification
ret
PageChangedLow endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleGetPageName
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Given the passed position, find the page name token
CALLED BY: MSG_STUDIO_ARTICLE_GET_PAGE_NAME
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
ss:bp - VisTextRange
RETURN: ax - name token, or CA_NULL_ELEMENT if none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/30/94 Initial version
jenny 11/ 9/94 Broke out GetPageName
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleGetPageName method StudioArticleClass,
MSG_STUDIO_ARTICLE_GET_PAGE_NAME
mov di, bp ; ss:di <- VisTextRange
call GetPageRangeFromVisTextRangeStart
call GetPageName
ret
StudioArticleGetPageName endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetPageName
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the page name token for the passed range.
CALLED BY: INTERNAL StudioArticleGetPageName
PageChanged
HandleVariableGraphicInsertion
PASS: *ds:si = article
dx:ax = start of page
cx:bx = end of page
RETURN: ax = page name token
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 9/94 Broke out of StudioArticleGetPageName
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetPageName proc near
uses di
params local EnumPageNameGraphicsLocals
.enter
mov ss:params.EPNGL_name, CA_NULL_ELEMENT
;
; Find the first page name character on the page which
; contains the passed start offset
;
mov di, offset GetPageNameCallback
call EnumPageNameGraphics
mov ax, ss:params.EPNGL_name
.leave
ret
GetPageName endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetPageNameCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the name token for the page
CALLED BY: GetPageName (via EnumPageNameGraphics)
PASS: ds:si - TextRunArrayElement
ss:bp - inherited locals
bx - page name token
RETURN: carry set to stop enumerating
bx saved in local variable "token"
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/15/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetPageNameCallback proc near
.enter inherit GetPageName
mov ss:params.EPNGL_name, bx
stc
.leave
ret
GetPageNameCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GenerateAndSendPageNameNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Generate a page name notification and tell the
document to send it.
CALLED BY: INTERNAL StudioArticlePageChanged
StudioArticleSetContext
StudioArticleNotifyWithDataBlock
PASS: *ds:si = text object
ax = index of page name
dl = PageNameChangeType
RETURN: nothing
DESTROYED: ax, bx, cx, es, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 9/12/94 Broke out of a couple places
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GenerateAndSendPageNameNotification proc near
call GeneratePageNameNotification ;bx = notification block
mov cx, bx
mov ax, MSG_STUDIO_DOCUMENT_SEND_PAGE_NOTIFICATION
call VisCallParent
ret
GenerateAndSendPageNameNotification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeneratePageNameNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Given a page name token, generate a NotifyPageNameChange
structure.
CALLED BY: INTERNAL
PASS: *ds:si = text object
ax = index of page name
dl = PageNameChangeType
RETURN: bx - handle of notification block
DESTROYED: es, di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/27/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeneratePageNameNotification proc far
uses cx, dx, bp
params local VisTextFindNameIndexParams
mname local NameArrayMaxElement
.enter
cmp ax, CA_NULL_ELEMENT
LONG je noName
;
; get the name from the context token
;
mov ss:[params].VTFNIP_index, ax
mov ss:[params].VTFNIP_type, VTNT_CONTEXT
mov ss:[params].VTFNIP_file, 0
segmov es, ss, ax
lea di, ss:[mname]
movdw ss:[params].VTFNIP_name, esdi
mov cx, size NameArrayMaxElement
mov ax, 0
rep stosb
push bp
lea bp, ss:[params]
mov ax, MSG_VIS_TEXT_FIND_NAME_BY_INDEX
call ObjCallInstanceNoLock
pop bp
;
; get the length of the name
;
push ds, si
lea di, ss:[mname]
add di, size VisTextNameArrayElement
segmov ds, es, ax
mov si, di ; ds:si <- source
call LocalStringLength ; cx <- string length, w/o null
;
; allocate a notification block
;
push cx ; save the string length
add cx, size NotifyPageNameChange
mov ax, cx
mov cx, ALLOC_DYNAMIC_NO_ERR_LOCK or mask HF_SHARABLE \
or (mask HAF_ZERO_INIT shl 8)
call MemAlloc
mov es, ax
pop cx
mov es:[NPNC_length], cx
mov ax, ss:[params].VTFNIP_index
mov es:[NPNC_index], ax
mov es:[NPNC_changeType], dl
;
; copy the name to the block
;
lea di, es:[NPNC_name] ; es:di <- destination buffer
rep movsb
pop ds, si ;*ds:si <- Article object
call MemUnlock
mov ax, 1
call MemInitRefCount
exit:
.leave
ret
noName:
call GenerateEmptyPageNameNotification
jmp exit
GeneratePageNameNotification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GenerateEmptyPageNameNotification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Generate a page name notification for the case
where the page has no name.
CALLED BY: INTERNAL
PASS: dl = PageNameChangeType
RETURN: bx = handle of notification block
DESTROYED: ax, cx, es
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/28/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GenerateEmptyPageNameNotification proc near
.enter
mov ax, size NotifyPageNameChange
mov cx, ALLOC_DYNAMIC_NO_ERR_LOCK or mask HF_SHARABLE \
or (mask HAF_ZERO_INIT shl 8)
call MemAlloc
mov es, ax
mov es:[NPNC_index], GIGS_NONE
mov es:[NPNC_changeType], dl
clr es:[NPNC_length]
call MemUnlock
mov ax, 1
call MemInitRefCount
.leave
ret
GenerateEmptyPageNameNotification endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NameTokenToListIndex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Converts a name token to its list index counterpart
CALLED BY: GeneratePageNameNotification, StudioArticleSetContext
PASS: *ds:si - article
ax - name token
RETURN: ax - name list index
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/30/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
NameTokenToListIndex proc near
uses bp
.enter
CheckHack < GIGS_NONE eq -1 >
CheckHack < CA_NULL_ELEMENT eq 0xffff >
cmp ax, -1
je done
sub sp, size VisTextNotifyTypeChange
mov bp, sp
mov ss:[bp].VTNTC_type.VTT_context, ax
mov ss:[bp].VTNTC_type.VTT_hyperlinkName, -1
mov ss:[bp].VTNTC_type.VTT_hyperlinkFile, -1
mov ax, MSG_VIS_TEXT_NAME_TOKENS_TO_LIST_INDICES
call ObjCallInstanceNoLock
mov ax, ss:[bp].VTNTC_index.VTT_context
add sp, size VisTextNotifyTypeChange
done:
.leave
ret
NameTokenToListIndex endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticlePageNameIndexToToken
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MESSAGE: StudioArticlePageNameIndexToToken -
MSG_STUDIO_ARTICLE_PAGE_NAME_INDEX_TO_TOKEN
SYNOPSIS: Converts a name list index to its name token counterpart
PASS: *ds:si - article
cx - name list index
RETURN: ax - name token
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/30/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticlePageNameIndexToToken method StudioArticleClass,
MSG_STUDIO_ARTICLE_PAGE_NAME_INDEX_TO_TOKEN
uses bp
.enter
CheckHack < GIGS_NONE eq -1 >
CheckHack < CA_NULL_ELEMENT eq 0xffff >
mov ax, cx
cmp ax, -1
je done
sub sp, size VisTextFindNameIndexParams + 1
mov bp, sp
mov ss:[bp].VTFNIP_index, ax
mov ss:[bp].VTFNIP_type, VTNT_CONTEXT
mov ss:[bp].VTFNIP_file, 0
clrdw ss:[bp].VTFNIP_name ; don't return name
mov ax, MSG_VIS_TEXT_FIND_NAME_BY_INDEX
call ObjCallInstanceNoLock
add sp, size VisTextFindNameIndexParams + 1
EC < cmp ax, -1 >
EC < ERROR_E PAGE_NAME_DOES_NOT_EXIST >
done:
.leave
ret
StudioArticlePageNameIndexToToken endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleSetDisplayMode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle change of display mode
CALLED BY: MSG_VIS_LARGE_TEXT_SET_DISPLAY_MODE
PASS: *ds:si = StudioArticleClass object
ds:di = StudioArticleClass instance data
cx = VisLargeTextDisplayModes
RETURN: none
DESTROYED: everything
SIDE EFFECTS: might modify VLTI_regionSpacing
PSEUDO CODE/STRATEGY:
If we're changing to page or condensed mode, put
DISPLAY_MODE_REGION_SPACING into VLTI_regionSpacing. For Galley and
Draft, we don't want the space, so we use 0. This actually makes
using the VTF_DONT_SHOW_SOFT_PAGE_BREAKS flag redundant. Oh well.
REVISION HISTORY:
Name Date Description
---- ---- -----------
dubois 6/23/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleSetDisplayMode method dynamic StudioArticleClass,
MSG_VIS_LARGE_TEXT_SET_DISPLAY_MODE
cmp cx, VLTDM_CONDENSED
mov ds:[di].VLTI_regionSpacing, DISPLAY_MODE_REGION_SPACING
jbe toSuper
clr ds:[di].VLTI_regionSpacing
toSuper:
mov di, offset StudioArticleClass
GOTO ObjCallSuperNoLock
StudioArticleSetDisplayMode endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SuspendObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Suspend calculation of the passed object
CALLED BY: INTERNAL
PASS: *ds:si = object
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SuspendObject proc near
uses ax, cx, dx, bp
.enter
mov ax, MSG_META_SUSPEND
call ObjCallInstanceNoLock
.leave
ret
SuspendObject endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UnsuspendObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Unsuspend calculation of the passed object
CALLED BY: INTERNAL
PASS: *ds:si = object
RETURN: nothing
DESTROYED: ax, cx, dx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UnsuspendObject proc near
uses bp
.enter
mov ax, MSG_META_UNSUSPEND
call ObjCallInstanceNoLock
.leave
ret
UnsuspendObject endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SA_ObjMessageQueueStackDS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send a message on the queue with params on the stack.
CALLED BY: INTERNAL
PASS: ds:si = object
ss:bp = parameters on stack
ax = message
dx = size of parameter struct
RETURN: bx = handle of object
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/12/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SA_ObjMessageQueueStackDS proc near
mov bx, ds:[LMBH_handle]
call SA_ObjMessageQueueStack
ret
SA_ObjMessageQueueStackDS endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SA_ObjMessageQueueStack
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send a message on the queue with params on the stack.
CALLED BY: INTERNAL
PASS: ^lbx:si = object
ss:bp = parameters on stack
ax = message
dx = size of parameter struct
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/12/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SA_ObjMessageQueueStack proc near
mov di, mask MF_FORCE_QUEUE or mask MF_STACK
call ObjMessage
ret
SA_ObjMessageQueueStack endp
DocNotify ends
DocPageCreDest segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleRegionIsLast -- MSG_VIS_LARGE_TEXT_REGION_IS_LAST
for StudioArticleClass
DESCRIPTION: Handle notification that a region is the last region
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
cx - last region #
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 5/28/92 Initial version
------------------------------------------------------------------------------@
StudioArticleRegionIsLast method dynamic StudioArticleClass,
MSG_VIS_LARGE_TEXT_REGION_IS_LAST
; in draft mode we want to bail completely and not delete regions
cmp ds:[di].VLTI_displayMode, VLTDM_DRAFT_WITH_STYLES
jae done
mov di, MSG_STUDIO_DOCUMENT_DELETE_PAGES_AFTER_POSITION
GOTO AppendDeleteCommon
done:
ret
StudioArticleRegionIsLast endm
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleAppendRegion -- MSG_VIS_LARGE_TEXT_APPEND_REGION
for StudioArticleClass
DESCRIPTION: Add another region to an article
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
cx - region to append after
RETURN:
carry - set if another region cannot be appended
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 5/27/92 Initial version
------------------------------------------------------------------------------@
StudioArticleAppendRegion method dynamic StudioArticleClass,
MSG_VIS_LARGE_TEXT_APPEND_REGION
mov di, MSG_STUDIO_DOCUMENT_APPEND_PAGES_VIA_POSITION
FALL_THRU AppendDeleteCommon
StudioArticleAppendRegion endm
;---
; di = message
AppendDeleteCommon proc far
class StudioArticleClass
; first we suspend ourself (so that the suspend/unsuspend from
; inserting regions has no ill effects)
push cx
mov ax, MSG_META_SUSPEND
call ObjCallInstanceNoLock
pop cx
; now we add pages
call GetRegionPos ;cx = x, dxbp = y
mov_tr ax, di
call VisCallParent
; now nuke the suspend data, so the MSG_META_UNSUSPEND won't do
; anything...
mov ax, ATTR_VIS_TEXT_SUSPEND_DATA
call ObjVarFindData ;DS:BX <- VisTextSuspendData
EC < ERROR_NC -1 >
clr ax
clrdw ds:[bx].VTSD_recalcRange.VTR_start, ax
clrdw ds:[bx].VTSD_recalcRange.VTR_end
movdw ds:[bx].VTSD_showSelectionPos, 0xffffffff
mov ds:[bx].VTSD_notifications, ax
mov ds:[bx].VTSD_needsRecalc, al
mov ax, MSG_META_UNSUSPEND
call ObjCallInstanceNoLock
clc
ret
AppendDeleteCommon endp
DocPageCreDest ends
DocSTUFF segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleSubstAttrToken -- MSG_VIS_TEXT_SUBST_ATTR_TOKEN
for StudioArticleClass
DESCRIPTION: Substitute a text attribute token
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
ss:bp - VisTextSubstAttrTokenParams
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 9/26/92 Initial version
------------------------------------------------------------------------------@
StudioArticleSubstAttrToken method dynamic StudioArticleClass,
MSG_VIS_TEXT_SUBST_ATTR_TOKEN
tst ss:[bp].VTSATP_relayedToLikeTextObjects
jnz toSuper
; send to attribute manager to take care of
mov ax, MSG_GOAM_SUBST_TEXT_ATTR_TOKEN
mov dx, size VisTextSubstAttrTokenParams
mov di, mask MF_RECORD or mask MF_STACK
call ToAttrMgrCommon
ret
toSuper:
mov di, offset StudioArticleClass
GOTO ObjCallSuperNoLock
StudioArticleSubstAttrToken endm
;---
; ax = message, di = flags
ToAttrMgrCommon proc near
push si
mov bx, segment GrObjAttributeManagerClass
mov si, offset GrObjAttributeManagerClass
call ObjMessage
pop si
mov cx, di
mov ax, MSG_META_SEND_CLASSED_EVENT
mov dx, TO_TARGET
call VisCallParent
ret
ToAttrMgrCommon endp
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleRecalcForAttrChange --
MSG_VIS_TEXT_RECALC_FOR_ATTR_CHANGE for StudioArticleClass
DESCRIPTION: Recalculate for an attribute change
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
cx - relayed globally flag
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 9/26/92 Initial version
------------------------------------------------------------------------------@
StudioArticleRecalcForAttrChange method dynamic StudioArticleClass,
MSG_VIS_TEXT_RECALC_FOR_ATTR_CHANGE
tst cx
jnz toSuper
; send to attribute manager to take care of
mov ax, MSG_GOAM_RECALC_FOR_TEXT_ATTR_CHANGE
mov di, mask MF_RECORD
call ToAttrMgrCommon
ret
toSuper:
mov di, offset StudioArticleClass
GOTO ObjCallSuperNoLock
StudioArticleRecalcForAttrChange endm
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleGetObjectForSearchSpell --
MSG_META_GET_OBJECT_FOR_SEARCH_SPELL for StudioArticleClass
DESCRIPTION: Get the next object for search/spell
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
cx:dx - object that search/spell is currently in
bp - GetSearchSpellObjectOption
RETURN:
cx:dx - requested object (or 0 if none)
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 11/19/92 Initial version
------------------------------------------------------------------------------@
StudioArticleGetObjectForSearchSpell method dynamic StudioArticleClass,
MSG_META_GET_OBJECT_FOR_SEARCH_SPELL
call VisCallParent
ret
StudioArticleGetObjectForSearchSpell endm
DocSTUFF ends
DocMiscFeatures segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleSetVisParent -- MSG_STUDIO_ARTICLE_SET_VIS_PARENT
for StudioArticleClass
DESCRIPTION: Set the vis parent for an article
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
cxdx - parent
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 10/21/92 Initial version
------------------------------------------------------------------------------@
StudioArticleSetVisParent method dynamic StudioArticleClass,
MSG_STUDIO_ARTICLE_SET_VIS_PARENT
ornf dx, LP_IS_PARENT
movdw ds:[di].VI_link.LP_next, cxdx
ret
StudioArticleSetVisParent endm
DocMiscFeatures ends
DocSTUFF segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleDisplayObjectForSearchSpell --
MSG_META_DISPLAY_OBJECT_FOR_SEARCH_SPELL for StudioArticleClass
DESCRIPTION: Display the object
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 11/20/92 Initial version
------------------------------------------------------------------------------@
StudioArticleDisplayObjectForSearchSpell method dynamic StudioArticleClass,
MSG_META_DISPLAY_OBJECT_FOR_SEARCH_SPELL
call MakeContentEditable
ret
StudioArticleDisplayObjectForSearchSpell endm
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleCrossSectionReplaceAborted --
MSG_VIS_TEXT_CROSS_SECTION_REPLACE_ABORTED for StudioArticleClass
DESCRIPTION: Notification that a cross section change has been aborted
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
RETURN:
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 11/30/92 Initial version
------------------------------------------------------------------------------@
StudioArticleCrossSectionReplaceAborted method dynamic StudioArticleClass,
MSG_VIS_TEXT_CROSS_SECTION_REPLACE_ABORTED
mov ax, offset CrossSectionReplaceAbortedString
call DisplayError
ret
StudioArticleCrossSectionReplaceAborted endm
DocSTUFF ends
DocNotify segment resource
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleGraphicVariableDraw --
MSG_VIS_TEXT_GRAPHIC_VARIABLE_DRAW for VisTextClass
DESCRIPTION: draw a variable graphic, handling VTVT_CONTEXT_NAME
specially
PASS:
*ds:si - instance data
es - segment of VisTextClass
ax - The message
cx - gstate with font and current position set
dx:bp - VisTextGraphic (dx always = ss)
RETURN:
cx - width of the graphic
dx - height of the graphic
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 9/30/92 Initial version
jenny 9/29/94 Broke out size-getting.
------------------------------------------------------------------------------@
StudioArticleGraphicVariableDraw method dynamic StudioArticleClass,
MSG_VIS_TEXT_GRAPHIC_VARIABLE_DRAW
;
; If it's not a page name, never mind.
;
cmp ss:[bp].VTG_data.VTGD_variable.VTGV_type,
VTVT_CONTEXT_NAME
jne callSuper
;
; Get the variable's string and size.
;
sub sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE
mov di, sp ; ss:di <- buffer
call GetVariableStringAndSize ; ds:si <- string
; cx <- width
; dx <- height
; di <- gstate
jcxz done
;
; Draw the string.
;
push di ; save gstate
call GrSaveState
mov ax, C_CYAN
call GrSetTextColor
mov_tr ax, cx ; save width
clr cx ; it's null-terminated
call GrDrawTextAtCP
mov_tr cx, ax ; cx <- width
pop di
call GrRestoreState
done:
add sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE
ret
callSuper:
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
ret
StudioArticleGraphicVariableDraw endp
COMMENT @----------------------------------------------------------------------
MESSAGE: StudioArticleGraphicVariableSize --
MSG_VIS_TEXT_GRAPHIC_VARIABLE_SIZE for StudioArticleClass
DESCRIPTION: get the size of a variable graphic, handling
VTVT_CONTEXT_NAME specially
PASS:
*ds:si - instance data
es - segment of StudioArticleClass
ax - The message
cx - gstate with font and current position set
dx:bp - VisTextGraphic (dx always = ss)
RETURN:
cx - width of the graphic
dx - height of the graphic
DESTROYED:
bx, si, di, ds, es (message handler)
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 9/30/92 Initial version
jenny 9/29/94 Broke out size-getting.
------------------------------------------------------------------------------@
StudioArticleGraphicVariableSize method dynamic StudioArticleClass,
MSG_VIS_TEXT_GRAPHIC_VARIABLE_SIZE
;
; If it's not a page name, never mind.
;
cmp ss:[bp].VTG_data.VTGD_variable.VTGV_type,
VTVT_CONTEXT_NAME
jne callSuper
;
; Get the size.
;
sub sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE
mov di, sp ; ss:di = buffer
call GetVariableStringAndSize ; cx <- width
; dx <- height
add sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE
ret
callSuper:
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
ret
StudioArticleGraphicVariableSize endp
COMMENT @----------------------------------------------------------------------
FUNCTION: GetVariableStringAndSize
DESCRIPTION: Get the string for a variable and its size in points.
CALLED BY: INTERNAL StudioArticleGraphicVariableSize
StudioArticleGraphicVariableDraw
PASS:
*ds:si = text object
es = dgroup
dx:bp = VisTextGraphic (dx always = ss)
ss:di = string buffer
cx = gstate
RETURN:
carry = set if got string (i.e. if showing invisibles)
ds:si = string (ds = ss)
cx = width in points
dx = height in points
di = gstate
DESTROYED:
none
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Tony 9/30/92 Initial version
jenny 9/29/94 Added size-getting; no longer uses
C_SECTION when not showing invisibles
------------------------------------------------------------------------------@
GetVariableStringAndSize proc near
uses ax, bx, bp
.enter
;
; Only if we're showing invisibles is the variable graphic being
; represented by its string.
;
clr ax
xchg cx, ax ; cx <- assume no string width
; ax <- gstate
test es:[miscSettings], mask SMS_SHOW_INVISIBLES
jz gotWidth
push ax
;
; Push GenDocumentGetVariableParams on the stack.
;
push ds:[LMBH_handle], si ;GDGVP_object
pushdw dxbp ;GDGVP_graphic
pushdw ssdi ;GDGVP_buffer
clrdw dxax
pushdw dxax ;GDGVP_position.PD_y
pushdw dxax ;GDGVP_position.PD_x
mov bp, sp
;
; Get the string.
;
mov dx, size GenDocumentGetVariableParams
mov ax, MSG_GEN_DOCUMENT_GET_VARIABLE
call VisCallParent
add sp, size GenDocumentGetVariableParams
segmov ds, ss, ax
mov si, di ;ds:si = string
;
; Now get the size.
;
pop di ; di = gstate
clr cx ; it's null-terminated
call GrTextWidth
mov cx, dx ; cx = width
gotWidth:
clr dx ; height = 0
.leave
ret
GetVariableStringAndSize endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleFollowHyperlink
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: If we are follwing a link from a hotspot, we need to
change to the text tool and give the target back to the
article.
CALLED BY: MSG_VIS_TEXT_FOLLOW_HYPERLINK
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
ss:bp -
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/ 5/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleFollowHyperlink method dynamic StudioArticleClass,
MSG_VIS_TEXT_FOLLOW_HYPERLINK
;
; If the current tool is not the Studio text tool,
; change to that tool, then callsuper to follow the hyperlink
;
push ds:[LMBH_handle]
call IsTextTool
jc callSuper
call SetStudioTool
callSuper:
pop bx
call MemDerefDS
GetResourceSegmentNS StudioArticleClass, es
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
;
; Setting a hyperlink changes char attrs, which causes text to
; update, drawing over any hotspots. Need to redraw hotspots
; at this point.
;
ret
StudioArticleFollowHyperlink endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SAVisTextRenameName
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: If user is changing a page name, and show invisibles is on,
redraw.
CALLED BY: MSG_VIS_TEXT_RENAME_NAME
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
ss:bp - VisTextNameCommonParams
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/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SAVisTextRenameName method dynamic StudioArticleClass,
MSG_VIS_TEXT_RENAME_NAME
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
;
; is this rename for a context in the same file?
;
cmp ss:[bp].VTNCP_data.VTND_type, VTNT_CONTEXT
jne done
cmp ss:[bp].VTNCP_data.VTND_file, 0
jne done
call ForceRedrawIfShowingInvisibles
done:
ret
SAVisTextRenameName endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ForceRedrawIfShowingInvisibles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Force a redraw if showing invisibles
CALLED BY: INTERNAL
PASS: nothing
RETURN: nothing
DESTROYED: ax, di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 8/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ForceRedrawIfShowingInvisibles proc near
uses bx, si, bp
.enter
GetResourceSegmentNS dgroup, es
test es:[miscSettings], mask SMS_SHOW_INVISIBLES
jz noInvisibles
GetResourceHandleNS StudioViewControl, bx
mov si, offset StudioViewControl
clr di
mov ax, MSG_GVC_REDRAW
call ObjMessage
noInvisibles:
.leave
ret
ForceRedrawIfShowingInvisibles endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleSetHyperlink
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: MSG_META_TEXT_SET_HYPERLINK
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
RETURN:
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/ 1/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleSetHyperlink method dynamic StudioArticleClass,
MSG_META_TEXT_SET_HYPERLINK,
MSG_VIS_TEXT_SET_HYPERLINK
call SuspendObject
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
call UnsuspendObject
ret
StudioArticleSetHyperlink endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleSetContext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: A page is being named. Send out a NotifyPageNameChange
notification.
CALLED BY: MSG_VIS_TEXT_SET_CONTEXT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of StudioArticleClass
ax - the message
ss:bp - VisTextSetContextParams
RETURN: nothing
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 6/27/94 Initial version
jenny 9/ 1/94 Allow only one page name graphic per page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleSetContext method dynamic StudioArticleClass,
MSG_VIS_TEXT_SET_CONTEXT
mov di, bp
params local EnumPageNameGraphicsLocals
.enter
;
; If we're resetting the stored context on a page name graphic,
; only the superclass need interest itself.
;
mov ax, ATTR_SA_SET_STORED_CONTEXT_COUNT
call ObjVarFindData ;ds:bx - ptr to count
LONG jc callSuperOnly
;
; Don't redraw till we're through fooling with stuff.
;
call SuspendObject
mov ax, ds:[LMBH_handle]
movdw ss:params.EPNGL_textObj, axsi
;
; get the range's physical boundaries
;
push bp
mov bp, di
call GetTextRange
pop bp
;
; We need both the list index (for the page name change notification)
; and the name token (for the variable graphic). As soon as we have
; the index, we store it on the stack for later use in the
; notification.
;
mov ax, ss:[di].VTSCXP_context
test ss:[di].VTSCXP_flags, mask VTCF_TOKEN
jz getToken
call NameTokenToListIndex
push ax ; save index
mov ax, ss:[di].VTSCXP_context
jmp haveToken
getToken:
push ax ; save index
mov cx, ax
mov ax, MSG_STUDIO_ARTICLE_PAGE_NAME_INDEX_TO_TOKEN
call ObjCallInstanceNoLock ; ax = name token
mov ss:[di].VTSCXP_context, ax
ornf ss:[di].VTSCXP_flags, mask VTCF_TOKEN
haveToken:
;
; ax = token. If no token, we are in the process of clearing
; the page name.
;
cmp ax, CA_NULL_ELEMENT
je clearContext
mov ss:[params].EPNGL_name, ax ; record token
;
; We don't want a context to be set on more than one page.
;
test ss:[di].VTSCXP_flags,
mask VTCF_ENSURE_CONTEXT_NOT_ALREADY_SET
jz setContext
call CheckIfPageNameAlreadyUsed
jc unsuspendRedraws ; done if name's
; been used
;
; No need for our superclass to be vigilant, as we know all is well.
;
andnf ss:[di].VTSCXP_flags,
not mask VTCF_ENSURE_CONTEXT_NOT_ALREADY_SET
setContext:
call FigureRangeAndSetContextThere
;
; We're dealing with a single context.
;
mov dl, PNCT_SET_CONTEXT
sendNotification:
;
; Send a notification that the page name has changed so
; the page name controller can update its status bar
;
pop ax ; ax <- index
call GenerateAndSendPageNameNotification
;
; If showing invisibles, force a redraw so
; that any name changes will be shown.
;
call ForceRedrawIfShowingInvisibles
unsuspendRedraws:
call UnsuspendObject
done:
.leave
ret
clearContext:
call StudioArticleClearContextLow
jmp sendNotification
callSuperOnly:
;
; ds:[bx] = extra data for ATTR_SA_SET_STORED_CONTEXT_COUNT
;
subdw ds:[bx], 1
tstdw ds:[bx]
jnz callSuper
call ObjVarDeleteData
callSuper:
push bp
mov bp, di
call SetContextCallSuperNoLockLow
pop bp
jmp done
StudioArticleSetContext endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTextRange
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the physical coordinates corresponding to the
passed virtual ones
CALLED BY: INTERNAL StudioArticleSetContext
PASS: *ds:si = article
ss:bp = VisTextRange holding virtual coordinates
ss:di = ditto
RETURN: ss:di = VisTextRange holding physical coordinates
DESTROYED: ax, cx, dx, bp
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 3/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTextRange proc near
clr cx ;no context
mov dx, ss ;dx:bp <- VisTextRange
mov ax, MSG_VIS_TEXT_GET_RANGE
call ObjCallInstanceNoLock
ret
GetTextRange endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FigureRangeAndSetContextThere
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Figure the range over which to set the context and set it.
CALLED BY: INTERNAL StudioArticleSetContext
PASS: *ds:si = article
ss:di = VisTextSetContextParams
ss:bp = inherited EnumPageNameGraphicsLocals
EPNGL_name = new page name token
RETURN: nothing
DESTROYED: ax, cx, bx, dx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FigureRangeAndSetContextThere proc near
.enter inherit StudioArticleSetContext
;
; We want only one context set per page. If we have a page
; name graphic on the page already, we replace the context
; token currently associated with it by the token of the new
; context and get the position of the graphic so as to
; overwrite the context set at that position with the new context.
;
push di
call GetPageRangeFromVisTextRangeStart
mov di, offset ReplaceCurrentContextCallback
call EnumPageNameGraphics ; carry <- set if graphic
; found
; ss:[bp].EPNGL_position
; <- graphic position
pop di
jc useRunBounds
;
; This page has no existing page name graphic, so insert one.
;
movdw ss:[di].VTR_end, dxax
clr bx ; 1st word of data
mov dx, VTVT_CONTEXT_NAME ; variable graphic type
mov ax, ss:[params].EPNGL_name ; ax <- token
call StudioArticleInsertVariableGraphic
;
; We want to apply the context only to the variable graphic, so
; we limit the range to the first character of the passed range.
;
movdw dxax, ss:[di].VTR_start
incdw dxax
movdw ss:[di].VTR_end, dxax
setContext:
push bp
mov bp, di
call SetContextCallSuperNoLockLow
pop bp
.leave
ret
useRunBounds:
;
; Find the bounds of the context presently set so as to overwrite
; that whole range with the new context.
;
movdw dxax, ss:[params].EPNGL_position
call GetTypeRunBoundsLow ; ss:[di] <- VisTextRange
; filled with bounds
jmp setContext
FigureRangeAndSetContextThere endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckIfPageNameAlreadyUsed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check whether page name has been assigned to a page already
CALLED BY: INTERNAL StudioArticleSetContext
PASS: *ds:si = article
ax = context token
RETURN: carry set if page name already used
DESTROYED: ax, bx, cx, dx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 3/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckIfPageNameAlreadyUsed proc near
uses di,bp
.enter
;
; Get the range of the whole article.
;
push ax ; save context token
call GetWholeArticleRange
;
; See if the passed page name has been set on a page already.
;
mov di, offset MatchPageNameCallback
call EnumPageNameGraphics ; carry <- set if
; graphic found
pop ax ; ax <- context token
jnc done
mov di, offset PageNameAlreadyUsedErrorString
mov cx, (CDT_ERROR shl offset CDBF_DIALOG_TYPE) or \
(GIT_NOTIFICATION shl offset CDBF_INTERACTION_TYPE)
call DoPageNameAlreadyUsedDialog
stc
done:
.leave
ret
CheckIfPageNameAlreadyUsed endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetWholeArticleRange
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the range of the article.
CALLED BY: INTERNAL CheckIfPageNameAlreadyUsed
HandleVariableGraphicInsertion
PASS: *ds:si = article
RETURN: dx:ax = start of range
cx:bx = end of range
DESTROYED: ax
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/23/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetWholeArticleRange proc near
mov ax, MSG_VIS_TEXT_GET_TEXT_SIZE
call ObjCallInstanceNoLock
movdw cxbx, dxax ; cx:bx <- end of article
clrdw dxax ; dx:ax <- start of article
ret
GetWholeArticleRange endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DoPageNameAlreadyUsedDialog
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Put up a dialog saying a page name is in use already
CALLED BY: INTERNAL CheckIfPageNameAlreadyUsed
PASS: *ds:si = article
ax = context token
cx = flags for UserStandardDialog
di = offset of error string to use
RETURN: nothing
DESTROYED: cx, dx, di
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 5/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DoPageNameAlreadyUsedDialog proc near
uses ax, si
nameEltBuf local MAX_VIS_TEXT_NAME_ARRAY_ELT_SIZE dup(char)
.enter
;
; Get the name array element for the context.
;
push bp
push di, cx ; save offset and flags
mov cx, ss
lea dx, ss:[nameEltBuf]
mov bp, ax ; bp <- context token
mov ax, MSG_VIS_TEXT_FIND_NAME_BY_TOKEN
call ObjCallInstanceNoLock ; ax <- element size
;
; NULL terminate the name string.
;
mov es, cx
mov di, dx
add di, ax ; es:di <- end of string
mov {char}es:[di], 0
;
; Tell the user this page name belongs to a page already.
;
mov di, dx
add di, size VisTextNameArrayElement
; es:di <- name string
pop si, ax ; si <- error string offset
; ax <- flags
call DoStandardDialog
pop bp
.leave
ret
DoPageNameAlreadyUsedDialog endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MatchPageNameCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Look for page name token matching token passed on stack
CALLED BY: StudioArticleSetContext (via EnumPageNameGraphics)
PASS: ss:bp = inherited EnumPageNameGraphicsLocals
EPNGL_name = page name token to match
bx = page name token
RETURN: carry set if match found (stops enumeration)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/ 3/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MatchPageNameCallback proc near
.enter inherit StudioArticleSetContext
cmp ss:params.EPNGL_name, bx
clc
jne done
stc ; stop hunting
done:
.leave
ret
MatchPageNameCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ReplaceCurrentContextCallback
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make the current page name graphic represent the
passed page name.
CALLED BY: StudioArticleSetContext (via EnumPageNameGraphics)
PASS: ds:si = graphic TextRunArrayElement
es = segment of graphic element array
ss:bp = inherited EnumPageNameGraphicsLocals
EPNGL_name = new page name token for run
RETURN: ss:[bp].params.EPNGL_position = start position of element
carry set
DESTROYED: ax
SIDE EFFECTS:
Replaces graphic's stored page name token with the passed token.
PSEUDO CODE/STRATEGY:
Routine assumes there is at most one page name graphic per page and
so sets the carry to stop the enumeration after one call.
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 9/ 1/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ReplaceCurrentContextCallback proc near
.enter inherit StudioArticleSetContext
;
; First store the new context token for the graphic.
;
pushdw dssi
mov ax, ds:[si].TRAE_token
segmov ds, es
mov si, VM_ELEMENT_ARRAY_CHUNK
call ChunkArrayElementToPtr ; ds:di <- graphic
mov ax, ss:[params].EPNGL_name
mov {word} \
ds:[di].VTG_data.VTGD_variable.VTGV_privateData[2], ax
popdw dssi
;
; Now get the graphic's position and set the carry since we've
; found the only graphic on the page.
;
clr ax
mov al, ds:[si].TRAE_position.WAAH_high
mov ss:[params].EPNGL_position.high, ax
mov ax, ds:[si].TRAE_position.WAAH_low
mov ss:[params].EPNGL_position.low, ax
stc
.leave
ret
ReplaceCurrentContextCallback endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleClearContextLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Delete page name chars and clear corresponding contexts
CALLED BY: INTERNAL StudioArticleSetContext
PASS: *ds:si = text object
es = segment of text object
ss:di = VisTextSetContextParams
RETURN: dl = PageNameChangeType
DESTROYED: ax,bx,cx,dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/20/94 Initial version
jenny 9/ 1/94 Broke out DeletePageNameGraphicsInRange
jenny 10/13/94 Added code broken out of StudioArticleSetContext
and check for clearing multiple contexts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleClearContextLow proc near
uses bp
.enter inherit StudioArticleSetContext
;
; Clear the contexts and delete the page name chars for all
; page that overlap with the passed range. First get the start
; of the first page.
;
push di
call GetPageRangeFromVisTextRangeStart
pop di
movdw ss:[di].VTR_start, dxax
;
; Then get the end of the last page.
;
push di
movdw dxax, ss:[di].VTR_end
call GetPageRangeAndNumber ; dx:ax <- start
; cx:bx <- end
pop di
movdw ss:[di].VTR_end, cxbx
;
; Notice whether the start of the first page is different from
; the start of the last; this tells us whether we're clearing
; multiple contexts.
;
cmpdw ss:[di].VTR_start, dxax
mov dl, PNCT_SET_CONTEXT
je gotChangeType
mov dl, PNCT_CLEAR_MULTIPLE_CONTEXTS
gotChangeType:
push dx
;
; Clear the context(s) and delete the page name graphic(s).
;
push bp, di
mov bp, di
call SetContextCallSuperNoLockLow
pop bp, di
call DeletePageNameGraphicsInVisTextRange
;
; Return change type.
;
pop dx
.leave
ret
StudioArticleClearContextLow endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DeletePageNameGraphicsInVisTextRange
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: INTERNAL StudioArticleClearContextLow
PASS: *ds:si = text object
ss:di = VisTextRange
RETURN: nothing
DESTROYED: ax, bx, cx, dx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 11/23/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DeletePageNameGraphicsInVisTextRange proc near
movdw dxax, ss:[di].VTR_start
movdw cxbx, ss:[di].VTR_end
FALL_THRU DeletePageNameGraphicsInRange
DeletePageNameGraphicsInVisTextRange endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DeletePageNameGraphicsInRange
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Delete the page name graphics in the passed range.
CALLED BY: INTERNAL DeletePageNameGraphicsInVisTextRange
HandleVariableGraphicInsertion
PASS: *ds:si = text object
ss:bp = inherited EnumPageNameGraphicsLocals
dx:ax = range start
cx:bx = range end
RETURN: nothing
DESTROYED: ax, bx, cx, dx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 9/ 1/94 Broke out of StudioArticleClearContextLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DeletePageNameGraphicsInRange proc near
uses di
.enter inherit StudioArticleSetContext
;
; We don't want any undo chains for these deletions.
;
push cx, dx
clr cx ; cx <- set nothing
mov dx, mask VTF_ALLOW_UNDO ; dx <- clear undo
call SetArticleFeatures
pop cx, dx
;
; Delete the page name graphics in the passed range.
;
clrdw ss:params.EPNGL_count
mov di, offset DeletePageNameGraphic
call EnumPageNameGraphics
;
; Resume allowing undo.
;
mov cx, mask VTF_ALLOW_UNDO ; dx <- set undo
clr dx ; cx <- clear nothing
call SetArticleFeatures
;
; If we didn't delete anything, we're done.
;
tstdw ss:params.EPNGL_count
jz done
;
; Add delete count to the ignore count
;
mov ax, ATTR_SA_IGNORE_DELETE_VARIABLE_GRAPHICS
call ObjVarFindData ;ds:bx - ptr to count
jc varDataExists
mov cx, size dword
call ObjVarAddData ;ds:bx - ptr to count
varDataExists:
movdw dxax, ss:params.EPNGL_count
adddw ds:[bx], dxax
;
; Put the count of number of page name chars to be deleted
; in vardata, so that we know to not filter their deletion.
;
mov cx, size dword
mov ax, ATTR_SA_CLEAR_PAGE_NAME_CHAR_COUNT
call ObjVarAddData ;ds:bx - ptr to count
movdw dxax, ss:params.EPNGL_count
movdw ds:[bx], dxax
done:
.leave
ret
DeletePageNameGraphicsInRange endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetArticleFeatures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the features for the article
CALLED BY: INTERNAL DeletePageNameGraphicsInRange
PASS: cx = VisTextFeatures to set
dx = VisTextFeatures to clear
si = chunk of text object OD
RETURN: nothing
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 10/11/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetArticleFeatures proc near
uses ax, bx, bp, di
.enter inherit StudioArticleSetContext
mov bx, ss:params.EPNGL_textObj.handle
mov di, mask MF_FORCE_QUEUE
mov ax, MSG_VIS_TEXT_SET_FEATURES
call ObjMessage
.leave
ret
SetArticleFeatures endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DeletePageNameGraphic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Delete a page name graphic character
CALLED BY: StudioArticleUnsetAllContexts (via EnumPageNameGraphics)
PASS: ds:si - graphic TextRunArrayElement
inherited variables
RETURN: carry clear
DESTROYED: ax, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/12/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DeletePageNameGraphic proc near
uses si, di, bp
.enter inherit StudioArticleSetContext
clr dh
mov dl, ds:[si].TRAE_position.WAAH_high
mov ax, ds:[si].TRAE_position.WAAH_low
sub sp, size VisTextReplaceParameters
mov di, sp
;
; subtract out the effect of previous deletions, as the
; graphic we are trying to delete now will have moved
; from its original position by the time this message arrives
;
subdw dxax, ss:params.EPNGL_count
movdw ss:[di].VTRP_range.VTR_start, dxax
incdw dxax
movdw ss:[di].VTRP_range.VTR_end, dxax
clrdw ss:[di].VTRP_insCount
;
; the replace must be filtered, so that HotSpotText can
; update the HotSpotArray
;
mov ss:[di].VTRP_flags, mask VTRF_FILTER
movdw bxsi, ss:params.EPNGL_textObj
push bp
mov bp, di
mov ax, MSG_VIS_TEXT_REPLACE_TEXT
mov dx, size VisTextReplaceParameters
;
; Make sure the message goes on the queue. If it were to be
; called, then the graphic character would be immediately
; eliminated from the range over which EnumPageNameGraphics is
; enumerating, which would mean that suddenly the first
; character after that range would fall within it. If that
; character were a page name graphic, we'd wind up back here
; zapping it unjustifiably. -jenny 10/11/94
;
call SA_ObjMessageQueueStack
pop bp
add sp, size VisTextReplaceParameters
incdw ss:params.EPNGL_count
clc ;continue enumerating
.leave
ret
DeletePageNameGraphic endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
IsPageNameGraphicHere
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set carry to let caller know that there is a page
name graphic at the passed offset.
CALLED BY: SAVisTextReplaceParams (via EnumPageNameGraphics)
PASS: ds:si - graphic TextRunArrayElement
RETURN: carry set
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 11/ 8/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
IsPageNameGraphicHere proc near
stc ;stop enumerating
ret
IsPageNameGraphicHere endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleInsertVariableGraphic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Insert a variable graphic char
CALLED BY:
PASS: *ds:si - article
dx - VisTextVariableType
bx - format
ax - name token
ss:di - range to replace
RETURN: nothing
DESTROYED: everything but ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/11/94 Initial version
jenny 12/ 9/94 Store a unique ID in the privateData
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleInsertVariableGraphic proc near
uses ax, bp
.enter
;
; Set up the structure to pass and zero it out.
;
sub sp, size ReplaceWithGraphicParams
mov bp, sp
push ax, di
segmov es, ss, ax
mov di, bp
mov cx, size ReplaceWithGraphicParams
clr ax
rep stosb
pop ax, di
mov ss:[bp].RWGP_graphic.VTG_type, VTGT_VARIABLE
mov ss:[bp].RWGP_graphic.VTG_flags, mask VTGF_DRAW_FROM_BASELINE
mov ss:[bp].RWGP_graphic.VTG_data.VTGD_variable.VTGV_manufacturerID,
MANUFACTURER_ID_GEOWORKS
mov ss:[bp].RWGP_graphic.VTG_data.VTGD_variable.VTGV_type, dx
mov {word} \
ss:[bp].RWGP_graphic.VTG_data.VTGD_variable.VTGV_privateData, bx
mov {word} \
ss:[bp].RWGP_graphic.VTG_data.VTGD_variable.VTGV_privateData[2], ax
;
; Get a unique ID and store it in the graphic's private data.
;
call GetWholePageNameGraphicID ; dx:ax <- FileID
; cx <- ID unique
; within file
mov {word} \
ss:[bp].RWGP_graphic.VTG_data.VTGD_variable.VTGV_privateData[4], dx
mov {word} \
ss:[bp].RWGP_graphic.VTG_data.VTGD_variable.VTGV_privateData[6], ax
mov {word} \
ss:[bp].RWGP_graphic.VTG_data.VTGD_variable.VTGV_privateData[8], cx
movdw dxax, ss:[di].VTR_start
movdw ss:[bp].RWGP_range.VTR_start, dxax
movdw ss:[bp].RWGP_range.VTR_end, dxax
mov ax, MSG_VIS_TEXT_REPLACE_WITH_GRAPHIC
mov dx, size ReplaceWithGraphicParams
call ObjCallInstanceNoLock
add sp, size ReplaceWithGraphicParams
.leave
ret
StudioArticleInsertVariableGraphic endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetWholePageNameGraphicID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get a unique ID to store in a page name graphic.
CALLED BY: INTERNAL StudioArticleInsertVariableGraphic
FixupPageNameGraphic
PASS:
RETURN: dx:ax = FileID
cx = unique internal ID for page name graphic
DESTROYED: es
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/ 9/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetWholePageNameGraphicID proc near
uses di
.enter
call GetFileID
call GetPageNameGraphicID
.leave
ret
GetWholePageNameGraphicID endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetFileID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the file's FileID.
CALLED BY: INTERNAL GetWholePageNameGraphicID
PASS: ds = segment of article
RETURN: dx:ax = FileID
DESTROYED: cx, di, es
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/ 9/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetFileID proc near
call GetFileHandle ; bx <- file handle
segmov es, ss
sub sp, (size FileID)
mov di, sp ; es:di <- buffer
mov ax, FEA_FILE_ID
mov cx, (size FileID)
call FileGetHandleExtAttributes
CheckHack <size FileID eq size dword>
mov dx, {word} es:[di].high
mov ax, {word} es:[di].low
add sp, (size FileID)
ret
GetFileID endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetPageNameGraphicID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the unique ID to store in the next page name graphic.
CALLED BY: INTERNAL GetWholePageNameGraphicID
PASS: *ds:si = article
RETURN: cx = ID
DESTROYED: nothing
SIDE EFFECTS:
Increments the ID stored with the document.
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 12/ 8/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetPageNameGraphicID proc near
mov ax, MSG_STUDIO_DOCUMENT_GET_PAGE_NAME_GRAPHIC_ID
call VisCallParent ; cx <- unique ID
ret
GetPageNameGraphicID endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetPageRangeFromVisTextRangeStart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the range of the page containing the start of the
passed text range.
CALLED BY: INTERNAL StudioArticleSetContext
StudioArticleGetPageName
PASS: *ds:si - article
ss:di - VisTextRange
RETURN: dx:ax - start offset of page which contains start select
cx:bx - end offset of page
di - page number
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jenny 9/ 5/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetPageRangeFromVisTextRangeStart proc near
movdw dxax, ss:[di].VTR_start
FALL_THRU GetPageRangeAndNumber
GetPageRangeFromVisTextRangeStart endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetPageRangeAndNumber
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the VisTextRange which covers the page containing
the passed text position
CALLED BY: INTERNAL
PASS: *ds:si - article
dx:ax - start select position
RETURN: dx:ax - start offset of page which contains start select
cx:bx - end offset of page
di - page number
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/15/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetPageRangeAndNumber proc near
uses si, bp
startOffset local dword
.enter
clrdw ss:startOffset
mov si, offset ArticleRegionArray
mov di, ds:[si]
mov cx, ds:[di].CAH_count
add di, ds:[di].CAH_offset
findLoop:
adddw ss:startOffset, ds:[di].VLTRAE_charCount, bx
cmpdw dxax, ss:startOffset
jb foundIt
add di, size ArticleRegionArrayElement
loop findLoop
sub di, size ArticleRegionArrayElement
foundIt:
call ChunkArrayPtrToElement ;ax = current element, or
push ax ; page number
movdw cxbx, ss:startOffset ;cx:bx = start offset of
; *next* region
movdw dxax, cxbx
test ds:[di].VLTRAE_flags, mask VLTRF_ENDED_BY_COLUMN_BREAK
jz noBreak ;don't sub off 1 for col break
decdw cxbx ;cx:bx = end offset of this reg
noBreak:
subdw dxax, ds:[di].VLTRAE_charCount
;dx:ax = start off. of this reg
pop di ;bp = page number
.leave
ret
GetPageRangeAndNumber endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetPageRangeFromPageNumber
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find the VisTextRange which covers the passed page number
CALLED BY: INTERNAL
PASS: *ds:si - article
cx - page number
RETURN: dx:ax - start offset of page which contains start select
cx:bx - end offset of page
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/15/94 Initial version
jenny 9/14/94 Fixed not to assume that a page break
follows the last page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetPageRangeFromPageNumber proc near
uses si
startOffset local dword
.enter
;
; First find out whether this is the last page and save the
; flags so we'll know later.
;
mov si, offset ArticleRegionArray
mov si, ds:[si]
inc cx
cmp cx, ds:[si].CAH_count
EC < ERROR_A PAGE_INDEX_OUT_OF_RANGE >
pushf
dec cx
;
; Start off at the first page and count up to get the info for
; the page passed.
;
clrdw startOffset
add si, ds:[si].CAH_offset
jcxz foundPage
countLoop:
adddw ss:startOffset, ds:[si].VLTRAE_charCount, bx
add si, size ArticleRegionArrayElement
loop countLoop
foundPage:
movdw dxax, ss:startOffset ;dx:ax = start offset
movdw cxbx, dxax
adddw cxbx, ds:[si].VLTRAE_charCount
;
; Now restore the flags which indicate whether we're dealing
; with the last page. If we're not, decrement the end offset so
; as not to include the page break character in the range.
;
popf
je done
decdw cxbx ;cx:bx = end offset
done:
.leave
ret
GetPageRangeFromPageNumber endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EnumPageNameGraphics
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Enumerate all the graphic runs within a give text range.
CALLED BY: INTERNAL
PASS: *ds:si - article
dx:ax - start pos
cx:bx - end pos
di - offset of callback routine in this segment
bp - data
Passed to callback:
ds:si - TextRunArrayElement
bx - page name token
bp - data
es - segment of graphic element array
Return: carry set to stop enumerating, clear to continue
Can destroy: ax,bx,cx,dx,si,di,ds,es
RETURN: carry set if callback set it to stop enumeration
DESTROYED: di
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/15/94 Initial version
jenny 9/ 1/94 Now returns carry set if callback set it
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EnumPageNameGraphics proc far
uses ax,bx,cx,dx,bp,si,ds,es
passedBP local word push bp
rangeEnd local dword push cx, bx
callback local nptr push di
.enter
call GetFileHandle ;bx = file
call LockGraphicRunArray ;ds:si = first element
jnc exit ;cx = # consecutive elements
;di = elt array VM blk han
call LockGraphicElementArray ;es = segment of element array
topLoop:
jcxz doneClearCarry ;no more elements?
; check if this graphic element is past the end of the range
mov bx, ss:rangeEnd.high
cmp bl, ds:[si].TRAE_position.WAAH_high
jne 10$
mov bx, ss:rangeEnd.low
cmp bx, ds:[si].TRAE_position.WAAH_low
10$:
jbe doneClearCarry
; see if this element comes after the start of the range
cmp dl, ds:[si].TRAE_position.WAAH_high
jnz 20$
cmp ax, ds:[si].TRAE_position.WAAH_low
20$:
ja continue
mov bx, ds:[si].TRAE_token
call IsGraphicAPageNameGraphic ;bx <- name token
jc continue
mov di, ss:[callback]
push ax, cx, dx, bp, si, ds, es
mov bp, ss:[passedBP]
call di ;call the callback
pop ax, cx, dx, bp, si, ds, es
jc done ;abort enum?
continue:
add si, size TextRunArrayElement
loop topLoop
xchg ax, cx ;huge array code uses ax
push dx
sub si, size TextRunArrayElement
call HugeArrayNext ;for count
pop dx
xchg ax, cx
jmp topLoop
doneClearCarry:
clc
done:
call HugeArrayUnlock
call VMUnlockES
exit:
.leave
ret
EnumPageNameGraphics endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
IsGraphicAPageNameGraphic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check whether the graphic element defines a page name
CALLED BY: GetCurrentPageNameToken
PASS: bx - element token
es - segment of graphic element array
RETURN: carry set if not a page name graphic
carry clear if graphic defines a page name,
bx - name token
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/ 8/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
IsGraphicAPageNameGraphic proc far
uses ax, ds, si, di
.enter
cmp bx, CA_NULL_ELEMENT
je noGood
segmov ds, es, ax
mov si, VM_ELEMENT_ARRAY_CHUNK
mov ax, bx
call ChunkArrayElementToPtr ; ds:di - graphic
cmp ds:[di].VTG_type, VTGT_VARIABLE
jne noGood
cmp ds:[di].VTG_data.VTGD_variable.VTGV_type,
VTVT_CONTEXT_NAME
jne noGood
mov bx,
{word}ds:[di].VTG_data.VTGD_variable.VTGV_privateData[2]
clc
jmp done
noGood:
stc
done:
.leave
ret
IsGraphicAPageNameGraphic endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LockGraphicRunArray
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Lock the graphic run array
CALLED BY:
PASS: *ds:si - article
bx - file handle
RETURN: carry clear if no graphic runs
carry set if graphic runs
ds:si - first element
cx - # consecutive elements
di - VM Block handle of element array
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/ 8/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LockGraphicRunArray proc near
uses ax, dx, bp
.enter
push bx
mov ax, ATTR_VIS_TEXT_GRAPHIC_RUNS
call ObjVarFindData
mov di, {word}ds:[bx] ;di = VM Block handle
pop bx
jnc done
mov ax, di
call VMLock
mov ds, ax ; ds -> TextLargeRunArrayHeader
push ds:[TLRAH_elementVMBlock] ; save handle
call VMUnlock ; release block
clr ax, dx ;start with element #0
call HugeArrayLock ;ds:si = element #0
EC < tst ax >
EC < ERROR_Z -1 >
mov cx, ax ;cx = # consecutive
pop di ;get element array handle
stc
done:
.leave
ret
LockGraphicRunArray endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LockGraphicElementArray
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Lock the graphic element array
CALLED BY: GetCurrentPageNameToken
PASS: ds - segment of graphic run array
^vbx:di - element array
RETURN: es - segment of graphic element arrray
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 7/ 8/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LockGraphicElementArray proc near
push ax, bp
mov ax, di
call VMLock
mov es, ax
pop ax, bp
ret
LockGraphicElementArray endp
;---
GetFileHandle proc near
push ax
mov bx, ds:[LMBH_handle] ;ds = article segment
mov ax, MGIT_OWNER_OR_VM_FILE_HANDLE
call MemGetInfo
mov bx, ax ;bx = file handle
pop ax
ret
GetFileHandle endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleSetHyperlinkTextStyle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Tell the document to remember the new ShowAllHyperlinks
setting.
CALLED BY: MSG_VIS_TEXT_SET_HYPERLINK_TEXT_STYLE
PASS: *ds:si = StudioArticleClass object
ds:di = StudioArticleClass instance data
ds:bx = StudioArticleClass object (same as *ds:si)
es = segment of StudioArticleClass
ax = message #
ss:bp - VisTextSetTextStyleParams
RETURN: nothing
DESTROYED: ax, bx, cx, dx, di
SIDE EFFECTS:
Sets MBH_miscFlags in the document MapBlockHeader
PSEUDO CODE/STRATEGY:
This code is dependent on the VTES_BOXED style being used
to show hyperlinks.
We also do some checking that depends on the VTSTSP_range
being set from 0 to TEXT_ADDRESS_PAST_END
by the ShowHyperlinks code in the hyperlink controller.
We do the checking because this message also gets sent out
by VisTextSetHyperlink in the text library and in that case we
don't want to waste time notifying the document of the
ShowAllHyperlinks setting. The ShowAllHyperlinks setting
will only change when the hyperlink controller sends us
the message.
Also we ignore undo actions associated with changing the
hyperlink text style. This serves two purposes: it keeps the
handle table from filling up with excessive undo actions,
and it avoids problems with clipboard paste and
quick move/copy where the user Undo'es the action, changes
the ShowAllHyperlinks setting, and then Redo'es the action.
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 11/ 8/94 Initial version
cassie 3/13/95 ignore undo actions instead of
flushing the undo chain
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleSetHyperlinkTextStyle method dynamic StudioArticleClass,
MSG_VIS_TEXT_SET_HYPERLINK_TEXT_STYLE
;
; Check if we're being called by HyperlinkController, and
; if so, update the document state.
;
cmpdw ss:[bp].VTSTSP_range.VTR_start, 0
jne callSuper
cmpdw ss:[bp].VTSTSP_range.VTR_end, TEXT_ADDRESS_PAST_END
jne callSuper
;
; Update the document's MSDF_SHOW_HYPERLINKS flag.
;
; Assume we're going to show the hyperlinks; then check if
; that's true.
;
mov cx, mask MSDF_SHOW_HYPERLINKS
clr dx
test ss:[bp].VTSTSP_extendedBitsToSet, mask VTES_BOXED
jnz showHyperlinks
xchg cx, dx ; unset MSDF_SHOW_HYPERLINKS
showHyperlinks:
mov ax, MSG_STUDIO_DOCUMENT_SET_MISC_FLAGS
call VisCallParent
callSuper:
;
; Suspend the text object so the Undo moniker does not change twice
;
call MarkBusy
call IgnoreUndoNoFlush
call SuspendObject
;
; Call super to change the hyperlink text style.
;
mov ax, MSG_VIS_TEXT_SET_HYPERLINK_TEXT_STYLE
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
call UnsuspendObject
call AcceptUndo
call MarkNotBusy
ret
StudioArticleSetHyperlinkTextStyle endm
DocNotify ends
DocMiscFeatures segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleDescribeAttrs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check for indeterminate style and set global flag.
CALLED BY: MSG_META_STYLED_OBJECT_DESCRIBE_ATTRS
PASS: *ds:si = StudioArticleClass object
ds:di = StudioArticleClass instance data
ds:bx = StudioArticleClass object (same as *ds:si)
es = segment of StudioArticleClass
ax = message #
ss:bp - SSCDescribeAttrsParams
RETURN: nothing
DESTROYED: ax
bx, si, di, ds, es (method handler)
SIDE EFFECTS:
Modifies the global variable styleIndeterminate.
PSEUDO CODE/STRATEGY:
For the reason that we intercept this message, see strategy
of StudioArticleDefineStyle.
Pseudo code for this method:
- Call super to describe the attrs and fill in the
SSCDAP_textObject.
- Check if we are using a new styles library since we assume
the new styles library will have the bug (that we are avoiding)
fixed.
- Get the description string from the SSCDAP_textObject.
- Get a pointer to our StringUsedForTestingForIndeterminateStyle.
- Compare the two strings up to the length of out StringUsedForTest...
- Store the result in a global variable.
NOTE: styleIndeterminate must be initialized to BB_FALSE since it
will never get set if we have a new styles library.
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 11/14/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleDescribeAttrs method dynamic StudioArticleClass,
MSG_META_STYLED_OBJECT_DESCRIBE_ATTRS
uses cx, dx, bp
.enter
;
; Call super to describe the attrs.
;
push bp
mov di, offset StudioArticleClass
call ObjCallSuperNoLock
pop bp
;
; Check the version of the style library.
;
call CheckStylesLibraryProtocol ; carry set if old version
jnc done ; no need to check
;
; Check if the style is indeterminate.
; We cheat here by looking at the description that the superclass
; put into the describeTextObject.
;
; Grab the description string from the describeTextObject.
mov ax, MSG_VIS_TEXT_GET_ALL_OPTR
movdw bxsi, ss:[bp].SSCDAP_textObject
GetResourceHandleNS BufferStringForTestingForIndeterminateStyle, dx
mov bp, offset BufferStringForTestingForIndeterminateStyle
mov di, mask MF_CALL
call ObjMessage ; trash ds
; cx <- chunk handle w/ null terminated text
mov bx, dx
push bx ; save handle to unlock later
call MemLock ; lock resource #1
mov ds, ax
mov si, cx
mov si, ds:[si] ; ds:si <- description string
; Grab the StringUsedForTestingForIndeterminateStyle string.
GetResourceHandleNS StringUsedForTestingForIndeterminateStyle, bx
call MemLock ; lock resource #2
mov es, ax
mov di, offset StringUsedForTestingForIndeterminateStyle
mov di, es:[di] ; es:di <- testing string
; Compare the two strings up to the length of the testing string.
call LocalStringLength
; cx <- # of chars in StringUsedForTesting...
call LocalCmpStrings
call MemUnlock ; unlock resource #2
pop bx
call MemUnlock ; unlock resource #1
jnz notIndeterminate
mov ch, BB_TRUE
jmp short storeResult
notIndeterminate:
mov ch, BB_FALSE
storeResult:
;
; Store the result in the global variable styleIndeterminate.
;
call StudioGetDGroupES
mov es:[styleIndeterminate], ch
done:
.leave
ret
StudioArticleDescribeAttrs endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckStylesLibraryProtocol
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Find out whether styles library has the 'defining
an indeterminate style' bug fixed or not.
CALLED BY: (INTERNAL) StudioArticleDescribeAttrs
PASS: nothing
RETURN: carry set if styles library is old and doesn't
have the 'defining an indeterminate style' bug fixed.
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 11/18/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckStylesLibraryProtocol proc near
uses ax,bx,di,es
.enter
sub sp, size ReleaseNumber
mov di, sp
segmov es, ss, ax
mov bx, handle styles
mov ax, GGIT_GEODE_RELEASE
call GeodeGetInfo
;
; Anything below 2.1 will be treated specially
;
cmp ss:[di].RN_major, 2 ;carry set if < 2
jc done
cmp ss:[di].RN_minor, 1 ;carry set if < 1
done:
lahf
add sp, size ReleaseNumber
sahf
.leave
ret
CheckStylesLibraryProtocol endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StudioArticleDefineStyle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check for indeterminate style and for the Boxed char
attribute.
CALLED BY: MSG_META_STYLED_OBJECT_DEFINE_STYLE
MSG_META_STYLED_OBJECT_REDEFINE_STYLE
PASS: *ds:si = StudioArticleClass object
ds:di = StudioArticleClass instance data
ds:bx = StudioArticleClass object (same as *ds:si)
es = segment of StudioArticleClass
ax = message #
ss:bp - SSCDefineStyleParams
RETURN: nothing
DESTROYED:
bx, si, di, ds, es (method handler)
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
The 2.01 version of the Styles library has a bug where it does
not disable the DefineNewStyle trigger when there is an
Indeterminate style selected. We don't want to ship a new
version of the Style library so we need to check if the style is
Indeterminate and report an error to the user.
We just have to check the global variable styleIndeterminate that
was set when MSG_META_STYLED_OBJECT_DESCRIBE_ATTRS was intercepted.
We also want to reserve the Boxed char attribute for showing
hyperlinks so we need to check if the user is trying to define
or redefine a style with the Boxed char attr and tell them that
they can not.
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 11/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StudioArticleDefineStyle method dynamic StudioArticleClass,
MSG_META_STYLED_OBJECT_DEFINE_STYLE,
MSG_META_STYLED_OBJECT_REDEFINE_STYLE
uses ax, cx, dx, bp
passedBP local word push bp
getParams local VisTextGetAttrParams
charAttr local VisTextCharAttr
charDiffs local VisTextCharAttrDiffs
ForceRef getParams
ForceRef charAttr
ForceRef charDiffs
.enter
;
; Check if the style is indeterminate.
;
call StudioGetDGroupES
cmp es:[styleIndeterminate], BB_TRUE
je reportIndeterminateError
;
; Get the Character Attributes of the selected text
; and check for the Boxed char attribute.
;
call SA_GetCharAttr
call SA_CheckForBoxedCharAttr
jc done
;
; Call super to define the style.
;
push bp
; ax is still the message
mov di, offset StudioArticleClass
mov bp, passedBP
call ObjCallSuperNoLock
pop bp
done:
.leave
ret
reportIndeterminateError:
call SA_ReportIndeterminateStyleError
jmp short done
StudioArticleDefineStyle endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SA_GetCharAttr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get the char attrs of the current selected area
CALLED BY: (INTERNAL) StudioArticleDefineStyle
PASS: *ds:si - article
inherited locals
RETURN: charAttr and charDiffs filled in
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 11/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SA_GetCharAttr proc near
uses ax, dx
.enter inherit StudioArticleDefineStyle
lea ax, charAttr
movdw getParams.VTGAP_attr, ssax
lea ax, charDiffs
movdw getParams.VTGAP_return, ssax
mov ax, MSG_VIS_TEXT_GET_CHAR_ATTR
clr getParams.VTGAP_flags
mov getParams.VTGAP_range.VTR_start.high, VIS_TEXT_RANGE_SELECTION
push bp
lea bp, getParams
mov dx, (size getParams)
call ObjCallInstanceNoLock
pop bp
.leave
ret
SA_GetCharAttr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SA_ReportIndeterminateStyleError
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Show indeterminate style error message to user
CALLED BY: (INTERNAL) StudioArticleDefineStyle
PASS: *ds:si - article
RETURN: nothing
DESTROYED: ax, bx
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 11/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SA_ReportIndeterminateStyleError proc near
mov ax, (CDT_ERROR shl offset CDBF_DIALOG_TYPE) or \
(GIT_NOTIFICATION shl offset CDBF_INTERACTION_TYPE)
mov bx, offset ErrorCanNotDefineInteterminateStyle
call PutupHelpBox
ret
SA_ReportIndeterminateStyleError endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SA_CheckForBoxedCharAttr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Report an error if the Boxed char attr is set
CALLED BY: (INTERNAL) StudioArticleDefineStyle
PASS: *ds:si - article
inherited locals
RETURN: carry set if VTES_BOXED char atts set
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
lester 11/10/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SA_CheckForBoxedCharAttr proc near
uses ax, bx
.enter inherit StudioArticleDefineStyle
;
; Test the charAttr for the BOXED char attr
;
test charAttr.VTCA_extendedStyles, mask VTES_BOXED
jnz reportError
clc ; carry clear <- no Boxed char attr
done:
.leave
ret
reportError:
;
; Display error and return carry set
;
mov ax, (CDT_ERROR shl offset CDBF_DIALOG_TYPE) or \
(GIT_NOTIFICATION shl offset CDBF_INTERACTION_TYPE)
mov bx, offset ErrorCanNotDefineStyleWithBoxedCharAttr
call PutupHelpBox
stc ; carry set <- indeterminate style
jmp short done
SA_CheckForBoxedCharAttr endp
DocMiscFeatures ends
| 27.146986 | 80 | 0.616222 |
a0a90db1d0d60754322e8f5c2cb61d899fb8be49 | 585 | asm | Assembly | libsrc/enterprise/exos_capture_channel.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | libsrc/enterprise/exos_capture_channel.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | libsrc/enterprise/exos_capture_channel.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | ;
; Enterprise 64/128 specific routines
; by Stefano Bodrato, 2011
;
; exos_capture_channel(unsigned char main_channel, unsigned char secondary_channel);
;
;
; $Id: exos_capture_channel.asm,v 1.3 2016-06-19 20:17:32 dom Exp $
;
SECTION code_clib
PUBLIC exos_capture_channel
PUBLIC _exos_capture_channel
EXTERN exos_capture_channel_callee
EXTERN ASMDISP_EXOS_CAPTURE_CHANNEL_CALLEE
exos_capture_channel:
_exos_capture_channel:
pop bc
pop de
pop hl
push hl
push de
push bc
jp exos_capture_channel_callee + ASMDISP_EXOS_CAPTURE_CHANNEL_CALLEE
| 18.870968 | 84 | 0.774359 |
e6f372897a2f0fb7f069c9d5ac5e171a0ce70e0f | 549 | asm | Assembly | signal comparator.asm | earthperson/TIS-100 | 89343834804ed57b786911bb4626b75092059522 | [
"MIT"
] | null | null | null | signal comparator.asm | earthperson/TIS-100 | 89343834804ed57b786911bb4626b75092059522 | [
"MIT"
] | null | null | null | signal comparator.asm | earthperson/TIS-100 | 89343834804ed57b786911bb4626b75092059522 | [
"MIT"
] | null | null | null | #walkthrough/23.jpg
#SIGNAL COMPARATOR
#READ A VALUE FROM IN
#WRITE 1 TO OUT.G IF IN > 0
#WRITE 1 TO OUT.E IF IN = 0
#WRITE 1 TO OUT.L IF IN < 0
#WHEN A 1 IS NOT WRITTEN TO AN OUTPUT, WRITE A 0 INSTEAD
MOV UP, DOWN
MOV UP, DOWN
MOV UP, RIGHT
MOV LEFT, ACC
JGZ POSITIVE
JLZ OMMITED
JEZ OMMITED
POSITIVE:
MOV 1, DOWN
JMP END
OMMITED:
MOV 0, DOWN
END:
MOV ACC, RIGHT
MOV LEFT, ACC
JEZ ZERO
JNZ OMMITED
ZERO:
MOV 1, DOWN
JMP END
OMMITED:
MOV 0, DOWN
END:
MOV ACC, RIGHT
MOV LEFT, ACC
JLZ NEGATIVE
MOV 0, DOWN
JMP END
NEGATIVE:
MOV 1, DOWN
END:
| 11.4375 | 56 | 0.708561 |
c20bc063966186acbe48195736fcfdadb096bbc6 | 5,991 | asm | Assembly | 8088/demo/100line/l100.asm | reenigne/reenigne | c3eb8b31d7964e78bbe44908987d4be052a74488 | [
"Unlicense"
] | 92 | 2015-04-10T17:45:11.000Z | 2022-03-30T17:58:51.000Z | 8088/demo/100line/l100.asm | MS-DOS-stuff/reenigne | 0a113990aef398550c6f14d1c7a33af1cb091887 | [
"Unlicense"
] | 2 | 2017-11-05T07:21:35.000Z | 2018-11-04T23:36:13.000Z | 8088/demo/100line/l100.asm | MS-DOS-stuff/reenigne | 0a113990aef398550c6f14d1c7a33af1cb091887 | [
"Unlicense"
] | 18 | 2015-04-11T20:32:44.000Z | 2021-11-06T05:19:57.000Z | org 0x100
cpu 8086
demoAPI EQU 0F8h
; Determine if loader is present, and abort if not
; First, check to see if the API is even present.
; If not, don't try to call anything since it will hang the system.
xor bx,bx
mov es,bx
mov di,(demoAPI * 4)+2 ;check to see if our INT is empty
cmp [word es:di],bx ;int. vector empty?
je exitShort ;abort if so
mov ax,0700h ;check int. vector to see if it's ours
int demoAPI
cmp ax,0C0DEh ;magic cookie received?
jne exitShort ;abort if not
jmp mstart
exitShort:
jmp exitEffect
mstart:
; Move vsync start up 50 scanlines (25 rows) to scanline 174 = row 37
; Active region:
; Scanline 0 = row 0 scanline 0 of 100-line screen
; Scanline 1 = row 1 scanline 0 of 100-line screen
; ...
; Overscan region:
; Scanline 100 = row 0 scanline 0 of 162-line screen
; Scanline 101 = row 0 scanline 1 of 162-line screen = last visible
; Scanline 102 = row 1 scanline 0 of 162-line screen
; Scanline 103 = row 1 scanline 1 of 162-line screen
; ...
; Scanline 126 = row 126 scanline 0 of 162-line screen
; Scanline 127 = row 0 scanline 0 of 162-line screen
; Common: 0x7100, 0x5001, 0x5a02, 0x0003, 0x0005, 0x0208, 0x060a, 0x070b, 0x030a, 0xc00f
; Active region: 0x6304, 0x6406, 0x7f07, 0x0009, 0x1f0c, 0x400d
; Overscan region: 0x5004, 0x0106, 0x2507, 0x0109, 0x000c, 0x000d
; Ready to start; tell API we are waiting, then proceed when
; we get the signal.
mov ah,01 ;tell loader we are ready to start
int demoAPI
mov ah,02 ;wait for signal to proceed
stc
waitLoader:
int demoAPI
jnc waitLoader ;if carry not set, don't start yet
; Copy data
mov ax,cs
mov ds,ax
mov ax,0xb800
mov es,ax
mov cx,8160
mov si,data
xor di,di
cld
rep movsw
xor ax,ax
stosw
; Mode 09
; 1 +HRES 1
; 2 +GRPH 0
; 4 +BW 0
; 8 +VIDEO ENABLE 8
; 0x10 +1BPP 0
; 0x20 +ENABLE BLINK 0
mov dx,0x3d8
mov al,0x09
out dx,al
; Palette 00
; 1 +OVERSCAN B 0
; 2 +OVERSCAN G 2
; 4 +OVERSCAN R 4
; 8 +OVERSCAN I 0
; 0x10 +BACKGROUND I 0
; 0x20 +COLOR SEL 0
inc dx
mov al,0x00
out dx,al
mov dl,0xd4
; 0xff Horizontal Total 71
mov ax,0x7100
out dx,ax
; 0xff Horizontal Displayed 50
mov ax,0x5001
out dx,ax
; 0xff Horizontal Sync Position 5a
mov ax,0x5a02
out dx,ax
; 0x0f Horizontal Sync Width 0d
mov ax,0x0003
out dx,ax
; 0x7f Vertical Total 3d
mov ax,0x6304
out dx,ax
; 0x1f Vertical Total Adjust 00
mov ax,0x0005
out dx,ax
; 0x7f Vertical Displayed 02
mov ax,0x6406
out dx,ax
; 0x7f Vertical Sync Position 18
mov ax,0x7f07
out dx,ax
; 0x03 Interlace Mode 02
mov ax,0x0208
out dx,ax
; 0x1f Max Scan Line Address 00
mov ax,0x0009
out dx,ax
; Cursor Start 06
; 0x1f Cursor Start 6
; 0x60 Cursor Mode 0
mov ax,0x000a
out dx,ax
; 0x1f Cursor End 07
mov ax,0x000b
out dx,ax
; 0x3f Start Address (H) 00
mov ax,0x000c
out dx,ax
; 0xff Start Address (L) 00
mov ax,0x000d
out dx,ax
; 0x3f Cursor (H) 03
mov ax,0x1f0e
out dx,ax
; 0xff Cursor (L) c0
mov ax,0xff0f
out dx,ax
%macro waitForDisplayEnable 0
%%waitForDisplayEnable
in al,dx ; 1 1 2
test al,1 ; 2 0 2
jnz %%waitForDisplayEnable ; 2 0 2
%endmacro
%macro waitForDisplayDisable 0
%%waitForDisplayDisable
in al,dx ; 1 1 2
test al,1 ; 2 0 2
jz %%waitForDisplayDisable ; 2 0 2
%endmacro
%macro waitForVerticalSync 0
%%waitForVerticalSync
in al,dx
test al,8
jz %%waitForVerticalSync
%endmacro
%macro waitForNoVerticalSync 0
%%waitForNoVerticalSync
in al,dx
test al,8
jnz %%waitForNoVerticalSync
%endmacro
cli
mov dl,0xda
mov bx,80 ; Initial
mov cx,0 ; Frame counter
frameLoop:
; Scanline 0
waitForDisplayEnable
; Active region: 0x6304, 0x6406, 0x7f07, 0x0009, 0x1f0c, 0x400d
mov dl,0xd4
mov ax,0x0009
out dx,ax
mov ax,0x6304
out dx,ax
mov ax,0x6406
out dx,ax
mov ax,0x7f07
out dx,ax
mov ax,0x1f0c
out dx,ax
mov ax,0x400d
out dx,ax
mov dl,0xda
waitForDisplayDisable
; Scanlines 1-99
%rep 99
waitForDisplayEnable
waitForDisplayDisable
%endrep
; Scanline 100
waitForDisplayEnable
; Overscan region: 0x5004, 0x0106, 0x2507, 0x0109, 0x000c, 0x000d
mov dl,0xd4
mov ax,0x0109
out dx,ax
mov ax,0x0106
out dx,ax
mov ax,0x2507
out dx,ax
mov ax,0x5004
out dx,ax
mov ax,0x000c
out dx,ax
inc ax
out dx,ax
mov dl,0xda
waitForDisplayDisable
waitForVerticalSync
waitForNoVerticalSync
push dx
mov ah,0
int demoAPI
mov ah,2
int demoAPI
jnc exitEffect
pop dx
jmp frameLoop
exitEffect:
mov ax,0x4c00
int 0x21
data:
| 23.22093 | 89 | 0.527625 |
46421f0f70c5580ca9b13dff8632c9224833230f | 5,339 | asm | Assembly | ecdsa128/src/SHA1_src/SHA1_VS/src/SHA_short.asm | FloydZ/Crypto-Hash | 2635450fb16d4d8dc4578d6539cc25ce599f7e21 | [
"MIT"
] | 11 | 2015-03-17T10:31:23.000Z | 2022-01-21T17:42:43.000Z | ecdsa128/src/SHA1_src/SHA1_VS/src/SHA_short.asm | 0xFF1E071F/Crypto-Hash | 2635450fb16d4d8dc4578d6539cc25ce599f7e21 | [
"MIT"
] | null | null | null | ecdsa128/src/SHA1_src/SHA1_VS/src/SHA_short.asm | 0xFF1E071F/Crypto-Hash | 2635450fb16d4d8dc4578d6539cc25ce599f7e21 | [
"MIT"
] | 6 | 2018-01-29T16:06:36.000Z | 2021-05-08T19:22:24.000Z | ; Very simple wrapper for SHA1ShortMsg.txt
;
; Note:
; First message on list has length ZERO, however its represented in test vectors as string 00.
; This wrapper reads *ONLY* messages and valid hashes from test vectors, THE LENGHT OF MESSAGES
; IS DIRECTLY COMPUTED AS NUMBERS OF BYTES READ.
; Thats why it uses additional check to correctly support this special situation:
; if 1-byte message was found in the test vectors and if its 0x00, sha1 from ZERO LENGHT string
; is computed. It is NOT a bug in sha1 code, its just a way the wrapper works.
;
;
.686p
.mmx
.model flat,stdcall
option casemap:none
include g:\masm32\include\windows.inc
include g:\masm32\include\user32.inc
include g:\masm32\include\kernel32.inc
include g:\masm32\include\oleaut32.inc
include g:\masm32\include\comctl32.inc
include g:\masm32\include\advapi32.inc
includelib g:\masm32\lib\user32.lib
includelib g:\masm32\lib\kernel32.lib
includelib g:\masm32\lib\oleaut32.lib
includelib g:\masm32\lib\comctl32.lib
includelib g:\masm32\lib\advapi32.lib
include ..\lib\sha1.inc
include ..\lib\utils.inc
readLine PROTO :DWORD, :DWORD, :DWORD
printHash PROTO :DWORD
printLine PROTO :DWORD
compareHash PROTO :DWORD, :DWORD
.data?
_BUFFER db 14000h dup (?)
_HASH db 20 dup (?)
_LEN dd ?
.data
szErrorFile db "Cannot read "
szSHALongMsgFile db "SHA1ShortMsg.txt",0
szSHAError db "Invalid hash found !!",0
szSHAOk db "All hashes are valid.",0
.code
start:
pushad
invoke CreateFile, offset szSHALongMsgFile, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0
mov ebx, eax
inc eax
jz @errFile
invoke CreateFileMapping, ebx, 0, PAGE_READONLY, 0, 0, 0
mov esi, eax
invoke MapViewOfFile, esi, FILE_MAP_READ, 0, 0, 0
mov edi, eax
xor ecx, ecx
xor edx, edx
@mainLoop:
invoke readLine, eax, offset _BUFFER, offset _LEN ;READ MSG
invoke sha1, offset _HASH, dword ptr [_LEN], offset _BUFFER
invoke printHash, offset _HASH
invoke readLine, eax, offset _BUFFER, offset _LEN ;READ HASH
invoke compareHash, offset _HASH, offset _BUFFER
jz @F
inc ecx
@@:
inc edx
cmp edx, 65
jnz @mainLoop
mov _LEN, ecx
invoke UnmapViewOfFile, edi
invoke CloseHandle, esi
invoke CloseHandle, ebx
cmp _LEN, 0
jz @all_ok
invoke printLine, offset szSHAError
jmp @return
@all_ok:
invoke printLine, offset szSHAOk
jmp @return
@errFile:
invoke printLine, offset szErrorFile
@return:
popad
ret
readLine proc ptrStart:DWORD, ptrOut:DWORD, ptrlenOut:DWORD
pushad
mov esi, ptrStart
mov edi, ptrOut
xor ebx, ebx ;flag
@tryAgain:
cmp byte ptr [esi], "#"
jz @goEOL
cmp word ptr [esi], 0A0Dh
jz @goEOL
cmp byte ptr [esi], "["
jz @goEOL
cmp dword ptr [esi], " neL"
jz @goEOL
cmp dword ptr [esi], " gsM"
jz @readMsg
cmp dword ptr [esi], "= DM"
jz @readMd
@@: inc esi
@goEOL: cmp word ptr [esi], 0A0Dh
jnz @B
add esi, 2
test ebx, ebx
jz @tryAgain
;----------------------------------------
cmp ebx, 1 ;
jnz @done ;
cmp byte ptr [edi-1], 0 ; THE ADDITIONAL CHECK!
jnz @done ;
dec ebx ;
;----------------------------------------
@done:
mov eax, ptrlenOut
mov dword ptr [esp+28], esi
mov dword ptr [eax], ebx
popad
ret
@readMd:
add esi, 5
jmp @readMore
@readMsg:
add esi, 6
;esi = ptr Msg
;edi = ptrOut
@readMore:
mov al, byte ptr [esi]
cmp al, 39h
jbe @F
sub al, ("a" - 0Ah - 30h)
@@: sub al, 30h
shl al, 4
mov ah, byte ptr [esi+1]
cmp ah, 39h
jbe @F
sub ah, ("a" - 0Ah - 30h)
@@: sub ah, 30h
or al, ah
mov byte ptr [edi], al
inc edi
add esi, 2
inc ebx
cmp word ptr [esi], 0A0Dh
jz @goEOL
jmp @readMore
readLine endp
compareHash proc ptrH1:DWORD, ptrH2:DWORD
pushad
mov esi, ptrH1
mov eax, dword ptr [esi ]
mov ebx, dword ptr [esi+ 4]
mov ecx, dword ptr [esi+ 8]
mov edx, dword ptr [esi+12]
mov edi, dword ptr [esi+16]
mov esi, ptrH2
xor eax, dword ptr [esi ]
xor ebx, dword ptr [esi+ 4]
xor ecx, dword ptr [esi+ 8]
xor edx, dword ptr [esi+12]
xor edi, dword ptr [esi+16]
or eax, ebx
or ecx, edx
or eax, edi
or eax, ecx
popad
ret
compareHash endp
printHash proc ptrHash:DWORD
LOCAL _Temp : DWORD
LOCAL _String[44] : BYTE
pushad
lea esi, _Temp
lea edi, _String
and dword ptr [esi], 0
push 20
push ptrHash
push edi
call ConvertHexToString
mov dword ptr [edi+40], 0A0Dh
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov ebx, eax
push 0
push esi
push (40+2)
push edi
push ebx
call WriteConsoleA
popad
ret
printHash endp
printLine proc ptrString:DWORD
LOCAL _Temp : DWORD
LOCAL _EOL : DWORD
pushad
lea esi, _Temp
lea edi, _EOL
and dword ptr [esi], 0
mov dword ptr [edi], 0A0Dh
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov ebx, eax
invoke getstringlen, ptrString
push 0
push esi
push eax
push ptrString
push ebx
call WriteConsoleA
and dword ptr [esi], 0
push 0
push esi
push 2
push edi
push ebx
call WriteConsoleA
popad
ret
printLine endp
ConvertHexToString proc ptrOut:DWORD, ptrIn:DWORD, lIn:DWORD
pushad
mov esi, ptrIn
mov edi, ptrOut
mov ecx, lIn
cld
@loop: lodsb
mov ah, al
and ax, 0FF0h
shr al, 4
cmp al, 0Ah
jb @F
add al, 7
@@: add al, 30h
stosb
shr ax, 8
cmp al, 0Ah
jb @F
add al, 7
@@: add al, 30h
stosb
loop @loop
xor al, al
stosb
popad
ret
ConvertHexToString endp
end start | 17.278317 | 118 | 0.686271 |
c584fe77132f222dc01a1a96eaa2ee2f0890f6d5 | 4,062 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_147_215.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_147_215.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_147_215.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x9921, %rbp
nop
nop
nop
nop
cmp %rbx, %rbx
mov (%rbp), %rsi
nop
nop
nop
nop
and %r15, %r15
lea addresses_A_ht+0x19d41, %rdx
clflush (%rdx)
nop
nop
nop
cmp $44640, %r14
movw $0x6162, (%rdx)
nop
nop
nop
add $21561, %r13
lea addresses_D_ht+0x16e81, %r14
nop
nop
nop
sub %rdx, %rdx
mov (%r14), %rbp
xor %r15, %r15
lea addresses_normal_ht+0x1e601, %r14
nop
nop
nop
sub $223, %r15
mov (%r14), %r13d
nop
add $28929, %r15
lea addresses_A_ht+0x17f97, %r15
inc %rbp
mov $0x6162636465666768, %r13
movq %r13, %xmm0
movups %xmm0, (%r15)
add %r14, %r14
lea addresses_A_ht+0x17e81, %rdx
clflush (%rdx)
nop
add $20474, %r15
movl $0x61626364, (%rdx)
nop
inc %rbp
lea addresses_WT_ht+0xe106, %rsi
lea addresses_WC_ht+0xf481, %rdi
sub %r13, %r13
mov $2, %rcx
rep movsw
nop
inc %r14
lea addresses_WC_ht+0x10101, %rsi
lea addresses_WC_ht+0x12123, %rdi
nop
nop
nop
xor $10363, %r13
mov $78, %rcx
rep movsl
nop
xor %r14, %r14
lea addresses_D_ht+0x1ef95, %rsi
lea addresses_UC_ht+0xed91, %rdi
nop
nop
nop
cmp $42142, %rbx
mov $115, %rcx
rep movsq
nop
nop
sub %r15, %r15
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r9
push %rbp
push %rcx
push %rdx
// Store
mov $0x484e7c0000000d01, %r14
nop
nop
nop
nop
cmp %rcx, %rcx
movl $0x51525354, (%r14)
nop
nop
nop
nop
sub %rbp, %rbp
// Store
lea addresses_WC+0x1c477, %r11
nop
nop
nop
nop
and %r10, %r10
movw $0x5152, (%r11)
dec %r9
// Faulty Load
lea addresses_D+0x18a81, %r14
nop
nop
nop
nop
nop
dec %rdx
movb (%r14), %r10b
lea oracles, %r14
and $0xff, %r10
shlq $12, %r10
mov (%r14,%r10,1), %r10
pop %rdx
pop %rcx
pop %rbp
pop %r9
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_NC', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_D', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 2, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}, 'OP': 'REPM'}
{'36': 147}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 22.692737 | 440 | 0.649188 |
0576095ffdb65ff279c432318ebd71627a4bfffe | 998 | asm | Assembly | programs/oeis/004/A004959.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/004/A004959.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/004/A004959.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A004959: a(n) = ceiling(n*phi^4), where phi is the golden ratio, A001622.
; 0,7,14,21,28,35,42,48,55,62,69,76,83,90,96,103,110,117,124,131,138,144,151,158,165,172,179,186,192,199,206,213,220,227,234,240,247,254,261,268,275,282,288,295,302,309,316,323,329,336,343,350,357,364,371,377,384,391,398,405,412,419,425,432,439,446,453,460,467,473,480,487,494,501,508,515,521,528,535,542,549,556,563,569,576,583,590,597,604,611,617,624,631,638,645,652,658,665,672,679
mov $4,$0
mov $6,$0
lpb $4
mov $0,$6
sub $4,1
sub $0,$4
mov $8,2
mov $9,0
mov $10,$0
lpb $8
mov $0,$10
mov $3,0
sub $8,1
add $0,$8
sub $0,1
mul $0,3
mov $5,1
lpb $0
mov $2,$0
div $0,$5
sub $0,2
max $2,0
seq $2,26356 ; a(n) = floor((n-1)*phi) + n + 1, n > 0, where phi = (1+sqrt(5))/2.
add $3,$2
mov $5,$3
lpe
mov $7,$8
mul $7,$5
add $9,$7
lpe
min $10,1
mul $10,$5
mov $5,$9
sub $5,$10
sub $5,1
add $1,$5
lpe
mov $0,$1
| 23.761905 | 384 | 0.557114 |
94e791ec04251e141821842898c4408481ff121f | 222 | asm | Assembly | LearnAssembly/chap3/memory.asm | wisemountain/wise.learn | a8e1343a7d5fd791a3327c108268f752e56b63d7 | [
"MIT"
] | 3 | 2021-04-23T04:01:55.000Z | 2021-09-20T12:47:53.000Z | LearnAssembly/chap3/memory.asm | wisemountain/wise.learn | a8e1343a7d5fd791a3327c108268f752e56b63d7 | [
"MIT"
] | null | null | null | LearnAssembly/chap3/memory.asm | wisemountain/wise.learn | a8e1343a7d5fd791a3327c108268f752e56b63d7 | [
"MIT"
] | null | null | null | segment .data
a dd 4
b dd 4.4
c times 10 dd 0
d dw 1, 2
e db 0xfb
f db "hello world", 0
segment .bss
g resd 1
h resd 10
i resb 100
segment .text
global _start
_start:
mov eax, 60
mov ebx, 0
syscall
| 11.1 | 22 | 0.626126 |
fc9066ddcbedbe6b1db049e105ffa322c50a95b5 | 172 | asm | Assembly | libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_empty.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_empty.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/b_array/c/sccz80/b_array_empty.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; int b_array_empty(b_array_t *a)
SECTION code_adt_b_array
PUBLIC b_array_empty
defc b_array_empty = asm_b_array_empty
INCLUDE "adt/b_array/z80/asm_b_array_empty.asm"
| 15.636364 | 47 | 0.825581 |
356f9f4839932f62adfe1f09ba019317be186732 | 723 | asm | Assembly | programs/oeis/010/A010060.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/010/A010060.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/010/A010060.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A010060: Thue-Morse sequence: let A_k denote the first 2^k terms; then A_0 = 0 and for k >= 0, A_{k+1} = A_k B_k, where B_k is obtained from A_k by interchanging 0's and 1's.
; 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0
lpb $0
add $1,$0
div $0,2
lpe
mod $1,2
| 80.333333 | 501 | 0.547718 |
ff0e79366c7e7c8c0f6c85cf7659ddcb959cbf97 | 673 | asm | Assembly | oeis/165/A165312.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/165/A165312.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/165/A165312.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A165312: a(0)=1, a(1)=5, a(n)=11*a(n-1)-25*a(n-2) for n>1.
; Submitted by Jamie Morken(s2)
; 1,5,30,205,1505,11430,88105,683405,5314830,41378005,322287305,2510710230,19560629905,152399173205,1187375157630,9251147403805,72078242501105,561581982417030,4375445744059705,34090353624231005,265607746265048430,2069426368309757605,16123496394781122905,125622801134848411830,978763402613804457505,7625827400380638736805,59415016338841914667230,462919494717745092919405,3606739033424148155432705,28101141999722002386774630,218944086161338322368703305,1705856397781671486386370605
mov $2,1
lpb $0
sub $0,1
add $1,$3
mul $2,5
add $2,$1
mul $1,5
mov $3,$2
lpe
mov $0,$2
| 44.866667 | 479 | 0.812779 |
69f1b1c2b1e13e1da9dfa94925c61e2fdc7c0e61 | 7,291 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i3-7100_9_0xca_notsx.log_21829_673.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i3-7100_9_0xca_notsx.log_21829_673.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i3-7100_9_0xca_notsx.log_21829_673.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 %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x1b370, %rdx
nop
and $1132, %r11
mov (%rdx), %bp
nop
nop
nop
nop
add $22724, %r10
lea addresses_D_ht+0x191b3, %rsi
lea addresses_normal_ht+0x1475b, %rdi
clflush (%rdi)
inc %r11
mov $4, %rcx
rep movsw
nop
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_normal_ht+0x12cb3, %rsi
lea addresses_WT_ht+0xfaef, %rdi
clflush (%rsi)
nop
add $48651, %r10
mov $26, %rcx
rep movsq
sub %rcx, %rcx
lea addresses_D_ht+0xd4a9, %rdx
nop
and %rdi, %rdi
movb (%rdx), %cl
nop
nop
xor %rcx, %rcx
lea addresses_normal_ht+0x13ddb, %rsi
lea addresses_WC_ht+0x48f3, %rdi
clflush (%rdi)
nop
nop
nop
nop
xor %rax, %rax
mov $34, %rcx
rep movsw
add %rdx, %rdx
lea addresses_UC_ht+0x1ec6f, %rdi
nop
nop
nop
nop
add $33738, %rdx
mov $0x6162636465666768, %rcx
movq %rcx, (%rdi)
nop
nop
add %rsi, %rsi
lea addresses_D_ht+0x17793, %rdi
nop
nop
nop
cmp %rcx, %rcx
movl $0x61626364, (%rdi)
nop
nop
nop
nop
dec %rbp
lea addresses_UC_ht+0xdee1, %rsi
lea addresses_normal_ht+0x1a5f3, %rdi
xor $29177, %rbp
mov $67, %rcx
rep movsl
nop
nop
nop
nop
add %rsi, %rsi
lea addresses_WC_ht+0x15373, %rsi
lea addresses_WC_ht+0x9ff3, %rdi
nop
cmp %rdx, %rdx
mov $91, %rcx
rep movsq
nop
dec %rcx
lea addresses_UC_ht+0x16533, %rcx
clflush (%rcx)
nop
nop
mfence
mov (%rcx), %r11d
nop
xor %rdi, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r8
push %r9
push %rax
push %rbx
push %rsi
// Store
lea addresses_A+0x1df3, %rax
nop
nop
nop
nop
nop
xor %r11, %r11
movl $0x51525354, (%rax)
nop
nop
nop
add %r8, %r8
// Store
mov $0x433, %r9
clflush (%r9)
xor $16243, %r10
mov $0x5152535455565758, %r11
movq %r11, %xmm6
vmovups %ymm6, (%r9)
nop
nop
nop
nop
nop
cmp $40646, %r11
// Store
lea addresses_WC+0x17b23, %rsi
xor %r8, %r8
mov $0x5152535455565758, %r9
movq %r9, %xmm5
vmovaps %ymm5, (%rsi)
nop
nop
xor %r9, %r9
// Faulty Load
lea addresses_US+0x165f3, %r11
nop
nop
add $822, %r8
mov (%r11), %r9w
lea oracles, %r8
and $0xff, %r9
shlq $12, %r9
mov (%r8,%r9,1), %r9
pop %rsi
pop %rbx
pop %rax
pop %r9
pop %r8
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_A', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_P', 'size': 32, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_WC', 'size': 32, 'AVXalign': True}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}}
{'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': True, 'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': True}, 'OP': 'LOAD'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 35.393204 | 2,999 | 0.656563 |
0c04b977bdb62b00b1cd0433729c8ef8305f5c37 | 1,401 | asm | Assembly | projects/VM/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | NanJerry/Nand2Tetris | ffb5aa17bba197f68802342bae98f5b9e699c24a | [
"MIT"
] | null | null | null | projects/VM/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | NanJerry/Nand2Tetris | ffb5aa17bba197f68802342bae98f5b9e699c24a | [
"MIT"
] | null | null | null | projects/VM/08/ProgramFlow/FibonacciSeries/FibonacciSeries.asm | NanJerry/Nand2Tetris | ffb5aa17bba197f68802342bae98f5b9e699c24a | [
"MIT"
] | null | null | null | @ARG
D = M
@1
A = D + A
D = M
@SP
M = M + 1
A = M - 1
M = D
@SP
M = M - 1
A = M
D = M
@THAT
M = D
@0
D = A
@SP
M = M + 1
A = M - 1
M = D
@0
D = A
@THAT
D = M + D
@R13
M = D
@SP
M = M - 1
A = M
D = M
@R13
A = M
M = D
@1
D = A
@SP
M = M + 1
A = M - 1
M = D
@1
D = A
@THAT
D = M + D
@R13
M = D
@SP
M = M - 1
A = M
D = M
@R13
A = M
M = D
@ARG
D = M
@0
A = D + A
D = M
@SP
M = M + 1
A = M - 1
M = D
@2
D = A
@SP
M = M + 1
A = M - 1
M = D
@SP
M = M - 1
A = M
D = M
@SP
A = M - 1
M = M - D
@0
D = A
@ARG
D = M + D
@R13
M = D
@SP
M = M - 1
A = M
D = M
@R13
A = M
M = D
(MAIN_LOOP_START)
@ARG
D = M
@0
A = D + A
D = M
@SP
M = M + 1
A = M - 1
M = D
@SP
M=M-1
A=M
D=M
@COMPUTE_ELEMENT
D;JGT
@END_PROGRAM
0;JMP
(COMPUTE_ELEMENT)
@0
D = A
@THAT
A = M + D
D = M
@SP
M = M + 1
A = M - 1
M = D
@1
D = A
@THAT
A = M + D
D = M
@SP
M = M + 1
A = M - 1
M = D
@SP
M = M - 1
A = M
D = M
@SP
A = M - 1
M = M + D
@2
D = A
@THAT
D = M + D
@R13
M = D
@SP
M = M - 1
A = M
D = M
@R13
A = M
M = D
@THAT
D = M
@SP
M = M + 1
A = M - 1
M = D
@1
D = A
@SP
M = M + 1
A = M - 1
M = D
@SP
M = M - 1
A = M
D = M
@SP
A = M - 1
M = M + D
@SP
M = M - 1
A = M
D = M
@THAT
M = D
@ARG
D = M
@0
A = D + A
D = M
@SP
M = M + 1
A = M - 1
M = D
@1
D = A
@SP
M = M + 1
A = M - 1
M = D
@SP
M = M - 1
A = M
D = M
@SP
A = M - 1
M = M - D
@0
D = A
@ARG
D = M + D
@R13
M = D
@SP
M = M - 1
A = M
D = M
@R13
A = M
M = D
@MAIN_LOOP_START
0;JMP
(END_PROGRAM)
| 6.703349 | 17 | 0.401856 |
3080619be0b36c29f875b289e11e2cbdbd1975f7 | 3,765 | asm | Assembly | src/tiles.asm | jardafis/CastleEscape | 3deb573938109a8ea84277d83dd7a163588747a4 | [
"BSD-3-Clause"
] | 1 | 2022-01-07T07:10:55.000Z | 2022-01-07T07:10:55.000Z | src/tiles.asm | jardafis/CastleEscape | 3deb573938109a8ea84277d83dd7a163588747a4 | [
"BSD-3-Clause"
] | null | null | null | src/tiles.asm | jardafis/CastleEscape | 3deb573938109a8ea84277d83dd7a163588747a4 | [
"BSD-3-Clause"
] | null | null | null | IF !_ZXN
extern _tile0
extern _tileAttr
extern setAttr
public displayPixelTile
public _displayTile
public displayTile
public setTileAttr
#include "defs.inc"
section CODE_2
;
; Display the specified tile and attribute at the specified location.
;
; Callable from 'C' (sccz80)
;
defvars 0 ; Define the stack variables used
{
yPos ds.b 2
xPos ds.b 2
tile ds.b 2
}
_displayTile:
entry
ld b, (ix+yPos)
ld c, (ix+xPos)
ld a, (ix+tile)
call displayTile
call setTileAttr
exit
ret
;
; Display the specified tile at the specified location.
;
; All used registers are preserved by this function.
;
; Entry:
; b - Y character location
; c - X character location
; a - Tile ID of item
;
; Exit:
; b - Y character location
; c - X character location
; a - Tile ID of item
;
displayTile:
push af
push bc
push hl
; hl = a * 8
rlca
rlca
rlca
ld h, a ; Save rotated value of A
and %11111000 ; Clear out the lower 3 bits
ld l, a ; and save low order byte
ld a, h ; Restore the rotated value of A
and %00000111 ; Keep lower 3 bits
ld h, a ; Store the high order byte
outChar _tile0
pop hl
pop bc
pop af
ret
;
; Display the specified tile at the specified pixel location.
;
; All used registers are preserved by this function.
;
; Entry:
; b - Y pixel location
; c - X pixel location
; a - Tile ID of item
;
displayPixelTile:
push af
push bc
push de
push hl
di
ld (clearTileSP+1), sp
calculateRow b
; Calculate the index into the tilesheet
; hl = tileID * 8
rlca
rlca
rlca
ld h, a
and %11111000
ld l, a
ld a, h
and %00000111
ld h, a
ld de, _tile0
add hl, de
ld a, c ; Item x pixel position to char position
rrca
rrca
rrca
and %00011111
ld b, a
ld c, -1 ; Ensure C doesn't wraparound when using ldi
; Write the tile data to the screen
; de - Pointer to screen
; hl - Pointer to tile data
; b - Tile X character offset
REPT 8
pop de ; Pop screen address
ld a, e ; Add X offset
add b
ld e, a
ldi
ENDR
clearTileSP:
ld sp, -1
ei
pop hl
pop de
pop bc
pop af
ret
;
; Set the attribute for the tile at the specified location
;
; Entry:
; b - Y location
; c - X location
; a - Tile ID of item
;
setTileAttr:
push af
push hl
ld hl, _tileAttr
addhl a
ld a, (hl)
call setAttr
pop hl
pop af
ret
ENDIF
| 22.410714 | 84 | 0.413546 |
d6b87653356a3f8d34fb96c92bdf8d3c406dcc84 | 8,209 | asm | Assembly | code/transition.asm | sinusoid-studios/rhythm-land | 6471f1d7b7d885bbb898888645ac291d45125134 | [
"MIT"
] | 11 | 2021-08-10T20:31:11.000Z | 2021-12-28T11:57:03.000Z | code/transition.asm | sinusoid-studios/rhythm-land | 6471f1d7b7d885bbb898888645ac291d45125134 | [
"MIT"
] | null | null | null | code/transition.asm | sinusoid-studios/rhythm-land | 6471f1d7b7d885bbb898888645ac291d45125134 | [
"MIT"
] | 1 | 2021-10-02T17:49:10.000Z | 2021-10-02T17:49:10.000Z | INCLUDE "constants/hardware.inc"
INCLUDE "constants/other-hardware.inc"
INCLUDE "constants/actors.inc"
INCLUDE "constants/transition.inc"
INCLUDE "constants/interrupts.inc"
INCLUDE "macros/misc.inc"
SECTION "Screen Transition Variables", HRAM
; Current state of the screen transition
; See constants/transition.inc for possible values
hTransitionState::
DS 1
; Current position in TransitionPosTable
hTransitionIndex::
DS 1
; Number of frames until the master volume is decreased a step
hMusicFadeCountdown::
DS 1
; Screen ID of the screen to transition to
hTransitionNextScreen::
DS 1
SECTION "Screen Transition Initialization", ROM0
; Start a screen transition
; The next screen will be set up when the screen is fully covered
; @param a Screen ID of the next screen
TransitionStart::
; Save next screen's ID
ldh [hTransitionNextScreen], a
; Signal transitioning out
ld a, TRANSITION_STATE_OUT
ldh [hTransitionState], a
; Reset transition position index
xor a, a
ldh [hTransitionIndex], a
; Window always filling the screen vertically
; a = 0
ldh [rWY], a
; Hide the window initially
ld a, SCRN_X + WX_OFS
ldh [rWX], a
; Set initial music fade delay
ld a, TRANSITION_MUSIC_FADE_SPEED
ldh [hMusicFadeCountdown], a
; Fill the window black
; TODO: Find something better
; Black tile
ld hl, $8FF0
lb bc, $FF, 16
call LCDMemsetSmall
; Fill window tilemap
ld hl, _SCRN1
; b = $FF
ld c, SCRN_Y_B
call LCDMemsetMap
; Remove all sprites
; Set all actors to empty
ld a, ACTOR_EMPTY
ld hl, wActorTypeTable
ld c, MAX_ACTOR_COUNT
rst MemsetSmall
; Hide all existing objects
call HideAllObjects
; Let the VBlank interrupt handler set up the next LYC value.
; All that needs to be done here is actually enable LYC interrupts.
; If LYC interrupts are already enabled, there's nothing to do.
ld hl, rIE
bit IEB_STAT, [hl]
ret nz
; Need to enable LYC interrupts, but also ensure it doesn't trigger
; before VBlank
ASSERT HIGH(rIE) > SCRN_Y
ld a, h
ldh [rLYC], a
; Clear any pending LYC interrupt
ld l, LOW(rIF)
res IEB_STAT, [hl]
; Enable LYC interrupts
ASSERT LOW(rIE) == HIGH(rIF)
ld l, h
set IEB_STAT, [hl]
ret
SECTION "Screen Transition Update", ROM0
TransitionUpdate::
; Advance the transition
; Get transition direction
ldh a, [hTransitionState]
ASSERT TRANSITION_STATE_OUT == 1
dec a
ldh a, [hTransitionIndex]
jr nz, .transitionIn
; Transitioning out
inc a
; Check if this part of the transition is over
cp a, TransitionPosTable.end - TransitionPosTable
jr nc, .covered
ldh [hTransitionIndex], a
; Set first block's position before LY 0
ASSERT LOW(TransitionPosTable) == 0
ld l, a
ASSERT HIGH(TransitionPosTable.end - 1) == HIGH(TransitionPosTable)
ld h, HIGH(TransitionPosTable)
ld a, [hl]
ldh [rWX], a
; This must also be called when transitioning in if it cuts into
; that time
ASSERT TRANSITION_MUSIC_FADE_SPEED * 8 <= TRANSITION_DURATION + TRANSITION_DELAY
jp MusicFadeOut
.covered
; The screen is now entirely covered, so setup for the next screen
; can be done!
; Disable all LYC interrupts
ld hl, rIE
res IEB_STAT, [hl]
ASSERT LOW(LYC_INDEX_NONE) == HIGH(rIE)
ld a, h
ldh [hLYCIndex], a
ldh [hLYCResetIndex], a
; Update transition state
ld a, TRANSITION_STATE_MID
ldh [hTransitionState], a
; Discard return address (switching screens)
pop af
; Get next screen's ID
ldh a, [hTransitionNextScreen]
ld b, a
add a, a ; a * 2 (Pointer)
add a, b ; a * 3 (+Bank)
add a, LOW(ScreenSetupTable)
ld l, a
ASSERT HIGH(ScreenSetupTable.end - 1) == HIGH(ScreenSetupTable)
ld h, HIGH(ScreenSetupTable)
ld a, [hli]
; Switching the bank to 0 in this case is benign but still triggers
; an exception in bgb
and a, a
jr z, .skipBank1
ldh [hCurrentBank], a
ld [rROMB0], a
.skipBank1
ld a, [hli]
ld h, [hl]
ld l, a
; Get the frame number of when to start the transition in
ldh a, [hFrameCounter]
add a, TRANSITION_DELAY
ldh [hTransitionIndex], a
; If the setup routine is Null, don't call it
ld a, l
or a, h
jr z, .delayLoop
rst JP_HL
.delayLoop
rst WaitVBlank
; Calling SoundSystem_Process directly instead of SoundUpdate
; because this is in ROM0 and there is no sync data to be looking
; for
call SoundSystem_Process
call MusicFadeOut
; Wait until the frame counter reaches
; Setup start frame + TRANSITION_DELAY
ldh a, [hFrameCounter]
ld b, a
ldh a, [hTransitionIndex]
cp a, b
jr nz, .delayLoop
; Start transitioning in
ld a, TRANSITION_STATE_IN
ldh [hTransitionState], a
; Animate this part in reverse
ld a, TransitionPosTable.end - TransitionPosTable - 1
ldh [hTransitionIndex], a
; Clear pending LYC interrupts
ld hl, rIF
res IEB_STAT, [hl]
; Re-enable LYC interrupts
ASSERT LOW(rIE) == HIGH(rIF)
ld l, h
set IEB_STAT, [hl]
; Jump into the next screen's loop
ldh a, [hTransitionNextScreen]
; Switch to the next screen
ldh [hCurrentScreen], a
ld b, a
add a, a ; a * 2 (Pointer)
add a, b ; a * 3 (+Bank)
add a, LOW(ScreenTable)
ld l, a
ASSERT HIGH(ScreenTable.end - 1) == HIGH(ScreenTable)
ld h, HIGH(ScreenTable)
ld a, [hli]
; Switching the bank to 0 in this case is benign but still triggers
; an exception in bgb
and a, a
jr z, .skipBank2
ldh [hCurrentBank], a
ld [rROMB0], a
.skipBank2
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
.transitionIn
; Transitioning into the next screen
dec a
; Check if this part of the transition is over
jr z, .finished
ldh [hTransitionIndex], a
; Set first block's position before LY 0
ASSERT LOW(TransitionPosTable) == 0
ld l, a
ASSERT HIGH(TransitionPosTable.end - 1) == HIGH(TransitionPosTable)
ld h, HIGH(TransitionPosTable)
ld a, [hl]
ldh [rWX], a
ret
.finished
; Hide the window
ld a, SCRN_X + WX_OFS
ldh [rWX], a
; Turn the transition off
ASSERT TRANSITION_STATE_OFF == 0
xor a, a
ldh [hTransitionState], a
ldh a, [hLYCResetIndex]
ASSERT LYC_INDEX_NONE == -1
inc a
jp nz, SetUpNextLYC.getLYC
; No LYC interrupts -> disable them
ld hl, rIE
res IEB_STAT, [hl]
ret
SECTION "Music Fade Out", ROM0
; This can be inlined if it doesn't cut into the delay (separate loop)
ASSERT TRANSITION_MUSIC_FADE_SPEED * 8 > TRANSITION_DURATION
MusicFadeOut:
ldh a, [hMusicFadeCountdown]
dec a
jr nz, .noDecrease
; Subtract 1 from volume on each terminal
ldh a, [rNR50]
sub a, $11
jr c, .musicOff
ldh [rNR50], a
; Reset countdown
ld a, TRANSITION_MUSIC_FADE_SPEED
jr .noDecrease
.musicOff
; Stop the music (master volume = 0 isn't silent)
call Music_Pause
; Reset master volume to max, excluding VIN signal
ld a, $FF ^ (AUDVOL_VIN_LEFT | AUDVOL_VIN_RIGHT)
ldh [rNR50], a
; Countdown will become -1 next frame
ASSERT LOW(-1) > TRANSITION_DURATION - TRANSITION_MUSIC_FADE_SPEED * 8
xor a, a
.noDecrease
ldh [hMusicFadeCountdown], a
ret
| 27.003289 | 84 | 0.601291 |
474e945a101949c17dfdf211bb5121ee113b3440 | 1,729 | asm | Assembly | src/upcore/src/cfenv/msvc/x86_64/fetestexcept.x64.asm | upcaste/upcaste | 8174a2f40e7fde022806f8d1565bb4a415ecb210 | [
"MIT"
] | 1 | 2018-09-17T20:50:14.000Z | 2018-09-17T20:50:14.000Z | src/upcore/src/cfenv/msvc/x86_64/fetestexcept.x64.asm | jwtowner/upcaste | 8174a2f40e7fde022806f8d1565bb4a415ecb210 | [
"MIT"
] | null | null | null | src/upcore/src/cfenv/msvc/x86_64/fetestexcept.x64.asm | jwtowner/upcaste | 8174a2f40e7fde022806f8d1565bb4a415ecb210 | [
"MIT"
] | null | null | null | ;;
;; Upcaste Performance Libraries
;; Copyright (C) 2012-2013 Jesse W. Towner
;;
;; Permission is hereby granted, free of charge, to any person obtaining
;; a copy of this software and associated documentation files (the
;; "Software"), to deal in the Software without restriction, including
;; without limitation the rights to use, copy, modify, merge, publish,
;; distribute, sublicense, and/or sell copies of the Software, and to
;; permit persons to whom the Software is furnished to do so, subject to
;; the following conditions:
;;
;; The above copyright notice and this permission notice shall be
;; included in all copies or substantial portions of the Software.
;;
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;;
INCLUDE fenv.inc
;;
;; int fetestexcept(int excepts);
;;
;; Tests current exception status flags with those specified by caller.
;;
;; Input:
;; ecx = excepts
;; Output:
;; rax = bitwise inclusive-or of exception status flags set
;;
.CODE
ALIGN 8
PUBLIC fetestexcept
fetestexcept PROC
xor rax, rax
stmxcsr DWORD PTR [rsp-4]
fnstsw ax
and ecx, FE_ALL_EXCEPT
or eax, DWORD PTR [rsp-4]
and eax, ecx
ret
fetestexcept ENDP
END
| 32.018519 | 74 | 0.690573 |
576997bda24455a76517151ed11cc5079f97ddf1 | 54,153 | asm | Assembly | Palmtree.Math.Core.Sint/vs_build/x64_Debug/pmc_compare.asm | rougemeilland/Palmtree.Math.Core.Sint | 0895fd4988b146f01ec705e091ef3fd79a721b40 | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Sint/vs_build/x64_Debug/pmc_compare.asm | rougemeilland/Palmtree.Math.Core.Sint | 0895fd4988b146f01ec705e091ef3fd79a721b40 | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Sint/vs_build/x64_Debug/pmc_compare.asm | rougemeilland/Palmtree.Math.Core.Sint | 0895fd4988b146f01ec705e091ef3fd79a721b40 | [
"MIT"
] | null | null | null | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM uint_number_zero:QWORD
COMM uint_number_one:QWORD
_DATA ENDS
msvcjmc SEGMENT
__7B7A869E_ctype@h DB 01H
__457DD326_basetsd@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__1887E595_winnt@h DB 01H
__9FC7C64B_processthreadsapi@h DB 01H
__FA470AEC_memoryapi@h DB 01H
__F37DAFF1_winerror@h DB 01H
__7A450CCC_winbase@h DB 01H
__B4B40122_winioctl@h DB 01H
__86261D59_stralign@h DB 01H
__8CA3E54E_pmc_inline_func@h DB 01H
__C8C7A597_pmc_compare@c DB 01H
msvcjmc ENDS
PUBLIC PMC_Compare_I_X
PUBLIC PMC_Compare_L_X
PUBLIC PMC_Compare_UX_X
PUBLIC PMC_Compare_X_I
PUBLIC PMC_Compare_X_L
PUBLIC PMC_Compare_X_UX
PUBLIC PMC_Compare_X_X
PUBLIC __JustMyCode_Default
EXTRN CheckNumber:PROC
EXTRN _RTC_CheckStackVars:PROC
EXTRN _RTC_InitBase:PROC
EXTRN _RTC_Shutdown:PROC
EXTRN __CheckForDebuggerJustMyCode:PROC
EXTRN __GSHandlerCheck:PROC
EXTRN __security_check_cookie:PROC
EXTRN ep_uint:BYTE
EXTRN __security_cookie:QWORD
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_I_X DD imagerel $LN17
DD imagerel $LN17+442
DD imagerel $unwind$PMC_Compare_I_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_L_X DD imagerel $LN17
DD imagerel $LN17+446
DD imagerel $unwind$PMC_Compare_L_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_UX_X DD imagerel $LN12
DD imagerel $LN12+303
DD imagerel $unwind$PMC_Compare_UX_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_X_I DD imagerel $LN17
DD imagerel $LN17+439
DD imagerel $unwind$PMC_Compare_X_I
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_X_L DD imagerel $LN17
DD imagerel $LN17+442
DD imagerel $unwind$PMC_Compare_X_L
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_X_UX DD imagerel $LN17
DD imagerel $LN17+375
DD imagerel $unwind$PMC_Compare_X_UX
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Compare_X_X DD imagerel $LN19
DD imagerel $LN19+445
DD imagerel $unwind$PMC_Compare_X_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$GET_ABS_32 DD imagerel GET_ABS_32
DD imagerel GET_ABS_32+175
DD imagerel $unwind$GET_ABS_32
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$GET_ABS_64 DD imagerel GET_ABS_64
DD imagerel GET_ABS_64+198
DD imagerel $unwind$GET_ABS_64
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$CompareU_X_I_Imp DD imagerel CompareU_X_I_Imp
DD imagerel CompareU_X_I_Imp+230
DD imagerel $unwind$CompareU_X_I_Imp
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$CompareU_X_L_Imp DD imagerel CompareU_X_L_Imp
DD imagerel CompareU_X_L_Imp+231
DD imagerel $unwind$CompareU_X_L_Imp
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$CompareU_X_X_Imp DD imagerel CompareU_X_X_Imp
DD imagerel CompareU_X_X_Imp+231
DD imagerel $unwind$CompareU_X_X_Imp
pdata ENDS
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
_RTC_Shutdown.rtc$TMZ DQ FLAT:_RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
_RTC_InitBase.rtc$IMZ DQ FLAT:_RTC_InitBase
rtc$IMZ ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$CompareU_X_X_Imp DD 025054919H
DD 011c2321H
DD 070150025H
DD 05014H
DD imagerel __GSHandlerCheck
DD 0118H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
CompareU_X_X_Imp$rtcName$0 DB 074H
DB 065H
DB 06dH
DB 070H
DB 05fH
DB 077H
DB 00H
ORG $+9
CompareU_X_X_Imp$rtcVarDesc DD 044H
DD 04H
DQ FLAT:CompareU_X_X_Imp$rtcName$0
ORG $+48
CompareU_X_X_Imp$rtcFrameData DD 01H
DD 00H
DQ FLAT:CompareU_X_X_Imp$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$CompareU_X_L_Imp DD 025054919H
DD 011c2321H
DD 070150025H
DD 05014H
DD imagerel __GSHandlerCheck
DD 0118H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
CompareU_X_L_Imp$rtcName$0 DB 074H
DB 065H
DB 06dH
DB 070H
DB 05fH
DB 077H
DB 00H
ORG $+9
CompareU_X_L_Imp$rtcVarDesc DD 044H
DD 04H
DQ FLAT:CompareU_X_L_Imp$rtcName$0
ORG $+48
CompareU_X_L_Imp$rtcFrameData DD 01H
DD 00H
DQ FLAT:CompareU_X_L_Imp$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$CompareU_X_I_Imp DD 025054919H
DD 011c2321H
DD 070150025H
DD 05014H
DD imagerel __GSHandlerCheck
DD 0118H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
CompareU_X_I_Imp$rtcName$0 DB 074H
DB 065H
DB 06dH
DB 070H
DB 05fH
DB 077H
DB 00H
ORG $+9
CompareU_X_I_Imp$rtcVarDesc DD 044H
DD 04H
DQ FLAT:CompareU_X_I_Imp$rtcName$0
ORG $+48
CompareU_X_I_Imp$rtcFrameData DD 01H
DD 00H
DQ FLAT:CompareU_X_I_Imp$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$GET_ABS_64 DD 025052f01H
DD 01132318H
DD 0700c001fH
DD 0500bH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$GET_ABS_32 DD 025052d01H
DD 01122317H
DD 0700b001fH
DD 0500aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_X_X DD 025053401H
DD 0118231dH
DD 070110029H
DD 05010H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_X_UX DD 025053401H
DD 0118231dH
DD 070110025H
DD 05010H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_X_L DD 025054519H
DD 0118231dH
DD 07011002dH
DD 05010H
DD imagerel __GSHandlerCheck
DD 0158H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
PMC_Compare_X_L$rtcName$0 DB 076H
DB 05fH
DB 073H
DB 069H
DB 067H
DB 06eH
DB 00H
ORG $+9
PMC_Compare_X_L$rtcVarDesc DD 064H
DD 01H
DQ FLAT:PMC_Compare_X_L$rtcName$0
ORG $+48
PMC_Compare_X_L$rtcFrameData DD 01H
DD 00H
DQ FLAT:PMC_Compare_X_L$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_X_I DD 025054419H
DD 0117231cH
DD 07010002dH
DD 0500fH
DD imagerel __GSHandlerCheck
DD 0158H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
PMC_Compare_X_I$rtcName$0 DB 076H
DB 05fH
DB 073H
DB 069H
DB 067H
DB 06eH
DB 00H
ORG $+9
PMC_Compare_X_I$rtcVarDesc DD 064H
DD 01H
DQ FLAT:PMC_Compare_X_I$rtcName$0
ORG $+48
PMC_Compare_X_I$rtcFrameData DD 01H
DD 00H
DQ FLAT:PMC_Compare_X_I$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_UX_X DD 025053401H
DD 0118231dH
DD 070110025H
DD 05010H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_L_X DD 025054519H
DD 0118231dH
DD 07011002dH
DD 05010H
DD imagerel __GSHandlerCheck
DD 0158H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
PMC_Compare_L_X$rtcName$0 DB 075H
DB 05fH
DB 073H
DB 069H
DB 067H
DB 06eH
DB 00H
ORG $+9
PMC_Compare_L_X$rtcVarDesc DD 064H
DD 01H
DQ FLAT:PMC_Compare_L_X$rtcName$0
ORG $+48
PMC_Compare_L_X$rtcFrameData DD 01H
DD 00H
DQ FLAT:PMC_Compare_L_X$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Compare_I_X DD 025054319H
DD 0117231cH
DD 07010002dH
DD 0500fH
DD imagerel __GSHandlerCheck
DD 0158H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
PMC_Compare_I_X$rtcName$0 DB 075H
DB 05fH
DB 073H
DB 069H
DB 067H
DB 06eH
DB 00H
ORG $+9
PMC_Compare_I_X$rtcVarDesc DD 064H
DD 01H
DQ FLAT:PMC_Compare_I_X$rtcName$0
ORG $+48
PMC_Compare_I_X$rtcFrameData DD 01H
DD 00H
DQ FLAT:PMC_Compare_I_X$rtcVarDesc
CONST ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT CompareU_X_X_Imp
_TEXT SEGMENT
result$ = 4
temp_w$ = 36
__$ArrayPad$ = 248
sign$ = 288
u$ = 296
v$ = 304
w$ = 312
CompareU_X_X_Imp PROC ; COMDAT
; 66 : {
mov QWORD PTR [rsp+32], r9
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov BYTE PTR [rsp+8], cl
push rbp
push rdi
sub rsp, 296 ; 00000128H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 74 ; 0000004aH
mov eax, -858993460 ; ccccccccH
rep stosd
movzx ecx, BYTE PTR [rsp+328]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 67 : PMC_STATUS_CODE result;
; 68 : _INT32_T temp_w;
; 69 : if ((result = ep_uint.Compare_X_X(u, v, &temp_w)) != PMC_STATUS_OK)
lea r8, QWORD PTR temp_w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
call QWORD PTR ep_uint+440
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN2@CompareU_X
; 70 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@CompareU_X
$LN2@CompareU_X:
; 71 : if (sign > 0)
movsx eax, BYTE PTR sign$[rbp]
test eax, eax
jle SHORT $LN3@CompareU_X
; 72 : *w = temp_w;
mov rax, QWORD PTR w$[rbp]
mov ecx, DWORD PTR temp_w$[rbp]
mov DWORD PTR [rax], ecx
jmp SHORT $LN4@CompareU_X
$LN3@CompareU_X:
; 73 : #ifdef _DEBUG
; 74 : else if (sign == 0)
movsx eax, BYTE PTR sign$[rbp]
test eax, eax
jne SHORT $LN5@CompareU_X
; 75 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@CompareU_X
jmp SHORT $LN6@CompareU_X
$LN5@CompareU_X:
; 76 : #endif
; 77 : else
; 78 : *w = -temp_w;
mov eax, DWORD PTR temp_w$[rbp]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
$LN6@CompareU_X:
$LN4@CompareU_X:
; 79 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@CompareU_X:
; 80 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:CompareU_X_X_Imp$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
CompareU_X_X_Imp ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT CompareU_X_L_Imp
_TEXT SEGMENT
result$ = 4
temp_w$ = 36
__$ArrayPad$ = 248
sign$ = 288
u$ = 296
v$ = 304
w$ = 312
CompareU_X_L_Imp PROC ; COMDAT
; 49 : {
mov QWORD PTR [rsp+32], r9
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov BYTE PTR [rsp+8], cl
push rbp
push rdi
sub rsp, 296 ; 00000128H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 74 ; 0000004aH
mov eax, -858993460 ; ccccccccH
rep stosd
movzx ecx, BYTE PTR [rsp+328]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 50 : PMC_STATUS_CODE result;
; 51 : _INT32_T temp_w;
; 52 : if ((result = ep_uint.Compare_X_L(u, v, &temp_w)) != PMC_STATUS_OK)
lea r8, QWORD PTR temp_w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
call QWORD PTR ep_uint+432
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN2@CompareU_X
; 53 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@CompareU_X
$LN2@CompareU_X:
; 54 : if (sign > 0)
movsx eax, BYTE PTR sign$[rbp]
test eax, eax
jle SHORT $LN3@CompareU_X
; 55 : *w = temp_w;
mov rax, QWORD PTR w$[rbp]
mov ecx, DWORD PTR temp_w$[rbp]
mov DWORD PTR [rax], ecx
jmp SHORT $LN4@CompareU_X
$LN3@CompareU_X:
; 56 : #ifdef _DEBUG
; 57 : else if (sign == 0)
movsx eax, BYTE PTR sign$[rbp]
test eax, eax
jne SHORT $LN5@CompareU_X
; 58 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@CompareU_X
jmp SHORT $LN6@CompareU_X
$LN5@CompareU_X:
; 59 : #endif
; 60 : else
; 61 : *w = -temp_w;
mov eax, DWORD PTR temp_w$[rbp]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
$LN6@CompareU_X:
$LN4@CompareU_X:
; 62 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@CompareU_X:
; 63 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:CompareU_X_L_Imp$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
CompareU_X_L_Imp ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT CompareU_X_I_Imp
_TEXT SEGMENT
result$ = 4
temp_w$ = 36
__$ArrayPad$ = 248
sign$ = 288
u$ = 296
v$ = 304
w$ = 312
CompareU_X_I_Imp PROC ; COMDAT
; 32 : {
mov QWORD PTR [rsp+32], r9
mov DWORD PTR [rsp+24], r8d
mov QWORD PTR [rsp+16], rdx
mov BYTE PTR [rsp+8], cl
push rbp
push rdi
sub rsp, 296 ; 00000128H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 74 ; 0000004aH
mov eax, -858993460 ; ccccccccH
rep stosd
movzx ecx, BYTE PTR [rsp+328]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 33 : PMC_STATUS_CODE result;
; 34 : _INT32_T temp_w;
; 35 : if ((result = ep_uint.Compare_X_I(u, v, &temp_w)) != PMC_STATUS_OK)
lea r8, QWORD PTR temp_w$[rbp]
mov edx, DWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
call QWORD PTR ep_uint+424
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN2@CompareU_X
; 36 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@CompareU_X
$LN2@CompareU_X:
; 37 : if (sign > 0)
movsx eax, BYTE PTR sign$[rbp]
test eax, eax
jle SHORT $LN3@CompareU_X
; 38 : *w = temp_w;
mov rax, QWORD PTR w$[rbp]
mov ecx, DWORD PTR temp_w$[rbp]
mov DWORD PTR [rax], ecx
jmp SHORT $LN4@CompareU_X
$LN3@CompareU_X:
; 39 : #ifdef _DEBUG
; 40 : else if (sign == 0)
movsx eax, BYTE PTR sign$[rbp]
test eax, eax
jne SHORT $LN5@CompareU_X
; 41 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@CompareU_X
jmp SHORT $LN6@CompareU_X
$LN5@CompareU_X:
; 42 : #endif
; 43 : else
; 44 : *w = -temp_w;
mov eax, DWORD PTR temp_w$[rbp]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
$LN6@CompareU_X:
$LN4@CompareU_X:
; 45 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@CompareU_X:
; 46 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:CompareU_X_I_Imp$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
CompareU_X_I_Imp ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.uint\palmtree.math.core.uint\pmc_inline_func.h
; COMDAT GET_ABS_64
_TEXT SEGMENT
tv68 = 192
u$ = 240
sign$ = 248
GET_ABS_64 PROC ; COMDAT
; 800 : {
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 248 ; 000000f8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 62 ; 0000003eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+280]
lea rcx, OFFSET FLAT:__8CA3E54E_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 801 : if (u > 0)
cmp QWORD PTR u$[rbp], 0
jle SHORT $LN2@GET_ABS_64
; 802 : {
; 803 : *sign = 1;
mov rax, QWORD PTR sign$[rbp]
mov BYTE PTR [rax], 1
; 804 : return ((_UINT64_T)u);
mov rax, QWORD PTR u$[rbp]
jmp SHORT $LN1@GET_ABS_64
; 805 : }
jmp SHORT $LN3@GET_ABS_64
$LN2@GET_ABS_64:
; 806 : else if (u == 0)
cmp QWORD PTR u$[rbp], 0
jne SHORT $LN4@GET_ABS_64
; 807 : {
; 808 : *sign = 0;
mov rax, QWORD PTR sign$[rbp]
mov BYTE PTR [rax], 0
; 809 : return (0);
xor eax, eax
jmp SHORT $LN1@GET_ABS_64
; 810 : }
jmp SHORT $LN5@GET_ABS_64
$LN4@GET_ABS_64:
; 811 : else
; 812 : {
; 813 : *sign = -1;
mov rax, QWORD PTR sign$[rbp]
mov BYTE PTR [rax], -1
; 814 : return ((_UINT64_T)u == 0x8000000000000000UL ? 0x8000000000000000UL : (_UINT64_T)-u);
mov rax, -9223372036854775808 ; 8000000000000000H
cmp QWORD PTR u$[rbp], rax
jne SHORT $LN7@GET_ABS_64
mov rax, -9223372036854775808 ; 8000000000000000H
mov QWORD PTR tv68[rbp], rax
jmp SHORT $LN8@GET_ABS_64
$LN7@GET_ABS_64:
mov rax, QWORD PTR u$[rbp]
neg rax
mov QWORD PTR tv68[rbp], rax
$LN8@GET_ABS_64:
mov rax, QWORD PTR tv68[rbp]
$LN5@GET_ABS_64:
$LN3@GET_ABS_64:
$LN1@GET_ABS_64:
; 815 : }
; 816 : }
lea rsp, QWORD PTR [rbp+216]
pop rdi
pop rbp
ret 0
GET_ABS_64 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.uint\palmtree.math.core.uint\pmc_inline_func.h
; COMDAT GET_ABS_32
_TEXT SEGMENT
tv68 = 192
u$ = 240
sign$ = 248
GET_ABS_32 PROC ; COMDAT
; 780 : {
mov QWORD PTR [rsp+16], rdx
mov DWORD PTR [rsp+8], ecx
push rbp
push rdi
sub rsp, 248 ; 000000f8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 62 ; 0000003eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, DWORD PTR [rsp+280]
lea rcx, OFFSET FLAT:__8CA3E54E_pmc_inline_func@h
call __CheckForDebuggerJustMyCode
; 781 : if (u > 0)
cmp DWORD PTR u$[rbp], 0
jle SHORT $LN2@GET_ABS_32
; 782 : {
; 783 : *sign = 1;
mov rax, QWORD PTR sign$[rbp]
mov BYTE PTR [rax], 1
; 784 : return ((_UINT32_T)u);
mov eax, DWORD PTR u$[rbp]
jmp SHORT $LN1@GET_ABS_32
; 785 : }
jmp SHORT $LN3@GET_ABS_32
$LN2@GET_ABS_32:
; 786 : else if (u == 0)
cmp DWORD PTR u$[rbp], 0
jne SHORT $LN4@GET_ABS_32
; 787 : {
; 788 : *sign = 0;
mov rax, QWORD PTR sign$[rbp]
mov BYTE PTR [rax], 0
; 789 : return (0);
xor eax, eax
jmp SHORT $LN1@GET_ABS_32
; 790 : }
jmp SHORT $LN5@GET_ABS_32
$LN4@GET_ABS_32:
; 791 : else
; 792 : {
; 793 : *sign = -1;
mov rax, QWORD PTR sign$[rbp]
mov BYTE PTR [rax], -1
; 794 : return ((_UINT32_T)u == 0x80000000U ? 0x80000000U : (_UINT32_T)-u);
cmp DWORD PTR u$[rbp], -2147483648 ; 80000000H
jne SHORT $LN7@GET_ABS_32
mov DWORD PTR tv68[rbp], -2147483648 ; 80000000H
jmp SHORT $LN8@GET_ABS_32
$LN7@GET_ABS_32:
mov eax, DWORD PTR u$[rbp]
neg eax
mov DWORD PTR tv68[rbp], eax
$LN8@GET_ABS_32:
mov eax, DWORD PTR tv68[rbp]
$LN5@GET_ABS_32:
$LN3@GET_ABS_32:
$LN1@GET_ABS_32:
; 795 : }
; 796 : }
lea rsp, QWORD PTR [rbp+216]
pop rdi
pop rbp
ret 0
GET_ABS_32 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT PMC_Compare_X_X
_TEXT SEGMENT
result$ = 4
nu$ = 40
nv$ = 72
u$ = 320
v$ = 328
w$ = 336
PMC_Compare_X_X PROC ; COMDAT
; 456 : {
$LN19:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 328 ; 00000148H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 82 ; 00000052H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+360]
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 457 : if (u == NULL)
cmp QWORD PTR u$[rbp], 0
jne SHORT $LN2@PMC_Compar
; 458 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 459 : if (v == NULL)
cmp QWORD PTR v$[rbp], 0
jne SHORT $LN3@PMC_Compar
; 460 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 461 : if (w == NULL)
cmp QWORD PTR w$[rbp], 0
jne SHORT $LN4@PMC_Compar
; 462 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 463 : PMC_STATUS_CODE result;
; 464 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov rax, QWORD PTR u$[rbp]
mov QWORD PTR nu$[rbp], rax
; 465 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov rax, QWORD PTR v$[rbp]
mov QWORD PTR nv$[rbp], rax
; 466 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nu$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN5@PMC_Compar
; 467 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN5@PMC_Compar:
; 468 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nv$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN6@PMC_Compar
; 469 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN6@PMC_Compar:
; 470 : if (nu->SIGN == 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jne SHORT $LN7@PMC_Compar
; 471 : {
; 472 : // u == 0 の場合
; 473 :
; 474 : // v の符号の反対を返す
; 475 : *w = -nv->SIGN;
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
; 476 : }
jmp $LN8@PMC_Compar
$LN7@PMC_Compar:
; 477 : else if (nu->SIGN > 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jle SHORT $LN9@PMC_Compar
; 478 : {
; 479 : // u > 0 の場合
; 480 :
; 481 : if (nv->SIGN <= 0)
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jg SHORT $LN11@PMC_Compar
; 482 : {
; 483 : // v == 0 の場合
; 484 :
; 485 : // 1 を返す
; 486 : *w = 1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 1
; 487 : }
jmp SHORT $LN12@PMC_Compar
$LN11@PMC_Compar:
; 488 : else
; 489 : {
; 490 : // v > 0 の場合
; 491 :
; 492 : // abs(u) と abs(v) の比較結果を返す
; 493 : if ((result = CompareU_X_X_Imp(1, nu->ABS, nv->ABS, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov rax, QWORD PTR nv$[rbp]
mov r8, QWORD PTR [rax+16]
mov rax, QWORD PTR nu$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, 1
call CompareU_X_X_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN13@PMC_Compar
; 494 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN13@PMC_Compar:
$LN12@PMC_Compar:
; 495 : }
; 496 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 497 : else
; 498 : {
; 499 : // u < 0 の場合
; 500 :
; 501 : if (nv->SIGN >= 0)
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jl SHORT $LN14@PMC_Compar
; 502 : {
; 503 : // v == 0 の場合
; 504 :
; 505 : // -1 を返す
; 506 : *w = -1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], -1
; 507 : }
jmp SHORT $LN15@PMC_Compar
$LN14@PMC_Compar:
; 508 : else
; 509 : {
; 510 : // v < 0 の場合
; 511 :
; 512 : // -abs(u) と -abs(v) の比較結果を返す
; 513 : if ((result = CompareU_X_X_Imp(-1, nu->ABS, nv->ABS, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov rax, QWORD PTR nv$[rbp]
mov r8, QWORD PTR [rax+16]
mov rax, QWORD PTR nu$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, -1
call CompareU_X_X_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN16@PMC_Compar
; 514 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN16@PMC_Compar:
$LN15@PMC_Compar:
$LN10@PMC_Compar:
$LN8@PMC_Compar:
; 515 : }
; 516 : }
; 517 : #ifdef _DEBUG
; 518 : if (*w != 0 && *w != 1 && *w != -1)
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 0
je SHORT $LN17@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 1
je SHORT $LN17@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], -1
je SHORT $LN17@PMC_Compar
; 519 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@PMC_Compar
$LN17@PMC_Compar:
; 520 : #endif
; 521 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 522 : }
lea rsp, QWORD PTR [rbp+296]
pop rdi
pop rbp
ret 0
PMC_Compare_X_X ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT PMC_Compare_X_UX
_TEXT SEGMENT
result$ = 4
nu$ = 40
u$ = 288
v$ = 296
w$ = 304
PMC_Compare_X_UX PROC ; COMDAT
; 391 : {
$LN17:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 296 ; 00000128H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 74 ; 0000004aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+328]
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 392 : if (u == NULL)
cmp QWORD PTR u$[rbp], 0
jne SHORT $LN2@PMC_Compar
; 393 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 394 : if (v == NULL)
cmp QWORD PTR v$[rbp], 0
jne SHORT $LN3@PMC_Compar
; 395 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 396 : if (w == NULL)
cmp QWORD PTR w$[rbp], 0
jne SHORT $LN4@PMC_Compar
; 397 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 398 : PMC_STATUS_CODE result;
; 399 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov rax, QWORD PTR u$[rbp]
mov QWORD PTR nu$[rbp], rax
; 400 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nu$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN5@PMC_Compar
; 401 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN5@PMC_Compar:
; 402 : if (nu->SIGN == 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jne SHORT $LN6@PMC_Compar
; 403 : {
; 404 : // u == 0 の場合
; 405 :
; 406 : if (v->FLAGS.IS_ZERO)
mov rax, QWORD PTR v$[rbp]
mov eax, DWORD PTR [rax]
and eax, 1
test eax, eax
je SHORT $LN8@PMC_Compar
; 407 : {
; 408 : // v == 0 の場合
; 409 :
; 410 : // 0 を返す
; 411 : *w = 0;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 0
; 412 : }
jmp SHORT $LN9@PMC_Compar
$LN8@PMC_Compar:
; 413 : else
; 414 : {
; 415 : // v > 0 の場合
; 416 :
; 417 : // -1 を返す
; 418 : *w = -1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], -1
$LN9@PMC_Compar:
; 419 : }
; 420 : }
jmp SHORT $LN7@PMC_Compar
$LN6@PMC_Compar:
; 421 : else if (nu->SIGN > 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jle SHORT $LN10@PMC_Compar
; 422 : {
; 423 : // u > 0 の場合
; 424 :
; 425 : if (v->FLAGS.IS_ZERO)
mov rax, QWORD PTR v$[rbp]
mov eax, DWORD PTR [rax]
and eax, 1
test eax, eax
je SHORT $LN12@PMC_Compar
; 426 : {
; 427 : // v == 0 の場合
; 428 :
; 429 : // 1 を返す
; 430 : *w = 1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 1
; 431 : }
jmp SHORT $LN13@PMC_Compar
$LN12@PMC_Compar:
; 432 : else
; 433 : {
; 434 : // v > 0 の場合
; 435 :
; 436 : // abs(u) と abs(v) の比較結果を返す
; 437 : if ((result = CompareU_X_X_Imp(1, nu->ABS, v, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8, QWORD PTR v$[rbp]
mov rax, QWORD PTR nu$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, 1
call CompareU_X_X_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN14@PMC_Compar
; 438 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN14@PMC_Compar:
$LN13@PMC_Compar:
; 439 : }
; 440 : }
jmp SHORT $LN11@PMC_Compar
$LN10@PMC_Compar:
; 441 : else
; 442 : {
; 443 : // u < 0 の場合
; 444 :
; 445 : // -1 を返す
; 446 : *w = -1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], -1
$LN11@PMC_Compar:
$LN7@PMC_Compar:
; 447 : }
; 448 : #ifdef _DEBUG
; 449 : if (*w != 0 && *w != 1 && *w != -1)
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 0
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 1
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], -1
je SHORT $LN15@PMC_Compar
; 450 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 451 : #endif
; 452 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 453 : }
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
PMC_Compare_X_UX ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT PMC_Compare_X_L
_TEXT SEGMENT
result$ = 4
nu$ = 40
v_sign$ = 68
v_abs$ = 104
__$ArrayPad$ = 312
u$ = 352
v$ = 360
w$ = 368
PMC_Compare_X_L PROC ; COMDAT
; 325 : {
$LN17:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 360 ; 00000168H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 90 ; 0000005aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+392]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 326 : if (u == NULL)
cmp QWORD PTR u$[rbp], 0
jne SHORT $LN2@PMC_Compar
; 327 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 328 : if (w == NULL)
cmp QWORD PTR w$[rbp], 0
jne SHORT $LN3@PMC_Compar
; 329 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 330 : PMC_STATUS_CODE result;
; 331 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov rax, QWORD PTR u$[rbp]
mov QWORD PTR nu$[rbp], rax
; 332 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nu$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN4@PMC_Compar
; 333 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 334 : char v_sign;
; 335 : _UINT64_T v_abs = GET_ABS_64(v, &v_sign);
lea rdx, QWORD PTR v_sign$[rbp]
mov rcx, QWORD PTR v$[rbp]
call GET_ABS_64
mov QWORD PTR v_abs$[rbp], rax
; 336 : if (nu->SIGN == 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jne SHORT $LN5@PMC_Compar
; 337 : {
; 338 : // u == 0 の場合
; 339 :
; 340 : // v の符号の反対を返す
; 341 : *w = -v_sign;
movsx eax, BYTE PTR v_sign$[rbp]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
; 342 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 343 : else if (nu->SIGN > 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jle SHORT $LN7@PMC_Compar
; 344 : {
; 345 : // u > 0 の場合
; 346 :
; 347 : if (v_sign <= 0)
movsx eax, BYTE PTR v_sign$[rbp]
test eax, eax
jg SHORT $LN9@PMC_Compar
; 348 : {
; 349 : // v == 0 の場合
; 350 :
; 351 : // 1 を返す
; 352 : *w = 1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 1
; 353 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 354 : else
; 355 : {
; 356 : // v > 0 の場合
; 357 :
; 358 : // abs(u) と abs(v) の比較結果を返す
; 359 : if ((result = CompareU_X_L_Imp(1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8, QWORD PTR v_abs$[rbp]
mov rax, QWORD PTR nu$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, 1
call CompareU_X_L_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN11@PMC_Compar
; 360 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN11@PMC_Compar:
$LN10@PMC_Compar:
; 361 : }
; 362 : }
jmp SHORT $LN8@PMC_Compar
$LN7@PMC_Compar:
; 363 : else
; 364 : {
; 365 : // u < 0 の場合
; 366 :
; 367 : if (v_sign >= 0)
movsx eax, BYTE PTR v_sign$[rbp]
test eax, eax
jl SHORT $LN12@PMC_Compar
; 368 : {
; 369 : // v == 0 の場合
; 370 :
; 371 : // -1 を返す
; 372 : *w = -1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], -1
; 373 : }
jmp SHORT $LN13@PMC_Compar
$LN12@PMC_Compar:
; 374 : else
; 375 : {
; 376 : // v < 0 の場合
; 377 :
; 378 : // -abs(u) と -abs(v) の比較結果を返す
; 379 : if ((result = CompareU_X_L_Imp(-1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8, QWORD PTR v_abs$[rbp]
mov rax, QWORD PTR nu$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, -1
call CompareU_X_L_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN14@PMC_Compar
; 380 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN14@PMC_Compar:
$LN13@PMC_Compar:
$LN8@PMC_Compar:
$LN6@PMC_Compar:
; 381 : }
; 382 : }
; 383 : #ifdef _DEBUG
; 384 : if (*w != 0 && *w != 1 && *w != -1)
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 0
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 1
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], -1
je SHORT $LN15@PMC_Compar
; 385 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 386 : #endif
; 387 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 388 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:PMC_Compare_X_L$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+328]
pop rdi
pop rbp
ret 0
PMC_Compare_X_L ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT PMC_Compare_X_I
_TEXT SEGMENT
result$ = 4
nu$ = 40
v_sign$ = 68
v_abs$ = 100
__$ArrayPad$ = 312
u$ = 352
v$ = 360
w$ = 368
PMC_Compare_X_I PROC ; COMDAT
; 259 : {
$LN17:
mov QWORD PTR [rsp+24], r8
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 360 ; 00000168H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 90 ; 0000005aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+392]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 260 : if (u == NULL)
cmp QWORD PTR u$[rbp], 0
jne SHORT $LN2@PMC_Compar
; 261 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 262 : if (w == NULL)
cmp QWORD PTR w$[rbp], 0
jne SHORT $LN3@PMC_Compar
; 263 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 264 : PMC_STATUS_CODE result;
; 265 : NUMBER_HEADER* nu = (NUMBER_HEADER*)u;
mov rax, QWORD PTR u$[rbp]
mov QWORD PTR nu$[rbp], rax
; 266 : if ((result = CheckNumber(nu)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nu$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN4@PMC_Compar
; 267 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 268 : char v_sign;
; 269 : _UINT32_T v_abs = GET_ABS_32(v, &v_sign);
lea rdx, QWORD PTR v_sign$[rbp]
mov ecx, DWORD PTR v$[rbp]
call GET_ABS_32
mov DWORD PTR v_abs$[rbp], eax
; 270 : if (nu->SIGN == 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jne SHORT $LN5@PMC_Compar
; 271 : {
; 272 : // u == 0 の場合
; 273 :
; 274 : // v の符号の反対を返す
; 275 : *w = -v_sign;
movsx eax, BYTE PTR v_sign$[rbp]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
; 276 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 277 : else if (nu->SIGN > 0)
mov rax, QWORD PTR nu$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jle SHORT $LN7@PMC_Compar
; 278 : {
; 279 : // u > 0 の場合
; 280 :
; 281 : if (v_sign <= 0)
movsx eax, BYTE PTR v_sign$[rbp]
test eax, eax
jg SHORT $LN9@PMC_Compar
; 282 : {
; 283 : // v == 0 の場合
; 284 :
; 285 : // 1 を返す
; 286 : *w = 1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 1
; 287 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 288 : else
; 289 : {
; 290 : // v > 0 の場合
; 291 :
; 292 : // abs(u) と abs(v) の比較結果を返す
; 293 : if ((result = CompareU_X_I_Imp(1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8d, DWORD PTR v_abs$[rbp]
mov rax, QWORD PTR nu$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, 1
call CompareU_X_I_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN11@PMC_Compar
; 294 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN11@PMC_Compar:
$LN10@PMC_Compar:
; 295 : }
; 296 : }
jmp SHORT $LN8@PMC_Compar
$LN7@PMC_Compar:
; 297 : else
; 298 : {
; 299 : // u < 0 の場合
; 300 :
; 301 : if (v_sign >= 0)
movsx eax, BYTE PTR v_sign$[rbp]
test eax, eax
jl SHORT $LN12@PMC_Compar
; 302 : {
; 303 : // v == 0 の場合
; 304 :
; 305 : // -1 を返す
; 306 : *w = -1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], -1
; 307 : }
jmp SHORT $LN13@PMC_Compar
$LN12@PMC_Compar:
; 308 : else
; 309 : {
; 310 : // v < 0 の場合
; 311 :
; 312 : // -abs(u) と -abs(v) の比較結果を返す
; 313 : if ((result = CompareU_X_I_Imp(-1, nu->ABS, v_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8d, DWORD PTR v_abs$[rbp]
mov rax, QWORD PTR nu$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, -1
call CompareU_X_I_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN14@PMC_Compar
; 314 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN14@PMC_Compar:
$LN13@PMC_Compar:
$LN8@PMC_Compar:
$LN6@PMC_Compar:
; 315 : }
; 316 : }
; 317 : #ifdef _DEBUG
; 318 : if (*w != 0 && *w != 1 && *w != -1)
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 0
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 1
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], -1
je SHORT $LN15@PMC_Compar
; 319 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 320 : #endif
; 321 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 322 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:PMC_Compare_X_I$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+328]
pop rdi
pop rbp
ret 0
PMC_Compare_X_I ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT PMC_Compare_UX_X
_TEXT SEGMENT
result$ = 4
nv$ = 40
u$ = 288
v$ = 296
w$ = 304
PMC_Compare_UX_X PROC ; COMDAT
; 215 : {
$LN12:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 296 ; 00000128H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 74 ; 0000004aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+328]
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 216 : if (v == NULL)
cmp QWORD PTR v$[rbp], 0
jne SHORT $LN2@PMC_Compar
; 217 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 218 : if (w == NULL)
cmp QWORD PTR w$[rbp], 0
jne SHORT $LN3@PMC_Compar
; 219 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 220 : PMC_STATUS_CODE result;
; 221 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov rax, QWORD PTR v$[rbp]
mov QWORD PTR nv$[rbp], rax
; 222 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nv$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN4@PMC_Compar
; 223 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 224 : if (u->FLAGS.IS_ZERO)
mov rax, QWORD PTR u$[rbp]
mov eax, DWORD PTR [rax]
and eax, 1
test eax, eax
je SHORT $LN5@PMC_Compar
; 225 : {
; 226 : // u == 0 の場合
; 227 :
; 228 : // v の符号の反対を返す
; 229 : *w = -nv->SIGN;
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
; 230 : }
jmp SHORT $LN6@PMC_Compar
$LN5@PMC_Compar:
; 231 : else
; 232 : {
; 233 : // u > 0 の場合
; 234 :
; 235 : if (nv->SIGN <= 0)
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jg SHORT $LN7@PMC_Compar
; 236 : {
; 237 : // v == 0 の場合
; 238 :
; 239 : // 1 を返す
; 240 : *w = 1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 1
; 241 : }
jmp SHORT $LN8@PMC_Compar
$LN7@PMC_Compar:
; 242 : else
; 243 : {
; 244 : // v > 0 の場合
; 245 :
; 246 : // abs(u) と abs(v) の比較結果を返す
; 247 : if ((result = CompareU_X_X_Imp(1, u, nv->ABS, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov rax, QWORD PTR nv$[rbp]
mov r8, QWORD PTR [rax+16]
mov rdx, QWORD PTR u$[rbp]
mov cl, 1
call CompareU_X_X_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN9@PMC_Compar
; 248 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN9@PMC_Compar:
$LN8@PMC_Compar:
$LN6@PMC_Compar:
; 249 : }
; 250 : }
; 251 : #ifdef _DEBUG
; 252 : if (*w != 0 && *w != 1 && *w != -1)
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 0
je SHORT $LN10@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 1
je SHORT $LN10@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], -1
je SHORT $LN10@PMC_Compar
; 253 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@PMC_Compar
$LN10@PMC_Compar:
; 254 : #endif
; 255 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 256 : }
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
PMC_Compare_UX_X ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT PMC_Compare_L_X
_TEXT SEGMENT
result$ = 4
nv$ = 40
u_sign$ = 68
u_abs$ = 104
__$ArrayPad$ = 312
u$ = 352
v$ = 360
w$ = 368
PMC_Compare_L_X PROC ; COMDAT
; 149 : {
$LN17:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 360 ; 00000168H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 90 ; 0000005aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+392]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 150 : if (v == NULL)
cmp QWORD PTR v$[rbp], 0
jne SHORT $LN2@PMC_Compar
; 151 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 152 : if (w == NULL)
cmp QWORD PTR w$[rbp], 0
jne SHORT $LN3@PMC_Compar
; 153 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 154 : PMC_STATUS_CODE result;
; 155 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov rax, QWORD PTR v$[rbp]
mov QWORD PTR nv$[rbp], rax
; 156 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nv$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN4@PMC_Compar
; 157 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 158 : char u_sign;
; 159 : _UINT64_T u_abs = GET_ABS_64(u, &u_sign);
lea rdx, QWORD PTR u_sign$[rbp]
mov rcx, QWORD PTR u$[rbp]
call GET_ABS_64
mov QWORD PTR u_abs$[rbp], rax
; 160 : if (u_sign == 0)
movsx eax, BYTE PTR u_sign$[rbp]
test eax, eax
jne SHORT $LN5@PMC_Compar
; 161 : {
; 162 : // u == 0 の場合
; 163 :
; 164 : // v の符号の反対を返す
; 165 : *w = - nv->SIGN;
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
; 166 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 167 : else if (u_sign > 0)
movsx eax, BYTE PTR u_sign$[rbp]
test eax, eax
jle SHORT $LN7@PMC_Compar
; 168 : {
; 169 : // u > 0 の場合
; 170 :
; 171 : if (nv->SIGN <= 0)
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jg SHORT $LN9@PMC_Compar
; 172 : {
; 173 : // v <= 0 の場合
; 174 :
; 175 : // 1 を返す
; 176 : *w = 1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 1
; 177 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 178 : else
; 179 : {
; 180 : // v > 0 の場合
; 181 :
; 182 : // abs(u) と abs(v) の比較結果を返す
; 183 : if ((result = CompareU_X_L_Imp(-1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8, QWORD PTR u_abs$[rbp]
mov rax, QWORD PTR nv$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, -1
call CompareU_X_L_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN11@PMC_Compar
; 184 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN11@PMC_Compar:
$LN10@PMC_Compar:
; 185 : }
; 186 : }
jmp SHORT $LN8@PMC_Compar
$LN7@PMC_Compar:
; 187 : else
; 188 : {
; 189 : // u < 0 の場合
; 190 :
; 191 : if (nv->SIGN >= 0)
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jl SHORT $LN12@PMC_Compar
; 192 : {
; 193 : // v == 0 の場合
; 194 :
; 195 : // -1 を返す
; 196 : *w = -1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], -1
; 197 : }
jmp SHORT $LN13@PMC_Compar
$LN12@PMC_Compar:
; 198 : else
; 199 : {
; 200 : // v < 0 の場合
; 201 :
; 202 : // -abs(u) と -abs(v) の比較結果を返す
; 203 : if ((result = CompareU_X_L_Imp(1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8, QWORD PTR u_abs$[rbp]
mov rax, QWORD PTR nv$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, 1
call CompareU_X_L_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN14@PMC_Compar
; 204 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN14@PMC_Compar:
$LN13@PMC_Compar:
$LN8@PMC_Compar:
$LN6@PMC_Compar:
; 205 : }
; 206 : }
; 207 : #ifdef _DEBUG
; 208 : if (*w != 0 && *w != 1 && *w != -1)
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 0
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 1
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], -1
je SHORT $LN15@PMC_Compar
; 209 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 210 : #endif
; 211 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 212 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:PMC_Compare_L_X$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+328]
pop rdi
pop rbp
ret 0
PMC_Compare_L_X ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\pmc_compare.c
; COMDAT PMC_Compare_I_X
_TEXT SEGMENT
result$ = 4
nv$ = 40
u_sign$ = 68
u_abs$ = 100
__$ArrayPad$ = 312
u$ = 352
v$ = 360
w$ = 368
PMC_Compare_I_X PROC ; COMDAT
; 83 : {
$LN17:
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+16], rdx
mov DWORD PTR [rsp+8], ecx
push rbp
push rdi
sub rsp, 360 ; 00000168H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 90 ; 0000005aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, DWORD PTR [rsp+392]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__C8C7A597_pmc_compare@c
call __CheckForDebuggerJustMyCode
; 84 : if (v == NULL)
cmp QWORD PTR v$[rbp], 0
jne SHORT $LN2@PMC_Compar
; 85 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN2@PMC_Compar:
; 86 : if (w == NULL)
cmp QWORD PTR w$[rbp], 0
jne SHORT $LN3@PMC_Compar
; 87 : return (PMC_STATUS_ARGUMENT_ERROR);
mov eax, -1
jmp $LN1@PMC_Compar
$LN3@PMC_Compar:
; 88 : PMC_STATUS_CODE result;
; 89 : NUMBER_HEADER* nv = (NUMBER_HEADER*)v;
mov rax, QWORD PTR v$[rbp]
mov QWORD PTR nv$[rbp], rax
; 90 : if ((result = CheckNumber(nv)) != PMC_STATUS_OK)
mov rcx, QWORD PTR nv$[rbp]
call CheckNumber
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN4@PMC_Compar
; 91 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp $LN1@PMC_Compar
$LN4@PMC_Compar:
; 92 : char u_sign;
; 93 : _UINT32_T u_abs = GET_ABS_32(u, &u_sign);
lea rdx, QWORD PTR u_sign$[rbp]
mov ecx, DWORD PTR u$[rbp]
call GET_ABS_32
mov DWORD PTR u_abs$[rbp], eax
; 94 : if (u_sign == 0)
movsx eax, BYTE PTR u_sign$[rbp]
test eax, eax
jne SHORT $LN5@PMC_Compar
; 95 : {
; 96 : // u == 0 の場合
; 97 :
; 98 : // v の符号の反対を返す
; 99 : *w = - nv->SIGN;
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
neg eax
mov rcx, QWORD PTR w$[rbp]
mov DWORD PTR [rcx], eax
; 100 : }
jmp $LN6@PMC_Compar
$LN5@PMC_Compar:
; 101 : else if (u_sign > 0)
movsx eax, BYTE PTR u_sign$[rbp]
test eax, eax
jle SHORT $LN7@PMC_Compar
; 102 : {
; 103 : // u > 0 の場合
; 104 :
; 105 : if (nv->SIGN <= 0)
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jg SHORT $LN9@PMC_Compar
; 106 : {
; 107 : // v <= 0 の場合
; 108 :
; 109 : // 1 を返す
; 110 : *w = 1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], 1
; 111 : }
jmp SHORT $LN10@PMC_Compar
$LN9@PMC_Compar:
; 112 : else
; 113 : {
; 114 : // v > 0 の場合
; 115 :
; 116 : // abs(u) と abs(v) の比較結果を返す
; 117 : if ((result = CompareU_X_I_Imp(-1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8d, DWORD PTR u_abs$[rbp]
mov rax, QWORD PTR nv$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, -1
call CompareU_X_I_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN11@PMC_Compar
; 118 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN11@PMC_Compar:
$LN10@PMC_Compar:
; 119 : }
; 120 : }
jmp SHORT $LN8@PMC_Compar
$LN7@PMC_Compar:
; 121 : else
; 122 : {
; 123 : // u < 0 の場合
; 124 :
; 125 : if (nv->SIGN >= 0)
mov rax, QWORD PTR nv$[rbp]
movsx eax, BYTE PTR [rax+24]
test eax, eax
jl SHORT $LN12@PMC_Compar
; 126 : {
; 127 : // v >= 0 の場合
; 128 :
; 129 : // -1 を返す
; 130 : *w = -1;
mov rax, QWORD PTR w$[rbp]
mov DWORD PTR [rax], -1
; 131 : }
jmp SHORT $LN13@PMC_Compar
$LN12@PMC_Compar:
; 132 : else
; 133 : {
; 134 : // v < 0 の場合
; 135 :
; 136 : // -abs(u) と -abs(v) の比較結果を返す
; 137 : if ((result = CompareU_X_I_Imp(1, nv->ABS, u_abs, w)) != PMC_STATUS_OK)
mov r9, QWORD PTR w$[rbp]
mov r8d, DWORD PTR u_abs$[rbp]
mov rax, QWORD PTR nv$[rbp]
mov rdx, QWORD PTR [rax+16]
mov cl, 1
call CompareU_X_I_Imp
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
je SHORT $LN14@PMC_Compar
; 138 : return (result);
mov eax, DWORD PTR result$[rbp]
jmp SHORT $LN1@PMC_Compar
$LN14@PMC_Compar:
$LN13@PMC_Compar:
$LN8@PMC_Compar:
$LN6@PMC_Compar:
; 139 : }
; 140 : }
; 141 : #ifdef _DEBUG
; 142 : if (*w != 0 && *w != 1 && *w != -1)
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 0
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], 1
je SHORT $LN15@PMC_Compar
mov rax, QWORD PTR w$[rbp]
cmp DWORD PTR [rax], -1
je SHORT $LN15@PMC_Compar
; 143 : return (PMC_STATUS_INTERNAL_ERROR);
mov eax, -256 ; ffffffffffffff00H
jmp SHORT $LN1@PMC_Compar
$LN15@PMC_Compar:
; 144 : #endif
; 145 : return (PMC_STATUS_OK);
xor eax, eax
$LN1@PMC_Compar:
; 146 : }
mov rdi, rax
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:PMC_Compare_I_X$rtcFrameData
call _RTC_CheckStackVars
mov rax, rdi
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+328]
pop rdi
pop rbp
ret 0
PMC_Compare_I_X ENDP
_TEXT ENDS
END
| 20.559226 | 109 | 0.629845 |
57c8cd5ac751320d2254ff9b0755b6929c1a6b14 | 845 | asm | Assembly | programs/oeis/212/A212844.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/212/A212844.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/212/A212844.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A212844: 2^(n+2) mod n.
; 0,0,2,0,3,4,1,0,5,6,8,4,8,2,2,0,8,4,8,4,11,16,8,16,3,16,23,8,8,16,8,0,32,16,2,4,8,16,32,24,8,4,8,20,23,16,8,16,22,46,32,12,8,4,7,16,32,16,8,4,8,16,32,0,63,58,8,64,32,36,8,40,8,16,47,64,72,22,8,64,77,16,8,4,43,16,32,56,8,76,57,64,32,16,52,64,8,72,68,4,8,52,8,88,53,16,8,4,8,26,32,64,8,28,82,64,59,16,2,64,85,16,32,64,103,4,8,0,32,66,8,16,113,16,77,72,8,118,8,44,32,16,54,112,128,16,53,64,8,46,8,112,59,64,97,4,8,16,32,64,121,4,8,64,128,16,8,88,151,16,167,64,8,82,22,80,32,16,8,4,8,16,32,104,128,70,83,64,158,106,8,64,8,16,32,120,8,166,8,104,32,16,135,64,128,16,185,64,79,46,8,64,32,16,42,112,78,16,32,4,128,34,8,128,203,16,8,196,8,186,74,96,8,22,222,64,32,120,8,64,8,82,239,64,23,10,31,32,32,246
mov $2,$0
add $2,$0
add $2,4
mov $3,$0
mov $0,$2
mov $1,4
add $3,1
lpb $0
sub $0,2
mod $1,$3
mul $1,2
lpe
div $1,2
| 49.705882 | 696 | 0.616568 |
d6c4d87d1ff5cf5d734e2c07ef225819d1d9a47d | 566 | asm | Assembly | programs/oeis/198/A198479.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/198/A198479.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/198/A198479.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A198479: 10^n*n^10.
; 0,10,102400,59049000,10485760000,976562500000,60466176000000,2824752490000000,107374182400000000,3486784401000000000,100000000000000000000,2593742460100000000000,61917364224000000000000,1378584918490000000000000,28925465497600000000000000,576650390625000000000000000,10995116277760000000000000000,201599390044900000000000000000,3570467226624000000000000000000,61310662578010000000000000000000,1024000000000000000000000000000000,16679880978201000000000000000000000,265599227914240000000000000000000000
mov $2,10
pow $2,$0
pow $0,10
mul $0,$2
| 70.75 | 502 | 0.90636 |
6fb562f773906aad4b82de65b305796f8e538045 | 1,005 | asm | Assembly | six_factorial.asm | hilaltrfllu/VerySimpleCPU | b7209d8189edc0e96945446a73c30134402c5049 | [
"MIT"
] | null | null | null | six_factorial.asm | hilaltrfllu/VerySimpleCPU | b7209d8189edc0e96945446a73c30134402c5049 | [
"MIT"
] | null | null | null | six_factorial.asm | hilaltrfllu/VerySimpleCPU | b7209d8189edc0e96945446a73c30134402c5049 | [
"MIT"
] | null | null | null | 0: NAND 69 69 // 1's complement of 1 Alp Kaan Erer
1: ADDi 69 1 // 2's complement of 1 [69: -1] RecursiveFactorial
2: CPIi 70 100 // loc 1000 -> n
3: ADD 100 69 // n - 1
4: CP 71 100 // 71 -> n - 1
5: LTi 71 1 // n - 1 < 1
6: ADDi 70 1 // loc 1000 ++
7: BZJ 72 71 // if n-1 > 1 go to loc 2 (72:2) else go to loc 8
8: ADD 70 69 // (1000 + n) - 1
9: CPI 74 70 // 74 -> # go to loc (1000 + n) - 1
10: CP 75 70 // 75:loc (1000 + n) - 1
11: ADD 75 69 // [(1000 + n) - 1] --
12: CPI 76 75 // 76: # at loc [(1000 + n) - 1] --
13: MUL 76 74 // 1.2 --> 2.3 --> 6.4 --> (n-1)!.n
14: CP 74 76 // save result
15: CP 77 75 // 77: loc loc (1000 + n) - 1
16: LTi 77 1001 // check that all n numbers multiplied
17: BZJ 73 77 // if 1000 loc stop else continue
18: CP 101 76 // copy result to loc 101
19: BZJi 20 19 // infinite loop END
20: 0
69: 1 // [-1]
70: 1000 // Stack start #
72: 2 // first loop location
73: 11 // second loop location
100: 6 // INPUT n
101: 0 // RESULT
999: 1 | 35.892857 | 72 | 0.545274 |
28b6d6a5a3d6a39f85441d5266f22b91057b2742 | 737 | asm | Assembly | programs/oeis/188/A188188.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/188/A188188.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/188/A188188.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A188188: Positions of 0 in A188187; complement of A004958.
; 1,2,3,4,6,7,8,10,11,12,14,15,16,18,19,20,21,23,24,25,27,28,29,31,32,33,35,36,37,38,40,41,42,44,45,46,48,49,50,52,53,54,55,57,58,59,61,62,63,65,66,67,69,70,71,72,74,75,76,78,79,80,82,83,84,86,87,88,90,91,92,93,95,96,97,99,100,101,103,104,105,107,108,109
mov $5,1
lpb $5
mov $4,2
sub $5,1
mov $9,$0
lpb $4
mov $0,$9
sub $0,1
mov $1,24
mov $2,1
add $2,$0
mov $3,$0
add $3,24
sub $3,$0
add $3,20
add $1,$3
sub $4,1
mov $6,$0
add $0,24
log $0,4
sub $6,3
mov $7,44
mul $7,$2
mul $7,2
add $7,7
mov $8,$6
sub $8,$0
add $7,$8
div $7,$1
mov $1,$7
add $1,2
lpe
lpe
sub $1,1
| 19.394737 | 254 | 0.522388 |
b622dc69de4b13507162b072a98546db407933f4 | 512 | asm | Assembly | programs/oeis/153/A153152.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/153/A153152.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/153/A153152.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A153152: Rotated binary incrementing: For n<2 a(n)=n, if n=(2^k)-1, a(n)=(n+1)/2, otherwise a(n)=n+1.
; 0,1,3,2,5,6,7,4,9,10,11,12,13,14,15,8,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,16,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,32,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100
add $0,1
mov $1,$0
lpb $1
mov $2,1
lpb $1
dif $1,2
mul $2,2
lpe
mul $0,2
mov $1,$2
lpe
div $0,2
| 32 | 292 | 0.603516 |
72f67d0f14e065178c7cb37a52ce70dd77412e0a | 13,559 | asm | Assembly | P6/data_P6_2/b_cp1_test3.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | 1 | 2022-01-23T09:24:47.000Z | 2022-01-23T09:24:47.000Z | P6/data_P6_2/b_cp1_test3.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | P6/data_P6_2/b_cp1_test3.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | lui $1,35428
ori $1,$1,2065
lui $2,21481
ori $2,$2,31609
lui $3,26197
ori $3,$3,26088
lui $4,18591
ori $4,$4,47439
lui $5,31720
ori $5,$5,58599
lui $6,53106
ori $6,$6,43597
mthi $1
mtlo $2
sec0:
nop
nop
nop
blez $4,yes0
nop
no0:addiu $k1,$k1,1
yes0:addiu $k0,$k0,1
sec1:
nop
nop
or $4,$4,$1
blez $4,yes1
nop
no1:addiu $k1,$k1,1
yes1:addiu $k0,$k0,1
sec2:
nop
nop
andi $4,$2,64941
blez $4,yes2
nop
no2:addiu $k1,$k1,1
yes2:addiu $k0,$k0,1
sec3:
nop
nop
mflo $4
blez $4,yes3
nop
no3:addiu $k1,$k1,1
yes3:addiu $k0,$k0,1
sec4:
nop
nop
lhu $4,6($0)
blez $4,yes4
nop
no4:addiu $k1,$k1,1
yes4:addiu $k0,$k0,1
sec5:
nop
sltu $4,$1,$3
nop
blez $4,yes5
nop
no5:addiu $k1,$k1,1
yes5:addiu $k0,$k0,1
sec6:
nop
nor $4,$4,$4
addu $4,$3,$3
blez $4,yes6
nop
no6:addiu $k1,$k1,1
yes6:addiu $k0,$k0,1
sec7:
nop
and $4,$3,$1
andi $4,$3,60836
blez $4,yes7
nop
no7:addiu $k1,$k1,1
yes7:addiu $k0,$k0,1
sec8:
nop
nor $4,$5,$4
mflo $4
blez $4,yes8
nop
no8:addiu $k1,$k1,1
yes8:addiu $k0,$k0,1
sec9:
nop
slt $4,$5,$2
lw $4,12($0)
blez $4,yes9
nop
no9:addiu $k1,$k1,1
yes9:addiu $k0,$k0,1
sec10:
nop
xori $4,$2,31269
nop
blez $4,yes10
nop
no10:addiu $k1,$k1,1
yes10:addiu $k0,$k0,1
sec11:
nop
lui $4,1044
addu $4,$2,$2
blez $4,yes11
nop
no11:addiu $k1,$k1,1
yes11:addiu $k0,$k0,1
sec12:
nop
lui $4,9039
andi $4,$2,9504
blez $4,yes12
nop
no12:addiu $k1,$k1,1
yes12:addiu $k0,$k0,1
sec13:
nop
ori $4,$2,10939
mflo $4
blez $4,yes13
nop
no13:addiu $k1,$k1,1
yes13:addiu $k0,$k0,1
sec14:
nop
slti $4,$4,-9727
lhu $4,6($0)
blez $4,yes14
nop
no14:addiu $k1,$k1,1
yes14:addiu $k0,$k0,1
sec15:
nop
mflo $4
nop
blez $4,yes15
nop
no15:addiu $k1,$k1,1
yes15:addiu $k0,$k0,1
sec16:
nop
mflo $4
nor $4,$0,$5
blez $4,yes16
nop
no16:addiu $k1,$k1,1
yes16:addiu $k0,$k0,1
sec17:
nop
mfhi $4
xori $4,$2,10748
blez $4,yes17
nop
no17:addiu $k1,$k1,1
yes17:addiu $k0,$k0,1
sec18:
nop
mflo $4
mfhi $4
blez $4,yes18
nop
no18:addiu $k1,$k1,1
yes18:addiu $k0,$k0,1
sec19:
nop
mflo $4
lbu $4,8($0)
blez $4,yes19
nop
no19:addiu $k1,$k1,1
yes19:addiu $k0,$k0,1
sec20:
nop
lw $4,16($0)
nop
blez $4,yes20
nop
no20:addiu $k1,$k1,1
yes20:addiu $k0,$k0,1
sec21:
nop
lb $4,7($0)
sltu $4,$3,$1
blez $4,yes21
nop
no21:addiu $k1,$k1,1
yes21:addiu $k0,$k0,1
sec22:
nop
lbu $4,16($0)
sltiu $4,$2,19231
blez $4,yes22
nop
no22:addiu $k1,$k1,1
yes22:addiu $k0,$k0,1
sec23:
nop
lw $4,8($0)
mflo $4
blez $4,yes23
nop
no23:addiu $k1,$k1,1
yes23:addiu $k0,$k0,1
sec24:
nop
lhu $4,16($0)
lb $4,11($0)
blez $4,yes24
nop
no24:addiu $k1,$k1,1
yes24:addiu $k0,$k0,1
sec25:
and $4,$2,$4
nop
nop
blez $4,yes25
nop
no25:addiu $k1,$k1,1
yes25:addiu $k0,$k0,1
sec26:
sltu $4,$4,$5
nop
slt $4,$4,$1
blez $4,yes26
nop
no26:addiu $k1,$k1,1
yes26:addiu $k0,$k0,1
sec27:
subu $4,$3,$2
nop
ori $4,$2,52129
blez $4,yes27
nop
no27:addiu $k1,$k1,1
yes27:addiu $k0,$k0,1
sec28:
sltu $4,$3,$1
nop
mflo $4
blez $4,yes28
nop
no28:addiu $k1,$k1,1
yes28:addiu $k0,$k0,1
sec29:
nor $4,$2,$5
nop
lhu $4,10($0)
blez $4,yes29
nop
no29:addiu $k1,$k1,1
yes29:addiu $k0,$k0,1
sec30:
and $4,$3,$5
or $4,$2,$2
nop
blez $4,yes30
nop
no30:addiu $k1,$k1,1
yes30:addiu $k0,$k0,1
sec31:
subu $4,$1,$5
and $4,$3,$4
sltu $4,$5,$1
blez $4,yes31
nop
no31:addiu $k1,$k1,1
yes31:addiu $k0,$k0,1
sec32:
sltu $4,$3,$3
slt $4,$1,$3
lui $4,1877
blez $4,yes32
nop
no32:addiu $k1,$k1,1
yes32:addiu $k0,$k0,1
sec33:
addu $4,$1,$6
subu $4,$2,$0
mfhi $4
blez $4,yes33
nop
no33:addiu $k1,$k1,1
yes33:addiu $k0,$k0,1
sec34:
and $4,$0,$3
and $4,$3,$0
lh $4,0($0)
blez $4,yes34
nop
no34:addiu $k1,$k1,1
yes34:addiu $k0,$k0,1
sec35:
addu $4,$4,$5
sltiu $4,$5,-14312
nop
blez $4,yes35
nop
no35:addiu $k1,$k1,1
yes35:addiu $k0,$k0,1
sec36:
or $4,$2,$2
ori $4,$3,51086
sltu $4,$4,$2
blez $4,yes36
nop
no36:addiu $k1,$k1,1
yes36:addiu $k0,$k0,1
sec37:
sltu $4,$2,$3
sltiu $4,$2,-27620
ori $4,$3,7898
blez $4,yes37
nop
no37:addiu $k1,$k1,1
yes37:addiu $k0,$k0,1
sec38:
xor $4,$4,$4
addiu $4,$1,-5844
mflo $4
blez $4,yes38
nop
no38:addiu $k1,$k1,1
yes38:addiu $k0,$k0,1
sec39:
slt $4,$3,$3
sltiu $4,$4,27295
lb $4,12($0)
blez $4,yes39
nop
no39:addiu $k1,$k1,1
yes39:addiu $k0,$k0,1
sec40:
slt $4,$1,$3
mflo $4
nop
blez $4,yes40
nop
no40:addiu $k1,$k1,1
yes40:addiu $k0,$k0,1
sec41:
slt $4,$4,$4
mflo $4
addu $4,$1,$2
blez $4,yes41
nop
no41:addiu $k1,$k1,1
yes41:addiu $k0,$k0,1
sec42:
slt $4,$3,$2
mfhi $4
lui $4,58316
blez $4,yes42
nop
no42:addiu $k1,$k1,1
yes42:addiu $k0,$k0,1
sec43:
or $4,$3,$2
mfhi $4
mfhi $4
blez $4,yes43
nop
no43:addiu $k1,$k1,1
yes43:addiu $k0,$k0,1
sec44:
sltu $4,$4,$4
mflo $4
lb $4,0($0)
blez $4,yes44
nop
no44:addiu $k1,$k1,1
yes44:addiu $k0,$k0,1
sec45:
xor $4,$3,$0
lb $4,13($0)
nop
blez $4,yes45
nop
no45:addiu $k1,$k1,1
yes45:addiu $k0,$k0,1
sec46:
slt $4,$3,$5
lhu $4,14($0)
addu $4,$1,$2
blez $4,yes46
nop
no46:addiu $k1,$k1,1
yes46:addiu $k0,$k0,1
sec47:
and $4,$3,$2
lhu $4,6($0)
slti $4,$2,-10364
blez $4,yes47
nop
no47:addiu $k1,$k1,1
yes47:addiu $k0,$k0,1
sec48:
xor $4,$3,$3
lhu $4,4($0)
mflo $4
blez $4,yes48
nop
no48:addiu $k1,$k1,1
yes48:addiu $k0,$k0,1
sec49:
xor $4,$3,$1
lhu $4,8($0)
lh $4,6($0)
blez $4,yes49
nop
no49:addiu $k1,$k1,1
yes49:addiu $k0,$k0,1
sec50:
xori $4,$2,6368
nop
nop
blez $4,yes50
nop
no50:addiu $k1,$k1,1
yes50:addiu $k0,$k0,1
sec51:
slti $4,$2,-7035
nop
nor $4,$6,$3
blez $4,yes51
nop
no51:addiu $k1,$k1,1
yes51:addiu $k0,$k0,1
sec52:
lui $4,60265
nop
sltiu $4,$2,-13513
blez $4,yes52
nop
no52:addiu $k1,$k1,1
yes52:addiu $k0,$k0,1
sec53:
lui $4,42526
nop
mflo $4
blez $4,yes53
nop
no53:addiu $k1,$k1,1
yes53:addiu $k0,$k0,1
sec54:
addiu $4,$4,-29534
nop
lw $4,0($0)
blez $4,yes54
nop
no54:addiu $k1,$k1,1
yes54:addiu $k0,$k0,1
sec55:
addiu $4,$1,30992
sltu $4,$1,$4
nop
blez $4,yes55
nop
no55:addiu $k1,$k1,1
yes55:addiu $k0,$k0,1
sec56:
xori $4,$1,39202
or $4,$4,$2
slt $4,$1,$4
blez $4,yes56
nop
no56:addiu $k1,$k1,1
yes56:addiu $k0,$k0,1
sec57:
xori $4,$5,19557
and $4,$3,$4
ori $4,$1,24971
blez $4,yes57
nop
no57:addiu $k1,$k1,1
yes57:addiu $k0,$k0,1
sec58:
xori $4,$3,31789
and $4,$6,$4
mflo $4
blez $4,yes58
nop
no58:addiu $k1,$k1,1
yes58:addiu $k0,$k0,1
sec59:
slti $4,$3,31117
sltu $4,$2,$3
lb $4,10($0)
blez $4,yes59
nop
no59:addiu $k1,$k1,1
yes59:addiu $k0,$k0,1
sec60:
ori $4,$1,13120
slti $4,$1,17018
nop
blez $4,yes60
nop
no60:addiu $k1,$k1,1
yes60:addiu $k0,$k0,1
sec61:
lui $4,9501
andi $4,$1,39836
or $4,$5,$3
blez $4,yes61
nop
no61:addiu $k1,$k1,1
yes61:addiu $k0,$k0,1
sec62:
xori $4,$3,5919
slti $4,$0,8334
slti $4,$2,7238
blez $4,yes62
nop
no62:addiu $k1,$k1,1
yes62:addiu $k0,$k0,1
sec63:
xori $4,$3,38432
lui $4,22792
mfhi $4
blez $4,yes63
nop
no63:addiu $k1,$k1,1
yes63:addiu $k0,$k0,1
sec64:
addiu $4,$3,8052
andi $4,$4,29356
lh $4,8($0)
blez $4,yes64
nop
no64:addiu $k1,$k1,1
yes64:addiu $k0,$k0,1
sec65:
ori $4,$3,63913
mflo $4
nop
blez $4,yes65
nop
no65:addiu $k1,$k1,1
yes65:addiu $k0,$k0,1
sec66:
andi $4,$2,21301
mflo $4
slt $4,$3,$2
blez $4,yes66
nop
no66:addiu $k1,$k1,1
yes66:addiu $k0,$k0,1
sec67:
lui $4,17222
mflo $4
lui $4,4290
blez $4,yes67
nop
no67:addiu $k1,$k1,1
yes67:addiu $k0,$k0,1
sec68:
slti $4,$4,-18379
mflo $4
mfhi $4
blez $4,yes68
nop
no68:addiu $k1,$k1,1
yes68:addiu $k0,$k0,1
sec69:
sltiu $4,$3,22552
mfhi $4
lw $4,4($0)
blez $4,yes69
nop
no69:addiu $k1,$k1,1
yes69:addiu $k0,$k0,1
sec70:
addiu $4,$4,-2109
lbu $4,8($0)
nop
blez $4,yes70
nop
no70:addiu $k1,$k1,1
yes70:addiu $k0,$k0,1
sec71:
lui $4,45253
lw $4,0($0)
subu $4,$6,$5
blez $4,yes71
nop
no71:addiu $k1,$k1,1
yes71:addiu $k0,$k0,1
sec72:
addiu $4,$2,26656
lb $4,14($0)
xori $4,$4,7209
blez $4,yes72
nop
no72:addiu $k1,$k1,1
yes72:addiu $k0,$k0,1
sec73:
sltiu $4,$3,6267
lw $4,8($0)
mflo $4
blez $4,yes73
nop
no73:addiu $k1,$k1,1
yes73:addiu $k0,$k0,1
sec74:
ori $4,$0,47969
lbu $4,3($0)
lhu $4,8($0)
blez $4,yes74
nop
no74:addiu $k1,$k1,1
yes74:addiu $k0,$k0,1
sec75:
mfhi $4
nop
nop
blez $4,yes75
nop
no75:addiu $k1,$k1,1
yes75:addiu $k0,$k0,1
sec76:
mflo $4
nop
nor $4,$3,$3
blez $4,yes76
nop
no76:addiu $k1,$k1,1
yes76:addiu $k0,$k0,1
sec77:
mfhi $4
nop
sltiu $4,$2,-30694
blez $4,yes77
nop
no77:addiu $k1,$k1,1
yes77:addiu $k0,$k0,1
sec78:
mfhi $4
nop
mfhi $4
blez $4,yes78
nop
no78:addiu $k1,$k1,1
yes78:addiu $k0,$k0,1
sec79:
mflo $4
nop
lb $4,2($0)
blez $4,yes79
nop
no79:addiu $k1,$k1,1
yes79:addiu $k0,$k0,1
sec80:
mflo $4
addu $4,$4,$5
nop
blez $4,yes80
nop
no80:addiu $k1,$k1,1
yes80:addiu $k0,$k0,1
sec81:
mfhi $4
xor $4,$5,$2
and $4,$5,$3
blez $4,yes81
nop
no81:addiu $k1,$k1,1
yes81:addiu $k0,$k0,1
sec82:
mfhi $4
sltu $4,$6,$5
ori $4,$3,14552
blez $4,yes82
nop
no82:addiu $k1,$k1,1
yes82:addiu $k0,$k0,1
sec83:
mfhi $4
nor $4,$1,$3
mfhi $4
blez $4,yes83
nop
no83:addiu $k1,$k1,1
yes83:addiu $k0,$k0,1
sec84:
mflo $4
addu $4,$3,$3
lw $4,0($0)
blez $4,yes84
nop
no84:addiu $k1,$k1,1
yes84:addiu $k0,$k0,1
sec85:
mfhi $4
ori $4,$3,34452
nop
blez $4,yes85
nop
no85:addiu $k1,$k1,1
yes85:addiu $k0,$k0,1
sec86:
mflo $4
slti $4,$6,21940
and $4,$4,$1
blez $4,yes86
nop
no86:addiu $k1,$k1,1
yes86:addiu $k0,$k0,1
sec87:
mfhi $4
addiu $4,$3,5474
lui $4,6710
blez $4,yes87
nop
no87:addiu $k1,$k1,1
yes87:addiu $k0,$k0,1
sec88:
mflo $4
andi $4,$0,23909
mflo $4
blez $4,yes88
nop
no88:addiu $k1,$k1,1
yes88:addiu $k0,$k0,1
sec89:
mflo $4
addiu $4,$3,12570
lw $4,8($0)
blez $4,yes89
nop
no89:addiu $k1,$k1,1
yes89:addiu $k0,$k0,1
sec90:
mfhi $4
mflo $4
nop
blez $4,yes90
nop
no90:addiu $k1,$k1,1
yes90:addiu $k0,$k0,1
sec91:
mfhi $4
mflo $4
subu $4,$4,$6
blez $4,yes91
nop
no91:addiu $k1,$k1,1
yes91:addiu $k0,$k0,1
sec92:
mfhi $4
mflo $4
xori $4,$3,29551
blez $4,yes92
nop
no92:addiu $k1,$k1,1
yes92:addiu $k0,$k0,1
sec93:
mfhi $4
mflo $4
mfhi $4
blez $4,yes93
nop
no93:addiu $k1,$k1,1
yes93:addiu $k0,$k0,1
sec94:
mflo $4
mfhi $4
lb $4,16($0)
blez $4,yes94
nop
no94:addiu $k1,$k1,1
yes94:addiu $k0,$k0,1
sec95:
mflo $4
lh $4,14($0)
nop
blez $4,yes95
nop
no95:addiu $k1,$k1,1
yes95:addiu $k0,$k0,1
sec96:
mfhi $4
lh $4,6($0)
and $4,$4,$1
blez $4,yes96
nop
no96:addiu $k1,$k1,1
yes96:addiu $k0,$k0,1
sec97:
mflo $4
lb $4,11($0)
xori $4,$6,46645
blez $4,yes97
nop
no97:addiu $k1,$k1,1
yes97:addiu $k0,$k0,1
sec98:
mflo $4
lw $4,16($0)
mflo $4
blez $4,yes98
nop
no98:addiu $k1,$k1,1
yes98:addiu $k0,$k0,1
sec99:
mflo $4
lb $4,2($0)
lw $4,8($0)
blez $4,yes99
nop
no99:addiu $k1,$k1,1
yes99:addiu $k0,$k0,1
sec100:
lbu $4,3($0)
nop
nop
blez $4,yes100
nop
no100:addiu $k1,$k1,1
yes100:addiu $k0,$k0,1
sec101:
lh $4,10($0)
nop
and $4,$4,$1
blez $4,yes101
nop
no101:addiu $k1,$k1,1
yes101:addiu $k0,$k0,1
sec102:
lb $4,5($0)
nop
xori $4,$2,52979
blez $4,yes102
nop
no102:addiu $k1,$k1,1
yes102:addiu $k0,$k0,1
sec103:
lb $4,4($0)
nop
mflo $4
blez $4,yes103
nop
no103:addiu $k1,$k1,1
yes103:addiu $k0,$k0,1
sec104:
lb $4,0($0)
nop
lw $4,12($0)
blez $4,yes104
nop
no104:addiu $k1,$k1,1
yes104:addiu $k0,$k0,1
sec105:
lw $4,0($0)
and $4,$2,$3
nop
blez $4,yes105
nop
no105:addiu $k1,$k1,1
yes105:addiu $k0,$k0,1
sec106:
lbu $4,0($0)
xor $4,$2,$0
xor $4,$3,$0
blez $4,yes106
nop
no106:addiu $k1,$k1,1
yes106:addiu $k0,$k0,1
sec107:
lhu $4,8($0)
slt $4,$0,$2
xori $4,$5,6148
blez $4,yes107
nop
no107:addiu $k1,$k1,1
yes107:addiu $k0,$k0,1
sec108:
lbu $4,2($0)
nor $4,$2,$2
mfhi $4
blez $4,yes108
nop
no108:addiu $k1,$k1,1
yes108:addiu $k0,$k0,1
sec109:
lw $4,8($0)
addu $4,$4,$3
lw $4,0($0)
blez $4,yes109
nop
no109:addiu $k1,$k1,1
yes109:addiu $k0,$k0,1
sec110:
lhu $4,6($0)
sltiu $4,$1,-19978
nop
blez $4,yes110
nop
no110:addiu $k1,$k1,1
yes110:addiu $k0,$k0,1
sec111:
lw $4,8($0)
addiu $4,$5,19363
slt $4,$1,$4
blez $4,yes111
nop
no111:addiu $k1,$k1,1
yes111:addiu $k0,$k0,1
sec112:
lb $4,12($0)
addiu $4,$4,5770
slti $4,$3,24700
blez $4,yes112
nop
no112:addiu $k1,$k1,1
yes112:addiu $k0,$k0,1
sec113:
lb $4,3($0)
xori $4,$2,5291
mfhi $4
blez $4,yes113
nop
no113:addiu $k1,$k1,1
yes113:addiu $k0,$k0,1
sec114:
lw $4,0($0)
lui $4,39317
lb $4,8($0)
blez $4,yes114
nop
no114:addiu $k1,$k1,1
yes114:addiu $k0,$k0,1
sec115:
lw $4,4($0)
mfhi $4
nop
blez $4,yes115
nop
no115:addiu $k1,$k1,1
yes115:addiu $k0,$k0,1
sec116:
lbu $4,14($0)
mflo $4
and $4,$5,$5
blez $4,yes116
nop
no116:addiu $k1,$k1,1
yes116:addiu $k0,$k0,1
sec117:
lh $4,2($0)
mfhi $4
addiu $4,$1,9394
blez $4,yes117
nop
no117:addiu $k1,$k1,1
yes117:addiu $k0,$k0,1
sec118:
lh $4,4($0)
mfhi $4
mfhi $4
blez $4,yes118
nop
no118:addiu $k1,$k1,1
yes118:addiu $k0,$k0,1
sec119:
lhu $4,10($0)
mflo $4
lw $4,0($0)
blez $4,yes119
nop
no119:addiu $k1,$k1,1
yes119:addiu $k0,$k0,1
sec120:
lh $4,2($0)
lh $4,2($0)
nop
blez $4,yes120
nop
no120:addiu $k1,$k1,1
yes120:addiu $k0,$k0,1
sec121:
lb $4,10($0)
lb $4,4($0)
and $4,$1,$0
blez $4,yes121
nop
no121:addiu $k1,$k1,1
yes121:addiu $k0,$k0,1
sec122:
lbu $4,5($0)
lb $4,3($0)
lui $4,54899
blez $4,yes122
nop
no122:addiu $k1,$k1,1
yes122:addiu $k0,$k0,1
sec123:
lhu $4,14($0)
lb $4,16($0)
mfhi $4
blez $4,yes123
nop
no123:addiu $k1,$k1,1
yes123:addiu $k0,$k0,1
sec124:
lb $4,8($0)
lhu $4,12($0)
lbu $4,9($0)
blez $4,yes124
nop
no124:addiu $k1,$k1,1
yes124:addiu $k0,$k0,1
| 11.89386 | 22 | 0.614647 |
cc9a6c00175da4161739dd14311d890a6be06c51 | 812 | asm | Assembly | oeis/142/A142937.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142937.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142937.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142937: Primes congruent to 27 mod 64.
; Submitted by Jon Maiga
; 283,347,859,1051,1307,1499,1627,2011,2203,2267,2459,2843,2971,3163,3547,3739,3803,3931,4507,5147,5531,5659,5851,6043,6299,6427,6491,6619,7451,7643,7963,8219,8539,8731,8923,9371,9883,10139,10267,10331,10459,10651,11483,11867,12251,12379,12763,13147,13339,13723,14107,14683,14747,14939,15131,15259,15451,15643,16091,16411,16603,16987,17627,18523,18587,19163,19483,19739,19867,20123,20443,20507,21019,21211,21467,21787,21851,22171,22619,22811,23003,23131,23899,24091,24859,24923,25243,25307,25819,26203
mov $2,$0
add $2,6
pow $2,2
lpb $2
mov $3,$4
add $3,26
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,64
lpe
mov $0,$4
add $0,27
| 36.909091 | 501 | 0.732759 |
e5a47343aff9c8ba9d8d9153fbbbbc66cd31d734 | 699 | asm | Assembly | oeis/259/A259968.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/259/A259968.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/259/A259968.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A259968: a(n) = a(n-1) + a(n-2) + a(n-4), with a(1)=1, a(2)=1, a(3)=3, a(4)=6.
; Submitted by Jon Maiga
; 1,1,3,6,10,17,30,53,93,163,286,502,881,1546,2713,4761,8355,14662,25730,45153,79238,139053,244021,428227,751486,1318766,2314273,4061266,7127025,12507057,21948355,38516678,67592058,118615793,208156206,365288677,641036941,1124941411,1974134558,3464364646,6079536145,10668842202,18722512905,32855719753,57657768803,101182330758,177562612466,311600662977,546821044246,959604037981,1683987694693,2955192395651,5186001134590,9100797568222,15970786397505,28026776361378,49183563893473,86311137823073
mov $1,1
mov $3,2
lpb $0
sub $0,1
sub $1,$3
add $2,$3
add $3,$1
add $1,$2
lpe
mov $0,$1
| 46.6 | 493 | 0.763948 |
621cfc8312ea967991a30b62f20081aae7263147 | 141 | asm | Assembly | travis/test/coffalign.asm | johannkoenig/nasm | 47918f69201058980d793230e993d59be0522c84 | [
"BSD-2-Clause"
] | 1,052 | 2018-12-07T19:57:03.000Z | 2022-03-31T07:06:00.000Z | travis/test/coffalign.asm | johannkoenig/nasm | 47918f69201058980d793230e993d59be0522c84 | [
"BSD-2-Clause"
] | 17 | 2020-07-02T10:40:48.000Z | 2022-02-02T20:21:33.000Z | travis/test/coffalign.asm | johannkoenig/nasm | 47918f69201058980d793230e993d59be0522c84 | [
"BSD-2-Clause"
] | 138 | 2019-10-03T23:11:37.000Z | 2022-03-28T20:16:27.000Z | section .text align=64
foo:
nop
nop
nop
ret
section .data align=64
bar:
db 0, 1, 2
section .text align=32
baz:
nop
nop
nop
ret
| 7.833333 | 23 | 0.652482 |
ac92e75390c9340188f8e5a37ad6bea6db18196c | 403 | asm | Assembly | programs/oeis/290/A290026.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/290/A290026.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/290/A290026.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A290026: Number of 3-cycles in the n-halved cube graph.
; 0,0,4,32,160,640,2240,7168,21504,61440,168960,450560,1171456,2981888,7454720,18350080,44564480,106954752,254017536,597688320,1394606080,3229614080,7428112384,16978542592,38587596800,87241523200,196293427200,439697276928,980863156224
add $0,1
mov $3,2
pow $3,$0
bin $0,3
mov $2,$3
lpb $2
mul $0,$2
mod $2,5
lpe
mov $1,$0
div $1,8
mul $1,4
| 25.1875 | 234 | 0.754342 |
f88c3dd1d8487e9c875709e38c86b48059cb49ad | 752 | asm | Assembly | oeis/294/A294300.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/294/A294300.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/294/A294300.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A294300: Sum of the fifth powers of the parts in the partitions of n into two distinct parts.
; 0,0,33,244,1300,4182,12201,27984,61776,117700,220825,374100,630708,985194,1539825,2266432,3347776,4708584,6657201,9033300,12333300,16256350,21571033,27758544,35970000,45364332,57617001,71428084,89176276,108928050,133987425,161568000,196171008,233886544,280741825,331374132,393729876,460597734,542309001,629333200,734933200,846705300,981480633,1123335444,1293405300,1471497082,1683896401,1905278784,2168045376,2440755000,2763020625,3096164500,3488249908,3892096494,4365610425,4851684432,5419626576
add $0,1
mov $2,$0
lpb $0
mov $3,$2
dif $3,$0
gcd $3,2
mul $3,$0
cmp $3,$2
cmp $3,0
mul $3,$0
sub $0,1
pow $3,5
add $1,$3
lpe
mov $0,$1
| 39.578947 | 498 | 0.779255 |
73c2afa0d199d4e75833aedf16047f34b296f042 | 798 | asm | Assembly | libsrc/graphics/xordrawb_callee.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null | libsrc/graphics/xordrawb_callee.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null | libsrc/graphics/xordrawb_callee.asm | rjcorrig/z88dk | c49c26bb232c17ea5a45d21bb81b6343572b7f4c | [
"ClArtistic"
] | null | null | null | ;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
;
; ----- void __CALLEE__ xordrawb(int x, int y, int h, int v)
;
; $Id: xordrawb_callee.asm $
;
SECTION code_graphics
PUBLIC xordrawb_callee
PUBLIC _xordrawb_callee
PUBLIC ASMDISP_XORDRAWB_CALLEE
EXTERN drawbox
EXTERN xorpixel
EXTERN swapgfxbk
EXTERN __graphics_end
.xordrawb_callee
._xordrawb_callee
pop af
pop bc ; height
pop de
ld b,e ; width
pop hl ; x
pop de
ld h,e ; y
push af
.asmentry
push ix
ld ix,xorpixel
call swapgfxbk
call drawbox
jp __graphics_end
DEFC ASMDISP_XORDRAWB_CALLEE = # asmentry - xordrawb_callee
| 17.733333 | 60 | 0.605263 |
d757a213d77c216ae31a4996f59ce0be2d5fd5d6 | 4,051 | asm | Assembly | bahamut/source/macros.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 2 | 2021-08-15T04:10:10.000Z | 2021-08-15T20:14:13.000Z | bahamut/source/macros.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 1 | 2022-02-16T02:46:39.000Z | 2022-02-16T04:30:29.000Z | bahamut/source/macros.asm | higan-emu/bahamut-lagoon-translation-kit | 6f08de5b92b597c0b9ecebd485cc975b99acfc13 | [
"0BSD"
] | 1 | 2021-12-25T11:34:57.000Z | 2021-12-25T11:34:57.000Z | //used to allocate unique memory addresses for all variables
inline variable(variable size, define name) {
//the address is constant, but the data at the address in variable (mutable)
constant {name} = sramCursor
sramCursor = sramCursor + size
}
//implements modulo counters that do not need to be initialized before use
//these counters are used to implement tiledata double-buffering when rendering
macro getTileIndex(define counter, variable limit) {
php; rep #$20
lda {counter}
cmp.w #limit; bcc {#}
lda.w #0; {#}:
inc; sta {counter}
dec; plp
}
//A <= min(A, value)
namespace min {
macro b(variable value) {
cmp.b #value; bcc {#}; lda.b #value; {#}:
}
macro w(variable value) {
cmp.w #value; bcc {#}; lda.w #value; {#}:
}
}
//A <= max(A, value)
namespace max {
macro b(variable value) {
cmp.b #value; bcs {#}; lda.b #value; {#}:
}
macro w(variable value) {
cmp.w #value; bcs {#}; lda.w #value; {#}:
}
}
//A <= clamp(A, min, max)
namespace clamp {
macro b(variable min, variable max) {
min.b(max)
max.b(min)
}
macro w(variable min, variable max) {
min.w(max)
max.w(min)
}
}
expression color(r, g, b) = (r & $1f) << 0 | (g & $1f) << 5 | (b & $1f) << 10
//multiplies the accumulator by various constant values
//<= 255 works with both 8-bit and 16-bit accumulator
//>= 256 requires 16-bit accumulator
macro mul(variable by) {
if by == 1 {
//do nothing
} else if by == 2 {
asl
} else if by == 3 {
pha; asl; add $01,s; sta $01,s; pla
} else if by == 4 {
asl #2
} else if by == 5 {
pha; asl #2; add $01,s; sta $01,s; pla
} else if by == 6 {
asl; pha; asl; add $01,s; sta $01,s; pla
} else if by == 7 {
pha; asl #3; sub $01,s; sta $01,s; pla
} else if by == 8 {
asl #3
} else if by == 9 {
pha; asl #3; add $01,s; sta $01,s; pla
} else if by == 10 {
asl; pha; asl #3; add $01,s; sta $01,s; pla
} else if by == 11 {
pha; asl #3; add $01,s; add $01,s; add $01,s; sta $01,s; pla
} else if by == 12 {
asl #2; pha; asl; add $01,s; sta $01,s; pla
} else if by == 16 {
asl #4
} else if by == 24 {
asl #3; pha; asl; add $01,s; sta $01,s; pla
} else if by == 30 {
pha; asl #5; sub $01,s; sub $01,s; sta $01,s; pla
} else if by == 32 {
asl #5
} else if by == 44 {
pha; asl; add $01,s; asl #2; sub $01,s; sta $01,s; pla; asl #2
} else if by == 48 {
asl #4; pha; asl; add $01,s; sta $01,s; pla
} else if by == 64 {
asl #6
} else if by == 128 {
asl #7
} else if by == 176 {
pha; asl; add $01,s; asl #2; sub $01,s; sta $01,s; pla; asl #4
} else if by == 180 {
pha; asl #3; add $01,s; sta $01,s; asl #2; add $01,s; sta $01,s; pla; asl #2
} else if by == 256 {
and #$00ff; xba
} else if by == 512 {
and #$00ff; xba; asl
} else if by == 896 {
and #$00ff; xba; lsr; pha; asl; pha; asl; add $01,s; add $03,s; sta $03,s; pla; pla
} else if by == 960 {
and #$00ff; xba; lsr #2; pha; asl #4; sub $01,s; sta $01,s; pla
} else if by == 1024 {
and #$00ff; xba; asl #2
} else if by == 2048 {
and #$00ff; xba; asl #3
} else if by == 4096 {
and #$00ff; xba; asl #4
} else if by == 5632 {
and #$00ff; xba; asl; pha; asl; pha; asl #2; add $01,s; add $03,s; sta $03,s; pla; pla
} else if by == 8192 {
clc; ror #4; and #$e000
} else {
error "unsupported multiplier: ", by
}
}
//divides the accumulator by various constant values
//<= 255 works with both 8-bit and 16-bit accumulator
//>= 256 requires 16-bit accumulator
macro div(variable by) {
if by == 1 {
//do nothing
} else if by == 2 {
lsr
} else if by == 4 {
lsr #2
} else if by == 8 {
lsr #3
} else if by == 16 {
lsr #4
} else if by == 32 {
lsr #5
} else if by == 64 {
lsr #6
} else if by == 128 {
lsr #7
} else if by == 256 {
and #$ff00; xba
} else if by == 512 {
and #$ff00; xba; lsr
} else if by == 1024 {
and #$ff00; xba; lsr #2
} else {
error "unsupported divisor: ", by
}
}
| 26.305195 | 90 | 0.545791 |
d55f3c54e9792058c9a6625f897979d0fd9327dc | 1,243 | asm | Assembly | uti/erwin.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | uti/erwin.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | uti/erwin.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ; write out error, wait for a keystroke and die
section utility
include dev8_keys_qdos_io
include dev8_keys_qlv
xdef ut_erwin
xref gu_iow
xref gu_die
xref met_erms
;+++
; Write an error to a given channel (which is redefined by this routine)
; wait for a confirmation keystroke and die.
;
; Entry Exit
; d0.l error code ???
; a0 channel ID ???
;---
ut_erwin
move.l d0,a4 ; keep error code
lea err_wdef,a1
moveq #7,d1
moveq #1,d2
moveq #iow.defw,d0
bsr gu_iow ; define small window
moveq #iow.clra,d0
bsr gu_iow ; clear it
lea met_erms,a1
move.w ut.wtext,a2
jsr (a2)
move.l a4,d0
move.w ut.werms,a2
jsr (a2) ; write out error message
moveq #iow.ecur,d0 ; enable cursor
bsr gu_iow
moveq #iob.fbyt,d0 ; and fetch a keystroke
bsr gu_iow
jmp gu_die ; then die
err_wdef
dc.w 380,32,66,100
end
| 26.446809 | 72 | 0.47144 |
91b5f175cb2b2d934d3fff95e8fe95e894d5108b | 269 | asm | Assembly | boot/print.asm | 404Dev-404/lychee | fe2081e996ac3bcfe6ad6ab10263869d6c138a18 | [
"BSD-3-Clause"
] | null | null | null | boot/print.asm | 404Dev-404/lychee | fe2081e996ac3bcfe6ad6ab10263869d6c138a18 | [
"BSD-3-Clause"
] | null | null | null | boot/print.asm | 404Dev-404/lychee | fe2081e996ac3bcfe6ad6ab10263869d6c138a18 | [
"BSD-3-Clause"
] | null | null | null | print:
pusha
start:
mov al, [bx]
cmp al, 0
je done
mov ah, 0x0e
int 0x10
add bx, 1
jmp start
done:
popa
ret
print_nl:
pusha
mov ah, 0x0e
mov al, 0x0a
int 0x10
mov al, 0x0d
int 0x10
popa
ret
| 8.966667 | 16 | 0.505576 |
572912e17e341e5b4eda043afde701e76c3215e3 | 453 | asm | Assembly | programs/oeis/235/A235088.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/235/A235088.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/235/A235088.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A235088: a(n)*Pi is the total length of irregular spiral (center points: 1, 2, 3, 4) after n rotations.
; 3,6,17,28,47,66,93,120,155,190,233,276,327,378,437,496,563,630,705,780,863,946,1037,1128,1227,1326,1433,1540,1655,1770,1893,2016,2147,2278,2417,2556,2703,2850,3005,3160,3323,3486,3657,3828,4007,4186,4373,4560,4755,4950,5153,5356,5567,5778,5997,6216,6443,6670,6905,7140
mov $1,$0
pow $1,2
div $1,4
mul $1,8
add $1,3
mov $2,$0
mul $2,3
add $1,$2
| 37.75 | 270 | 0.715232 |
6ad7df956f63245cefca6329d9622c13af4b2f81 | 56,941 | asm | Assembly | cumote-dev/packet-sniffer/PacketSniffer.asm | vine77/cumotive | 7577cc70377ba789223661a3e5cbda9baf46f862 | [
"MIT"
] | null | null | null | cumote-dev/packet-sniffer/PacketSniffer.asm | vine77/cumotive | 7577cc70377ba789223661a3e5cbda9baf46f862 | [
"MIT"
] | null | null | null | cumote-dev/packet-sniffer/PacketSniffer.asm | vine77/cumotive | 7577cc70377ba789223661a3e5cbda9baf46f862 | [
"MIT"
] | null | null | null |
;CodeVisionAVR C Compiler V1.25.9 Standard
;(C) Copyright 1998-2008 Pavel Haiduc, HP InfoTech s.r.l.
;http://www.hpinfotech.com
;Chip type : ATmega644
;Program type : Application
;Clock frequency : 4.000000 MHz
;Memory model : Small
;Optimize for : Size
;(s)printf features : int, width
;(s)scanf features : int, width
;External SRAM size : 0
;Data Stack size : 1024 byte(s)
;Heap size : 256 byte(s)
;Promote char to int : No
;char is unsigned : Yes
;8 bit enums : No
;Word align FLASH struct: No
;Enhanced core instructions : On
;Smart register allocation : On
;Automatic register allocation : Off
#pragma AVRPART ADMIN PART_NAME ATmega644
#pragma AVRPART MEMORY PROG_FLASH 65536
#pragma AVRPART MEMORY EEPROM 2048
#pragma AVRPART MEMORY INT_SRAM SIZE 4096
#pragma AVRPART MEMORY INT_SRAM START_ADDR 0x100
.EQU EERE=0x0
.EQU EEWE=0x1
.EQU EEMWE=0x2
.EQU UDRE=0x5
.EQU RXC=0x7
.EQU EECR=0x1F
.EQU EEDR=0x20
.EQU EEARL=0x21
.EQU EEARH=0x22
.EQU SPSR0=0x2D
.EQU SPDR0=0x2E
.EQU SMCR=0x33
.EQU MCUSR=0x34
.EQU MCUCR=0x35
.EQU WDTCSR=0x60
.EQU UCSR0A=0xC0
.EQU UDR0=0xC6
.EQU SPL=0x3D
.EQU SPH=0x3E
.EQU SREG=0x3F
.EQU GPIOR0=0x1E
.DEF R0X0=R0
.DEF R0X1=R1
.DEF R0X2=R2
.DEF R0X3=R3
.DEF R0X4=R4
.DEF R0X5=R5
.DEF R0X6=R6
.DEF R0X7=R7
.DEF R0X8=R8
.DEF R0X9=R9
.DEF R0XA=R10
.DEF R0XB=R11
.DEF R0XC=R12
.DEF R0XD=R13
.DEF R0XE=R14
.DEF R0XF=R15
.DEF R0X10=R16
.DEF R0X11=R17
.DEF R0X12=R18
.DEF R0X13=R19
.DEF R0X14=R20
.DEF R0X15=R21
.DEF R0X16=R22
.DEF R0X17=R23
.DEF R0X18=R24
.DEF R0X19=R25
.DEF R0X1A=R26
.DEF R0X1B=R27
.DEF R0X1C=R28
.DEF R0X1D=R29
.DEF R0X1E=R30
.DEF R0X1F=R31
.MACRO __CPD1N
CPI R30,LOW(@0)
LDI R26,HIGH(@0)
CPC R31,R26
LDI R26,BYTE3(@0)
CPC R22,R26
LDI R26,BYTE4(@0)
CPC R23,R26
.ENDM
.MACRO __CPD2N
CPI R26,LOW(@0)
LDI R30,HIGH(@0)
CPC R27,R30
LDI R30,BYTE3(@0)
CPC R24,R30
LDI R30,BYTE4(@0)
CPC R25,R30
.ENDM
.MACRO __CPWRR
CP R@0,R@2
CPC R@1,R@3
.ENDM
.MACRO __CPWRN
CPI R@0,LOW(@2)
LDI R30,HIGH(@2)
CPC R@1,R30
.ENDM
.MACRO __ADDB1MN
SUBI R30,LOW(-@0-(@1))
.ENDM
.MACRO __ADDB2MN
SUBI R26,LOW(-@0-(@1))
.ENDM
.MACRO __ADDW1MN
SUBI R30,LOW(-@0-(@1))
SBCI R31,HIGH(-@0-(@1))
.ENDM
.MACRO __ADDW2MN
SUBI R26,LOW(-@0-(@1))
SBCI R27,HIGH(-@0-(@1))
.ENDM
.MACRO __ADDW1FN
SUBI R30,LOW(-2*@0-(@1))
SBCI R31,HIGH(-2*@0-(@1))
.ENDM
.MACRO __ADDD1FN
SUBI R30,LOW(-2*@0-(@1))
SBCI R31,HIGH(-2*@0-(@1))
SBCI R22,BYTE3(-2*@0-(@1))
.ENDM
.MACRO __ADDD1N
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
SBCI R22,BYTE3(-@0)
SBCI R23,BYTE4(-@0)
.ENDM
.MACRO __ADDD2N
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
SBCI R24,BYTE3(-@0)
SBCI R25,BYTE4(-@0)
.ENDM
.MACRO __SUBD1N
SUBI R30,LOW(@0)
SBCI R31,HIGH(@0)
SBCI R22,BYTE3(@0)
SBCI R23,BYTE4(@0)
.ENDM
.MACRO __SUBD2N
SUBI R26,LOW(@0)
SBCI R27,HIGH(@0)
SBCI R24,BYTE3(@0)
SBCI R25,BYTE4(@0)
.ENDM
.MACRO __ANDBMNN
LDS R30,@0+@1
ANDI R30,LOW(@2)
STS @0+@1,R30
.ENDM
.MACRO __ANDWMNN
LDS R30,@0+@1
ANDI R30,LOW(@2)
STS @0+@1,R30
LDS R30,@0+@1+1
ANDI R30,HIGH(@2)
STS @0+@1+1,R30
.ENDM
.MACRO __ANDD1N
ANDI R30,LOW(@0)
ANDI R31,HIGH(@0)
ANDI R22,BYTE3(@0)
ANDI R23,BYTE4(@0)
.ENDM
.MACRO __ORBMNN
LDS R30,@0+@1
ORI R30,LOW(@2)
STS @0+@1,R30
.ENDM
.MACRO __ORWMNN
LDS R30,@0+@1
ORI R30,LOW(@2)
STS @0+@1,R30
LDS R30,@0+@1+1
ORI R30,HIGH(@2)
STS @0+@1+1,R30
.ENDM
.MACRO __ORD1N
ORI R30,LOW(@0)
ORI R31,HIGH(@0)
ORI R22,BYTE3(@0)
ORI R23,BYTE4(@0)
.ENDM
.MACRO __DELAY_USB
LDI R24,LOW(@0)
__DELAY_USB_LOOP:
DEC R24
BRNE __DELAY_USB_LOOP
.ENDM
.MACRO __DELAY_USW
LDI R24,LOW(@0)
LDI R25,HIGH(@0)
__DELAY_USW_LOOP:
SBIW R24,1
BRNE __DELAY_USW_LOOP
.ENDM
.MACRO __CLRD1S
LDI R30,0
STD Y+@0,R30
STD Y+@0+1,R30
STD Y+@0+2,R30
STD Y+@0+3,R30
.ENDM
.MACRO __GETD1S
LDD R30,Y+@0
LDD R31,Y+@0+1
LDD R22,Y+@0+2
LDD R23,Y+@0+3
.ENDM
.MACRO __PUTD1S
STD Y+@0,R30
STD Y+@0+1,R31
STD Y+@0+2,R22
STD Y+@0+3,R23
.ENDM
.MACRO __PUTD2S
STD Y+@0,R26
STD Y+@0+1,R27
STD Y+@0+2,R24
STD Y+@0+3,R25
.ENDM
.MACRO __POINTB1MN
LDI R30,LOW(@0+@1)
.ENDM
.MACRO __POINTW1MN
LDI R30,LOW(@0+@1)
LDI R31,HIGH(@0+@1)
.ENDM
.MACRO __POINTD1M
LDI R30,LOW(@0)
LDI R31,HIGH(@0)
LDI R22,BYTE3(@0)
LDI R23,BYTE4(@0)
.ENDM
.MACRO __POINTW1FN
LDI R30,LOW(2*@0+@1)
LDI R31,HIGH(2*@0+@1)
.ENDM
.MACRO __POINTD1FN
LDI R30,LOW(2*@0+@1)
LDI R31,HIGH(2*@0+@1)
LDI R22,BYTE3(2*@0+@1)
LDI R23,BYTE4(2*@0+@1)
.ENDM
.MACRO __POINTB2MN
LDI R26,LOW(@0+@1)
.ENDM
.MACRO __POINTW2MN
LDI R26,LOW(@0+@1)
LDI R27,HIGH(@0+@1)
.ENDM
.MACRO __POINTBRM
LDI R@0,LOW(@1)
.ENDM
.MACRO __POINTWRM
LDI R@0,LOW(@2)
LDI R@1,HIGH(@2)
.ENDM
.MACRO __POINTBRMN
LDI R@0,LOW(@1+@2)
.ENDM
.MACRO __POINTWRMN
LDI R@0,LOW(@2+@3)
LDI R@1,HIGH(@2+@3)
.ENDM
.MACRO __POINTWRFN
LDI R@0,LOW(@2*2+@3)
LDI R@1,HIGH(@2*2+@3)
.ENDM
.MACRO __GETD1N
LDI R30,LOW(@0)
LDI R31,HIGH(@0)
LDI R22,BYTE3(@0)
LDI R23,BYTE4(@0)
.ENDM
.MACRO __GETD2N
LDI R26,LOW(@0)
LDI R27,HIGH(@0)
LDI R24,BYTE3(@0)
LDI R25,BYTE4(@0)
.ENDM
.MACRO __GETD2S
LDD R26,Y+@0
LDD R27,Y+@0+1
LDD R24,Y+@0+2
LDD R25,Y+@0+3
.ENDM
.MACRO __GETB1MN
LDS R30,@0+@1
.ENDM
.MACRO __GETB1HMN
LDS R31,@0+@1
.ENDM
.MACRO __GETW1MN
LDS R30,@0+@1
LDS R31,@0+@1+1
.ENDM
.MACRO __GETD1MN
LDS R30,@0+@1
LDS R31,@0+@1+1
LDS R22,@0+@1+2
LDS R23,@0+@1+3
.ENDM
.MACRO __GETBRMN
LDS R@0,@1+@2
.ENDM
.MACRO __GETWRMN
LDS R@0,@2+@3
LDS R@1,@2+@3+1
.ENDM
.MACRO __GETWRZ
LDD R@0,Z+@2
LDD R@1,Z+@2+1
.ENDM
.MACRO __GETD2Z
LDD R26,Z+@0
LDD R27,Z+@0+1
LDD R24,Z+@0+2
LDD R25,Z+@0+3
.ENDM
.MACRO __GETB2MN
LDS R26,@0+@1
.ENDM
.MACRO __GETW2MN
LDS R26,@0+@1
LDS R27,@0+@1+1
.ENDM
.MACRO __GETD2MN
LDS R26,@0+@1
LDS R27,@0+@1+1
LDS R24,@0+@1+2
LDS R25,@0+@1+3
.ENDM
.MACRO __PUTB1MN
STS @0+@1,R30
.ENDM
.MACRO __PUTW1MN
STS @0+@1,R30
STS @0+@1+1,R31
.ENDM
.MACRO __PUTD1MN
STS @0+@1,R30
STS @0+@1+1,R31
STS @0+@1+2,R22
STS @0+@1+3,R23
.ENDM
.MACRO __PUTBR0MN
STS @0+@1,R0
.ENDM
.MACRO __PUTDZ2
STD Z+@0,R26
STD Z+@0+1,R27
STD Z+@0+2,R24
STD Z+@0+3,R25
.ENDM
.MACRO __PUTBMRN
STS @0+@1,R@2
.ENDM
.MACRO __PUTWMRN
STS @0+@1,R@2
STS @0+@1+1,R@3
.ENDM
.MACRO __PUTBZR
STD Z+@1,R@0
.ENDM
.MACRO __PUTWZR
STD Z+@2,R@0
STD Z+@2+1,R@1
.ENDM
.MACRO __GETW1R
MOV R30,R@0
MOV R31,R@1
.ENDM
.MACRO __GETW2R
MOV R26,R@0
MOV R27,R@1
.ENDM
.MACRO __GETWRN
LDI R@0,LOW(@2)
LDI R@1,HIGH(@2)
.ENDM
.MACRO __PUTW1R
MOV R@0,R30
MOV R@1,R31
.ENDM
.MACRO __PUTW2R
MOV R@0,R26
MOV R@1,R27
.ENDM
.MACRO __ADDWRN
SUBI R@0,LOW(-@2)
SBCI R@1,HIGH(-@2)
.ENDM
.MACRO __ADDWRR
ADD R@0,R@2
ADC R@1,R@3
.ENDM
.MACRO __SUBWRN
SUBI R@0,LOW(@2)
SBCI R@1,HIGH(@2)
.ENDM
.MACRO __SUBWRR
SUB R@0,R@2
SBC R@1,R@3
.ENDM
.MACRO __ANDWRN
ANDI R@0,LOW(@2)
ANDI R@1,HIGH(@2)
.ENDM
.MACRO __ANDWRR
AND R@0,R@2
AND R@1,R@3
.ENDM
.MACRO __ORWRN
ORI R@0,LOW(@2)
ORI R@1,HIGH(@2)
.ENDM
.MACRO __ORWRR
OR R@0,R@2
OR R@1,R@3
.ENDM
.MACRO __EORWRR
EOR R@0,R@2
EOR R@1,R@3
.ENDM
.MACRO __GETWRS
LDD R@0,Y+@2
LDD R@1,Y+@2+1
.ENDM
.MACRO __PUTWSR
STD Y+@2,R@0
STD Y+@2+1,R@1
.ENDM
.MACRO __MOVEWRR
MOV R@0,R@2
MOV R@1,R@3
.ENDM
.MACRO __INWR
IN R@0,@2
IN R@1,@2+1
.ENDM
.MACRO __OUTWR
OUT @2+1,R@1
OUT @2,R@0
.ENDM
.MACRO __CALL1MN
LDS R30,@0+@1
LDS R31,@0+@1+1
ICALL
.ENDM
.MACRO __CALL1FN
LDI R30,LOW(2*@0+@1)
LDI R31,HIGH(2*@0+@1)
CALL __GETW1PF
ICALL
.ENDM
.MACRO __CALL2EN
LDI R26,LOW(@0+@1)
LDI R27,HIGH(@0+@1)
CALL __EEPROMRDW
ICALL
.ENDM
.MACRO __GETW1STACK
IN R26,SPL
IN R27,SPH
ADIW R26,@0+1
LD R30,X+
LD R31,X
.ENDM
.MACRO __NBST
BST R@0,@1
IN R30,SREG
LDI R31,0x40
EOR R30,R31
OUT SREG,R30
.ENDM
.MACRO __PUTB1SN
LDD R26,Y+@0
LDD R27,Y+@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1SN
LDD R26,Y+@0
LDD R27,Y+@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SN
LDD R26,Y+@0
LDD R27,Y+@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1SNS
LDD R26,Y+@0
LDD R27,Y+@0+1
ADIW R26,@1
ST X,R30
.ENDM
.MACRO __PUTW1SNS
LDD R26,Y+@0
LDD R27,Y+@0+1
ADIW R26,@1
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SNS
LDD R26,Y+@0
LDD R27,Y+@0+1
ADIW R26,@1
CALL __PUTDP1
.ENDM
.MACRO __PUTB1PMN
LDS R26,@0
LDS R27,@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1PMN
LDS R26,@0
LDS R27,@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1PMN
LDS R26,@0
LDS R27,@0+1
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1PMNS
LDS R26,@0
LDS R27,@0+1
ADIW R26,@1
ST X,R30
.ENDM
.MACRO __PUTW1PMNS
LDS R26,@0
LDS R27,@0+1
ADIW R26,@1
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1PMNS
LDS R26,@0
LDS R27,@0+1
ADIW R26,@1
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RN
MOVW R26,R@0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1RN
MOVW R26,R@0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RN
MOVW R26,R@0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RNS
MOVW R26,R@0
ADIW R26,@1
ST X,R30
.ENDM
.MACRO __PUTW1RNS
MOVW R26,R@0
ADIW R26,@1
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RNS
MOVW R26,R@0
ADIW R26,@1
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RON
MOV R26,R@0
MOV R27,R@1
SUBI R26,LOW(-@2)
SBCI R27,HIGH(-@2)
ST X,R30
.ENDM
.MACRO __PUTW1RON
MOV R26,R@0
MOV R27,R@1
SUBI R26,LOW(-@2)
SBCI R27,HIGH(-@2)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RON
MOV R26,R@0
MOV R27,R@1
SUBI R26,LOW(-@2)
SBCI R27,HIGH(-@2)
CALL __PUTDP1
.ENDM
.MACRO __PUTB1RONS
MOV R26,R@0
MOV R27,R@1
ADIW R26,@2
ST X,R30
.ENDM
.MACRO __PUTW1RONS
MOV R26,R@0
MOV R27,R@1
ADIW R26,@2
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1RONS
MOV R26,R@0
MOV R27,R@1
ADIW R26,@2
CALL __PUTDP1
.ENDM
.MACRO __GETB1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R30,Z
.ENDM
.MACRO __GETB1HSX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R31,Z
.ENDM
.MACRO __GETW1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R0,Z+
LD R31,Z
MOV R30,R0
.ENDM
.MACRO __GETD1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R0,Z+
LD R1,Z+
LD R22,Z+
LD R23,Z
MOVW R30,R0
.ENDM
.MACRO __GETB2SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R26,X
.ENDM
.MACRO __GETW2SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
.ENDM
.MACRO __GETD2SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R1,X+
LD R24,X+
LD R25,X
MOVW R26,R0
.ENDM
.MACRO __GETBRSX
MOVW R30,R28
SUBI R30,LOW(-@1)
SBCI R31,HIGH(-@1)
LD R@0,Z
.ENDM
.MACRO __GETWRSX
MOVW R30,R28
SUBI R30,LOW(-@2)
SBCI R31,HIGH(-@2)
LD R@0,Z+
LD R@1,Z
.ENDM
.MACRO __LSLW8SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
LD R31,Z
CLR R30
.ENDM
.MACRO __PUTB1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X,R30
.ENDM
.MACRO __PUTW1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
ST X+,R30
ST X+,R31
ST X+,R22
ST X,R23
.ENDM
.MACRO __CLRW1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
CLR R0
ST Z+,R0
ST Z,R0
.ENDM
.MACRO __CLRD1SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
CLR R0
ST Z+,R0
ST Z+,R0
ST Z+,R0
ST Z,R0
.ENDM
.MACRO __PUTB2SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
ST Z,R26
.ENDM
.MACRO __PUTW2SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
ST Z+,R26
ST Z,R27
.ENDM
.MACRO __PUTD2SX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
ST Z+,R26
ST Z+,R27
ST Z+,R24
ST Z,R25
.ENDM
.MACRO __PUTBSRX
MOVW R30,R28
SUBI R30,LOW(-@0)
SBCI R31,HIGH(-@0)
ST Z,R@1
.ENDM
.MACRO __PUTWSRX
MOVW R30,R28
SUBI R30,LOW(-@2)
SBCI R31,HIGH(-@2)
ST Z+,R@0
ST Z,R@1
.ENDM
.MACRO __PUTB1SNX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X,R30
.ENDM
.MACRO __PUTW1SNX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X,R31
.ENDM
.MACRO __PUTD1SNX
MOVW R26,R28
SUBI R26,LOW(-@0)
SBCI R27,HIGH(-@0)
LD R0,X+
LD R27,X
MOV R26,R0
SUBI R26,LOW(-@1)
SBCI R27,HIGH(-@1)
ST X+,R30
ST X+,R31
ST X+,R22
ST X,R23
.ENDM
.MACRO __MULBRR
MULS R@0,R@1
MOVW R30,R0
.ENDM
.MACRO __MULBRRU
MUL R@0,R@1
MOVW R30,R0
.ENDM
.MACRO __MULBRR0
MULS R@0,R@1
.ENDM
.MACRO __MULBRRU0
MUL R@0,R@1
.ENDM
.MACRO __MULBNWRU
LDI R26,@2
MUL R26,R@0
MOVW R30,R0
MUL R26,R@1
ADD R31,R0
.ENDM
.CSEG
.ORG 0
.INCLUDE "PacketSniffer.vec"
.INCLUDE "PacketSniffer.inc"
__RESET:
CLI
CLR R30
OUT EECR,R30
;INTERRUPT VECTORS ARE PLACED
;AT THE START OF FLASH
LDI R31,1
OUT MCUCR,R31
OUT MCUCR,R30
;DISABLE WATCHDOG
LDI R31,0x18
WDR
IN R26,MCUSR
CBR R26,8
OUT MCUSR,R26
STS WDTCSR,R31
STS WDTCSR,R30
;CLEAR R2-R14
LDI R24,13
LDI R26,2
CLR R27
__CLEAR_REG:
ST X+,R30
DEC R24
BRNE __CLEAR_REG
;CLEAR SRAM
LDI R24,LOW(0xF00)
LDI R25,HIGH(0xF00)
LDI R26,LOW(0x100)
LDI R27,HIGH(0x100)
__CLEAR_SRAM:
ST X+,R30
SBIW R24,1
BRNE __CLEAR_SRAM
;GLOBAL VARIABLES INITIALIZATION
LDI R30,LOW(__GLOBAL_INI_TBL*2)
LDI R31,HIGH(__GLOBAL_INI_TBL*2)
__GLOBAL_INI_NEXT:
LPM R24,Z+
LPM R25,Z+
SBIW R24,0
BREQ __GLOBAL_INI_END
LPM R26,Z+
LPM R27,Z+
LPM R0,Z+
LPM R1,Z+
MOVW R22,R30
MOVW R30,R0
__GLOBAL_INI_LOOP:
LPM R0,Z+
ST X+,R0
SBIW R24,1
BRNE __GLOBAL_INI_LOOP
MOVW R30,R22
RJMP __GLOBAL_INI_NEXT
__GLOBAL_INI_END:
;GPIOR0 INITIALIZATION
LDI R30,__GPIOR0_INIT
OUT GPIOR0,R30
;STACK POINTER INITIALIZATION
LDI R30,LOW(0xFFF)
OUT SPL,R30
LDI R30,HIGH(0xFFF)
OUT SPH,R30
;DATA STACK POINTER INITIALIZATION
LDI R28,LOW(0x500)
LDI R29,HIGH(0x500)
JMP _main
.ESEG
.ORG 0
.DSEG
.ORG 0x500
; 1 #include <mega644.h>
; 2 #ifndef __SLEEP_DEFINED__
#ifndef __SLEEP_DEFINED__
; 3 #define __SLEEP_DEFINED__
#define __SLEEP_DEFINED__
; 4 .EQU __se_bit=0x01
.EQU __se_bit=0x01
; 5 .EQU __sm_mask=0x0E
.EQU __sm_mask=0x0E
; 6 .EQU __sm_powerdown=0x04
.EQU __sm_powerdown=0x04
; 7 .EQU __sm_powersave=0x06
.EQU __sm_powersave=0x06
; 8 .EQU __sm_standby=0x0C
.EQU __sm_standby=0x0C
; 9 .EQU __sm_ext_standby=0x0E
.EQU __sm_ext_standby=0x0E
; 10 .EQU __sm_adc_noise_red=0x02
.EQU __sm_adc_noise_red=0x02
; 11 .SET power_ctrl_reg=smcr
.SET power_ctrl_reg=smcr
; 12 #endif
#endif
; 13 #include "cumote_hal.h"
_HAL_LQI:
.BYTE 0x1
_HAL_radio_channel:
.BYTE 0x1
_HAL_transmit_power:
.BYTE 0x1
_HAL_CRC_enabled:
.BYTE 0x1
.CSEG
_var_delay:
; t -> Y+0
; 14 MOV R16,R12
MOV R16,R12
; 15 ld R26,y ; load t into r26. y register is stack pointer. t is lowest on stack.
ld R26,y ; load t into r26. y register is stack pointer. t is lowest on stack.
; 16 clr R27 ; promote t to unsigned int
clr R27 ; promote t to unsigned int
; 17
; 18 cpi R16,0 ; see if r12 is 0
cpi R16,0 ; see if r12 is 0
; 19 breq startdelay ; branch to starting delay... overhead is now a bit more than 5 cycles.
breq startdelay ; branch to starting delay... overhead is now a bit more than 5 cycles.
; 20 preploop: ;~5 more cycles
preploop: ;~5 more cycles
; 21 lsl R26 ; multiply t by 2
lsl R26 ; multiply t by 2
; 22 rol R27
rol R27
; 23 dec R16
dec R16
; 24 cpi R16,0
cpi R16,0
; 25 brne preploop
brne preploop
; 26 startdelay: ;overhead: t=0...5. t=1...10. t=2...15. t=3...20. t=4...25.
startdelay: ;overhead: t=0...5. t=1...10. t=2...15. t=3...20. t=4...25.
; 27 subi R26,3 ; lo byte
subi R26,3 ; lo byte
; 28 sbci R27,0 ; hi byte, with carry
sbci R27,0 ; hi byte, with carry
; 29 brmi enddelay ; if result is negative, end loop, done with delay.
brmi enddelay ; if result is negative, end loop, done with delay.
; 30 enddelay:
enddelay:
ADIW R28,1
RET
.DSEG
_COM_spi_freq:
.BYTE 0x1
_COM_IRQ_pending:
.BYTE 0x1
_COM_IRQ_status:
.BYTE 0x1
.CSEG
_COM_init:
SBI 0x4,5
CBI 0x4,6
SBI 0x4,7
CBI 0x4,2
SBI 0x4,3
SBI 0x4,4
CBI 0x5,3
SBI 0x5,4
CLR R12
LDI R30,LOW(0)
STS _COM_IRQ_status,R30
RCALL _COM_reset_SPI_clock
RET
_COM_reset_SPI_clock:
LDI R30,LOW(80)
OUT 0x2C,R30
LDI R30,LOW(1)
OUT 0x2D,R30
STS _COM_spi_freq,R30
RET
_COM_set_MCU_clock:
ST -Y,R17
; clk -> Y+1
; junk -> R17
LDD R26,Y+1
CPI R26,LOW(0x5)
BRLO _0x13
LDI R30,LOW(4)
STD Y+1,R30
_0x13:
LDI R30,LOW(3)
CALL SUBOPT_0x0
ANDI R17,LOW(240)
LDD R30,Y+1
ANDI R30,LOW(0x7)
OR R17,R30
LDI R30,LOW(3)
ST -Y,R30
ST -Y,R17
RCALL _COM_write_register
LDD R17,Y+0
RJMP _0x11F
; speed -> Y+0
_COM_write_register:
ST -Y,R17
; address -> Y+2
; data -> Y+1
; junk -> R17
CBI 0x5,4
LDD R30,Y+2
ANDI R30,LOW(0x3F)
SUBI R30,-LOW(192)
OUT 0x2E,R30
_0x22:
IN R30,0x2D
SBRS R30,7
RJMP _0x22
IN R17,46
LDD R30,Y+1
OUT 0x2E,R30
_0x25:
IN R30,0x2D
SBRS R30,7
RJMP _0x25
SBI 0x5,4
LDD R17,Y+0
RJMP _0x11E
_COM_read_register:
ST -Y,R17
; address -> Y+1
; junk -> R17
CBI 0x5,4
LDD R30,Y+1
ANDI R30,LOW(0x3F)
SUBI R30,-LOW(128)
OUT 0x2E,R30
_0x2C:
IN R30,0x2D
SBRS R30,7
RJMP _0x2C
IN R17,46
LDI R30,LOW(0)
OUT 0x2E,R30
_0x2F:
IN R30,0x2D
SBRS R30,7
RJMP _0x2F
SBI 0x5,4
IN R30,0x2E
LDD R17,Y+0
RJMP _0x11F
; i -> R17
_COM_upload_frame:
SBIW R28,4
CALL __SAVELOCR6
; Twait -> R16,R17
; Tradio -> R18,R19
; Tmcu -> R20,R21
; Tspi -> Y+8
; L -> Y+7
; i -> Y+6
LDI R30,LOW(32)
ST -Y,R30
CALL _var_delay
CBI 0x5,4
LDI R30,LOW(32)
OUT 0x2E,R30
_0x48:
IN R30,0x2D
SBRS R30,7
RJMP _0x48
LDI R30,LOW(0)
OUT 0x2E,R30
_0x4B:
IN R30,0x2D
SBRS R30,7
RJMP _0x4B
IN R30,0x2E
STD Y+7,R30
LDI R31,0
ST -Y,R31
ST -Y,R30
RCALL _HAL_set_RX_buff_len
LDD R30,Y+7
SWAP R30
ANDI R30,0xF0
LSL R30
MOV R18,R30
CLR R19
LDD R30,Y+7
LSL R30
LSL R30
LSL R30
MOV R26,R30
LDS R30,_COM_spi_freq
CALL __LSLB12
MOV R26,R30
MOV R30,R12
CALL __LSRB12
MOV R20,R30
CLR R21
LDS R30,_COM_spi_freq
LDI R26,LOW(16)
CALL __LSLB12
MOV R26,R30
MOV R30,R12
CALL __ASRB12
LDI R31,0
SBRC R30,7
SER R31
STD Y+8,R30
STD Y+8+1,R31
MOVW R26,R18
SUB R26,R20
SBC R27,R21
SUB R26,R30
SBC R27,R31
MOVW R16,R26
ST -Y,R16
CALL _var_delay
LDI R30,LOW(0)
STD Y+6,R30
_0x4F:
LDD R26,Y+6
CP R26,R8
BRSH _0x50
LDI R30,LOW(0)
OUT 0x2E,R30
_0x51:
IN R30,0x2D
SBRS R30,7
RJMP _0x51
LDD R30,Y+6
LDI R31,0
ADD R30,R6
ADC R31,R7
MOVW R26,R30
IN R30,0x2E
ST X,R30
LDD R30,Y+6
SUBI R30,-LOW(1)
STD Y+6,R30
RJMP _0x4F
_0x50:
LDI R30,LOW(0)
OUT 0x2E,R30
_0x54:
IN R30,0x2D
SBRS R30,7
RJMP _0x54
IN R30,0x2E
STS _HAL_LQI,R30
SBI 0x5,4
CALL __LOADLOCR6
ADIW R28,10
RET
_COM_enable_interrupt_IRQ:
LDS R30,105
ORI R30,LOW(0x30)
STS 105,R30
SBI 0x1D,2
RET
_handle_IRQ:
ST -Y,R30
LDI R30,LOW(1)
STS _COM_IRQ_pending,R30
LD R30,Y+
RETI
_COM_IRQ_handler:
LDS R26,_COM_IRQ_pending
CPI R26,LOW(0x1)
BRNE _0x59
LDI R30,LOW(0)
STS _COM_IRQ_pending,R30
LDI R30,LOW(15)
ST -Y,R30
CALL _COM_read_register
STS _COM_IRQ_status,R30
_0x59:
RET
_HAL_initialization:
CLR R4
CLR R5
CLR R6
CLR R7
LDI R30,LOW(0)
STS _HAL_CRC_enabled,R30
__DELAY_USW 510
RCALL _HAL_statemachine_reset
RCALL _HAL_get_radio_channel
STS _HAL_radio_channel,R30
RCALL _HAL_get_transmit_power
STS _HAL_transmit_power,R30
RET
_HAL_statemachine_reset:
RCALL _HAL_get_state
__DELAY_USB 8
TST R11
BRNE _0x61
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(8)
ST -Y,R30
CALL _COM_write_register
__DELAY_USW 510
RJMP _0x62
_0x61:
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(3)
ST -Y,R30
CALL _COM_write_register
__DELAY_USB 8
_0x62:
RCALL _HAL_get_state
RET
; length -> Y+0
_HAL_set_RX_buff_len:
; length -> Y+0
MOV R0,R6
OR R0,R7
BREQ _0x67
ST -Y,R7
ST -Y,R6
CALL _free
CLR R8
_0x67:
LD R26,Y
LDD R27,Y+1
CPI R26,LOW(0x81)
LDI R30,HIGH(0x81)
CPC R27,R30
BRLO _0x68
LDI R30,LOW(128)
MOV R8,R30
_0x68:
LD R30,Y
LDD R31,Y+1
ST -Y,R31
ST -Y,R30
CALL _malloc
MOVW R6,R30
MOV R0,R6
OR R0,R7
BRNE _0x69
CLR R8
RJMP _0x6A
_0x69:
LDD R8,Y+0
_0x6A:
RJMP _0x11F
_HAL_get_radio_channel:
ST -Y,R17
; tmp -> R17
LDI R30,LOW(8)
CALL SUBOPT_0x0
MOV R30,R17
ANDI R30,LOW(0x1F)
STS _HAL_radio_channel,R30
RJMP _0x11D
_HAL_set_radio_channel:
ST -Y,R17
; channel -> Y+1
; tmp -> R17
LDI R30,LOW(8)
CALL SUBOPT_0x0
LDD R26,Y+1
CPI R26,LOW(0xB)
BRLO _0x6C
CPI R26,LOW(0x1B)
BRLO _0x6B
_0x6C:
LDI R30,LOW(11)
STD Y+1,R30
_0x6B:
MOV R30,R17
ANDI R30,LOW(0xE0)
LDD R26,Y+1
OR R30,R26
MOV R17,R30
LDI R30,LOW(8)
ST -Y,R30
ST -Y,R17
CALL _COM_write_register
LDD R30,Y+1
STS _HAL_radio_channel,R30
LDD R17,Y+0
RJMP _0x11F
_HAL_get_transmit_power:
ST -Y,R17
; tmp -> R17
LDI R30,LOW(5)
CALL SUBOPT_0x0
MOV R30,R17
ANDI R30,LOW(0xF)
STS _HAL_transmit_power,R30
RJMP _0x11D
; tx_pwr -> Y+1
; tmp -> R17
_HAL_get_state:
LDI R30,LOW(1)
ST -Y,R30
CALL _COM_read_register
ANDI R30,LOW(0x1F)
MOV R11,R30
RET
_HAL_set_state:
ST -Y,R17
; state -> Y+1
; i -> R17
LDI R17,35
CALL _HAL_get_state
LDD R30,Y+1
CPI R30,LOW(0x8)
BRNE _0x72
LDI R30,LOW(6)
CP R30,R11
BREQ _0x74
LDI R30,LOW(9)
CP R30,R11
BREQ _0x74
LDI R30,LOW(25)
CP R30,R11
BRNE _0x73
_0x74:
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(8)
RJMP _0x120
_0x73:
LDI R30,LOW(15)
CP R30,R11
BRNE _0x77
CBI 0x5,3
__DELAY_USW 880
RJMP _0x7A
_0x77:
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(3)
_0x120:
ST -Y,R30
CALL SUBOPT_0x1
_0x7A:
RJMP _0x71
_0x72:
CPI R30,LOW(0x6)
BRNE _0x7B
LDI R30,LOW(8)
CP R30,R11
BRNE _0x7C
CALL SUBOPT_0x2
CALL _COM_write_register
_0x7D:
SBIS 0x3,2
RJMP _0x7D
LDI R30,LOW(15)
ST -Y,R30
CALL _COM_read_register
RJMP _0x80
_0x7C:
LDI R30,LOW(22)
CP R30,R11
BREQ _0x82
LDI R30,LOW(9)
CP R30,R11
BREQ _0x82
LDI R30,LOW(25)
CP R30,R11
BRNE _0x81
_0x82:
CALL SUBOPT_0x2
CALL SUBOPT_0x1
_0x81:
_0x80:
RJMP _0x71
_0x7B:
CPI R30,LOW(0x9)
BRNE _0x84
LDI R30,LOW(8)
CP R30,R11
BRNE _0x85
CALL SUBOPT_0x3
CALL SUBOPT_0x4
RJMP _0x86
_0x85:
LDI R30,LOW(22)
CP R30,R11
BREQ _0x88
LDI R30,LOW(6)
CP R30,R11
BREQ _0x88
LDI R30,LOW(25)
CP R30,R11
BRNE _0x87
_0x88:
CALL SUBOPT_0x2
CALL SUBOPT_0x1
_0x87:
_0x86:
RJMP _0x71
_0x84:
CPI R30,LOW(0x16)
BRNE _0x8A
LDI R30,LOW(8)
CP R30,R11
BRNE _0x8B
CALL SUBOPT_0x2
CALL SUBOPT_0x4
RJMP _0x121
_0x8B:
LDI R30,LOW(6)
CP R30,R11
BREQ _0x8E
LDI R30,LOW(9)
CP R30,R11
BRNE _0x8D
_0x8E:
RJMP _0x121
_0x8D:
LDI R30,LOW(25)
CP R30,R11
BRNE _0x91
CALL SUBOPT_0x3
CALL SUBOPT_0x1
_0x121:
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(22)
ST -Y,R30
CALL SUBOPT_0x1
_0x91:
RJMP _0x71
_0x8A:
CPI R30,LOW(0x19)
BRNE _0x92
LDI R30,LOW(8)
CP R30,R11
BRNE _0x93
CALL SUBOPT_0x3
CALL SUBOPT_0x4
RJMP _0x122
_0x93:
LDI R30,LOW(6)
CP R30,R11
BREQ _0x96
LDI R30,LOW(9)
CP R30,R11
BRNE _0x95
_0x96:
RJMP _0x122
_0x95:
LDI R30,LOW(22)
CP R30,R11
BRNE _0x99
CALL SUBOPT_0x2
CALL SUBOPT_0x1
_0x122:
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(25)
ST -Y,R30
CALL SUBOPT_0x1
_0x99:
RJMP _0x71
_0x92:
CPI R30,LOW(0xF)
BRNE _0xA1
LDI R30,LOW(8)
CP R30,R11
BRNE _0x9B
SBI 0x5,3
LDI R17,LOW(12)
_0x9F:
CPI R17,1
BRLO _0xA0
SUBI R17,1
RJMP _0x9F
_0xA0:
_0x9B:
_0xA1:
_0x71:
CALL _HAL_get_state
LDD R17,Y+0
_0x11F:
ADIW R28,2
RET
; mode -> Y+1
; tmp -> R17
; tmp -> R17
_HAL_energy_detection:
CALL _HAL_get_state
LDI R30,LOW(6)
CP R30,R11
BREQ _0xA9
LDI R30,LOW(1)
CP R30,R11
BRNE _0xA8
_0xA9:
LDI R30,LOW(7)
ST -Y,R30
LDI R30,LOW(0)
ST -Y,R30
CALL _COM_write_register
__DELAY_USB 187
LDI R30,LOW(7)
ST -Y,R30
CALL _COM_read_register
RET
_0xA8:
LDI R30,LOW(0)
RET
; junk -> R17
; junk -> R17
; user_csma -> Y+1
; junk -> R17
; junk -> R17
; junk -> R17
; junk -> R17
; hi -> Y+1
; lo -> Y+0
; hi -> Y+1
; lo -> Y+0
; retries -> Y+0
; 31 #include "mega644_usart.h"
.DSEG
_usart_msg:
.BYTE 0x4
_usart_rx_buffer:
.BYTE 0xD
.CSEG
_m644_init_usart:
LDI R30,LOW(1)
MOV R10,R30
CLR R13
LDI R30,LOW(66)
STS 192,R30
LDI R30,LOW(192)
STS 193,R30
LDI R30,LOW(6)
STS 194,R30
LDI R30,LOW(0)
STS 197,R30
STS 196,R30
__PUTB1MN _usart_rx_buffer,10
__PUTB1MN _usart_rx_buffer,11
__PUTB1MN _usart_rx_buffer,12
RCALL _m644_enable_trx
RET
_m644_add_message:
; *new_msg -> Y+1
; len -> Y+0
LDI R30,LOW(1)
CP R30,R13
BRNE _0xB6
LDI R30,LOW(0)
RJMP _0x11E
_0xB6:
LD R30,Y
STS _usart_msg,R30
LDD R30,Y+1
LDD R31,Y+1+1
__PUTW1MN _usart_msg,1
LDI R30,LOW(0)
__PUTB1MN _usart_msg,3
LDI R30,LOW(1)
_0x11E:
ADIW R28,3
RET
_m644_start_tx:
__GETB2MN _usart_msg,3
LDS R30,_usart_msg
CP R26,R30
BRSH _0xB7
LDI R30,LOW(1)
MOV R13,R30
CALL SUBOPT_0x5
_0xB7:
RET
_m644_enable_trx:
LDS R30,193
ORI R30,LOW(0x18)
STS 193,R30
RET
_handle_rxc:
CALL SUBOPT_0x6
ST -Y,R17
; junk -> R17
__GETB2MN _usart_rx_buffer,12
CPI R26,LOW(0xA)
BRSH _0xB8
__GETB1MN _usart_rx_buffer,11
SUBI R30,-LOW(1)
__PUTB1MN _usart_rx_buffer,11
CALL SUBOPT_0x7
MOVW R26,R30
LDS R30,198
ST X,R30
__GETB1MN _usart_rx_buffer,12
SUBI R30,-LOW(1)
__PUTB1MN _usart_rx_buffer,12
SUBI R30,LOW(1)
__GETB2MN _usart_rx_buffer,11
CPI R26,LOW(0xA)
BRNE _0xB9
LDI R30,LOW(0)
__PUTB1MN _usart_rx_buffer,11
_0xB9:
RJMP _0xBA
_0xB8:
LDS R17,198
_0xBA:
LD R17,Y+
RJMP _0x123
_get_usart_byte:
ST -Y,R17
; to_return -> R17
LDI R17,0
__GETB2MN _usart_rx_buffer,12
CPI R26,LOW(0x1)
BRLO _0xBB
__GETB1MN _usart_rx_buffer,10
SUBI R30,-LOW(1)
__PUTB1MN _usart_rx_buffer,10
CALL SUBOPT_0x7
LD R17,Z
__GETB1MN _usart_rx_buffer,12
SUBI R30,LOW(1)
__PUTB1MN _usart_rx_buffer,12
SUBI R30,-LOW(1)
__GETB2MN _usart_rx_buffer,10
CPI R26,LOW(0xA)
BRNE _0xBC
LDI R30,LOW(0)
__PUTB1MN _usart_rx_buffer,10
_0xBC:
_0xBB:
MOV R30,R17
_0x11D:
LD R17,Y+
RET
_is_buffer_empty:
__GETB1MN _usart_rx_buffer,12
CPI R30,0
BRNE _0xBD
LDI R30,LOW(1)
RET
_0xBD:
LDI R30,LOW(0)
RET
RET
_handle_txc:
CALL SUBOPT_0x6
SBIS 0xB,7
RJMP _0xBF
CBI 0xB,7
RJMP _0xC0
_0xBF:
SBI 0xB,7
_0xC0:
__GETB2MN _usart_msg,3
LDS R30,_usart_msg
CP R30,R26
BRNE _0xC1
CLR R13
RJMP _0xC2
_0xC1:
CALL SUBOPT_0x5
_0xC2:
_0x123:
LD R30,Y+
OUT SREG,R30
LD R31,Y+
LD R30,Y+
LD R27,Y+
LD R26,Y+
RETI
; 32
; 33 unsigned int ms_counter;
.DSEG
_ms_counter:
.BYTE 0x2
; 34
; 35 /*
; 36 Program description:
; 37 Program will initialize everything on boot and wait for input from C++ program.
; 38 C++ program will set the listening channel and tell sniffer to start listening
; 39 Sniffer will then turn RX on and report any events via the USART.
; 40 */
; 41
; 42 // Sniffer States
; 43 #define INIT 0
; 44 #define WAIT 1
; 45 #define RUNNING 2
; 46 #define TEST 3
; 47 #define ENERGY_DETECTION 4
; 48
; 49 // USART Rx States
; 50 #define RX_WAIT 0
; 51 #define RX_SET_CHAN 1
; 52
; 53 #define RX_ACK 0xdd // pre-define 0xdd to tell visual c++ program that we're done receiving
; 54 #define RX_ED 0xaa
; 55
; 56 //usart rx commands
; 57 #define RX_CMD_SET_CHAN 0xab
; 58 #define RX_CMD_RUN 0xca
; 59 #define RX_CMD_HALT 0x9d
; 60 #define RX_CMD_ED 0xba // energy detection
; 61
; 62 unsigned char ack[4] = {0xff,0xff,0xff,0xdd};
_ack:
.BYTE 0x4
; 63 unsigned char *g_ack_head = ack;
_g_ack_head:
.BYTE 0x2
; 64 unsigned char preamble[5] = {0xff,0xff,0xff,0xff,0x00}; // last byte of preamble will hold message size
_preamble:
.BYTE 0x5
; 65 unsigned char *g_preamble_head = preamble;
_g_preamble_head:
.BYTE 0x2
; 66 unsigned char ed_preamble[4] = {0xff,0xff,0xff,0xaa};
_ed_preamble:
.BYTE 0x4
; 67 unsigned char *g_ed_preamble_head = ed_preamble;
_g_ed_preamble_head:
.BYTE 0x2
; 68
; 69
; 70 interrupt [TIM1_COMPA] void handle_tim1(void) {
.CSEG
_handle_tim1:
ST -Y,R0
ST -Y,R26
ST -Y,R27
ST -Y,R30
ST -Y,R31
IN R30,SREG
ST -Y,R30
; 71 if (ms_counter > 0)
LDS R26,_ms_counter
LDS R27,_ms_counter+1
CALL __CPW02
BRSH _0xC9
; 72 ms_counter--;
LDS R30,_ms_counter
LDS R31,_ms_counter+1
SBIW R30,1
CALL SUBOPT_0x8
; 73 }
_0xC9:
LD R30,Y+
OUT SREG,R30
LD R31,Y+
LD R30,Y+
LD R27,Y+
LD R26,Y+
LD R0,Y+
RETI
; 74
; 75 void usart_rx_ack(void);
; 76 void usart_rx_preamble(unsigned char size);
; 77 void usart_rx_ed_preamble(void);
; 78
; 79 void main(void) {
_main:
; 80 unsigned char my_msg[255]; // big enough to hold any single message
; 81 unsigned char *string_head; // make sure we keep track of start of array
; 82 unsigned char ack_msg[4];
; 83 unsigned char *ack_head;
; 84 unsigned char i;
; 85 unsigned char sniffer_state; // keep track of what sniffer's doing
; 86 unsigned char rx_state; // keep track of what usart rx state machine is doing
; 87 unsigned char my_rx_data;
; 88
; 89 sniffer_state = INIT;
SBIW R28,5
SUBI R29,1
; my_msg -> Y+6
; *string_head -> R16,R17
; ack_msg -> Y+2
; *ack_head -> R18,R19
; i -> R21
; sniffer_state -> R20
; rx_state -> Y+1
; my_rx_data -> Y+0
LDI R20,LOW(0)
; 90 COM_init();
CALL _COM_init
; 91 COM_set_MCU_clock(3); // set clock to 4 MHz
LDI R30,LOW(3)
ST -Y,R30
CALL _COM_set_MCU_clock
; 92 COM_enable_interrupt_IRQ();
CALL _COM_enable_interrupt_IRQ
; 93 HAL_initialization();
CALL _HAL_initialization
; 94
; 95 // timer initialization
; 96 TCCR1A = 0b00000000;
LDI R30,LOW(0)
STS 128,R30
; 97 OCR1AH = 1;
LDI R30,LOW(1)
STS 137,R30
; 98 OCR1AL = 0b11110100;
LDI R30,LOW(244)
STS 136,R30
; 99 TCCR1B = 0b00001010; // clk/8... count to 500 for 1ms at 4MHz.
LDI R30,LOW(10)
STS 129,R30
; 100 TCCR1C = 0;
LDI R30,LOW(0)
STS 130,R30
; 101 TIMSK1 = 0b00000010; // interrupt on compare A match
LDI R30,LOW(2)
STS 111,R30
; 102
; 103 m644_init_usart(); // attempt high speed connection
CALL _m644_init_usart
; 104
; 105 ms_counter = 500; // one half second
LDI R30,LOW(500)
LDI R31,HIGH(500)
CALL SUBOPT_0x8
; 106
; 107 #asm
; 108 sei
sei
; 109 #endasm
; 110
; 111 rx_state = RX_WAIT;
LDI R30,LOW(0)
STD Y+1,R30
; 112
; 113 HAL_set_state(STATUS_TRX_OFF); // initialize radio's state
CALL SUBOPT_0x9
; 114
; 115 string_head = my_msg;
MOVW R30,R28
ADIW R30,6
MOVW R16,R30
; 116 for (i=0; i<4; i++) {
LDI R21,LOW(0)
_0xCB:
CPI R21,4
BRSH _0xCC
; 117 my_msg[i] = 0xff; // preamble
MOV R30,R21
CALL SUBOPT_0xA
ADD R26,R30
ADC R27,R31
LDI R30,LOW(255)
ST X,R30
; 118 }
SUBI R21,-1
RJMP _0xCB
_0xCC:
; 119 my_msg[4] = 15;
LDI R30,LOW(15)
STD Y+10,R30
; 120 for (i=0;i<15;i++) {
LDI R21,LOW(0)
_0xCE:
CPI R21,15
BRSH _0xCF
; 121 my_msg[i+5] = i;
MOV R30,R21
SUBI R30,-LOW(5)
CALL SUBOPT_0xA
ADD R30,R26
ADC R31,R27
ST Z,R21
; 122 }
SUBI R21,-1
RJMP _0xCE
_0xCF:
; 123
; 124 ack_head = ack_msg;
MOVW R30,R28
ADIW R30,2
MOVW R18,R30
; 125 for (i=0; i<3; i++) {
LDI R21,LOW(0)
_0xD1:
CPI R21,3
BRSH _0xD2
; 126 ack_msg[i] = 0xff;
MOV R30,R21
LDI R31,0
MOVW R26,R28
ADIW R26,2
ADD R26,R30
ADC R27,R31
LDI R30,LOW(255)
ST X,R30
; 127 }
SUBI R21,-1
RJMP _0xD1
_0xD2:
; 128 ack_msg[3] = 0xdd;
LDI R30,LOW(221)
STD Y+5,R30
; 129
; 130 sniffer_state = WAIT;
LDI R20,LOW(1)
; 131
; 132 /// todo: separate the two state machines for cleaner code.
; 133
; 134 while(1) { // need to check certain flags in usart module periodically and act appropriately
_0xD3:
; 135 //First, check for messages.
; 136 if (is_buffer_empty() == 0) {
CALL _is_buffer_empty
CPI R30,0
BRNE _0xD6
; 137 my_rx_data = get_usart_byte(); // get the message from the buffer.
CALL _get_usart_byte
ST Y,R30
; 138
; 139 // first, check special case RX events
; 140 if (rx_state == RX_SET_CHAN) {
LDD R26,Y+1
CPI R26,LOW(0x1)
BRNE _0xD7
; 141 HAL_set_radio_channel(my_rx_data);
ST -Y,R30
CALL _HAL_set_radio_channel
; 142 rx_state = RX_WAIT;
LDI R30,LOW(0)
STD Y+1,R30
; 143 usart_rx_ack(); // acknowledge successful channel change
RCALL _usart_rx_ack
; 144 }
; 145 else if (rx_state == RX_WAIT) {
RJMP _0xD8
_0xD7:
LDD R30,Y+1
CPI R30,0
BRNE _0xD9
; 146 if (my_rx_data == RX_CMD_RUN) {
LD R26,Y
CPI R26,LOW(0xCA)
BRNE _0xDA
; 147 HAL_set_state(STATUS_RX_ON); // turn rx on if it's off
CALL SUBOPT_0xB
; 148 sniffer_state = RUNNING;
LDI R20,LOW(2)
; 149 usart_rx_ack();
RCALL _usart_rx_ack
; 150 }
; 151
; 152 else if (my_rx_data == RX_CMD_HALT) {
RJMP _0xDB
_0xDA:
LD R26,Y
CPI R26,LOW(0x9D)
BRNE _0xDC
; 153 HAL_set_state(STATUS_TRX_OFF); // turn rx off if it is on
CALL SUBOPT_0x9
; 154 sniffer_state = WAIT;
LDI R20,LOW(1)
; 155 usart_rx_ack();
RCALL _usart_rx_ack
; 156 }
; 157
; 158 else if (my_rx_data == RX_CMD_ED) {
RJMP _0xDD
_0xDC:
LD R26,Y
CPI R26,LOW(0xBA)
BRNE _0xDE
; 159 HAL_set_state(STATUS_RX_ON); // turn rx on
CALL SUBOPT_0xB
; 160 sniffer_state = ENERGY_DETECTION;
LDI R20,LOW(4)
; 161 usart_rx_ack();
RCALL _usart_rx_ack
; 162 ms_counter = 0;
LDI R30,0
STS _ms_counter,R30
STS _ms_counter+1,R30
; 163 }
; 164
; 165 else if (my_rx_data == RX_CMD_SET_CHAN) {
RJMP _0xDF
_0xDE:
LD R26,Y
CPI R26,LOW(0xAB)
BRNE _0xE0
; 166 rx_state = RX_SET_CHAN;
LDI R30,LOW(1)
STD Y+1,R30
; 167 }
; 168 }
_0xE0:
_0xDF:
_0xDD:
_0xDB:
; 169 }
_0xD9:
_0xD8:
; 170
; 171 if (sniffer_state == WAIT) {
_0xD6:
CPI R20,1
BRNE _0xE1
; 172 // for now, just do nothing. wait.
; 173 }
; 174
; 175 else if (sniffer_state == RUNNING) {
RJMP _0xE2
_0xE1:
CPI R20,2
BRNE _0xE3
; 176 if (COM_IRQ_pending == 1) { // radio has info for the application
LDS R26,_COM_IRQ_pending
CPI R26,LOW(0x1)
BRNE _0xE4
; 177 COM_IRQ_handler(); // figure out what the IRQ is.
CALL _COM_IRQ_handler
; 178 if (COM_IRQ_status == IRQ_RX_START) {
LDS R26,_COM_IRQ_status
CPI R26,LOW(0x4)
BRNE _0xE5
; 179 COM_upload_frame(); // upload the frame from the radio
CALL _COM_upload_frame
; 180 // now, transmit the data over the USART.
; 181 // first, transmit the preamble and message size
; 182 usart_rx_preamble(HAL_rx_frame_length);
ST -Y,R8
RCALL _usart_rx_preamble
; 183 // then, pass the usart the pointer to the 802.15.4 message string
; 184 while(busy_flag == 1);
_0xE6:
LDI R30,LOW(1)
CP R30,R13
BREQ _0xE6
; 185 m644_add_message(HAL_rx_frame,HAL_rx_frame_length);
ST -Y,R7
ST -Y,R6
ST -Y,R8
CALL SUBOPT_0xC
; 186 m644_start_tx();
; 187 }
; 188 else if (COM_IRQ_status == IRQ_TRX_END) { // either we missed the RX_START IRQ or this is just happening at the end of a received frame that we've already started downloading.
RJMP _0xE9
_0xE5:
LDS R26,_COM_IRQ_status
CPI R26,LOW(0x8)
BRNE _0xEA
; 189 }
; 190 }
_0xEA:
_0xE9:
; 191 }
_0xE4:
; 192
; 193 else if (sniffer_state == ENERGY_DETECTION) {
RJMP _0xEB
_0xE3:
CPI R20,4
BRNE _0xEC
; 194 if (ms_counter == 0) {
LDS R30,_ms_counter
LDS R31,_ms_counter+1
SBIW R30,0
BRNE _0xED
; 195 for (i=11;i<=26;i++) { // iterate through the channels and form a message to send
LDI R21,LOW(11)
_0xEF:
CPI R21,27
BRSH _0xF0
; 196 HAL_set_radio_channel(i);
ST -Y,R21
CALL _HAL_set_radio_channel
; 197 HAL_set_state(STATUS_RX_ON);
CALL SUBOPT_0xB
; 198 my_msg[i-11] = HAL_energy_detection();
MOV R30,R21
SUBI R30,LOW(11)
CALL SUBOPT_0xA
ADD R30,R26
ADC R31,R27
PUSH R31
PUSH R30
CALL _HAL_energy_detection
POP R26
POP R27
ST X,R30
; 199 HAL_set_state(STATUS_TRX_OFF);
CALL SUBOPT_0x9
; 200 }
SUBI R21,-1
RJMP _0xEF
_0xF0:
; 201 usart_rx_ed_preamble();
RCALL _usart_rx_ed_preamble
; 202 while(busy_flag == 1);
_0xF1:
LDI R30,LOW(1)
CP R30,R13
BREQ _0xF1
; 203 m644_add_message(string_head,16);
ST -Y,R17
ST -Y,R16
LDI R30,LOW(16)
ST -Y,R30
CALL SUBOPT_0xC
; 204 m644_start_tx();
; 205 while(busy_flag == 1);
_0xF4:
LDI R30,LOW(1)
CP R30,R13
BREQ _0xF4
; 206 ms_counter = 50; // wait a little bit before taking the next sample
LDI R30,LOW(50)
LDI R31,HIGH(50)
CALL SUBOPT_0x8
; 207 }
; 208 }
_0xED:
; 209
; 210 /* if (sniffer_state == WAIT) {
; 211 if (is_buffer_empty() == 0) { // message ready and waiting
; 212 my_rx_data = get_usart_byte(); // get the next byte from the buffer. Then, analyze that byte.
; 213 if (rx_state == RX_WAIT) {
; 214 if (my_rx_data == RX_CMD_SET_CHAN) {
; 215 rx_state = RX_SET_CHAN;
; 216 }
; 217 else if (my_rx_data == RX_CMD_RUN) {
; 218 HAL_set_state(STATUS_RX_ON); // Activate receiver
; 219 sniffer_state = RUNNING;
; 220 usart_rx_ack(); // acknowledge the run command
; 221 }
; 222 else if(my_rx_data == RX_CMD_ED) {
; 223 HAL_set_state(STATUS_RX_ON);
; 224 sniffer_state = ENERGY_DETECTION;
; 225 usart_rx_ack();
; 226 ms_counter = 0;
; 227 }
; 228 }
; 229 else if (rx_state == RX_SET_CHAN) {
; 230 HAL_set_radio_channel(my_rx_data); // set the appropriate channel. TODO: CHECK TO SEE IF CHANNEL IS CLEARED WHEN CHANGING RADIO STATE...
; 231 rx_state = RX_WAIT;
; 232 usart_rx_ack(); // acknowledge the channel change message /// TODO: add capability to report errors?
; 233 }
; 234 }
; 235 }
; 236 else if (sniffer_state == RUNNING) {
; 237 if (is_buffer_empty() == 0) { // message ready and waiting. Check to see if we should stop
; 238 my_rx_data = get_usart_byte();
; 239 if (rx_state == RX_WAIT) {
; 240 if (my_rx_data == RX_CMD_HALT) {
; 241 HAL_set_state(STATUS_TRX_OFF); // disable receiver
; 242 sniffer_state = WAIT; // back to wait... wait for command to restart
; 243 while(busy_flag == 1);
; 244 m644_add_message(ack_head,4);
; 245 m644_start_tx();
; 246 }
; 247 }
; 248 }
; 249
; 250 if (COM_IRQ_pending == 1) { // radio has info for the application /// TODO: THIS DOES NOT WORK! METHOD FOR SENDING PREAMBLE IS BROKEN
; 251 if (COM_IRQ_status == IRQ_RX_START) {
; 252 COM_upload_frame(); // upload the frame from the radio
; 253 // now, transmit the data over the USART.
; 254 // first, transmit the preamble and message size
; 255 usart_rx_preamble(HAL_rx_frame_length);
; 256 // then, pass the usart the pointer to the 802.15.4 message string
; 257 while(busy_flag == 1);
; 258 m644_add_message(HAL_rx_frame,HAL_rx_frame_length);
; 259 m644_start_tx();
; 260 }
; 261 else if (COM_IRQ_status == IRQ_TRX_END) { // either we missed the RX_START IRQ or this is just happening at the end of a received frame that we've already started downloading.
; 262 }
; 263 }
; 264 }
; 265 else if (sniffer_state == TEST) {
; 266 while(busy_flag == 1);
; 267 while(ms_counter > 0);
; 268 m644_add_message(ack_head,4);
; 269 m644_start_tx();
; 270 ms_counter = 100;
; 271 }
; 272 else if (sniffer_state == ENERGY_DETECTION) { // special mode. Iterate each channel, do detection, report findings to Visual C++ program.
; 273 if (is_buffer_empty() == 0) { // message ready and waiting
; 274 my_rx_data = get_usart_byte(); // get the message
; 275 if (my_rx_data == RX_CMD_HALT) {
; 276 HAL_set_state(STATUS_TRX_OFF);
; 277 sniffer_state = WAIT;
; 278 rx_state = RX_WAIT;
; 279 usart_rx_ack();
; 280 }
; 281 }
; 282 else if (ms_counter == 0) {
; 283 for (i=11;i<=26;i++) { // iterate through the channels and form a message to send
; 284 HAL_set_radio_channel(i);
; 285 HAL_set_state(STATUS_RX_ON);
; 286 my_msg[i-11] = HAL_energy_detection();
; 287 HAL_set_state(STATUS_TRX_OFF);
; 288 }
; 289 usart_rx_ed_preamble();
; 290 while(busy_flag == 1);
; 291 m644_add_message(string_head,16);
; 292 m644_start_tx();
; 293 while(busy_flag == 1);
; 294 ms_counter = 50; // wait a little bit before taking the next sample
; 295 }
; 296 } */
; 297 }
_0xEC:
_0xEB:
_0xE2:
RJMP _0xD3
; 298 }
_0xF7:
RJMP _0xF7
; 299
; 300 void usart_rx_ack(void) {
_usart_rx_ack:
; 301 while(busy_flag == 1);
_0xF8:
LDI R30,LOW(1)
CP R30,R13
BREQ _0xF8
; 302 m644_add_message(g_ack_head,4); // send a one byte response. 3 bytes of ff, then one command byte. In this case, ack.
LDS R30,_g_ack_head
LDS R31,_g_ack_head+1
CALL SUBOPT_0xD
; 303 m644_start_tx();
; 304 }
RET
; 305
; 306 void usart_rx_preamble(unsigned char size) { // pass the size of the message to come
_usart_rx_preamble:
; 307 preamble[4] = size;
; size -> Y+0
LD R30,Y
__PUTB1MN _preamble,4
; 308 while (busy_flag == 1); // wait until we can transmit safely
_0xFB:
LDI R30,LOW(1)
CP R30,R13
BREQ _0xFB
; 309 m644_add_message(g_preamble_head,5);
LDS R30,_g_preamble_head
LDS R31,_g_preamble_head+1
ST -Y,R31
ST -Y,R30
LDI R30,LOW(5)
ST -Y,R30
CALL SUBOPT_0xC
; 310 m644_start_tx();
; 311 }
ADIW R28,1
RET
; 312
; 313 void usart_rx_ed_preamble() {
_usart_rx_ed_preamble:
; 314 while (busy_flag == 1);
_0xFE:
LDI R30,LOW(1)
CP R30,R13
BREQ _0xFE
; 315 m644_add_message(g_ed_preamble_head,4);
LDS R30,_g_ed_preamble_head
LDS R31,_g_ed_preamble_head+1
CALL SUBOPT_0xD
; 316 m644_start_tx();
; 317 }
RET
_allocate_block_G2:
SBIW R28,2
CALL __SAVELOCR6
__GETWRN 16,17,4096
MOVW R26,R16
LDI R30,LOW(0)
LDI R31,HIGH(0)
ST X+,R30
ST X,R31
_0x101:
MOV R0,R16
OR R0,R17
BREQ _0x103
MOVW R26,R16
CALL __GETW1P
ADD R30,R16
ADC R31,R17
ADIW R30,4
MOVW R20,R30
ADIW R26,2
CALL __GETW1P
MOVW R18,R30
SBIW R30,0
BREQ _0x104
__PUTWSR 18,19,6
RJMP _0x105
_0x104:
LDI R30,LOW(4352)
LDI R31,HIGH(4352)
STD Y+6,R30
STD Y+6+1,R31
_0x105:
LDD R30,Y+6
LDD R31,Y+6+1
SUB R30,R20
SBC R31,R21
MOVW R26,R30
LDD R30,Y+8
LDD R31,Y+8+1
ADIW R30,4
CP R26,R30
CPC R27,R31
BRLO _0x106
MOVW R30,R20
__PUTW1RNS 16,2
MOVW R30,R18
__PUTW1RNS 20,2
LDD R30,Y+8
LDD R31,Y+8+1
MOVW R26,R20
ST X+,R30
ST X,R31
__ADDWRN 20,21,4
MOVW R30,R20
RJMP _0x11C
_0x106:
MOVW R16,R18
RJMP _0x101
_0x103:
LDI R30,LOW(0)
LDI R31,HIGH(0)
_0x11C:
CALL __LOADLOCR6
ADIW R28,10
RET
_find_prev_block_G2:
CALL __SAVELOCR4
__GETWRN 16,17,4096
_0x107:
MOV R0,R16
OR R0,R17
BREQ _0x109
MOVW R26,R16
ADIW R26,2
CALL __GETW1P
MOVW R18,R30
MOVW R26,R30
LDD R30,Y+4
LDD R31,Y+4+1
CP R30,R26
CPC R31,R27
BRNE _0x10A
MOVW R30,R16
RJMP _0x11B
_0x10A:
MOVW R16,R18
RJMP _0x107
_0x109:
LDI R30,LOW(0)
LDI R31,HIGH(0)
_0x11B:
CALL __LOADLOCR4
ADIW R28,6
RET
_realloc:
SBIW R28,2
CALL __SAVELOCR6
LDD R30,Y+10
LDD R31,Y+10+1
SBIW R30,0
BRNE PC+3
JMP _0x10B
SBIW R30,4
MOVW R16,R30
ST -Y,R17
ST -Y,R16
CALL _find_prev_block_G2
MOVW R18,R30
SBIW R30,0
BREQ _0x10C
MOVW R26,R16
ADIW R26,2
CALL __GETW1P
__PUTW1RNS 18,2
LDD R30,Y+8
LDD R31,Y+8+1
SBIW R30,0
BREQ _0x10D
ST -Y,R31
ST -Y,R30
CALL _allocate_block_G2
MOVW R20,R30
SBIW R30,0
BREQ _0x10E
MOVW R26,R16
CALL __GETW1P
STD Y+6,R30
STD Y+6+1,R31
MOVW R26,R30
LDD R30,Y+8
LDD R31,Y+8+1
CP R26,R30
CPC R27,R31
BRSH _0x10F
LDD R30,Y+6
LDD R31,Y+6+1
STD Y+8,R30
STD Y+8+1,R31
_0x10F:
ST -Y,R21
ST -Y,R20
LDD R30,Y+12
LDD R31,Y+12+1
ST -Y,R31
ST -Y,R30
LDD R30,Y+12
LDD R31,Y+12+1
ST -Y,R31
ST -Y,R30
CALL _memmove
MOVW R30,R20
RJMP _0x11A
_0x10E:
MOVW R30,R16
__PUTW1RNS 18,2
_0x10D:
_0x10C:
_0x10B:
LDI R30,LOW(0)
LDI R31,HIGH(0)
_0x11A:
CALL __LOADLOCR6
ADIW R28,12
RET
_malloc:
ST -Y,R17
ST -Y,R16
__GETWRN 16,17,0
LDD R30,Y+2
LDD R31,Y+2+1
SBIW R30,0
BREQ _0x110
ST -Y,R31
ST -Y,R30
CALL _allocate_block_G2
MOVW R16,R30
SBIW R30,0
BREQ _0x111
ST -Y,R17
ST -Y,R16
LDI R30,LOW(0)
ST -Y,R30
LDD R30,Y+5
LDD R31,Y+5+1
ST -Y,R31
ST -Y,R30
CALL _memset
_0x111:
_0x110:
MOVW R30,R16
LDD R17,Y+1
LDD R16,Y+0
ADIW R28,4
RET
_free:
LD R30,Y
LDD R31,Y+1
ST -Y,R31
ST -Y,R30
LDI R30,LOW(0)
LDI R31,HIGH(0)
ST -Y,R31
ST -Y,R30
CALL _realloc
ADIW R28,2
RET
#ifndef __SLEEP_DEFINED__
#define __SLEEP_DEFINED__
.EQU __se_bit=0x01
.EQU __sm_mask=0x0E
.EQU __sm_powerdown=0x04
.EQU __sm_powersave=0x06
.EQU __sm_standby=0x0C
.EQU __sm_ext_standby=0x0E
.EQU __sm_adc_noise_red=0x02
.SET power_ctrl_reg=smcr
#endif
_memmove:
ldd r25,y+1
ld r24,y
adiw r24,0
breq memmove3
ldd r27,y+5
ldd r26,y+4
ldd r31,y+3
ldd r30,y+2
cp r30,r26
cpc r31,r27
breq memmove3
brlt memmove1
memmove0:
ld r22,z+
st x+,r22
sbiw r24,1
brne memmove0
rjmp memmove3
memmove1:
add r26,r24
adc r27,r25
add r30,r24
adc r31,r25
memmove2:
ld r22,-z
st -x,r22
sbiw r24,1
brne memmove2
memmove3:
ldd r31,y+5
ldd r30,y+4
ADIW R28,6
RET
_memset:
ldd r27,y+1
ld r26,y
adiw r26,0
breq memset1
ldd r31,y+4
ldd r30,y+3
ldd r22,y+2
memset0:
st z+,r22
sbiw r26,1
brne memset0
memset1:
ldd r30,y+3
ldd r31,y+4
ADIW R28,5
RET
.DSEG
_p_S65:
.BYTE 0x2
.CSEG
;OPTIMIZER ADDED SUBROUTINE, CALLED 4 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x0:
ST -Y,R30
CALL _COM_read_register
MOV R17,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 7 TIMES, CODE SIZE REDUCTION:15 WORDS
SUBOPT_0x1:
CALL _COM_write_register
__DELAY_USB 7
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 5 TIMES, CODE SIZE REDUCTION:5 WORDS
SUBOPT_0x2:
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(6)
ST -Y,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x3:
LDI R30,LOW(2)
ST -Y,R30
LDI R30,LOW(9)
ST -Y,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0x4:
CALL _COM_write_register
__DELAY_USB 240
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:13 WORDS
SUBOPT_0x5:
__GETW2MN _usart_msg,1
__GETB1MN _usart_msg,3
SUBI R30,-LOW(1)
__PUTB1MN _usart_msg,3
SUBI R30,LOW(1)
LDI R31,0
ADD R26,R30
ADC R27,R31
LD R30,X
STS 198,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x6:
ST -Y,R26
ST -Y,R27
ST -Y,R30
ST -Y,R31
IN R30,SREG
ST -Y,R30
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x7:
SUBI R30,LOW(1)
LDI R31,0
SUBI R30,LOW(-_usart_rx_buffer)
SBCI R31,HIGH(-_usart_rx_buffer)
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x8:
STS _ms_counter,R30
STS _ms_counter+1,R31
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0x9:
LDI R30,LOW(8)
ST -Y,R30
JMP _HAL_set_state
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:3 WORDS
SUBOPT_0xA:
LDI R31,0
MOVW R26,R28
ADIW R26,6
RET
;OPTIMIZER ADDED SUBROUTINE, CALLED 3 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0xB:
LDI R30,LOW(6)
ST -Y,R30
JMP _HAL_set_state
;OPTIMIZER ADDED SUBROUTINE, CALLED 5 TIMES, CODE SIZE REDUCTION:5 WORDS
SUBOPT_0xC:
CALL _m644_add_message
JMP _m644_start_tx
;OPTIMIZER ADDED SUBROUTINE, CALLED 2 TIMES, CODE SIZE REDUCTION:1 WORDS
SUBOPT_0xD:
ST -Y,R31
ST -Y,R30
LDI R30,LOW(4)
ST -Y,R30
RJMP SUBOPT_0xC
__LSLB12:
TST R30
MOV R0,R30
MOV R30,R26
BREQ __LSLB12R
__LSLB12L:
LSL R30
DEC R0
BRNE __LSLB12L
__LSLB12R:
RET
__ASRB12:
TST R30
MOV R0,R30
MOV R30,R26
BREQ __ASRB12R
__ASRB12L:
ASR R30
DEC R0
BRNE __ASRB12L
__ASRB12R:
RET
__LSRB12:
TST R30
MOV R0,R30
MOV R30,R26
BREQ __LSRB12R
__LSRB12L:
LSR R30
DEC R0
BRNE __LSRB12L
__LSRB12R:
RET
__GETW1P:
LD R30,X+
LD R31,X
SBIW R26,1
RET
__CPW02:
CLR R0
CP R0,R26
CPC R0,R27
RET
__SAVELOCR6:
ST -Y,R21
__SAVELOCR5:
ST -Y,R20
__SAVELOCR4:
ST -Y,R19
__SAVELOCR3:
ST -Y,R18
__SAVELOCR2:
ST -Y,R17
ST -Y,R16
RET
__LOADLOCR6:
LDD R21,Y+5
__LOADLOCR5:
LDD R20,Y+4
__LOADLOCR4:
LDD R19,Y+3
__LOADLOCR3:
LDD R18,Y+2
__LOADLOCR2:
LDD R17,Y+1
LD R16,Y
RET
;END OF CODE MARKER
__END_OF_CODE:
| 19.407294 | 207 | 0.56606 |
e547bb04386711acb937065158eba76ca7d413f3 | 952 | asm | Assembly | programs/oeis/048/A048334.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/048/A048334.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/048/A048334.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A048334: a(n) in base 9 is a repdigit.
; 0,1,2,3,4,5,6,7,8,10,20,30,40,50,60,70,80,91,182,273,364,455,546,637,728,820,1640,2460,3280,4100,4920,5740,6560,7381,14762,22143,29524,36905,44286,51667,59048,66430,132860,199290,265720,332150,398580,465010,531440,597871,1195742,1793613,2391484,2989355,3587226,4185097,4782968,5380840,10761680,16142520,21523360,26904200,32285040,37665880,43046720,48427561,96855122,145282683,193710244,242137805,290565366,338992927,387420488,435848050,871696100,1307544150,1743392200,2179240250,2615088300,3050936350,3486784400,3922632451,7845264902,11767897353,15690529804,19613162255,23535794706,27458427157,31381059608,35303692060,70607384120,105911076180,141214768240,176518460300,211822152360,247125844420,282429536480,317733228541,635466457082,953199685623
lpb $0
mov $1,$0
trn $0,8
seq $2,82450 ; a(n) = 5*(n^2-n+2)/2.
mov $4,$2
min $4,1
add $3,$4
mul $3,9
mul $1,$3
mov $2,2
lpe
div $1,9
mov $0,$1
| 56 | 748 | 0.785714 |
1ea1407d1614e9e2c67890dbe2b6e5f5449a223f | 19,952 | asm | Assembly | engineMacros.asm | neilbaldwin/Pulsar | 8cc11ab4cb4117dc44022b7645b02f777a672bf2 | [
"BSD-2-Clause-FreeBSD"
] | 11 | 2021-04-08T14:24:52.000Z | 2022-03-25T00:45:27.000Z | engineMacros.asm | neilbaldwin/Pulsar | 8cc11ab4cb4117dc44022b7645b02f777a672bf2 | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2021-09-17T03:10:36.000Z | 2021-09-17T03:16:45.000Z | engineMacros.asm | neilbaldwin/Pulsar | 8cc11ab4cb4117dc44022b7645b02f777a672bf2 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-04-08T14:24:54.000Z | 2021-04-08T14:24:54.000Z |
;-------------------------------------------------------------------------------
; Echo
;-------------------------------------------------------------------------------
.MACRO echoEffect _track
.local _voice
.IF (_track=0)
_voice = 0
.ELSEIF (_track=1)
_voice = 1
.ELSE
_voice = 2
.ENDIF
lda #SRAM_ECHO_BANK
jsr setMMC1r1
;lda plyrEchoSpeed+_track
;cmp #$FF
;bne @doEcho
lda plyrInstrumentCopy + (_track * STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_ECHO
cmp #$FF
bne @doEcho
rts
@doEcho: and #NUMBER_OF_ECHOES-1
tay
lda echoRowsIndex,y
tay
lda SRAM_ECHOES,y
sta plyrEchoSpeed+_track
lda SRAM_ECHOES+1,y
sta plyrEchoInitAttn+_track
lda SRAM_ECHOES+2,y
sta plyrEchoAttn+_track
ldy plyrEchoIndex+_track
lda envelopePhase+_track
;cmp #ENVELOPE_RELEASE_PHASE
cmp #ENVELOPE_OFF_PHASE
;bcs @writeToBuffer
bne @writeToBuffer
.IF (_voice=0)
lda plyrEchoBuffer03_A,y
cmp #$FF
bne @readFromBuffer
.ELSEIF (_voice=1)
lda plyrEchoBuffer03_B,y
cmp #$FF
bne @readFromBuffer
.ELSE
lda plyrEchoBuffer02_D,y
cmp #$FF
bne @readFromBuffer
.ENDIF
.IF (_voice=0)
lda V_APU+$00
and #%11110000
sta V_APU+$00
.ELSEIF (_voice=1)
lda V_APU+$04
and #%11110000
sta V_APU+$04
.ELSE
lda V_APU+$0C
and #%11110000
;and #%00000000
sta V_APU+$0C
.ENDIF
jmp @writeToBuffer
@readFromBuffer:
.IF (_voice=0)
sta V_APU+$03
lda plyrEchoBuffer02_A,y
sta V_APU+$02
lda plyrEchoBuffer00_A,y
sta V_APU+$00
and #%11110000
sta tmp0
lda plyrEchoBuffer00_A,y
and #%00001111
sec
sbc plyrEchoAttn+_track
bpl @a
lda #$00
@a: ora tmp0
sta plyrEchoBuffer00_A,y
jmp @exit
@writeToBuffer:
lda plyrInstrumentCopy+(0*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_HARDFREQ
asl a
asl a
asl a
asl a
ora V_APU+$03 ;hi freq
sta plyrEchoBuffer03_A,y
lda V_APU+$02 ;lo freq
sta plyrEchoBuffer02_A,y
lda V_APU+$00 ;duty & amp
and #%11110000
sta tmp0
lda V_APU+$00
and #%00001111
sty tmp1
tay
lda VOLUME_TABLE_LO,y
sta engineTmp0
lda VOLUME_TABLE_HI,y
sta engineTmp1
ldy plyrEchoInitAttn+_track
lda (engineTmp0),y
@b: ora tmp0
ldy tmp1
sta plyrEchoBuffer00_A,y
.ELSEIF (_voice=1)
sta V_APU+$07
lda plyrEchoBuffer02_B,y
sta V_APU+$06
lda plyrEchoBuffer00_B,y
sta V_APU+$04
and #%11110000
sta tmp0
lda plyrEchoBuffer00_B,y
and #%00001111
sec
sbc plyrEchoAttn+_track
bpl @a
lda #$00
@a: ora tmp0
sta plyrEchoBuffer00_B,y
jmp @exit
@writeToBuffer:
lda plyrInstrumentCopy+(1*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_HARDFREQ
asl a
asl a
asl a
asl a
ora V_APU+$07 ;hi freq
sta plyrEchoBuffer03_B,y
lda V_APU+$06 ;lo freq
sta plyrEchoBuffer02_B,y
lda V_APU+$04 ;duty & amp
and #%11110000
sta tmp0
lda V_APU+$04
and #%00001111
sty tmp1
tay
lda VOLUME_TABLE_LO,y
sta engineTmp0
lda VOLUME_TABLE_HI,y
sta engineTmp1
ldy plyrEchoInitAttn+_track
lda (engineTmp0),y
@b: ora tmp0
ldy tmp1
sta plyrEchoBuffer00_B,y
.ELSE
sta V_APU+$0F
lda plyrEchoBuffer02_D,y
sta V_APU+$0E
lda plyrEchoBuffer00_D,y
sta V_APU+$0C
and #%11110000
sta tmp0
lda plyrEchoBuffer00_D,y
and #%00001111
sec
sbc plyrEchoAttn+_track
bpl @a
lda #$00
@a: ora tmp0
sta plyrEchoBuffer00_D,y
jmp @exit
@writeToBuffer: lda V_APU+$0E ;lo freq
sta plyrEchoBuffer02_D,y
lda V_APU+$0C ;duty & amp
and #%11110000
sta tmp0
lda V_APU+$0C
and #%00001111
sty tmp1
tay
lda VOLUME_TABLE_LO,y
sta engineTmp0
lda VOLUME_TABLE_HI,y
sta engineTmp1
ldy plyrEchoInitAttn+_track
lda (engineTmp0),y
@b: ora tmp0
ldy tmp1
sta plyrEchoBuffer00_D,y
.ENDIF
@exit: inc plyrEchoIndex+_track
lda plyrEchoIndex+_track
cmp #SIZE_OF_ECHO_BUFFER ;ECHO_MAX_DELAY
bcc @exit0
lda #$00
sta plyrEchoIndex+_track
@exit0: rts
.ENDMACRO
.MACRO plyrUpdateEchoIndex _track
.local _voice
.IF (_track=0)
_voice = 0
.ELSEIF (_track=1)
_voice = 1
.ELSE
_voice = 2
.ENDIF
lda plyrEchoCounter+_track
beq @a
dec plyrEchoCounter+_track
rts
@a: lda #$00
sta plyrEchoIndex+_track
lda plyrEchoSpeed+_track
sta plyrEchoCounter+_track
@x: rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Pitch Slide
;-------------------------------------------------------------------------------
.MACRO doPitchSlide _track
lda plyrSlideSpeed+_track
beq @slideX
bpl @slidePos
lda noteNumber+_track
clc
adc noteAddNote+_track
cmp plyrSlideDestination+_track
bcs @slideX
bcc @slideOff
@slidePos: lda noteNumber+_track
clc
adc noteAddNote+_track
cmp plyrSlideDestination+_track
bcc @slideX
@slideOff: lda plyrSlideDestination+_track
sta noteNumber+_track
lda #$00
sta plyrSlideSpeed+_track
sta noteAddFrac+_track
sta noteAddNote+_track
@slideX: rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Pitch Sweep
;-------------------------------------------------------------------------------
.MACRO doPitchSweep _track
lda #$00
sta plyrPitchSweepDelta+_track
lda plyrSlideSpeed+_track
beq @noSlide
lda plyrPitchSweepLo+_track
clc
adc plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_PSWEEPQ
sta plyrPitchSweepLo+_track
bcc @xSweep
lda plyrSlideSpeed+_track
sta plyrPitchSweepDelta+_track
rts
@noSlide: lda plyrPitchSweepLo+_track
clc
adc plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_PSWEEPQ
sta plyrPitchSweepLo+_track
bcc @xSweep
lda plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_PSWEEP
sta plyrPitchSweepDelta+_track
@xSweep: rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Vibrato
;-------------------------------------------------------------------------------
.MACRO doVibrato _track
.IF SRAM_MAP=32
lda #SRAM_VIBRATO_BANK
jsr setMMC1r1
.ENDIF
;lda #$80
;sta plyrVibSpeedLo
ldx plyrInstrumentCopy+(_track*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_VIBRATO
cpx #$FF
bne @doVib
lda #$00
sta plyrVibDelta+_track
sta plyrVibLastDelta+_track
@noVibYet:
rts
@doVib: lda vibratoRowsIndex,x
tax
lda plyrNoteCounter+_track
cmp SRAM_VIBRATOS+VIBRATO_COLUMN_DELAY,x ;*SRAM*
bcc @noVibYet
lda plyrSlideSpeed+_track
bne @noVibYet
lda #$00 ;zero delta so can be called every frame
sta plyrVibDelta+_track
lda SRAM_VIBRATOS+VIBRATO_COLUMN_ACCELERATE,x ;*SRAM*
beq @noAcc
lda plyrVibDepthMod+_track
cmp SRAM_VIBRATOS+VIBRATO_COLUMN_DEPTH,x ;*SRAM*
beq @accVib
lda plyrVibDepthModCounter+_track
clc
adc SRAM_VIBRATOS+VIBRATO_COLUMN_ACCELERATE,x ;*SRAM*
sta plyrVibDepthModCounter+_track
bcc @accVib
inc plyrVibDepthMod+_track
jmp @accVib
@noAcc: lda SRAM_VIBRATOS+VIBRATO_COLUMN_DEPTH,x ;*SRAM*
sta plyrVibDepthMod+_track
@accVib: lda plyrVibDepthMod+_track
beq @yVib
lda SRAM_VIBRATOS+VIBRATO_COLUMN_SPEED,x ;*SRAM*
beq @yVib
lda plyrVibSpeedCounter+_track
clc
;adc plyrVibSpeedLo+_track
adc plyrInstrumentCopy+(_track*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_PSWEEPQ
sta plyrVibSpeedCounter+_track
bcc @xVib
lda plyrVibPos+_track
clc
adc SRAM_VIBRATOS+VIBRATO_COLUMN_SPEED,x ;*SRAM*
;adc plyrVibDepthMod+_track
and #$3F
sta plyrVibPos+_track
tay
;lda sineTable,y
lda triTable,y
jsr @scaleVib
sta engineTmp2
sec
sbc plyrVibLastDelta+_track
sta plyrVibDelta+_track
lda engineTmp2
sta plyrVibLastDelta+_track
@xVib: rts
@yVib: lda #$00
;sta noteAddFrac
;sta noteAddNote
sta plyrVibPos+_track
sta plyrVibLastDelta+_track
rts
@scaleVib:
cpy #$1f
bcs @negative
sta engineTmp2
lda #$0F
sec
;sbc SRAM_VIBRATOS+VIBRATO_COLUMN_DEPTH,x
sbc plyrVibDepthMod+_track
beq @x1
tay
lda divideLo,y
sta engineTmp0
lda divideHi,y
sta engineTmp1
lda engineTmp2
tay
lda (engineTmp0),y
rts
@x1: lda engineTmp2
rts
@negative:
sta engineTmp2
lda #$10
sec
;sbc SRAM_VIBRATOS+VIBRATO_COLUMN_DEPTH,x
sbc plyrVibDepthMod+_track
beq @y1
tay
lda divideLo,y
sta engineTmp0
lda divideHi,y
sta engineTmp1
lda engineTmp2
tay
lda (engineTmp0),y
eor #$FF
clc
adc #$01
rts
@y1: lda engineTmp2
eor #$FF
clc
adc #$01
rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Add To Pitch
;-------------------------------------------------------------------------------
.MACRO addToPitch _voice
bmi @subtract
clc
adc noteAddFrac+_voice
sta engineTmp2
and #$0F
sta noteAddFrac+_voice
lda engineTmp2
lsr a
lsr a
lsr a
lsr a
clc
adc noteAddNote+_voice
sta noteAddNote+_voice
clc
adc noteNumber+_voice
sec
sbc #$5F
beq @a
bmi @a
sec
sbc noteNumber+_voice
sta noteAddNote+_voice
lda #$00
sta noteAddFrac+_voice
@a: rts
@subtract:
clc
adc noteAddFrac+_voice
sta engineTmp2
and #$0F
sta noteAddFrac+_voice
lda engineTmp2
eor #$FF
clc
adc #$10
lsr a
lsr a
lsr a
lsr a
sta engineTmp0
sec
lda noteAddNote+_voice
sbc engineTmp0
sta noteAddNote+_voice
clc
adc noteNumber+_voice
bpl @b
clc
adc #$5F
sec
sbc noteNumber+_voice
sta noteAddNote+_voice
@b: rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Scale Amplitude
;-------------------------------------------------------------------------------
.MACRO scaleVolume _track
tay
lda VOLUME_TABLE_LO,y
sta engineTmp0
lda VOLUME_TABLE_HI,y
sta engineTmp1
ldy plyrInstrumentCopy + (_track * STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_LEVEL
lda (engineTmp0),y
tay
lda VOLUME_TABLE_LO,y
sta engineTmp0
lda VOLUME_TABLE_HI,y
sta engineTmp1
ldy plyrTableVolume+_track
lda (engineTmp0),y
.ENDMACRO
;-------------------------------------------------------------------------------
; Get Note
;-------------------------------------------------------------------------------
.MACRO getNote _track
clc
adc noteAddNote+_track
cmp #NUMBER_OF_NOTES
bcc @notOver
bmi @x
sec
lda #NUMBER_OF_NOTES
@notOver:
tay
lda octaveShiftTable,y
pha
lda note2Table,y
clc
adc noteAddFrac+_track
tay
lda Tone2PeriodLo,y
sta getNoteTemp0
lda Tone2PeriodHi,y
sta getNoteTemp1
pla
beq @getNoteB
tay
@getNoteA:
lsr getNoteTemp1
ror getNoteTemp0
dey
bne @getNoteA
@getNoteB:
lda getNoteTemp0
ldy getNoteTemp1
@x: rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Run (Pitch) Table
;-------------------------------------------------------------------------------
.MACRO runTable _track
lda plyrPlaying
beq @notPlaying
.IF (_track<4)
ldx plyrInstrumentCopy + (_track * STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_TABLE
.ELSE
ldx plyrTableTrackE
.ENDIF
cpx #$FF
bne @runTable
.IF (_track<4)
lda #$0F
sta plyrTableVolume+_track
lda #$00
sta plyrTablePitch+_track
.ENDIF
@notPlaying:
rts
@runTable:
.IF SRAM_MAP=32
lda #SRAM_TABLE_BANK
jsr setMMC1r1
.ENDIF
lda editTableAddressLo,x
sta plyrTableVector
lda editTableAddressHi,x
sta plyrTableVector+1
lda plyrTableDoStep+_track
bne @doStep
@noStep: ;lda plyrTableCounter+_track
;clc
;adc plyrTableSpeed+_track
;sta plyrTableCounter+_track
lda plyrTableSpeed+_track
and #%11111110
clc
adc plyrTableCounter+_track
sta plyrTableCounter+_track
bcc @xxx
.IF (_track=4)
lda #$81
sta plyrKeyOn+$04
.ENDIF
lda plyrTableJump+_track
bpl @doJump
lda plyrTableIndex+_track
clc
adc #$01
and #STEPS_PER_TABLE-1
@doJump: sta plyrTableIndex+_track
lda #$FF
sta plyrTableJump+_track
sta plyrTableDoStep+_track
@xxx: rts
@doStep: ldy plyrTableIndex+_track
lda tableRowsIndex2,y
tay
lda (plyrTableVector),y ;*SRAM* fx1
sta plyrFxTemp1
iny
lda (plyrTableVector),y ;*SRAM* fx1 data
sta plyrFxDataTemp1
iny
lda (plyrTableVector),y ;*SRAM* fx2
sta plyrFxTemp2
cmp #COMMAND_H
bne @notJump
iny
lda (plyrTableVector),y
jsr randomRangeNumber
cmp plyrTableIndex+_track
beq @noJumping
sta plyrTableIndex+_track
lda #$01
sta plyrTableDoStep+_track
lda #$FF
sta plyrTableJump+_track
jmp @doStep
@noJumping:
lda #$FF
sta plyrTableJump+_track
@notJump:
iny
lda (plyrTableVector),y ;*SRAM* fx2 data
sta plyrFxDataTemp2
lda #$FF
sta plyrTableJump+_track
lda #$01
sta plyrFxType
ldy plyrFxTemp1
bmi @noFX1
lda plyrFxDataTemp1
ldx #_track
jsr plyrDoCommand
@noFX1:
ldy plyrFxTemp2
bmi @noFX2
lda plyrFxDataTemp2
ldx #_track
jsr plyrDoCommand
@noFX2:
.IF (_track=4)
ldx plyrCurrentInstrument+_track
lda plyrCurrentNote+_track
cmp SRAM_DRUMKIT_ROOTS,x ;*SRAM*
bcc @xxx
sbc SRAM_DRUMKIT_ROOTS,x ;*SRAM*
cmp #$0C
bcs @xxx
tax
lda drumkitRowsIndex,x
tax
.ENDIF
ldy plyrTableIndex+_track
lda tableRowsIndex,y
tay
lda (plyrTableVector),y ;*SRAM* volume scale or DPCM pitch
.IF (_track<4)
sta plyrTableVolume+_track
.ELSE
inx
sta plyrInstrumentCopyE,x
.ENDIF
iny
lda (plyrTableVector),y ;*SRAM* pitch offset or DPCM sample number
.IF (_track<4)
sta plyrTablePitch+_track
.ELSE
dex
sta plyrInstrumentCopyE,x
.ENDIF
lda #$00
sta plyrTableDoStep+_track
jmp @noStep
rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Run Duty Table
;-------------------------------------------------------------------------------
.MACRO runDutyTable _track
.IF (_track=0) || (_track=1)
lda plyrInstrumentCopy + (_track * STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_DUTY
cmp #$04
bcs @runDuty
tax
lda DUTY_TABLE,x
sta plyrCurrentDuty + _track
rts
@runDuty: sbc #$04
tax
lda plyrDutyTableDelay+_track
beq @moreDuty
dec plyrDutyTableDelay+_track
rts
@moreDuty:
lda editDutyAddressLo,x
sta plyrDutyVector
lda editDutyAddressHi,x
sta plyrDutyVector+1
.IF SRAM_MAP=32
lda #SRAM_DUTY_BANK
jsr setMMC1r1
.ENDIF
lda plyrDutyIndex+_track
tay
lda dutyRowsIndex,y
tay
lda (plyrDutyVector),y ;*SRAM*
sta plyrCurrentDuty+_track
iny
lda (plyrDutyVector),y ;*SRAM*
sta plyrDutyTableDelay+_track
iny
lda (plyrDutyVector),y ;*SRAM*
cmp #$FF
bne @dutyJump
lda plyrDutyIndex+_track
clc
adc #$01
and #STEPS_PER_DUTY_TABLE-1
@dutyJump:
sta plyrDutyIndex+_track
.ENDIF
rts
.ENDMACRO
;-------------------------------------------------------------------------------
; Refresh Voice
;-------------------------------------------------------------------------------
.MACRO refreshVoice _track
.IF (_track=4)
jsr @doTable
.ENDIF
lda #$01
sta plyrFxType
.IF (_track=0) || (_track=1)
jsr @doDuty
.ENDIF
.IF (_track < 4)
jsr @doTable
jsr @doADSR
jsr @doChord
.ENDIF
.IF (_track<3)
jsr @doPitchSlide
jsr @doPitchSweep
jsr @doVibrato
.ENDIF
.IF (_track<3)
lda plyrVibDelta+_track
clc
adc plyrPitchSweepDelta+_track
jsr @addToPitch
.ENDIF
.IF (_track<4)
lda plyrTablePitch+_track
cmp #$60
bcc @posPitch
cmp #NUMBER_OF_NOTES+$60
bcs @posPitch
sec
sbc #$60
jmp @absPitch
@posPitch:
clc
adc noteNumber+_track
clc
adc plyrPatternChordNote+_track
@absPitch:
.IF (_track<3)
jsr @getNote
sta pitchLo+_track
sty pitchHi+_track
.ELSEIF (_track=3)
clc
adc plyrPatternChordNote+_track
cmp #$10
bcc @notToneNoise
and #$0F
ora #$80
@notToneNoise:
sta pitchLo+_track
.ENDIF
.IF (_track < 3)
lda pitchLo+_track
sta V_APU+(_track * 4)+2
lda pitchHi+_track
sta V_APU+(_track * 4)+3
.ELSEIF (_track=3)
lda pitchLo+_track
sta V_APU+$0E
.ENDIF
.IF (_track < 3)
lda V_APU+(_track*4)+2
clc
adc plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_DETUNE
sta V_APU+(_track*4)+2
lda V_APU+(_track*4)+3
adc plyrDetuneHi+_track
and #$07
sta V_APU+(_track*4)+3
lda plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_SWEEP
eor #$FF
clc
adc #$01
bmi @negDetuneSweep
clc
adc plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_DETUNE
sta plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_DETUNE
lda plyrDetuneHi+_track
adc #$00
sta plyrDetuneHi+_track
jmp @skipDetuneSweep
@negDetuneSweep:
clc
adc plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_DETUNE
sta plyrInstrumentCopy + (_track*STEPS_PER_INSTRUMENT) + INSTRUMENT_ROW_DETUNE
lda plyrDetuneHi+_track
adc #$FF
sta plyrDetuneHi+_track
@skipDetuneSweep:
.ENDIF
.IF (_track=0) || (_track=1)
lda envelopeAmp+_track
scaleVolume _track
eor plyrCurrentDuty+_track
ora #$30
sta V_APU+(_track * 4)+0
.ENDIF
.IF _track = 2
lda plyrTableVolume+_track
beq @zeroC
lda envelopeAmp+_track
beq @zeroC
lda #$81
@zeroC: sta V_APU+$08
.ENDIF
.IF _track = 3
lda envelopeAmp+_track
scaleVolume _track
ora #$30
sta V_APU+(3 * 4)+0
.ENDIF
.ENDIF
.IF SRAM_MAP=32
lda #SRAM_HEADER_BANK
jsr setMMC1r1
.ENDIF
ldy editorCurrentSong
lda #$00
sta plyrDpcmMuted
lda SRAM_SONG_MUTE,y
and SetBits+_track
beq @noMute
.IF (_track<2)||(_track=3)
lda V_APU+(_track*4)+0
and #%11110000
sta V_APU+(_track*4)+0
.ENDIF
.IF (_track=2)
lda #$00
sta V_APU+$08
.ENDIF
.IF (_track=4)
;handle DPCM
inc plyrDpcmMuted
.ENDIF
@noMute:
lda SRAM_SONG_SOLO,y
bmi @noSolo
cmp #_track
beq @noSolo
.IF (_track<2)||(_track=3)
lda V_APU+(_track*4)+0
and #%11110000
sta V_APU+(_track*4)+0
.ENDIF
.IF (_track=2)
lda #$00
sta V_APU+$08
.ENDIF
.IF (_track=4)
inc plyrDpcmMuted
.ENDIF
@noSolo:
rts
.IF (_track<4)
;-------------------------------------------------------------------------------
; Pitch Sweep Call
;-------------------------------------------------------------------------------
@doPitchSweep:
.IF (_track<3)
doPitchSweep _track
.ELSE
.ENDIF
rts
;-------------------------------------------------------------------------------
; Pitch Slide Call
;-------------------------------------------------------------------------------
@doPitchSlide:
.IF (_track<3)
doPitchSlide _track
.ENDIF
rts
;-------------------------------------------------------------------------------
; Vibrato Call
;-------------------------------------------------------------------------------
@doVibrato:
.IF (_track<3)
doVibrato _track
.ENDIF
rts
;-------------------------------------------------------------------------------
; ADSR Call
;-------------------------------------------------------------------------------
@doADSR:
.IF (_track<4)
doADSR _track
.ENDIF
rts
;-------------------------------------------------------------------------------
; Get Note Call
;-------------------------------------------------------------------------------
@getNote: .IF (_track < 3)
getNote _track
.ENDIF
rts
;-------------------------------------------------------------------------------
; Duty Call
;-------------------------------------------------------------------------------
@doDuty: .IF (_track=0) | (_track=1)
runDutyTable _track
.ENDIF
rts
;-------------------------------------------------------------------------------
; Add To Pitch Call
;-------------------------------------------------------------------------------
@addToPitch:
.IF (_track<3)
addToPitch _track
.ENDIF
rts
;-------------------------------------------------------------------------------
; Chord Call
;-------------------------------------------------------------------------------
@doChord:
lda plyrChordNotes+_track
ldy plyrPatternChordIndex+_track
bne @notRoot
sty plyrPatternChordNote+_track
beq @updateChord
@notRoot: cpy #$01
bne @notChord1
lsr a
lsr a
lsr a
lsr a
bpl @writeChord
@notChord1:
and #$0F
@writeChord:
sta plyrPatternChordNote+_track
@updateChord:
lda plyrPatternChordCounter+_track
clc
adc plyrInstrumentCopy+(_track*STEPS_PER_INSTRUMENT)+INSTRUMENT_ROW_PSWEEPQ
sta plyrPatternChordCounter+_track
lda plyrPatternChordIndex+_track
adc #$00
cmp #$03
bcc @notChordLoop
lda #$00
@notChordLoop:
sta plyrPatternChordIndex+_track
rts
.ENDIF
;-------------------------------------------------------------------------------
; Table Call
;-------------------------------------------------------------------------------
@doTable:
runTable _track
rts
.ENDMACRO
| 19.20308 | 80 | 0.625401 |
2f6d8fb508cf10da13bc68d386e902e725f5cd2f | 420 | asm | Assembly | programs/oeis/250/A250108.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/250/A250108.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/250/A250108.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A250108: n*(n-1)/2 mod 2 + n*(n-1)/2 - n*( (n-1) mod 2 ).
; 0,0,4,2,10,10,22,20,36,36,56,54,78,78,106,104,136,136,172,170,210,210,254,252,300,300,352,350,406,406,466,464,528,528,596,594,666,666,742,740,820,820,904,902,990,990,1082,1080,1176,1176,1276,1274,1378
mov $1,1
mov $2,$0
div $0,2
mul $0,2
sub $1,$2
add $1,1
mov $2,1
lpb $0
sub $0,1
add $2,1
add $1,$2
lpe
add $1,1
div $1,2
sub $1,1
mul $1,2
mov $0,$1
| 20 | 202 | 0.609524 |
f43c91abb6dff2a10d60d84473fe626227945bab | 611 | asm | Assembly | asm/testatoi.asm | pedroreissantos/pepe | 444afc02359c31cfe24017dda49395016d94d43e | [
"BSD-3-Clause"
] | null | null | null | asm/testatoi.asm | pedroreissantos/pepe | 444afc02359c31cfe24017dda49395016d94d43e | [
"BSD-3-Clause"
] | null | null | null | asm/testatoi.asm | pedroreissantos/pepe | 444afc02359c31cfe24017dda49395016d94d43e | [
"BSD-3-Clause"
] | null | null | null | ; PEPE gerado por 'lcc' (IST: prs 2005)
; 'rl' serve como frame-pointer e 'r0' como acumulador
; os registos 'r1' a 'r10' sao preservados nas chamadas
; USE: pepe asm/testatoi.asm -q -- 32
include atoi.asm
include lib.asm
; global main
; TEXT
main: ; ncalls=3
PUSH r10
PUSH rl
MOV rl, sp
; P_argc EQU 6
; P_argv EQU 8
MOV r10, 8
ADD r10, rl
MOV r10,[r10]
MOV r10, [r10 + 2] ; MOVB
PUSH r10
CALL atoi
ADD sp,2
MOV r10,r0
PUSH r10
CALL printi
ADD sp,2
MOV r10,L2
PUSH r10
CALL prints
ADD sp,2
MOV r0,0
L1:
MOV sp, rl
POP rl
POP r10
RET
; extern prints
; extern atoi
; extern printi
; RODATA
L2:
STRING "", 10, 0
| 14.547619 | 55 | 0.693944 |
a22df833657a01a18fe502e9a7ab965e72c91ae3 | 380 | asm | Assembly | programs/oeis/164/A164356.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/164/A164356.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/164/A164356.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A164356: Expansion of (1 - x^2)^4 / ((1 - x)^4 * (1 - x^4)) in powers of x.
; 1,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4,2,4,6,4
mov $2,$0
mul $2,5
div $2,2
pow $2,3
lpb $2
add $2,4
dif $2,4
lpe
mov $0,$2
add $0,1
mod $0,10
| 25.333333 | 201 | 0.505263 |
5a4e5777cc4369d3e38ad214c646b5011ceb50e4 | 738 | asm | Assembly | programs/oeis/024/A024147.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/024/A024147.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/024/A024147.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A024147: a(n) = 12^n - n^7.
; 1,11,16,-459,4352,170707,2706048,35008265,427884544,5154997383,61907364224,742988883517,8916064616448,106993142630555,1283918359135360,15407021403726993,184884258626600960,2218611106330098319,26623333280273023872,319479999369729055109,3833759992446195122176,46005119909367900377571,552061438912433923235456,6624737266949233606294681,79496847203390839546970112,953962166440690123497782807,11447545997288281547183771008,137370551967459378652126621005,1648446623609512543937550761984,19781359483314150527395274409643,237376313799769806328928421431424,2848515765597237675947375984562977,34182189187166852111368807606386688,410186270246002225336426060975057695
mov $1,12
pow $1,$0
pow $0,7
sub $1,$0
mov $0,$1
| 82 | 657 | 0.895664 |
73d455332c1e40ae0dd79b995a38e68cbbdc3b3f | 249 | asm | Assembly | support/QtCreator/share/qtcreator/templates/wizards/projects/cppnasm/file.asm | agguro/nasm-support | f4e64dd47a5279cf7fc9cb6d1182626a5b9add62 | [
"BSD-2-Clause"
] | 6 | 2020-07-19T18:34:43.000Z | 2022-03-26T10:21:09.000Z | support/QtCreator/share/qtcreator/templates/wizards/projects/cppnasm/file.asm | agguro/nasm-support | f4e64dd47a5279cf7fc9cb6d1182626a5b9add62 | [
"BSD-2-Clause"
] | null | null | null | support/QtCreator/share/qtcreator/templates/wizards/projects/cppnasm/file.asm | agguro/nasm-support | f4e64dd47a5279cf7fc9cb6d1182626a5b9add62 | [
"BSD-2-Clause"
] | 3 | 2020-07-19T18:35:10.000Z | 2021-07-25T17:34:50.000Z | ;name: %{CN}.asm
;
;description:
;
bits 64
%include "../%{Filename}/inc/%{CN}.inc"
global %{CN}
section .rodata
hello: db "hello world.",10
.len: equ $-hello
section .text
%{CN}:
syscall write, stdout,hello,hello.len
ret
| 11.318182 | 39 | 0.590361 |
c5756897a53fed4e090860e780f593e55f3d0c71 | 2,019 | asm | Assembly | base/mvdm/dos/v86/cmd/keyb/keybcpsd.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/keyb/keybcpsd.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/keyb/keybcpsd.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z |
PAGE ,132
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; (C) Copyright Microsoft Corp. 1987-1990
; MS-DOS 5.00 - NLS Support - KEYB Command
;
;
; File Name: KEYBCPSD.ASM
; ----------
;
;
; Description:
; ------------
; Copies the SHARED_DATA_AREA into a part of memory that
; can be left resident. All relative pointers must already
; be recalculated to this new position.
; THIS FILE MUST BE THE LAST OF THE RESIDENT FILES WHEN KEYB IS LINKED.
;
;
; Procedures Contained in This File:
; ----------------------------------
;
; Include Files Required:
; -----------------------
; INCLUDE KEYBSHAR.INC
; INCLUDE KEYBCMD.INC
; INCLUDE KEYBTBBL.INC
;
; External Procedure References:
; ------------------------------
; FROM FILE ????????.ASM:
; procedure - description???
;
; Linkage Information: Refer to file KEYB.ASM
; --------------------
;
; Change History:
; ---------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC SD_DEST_PTR
PUBLIC COPY_SD_AREA
PUBLIC SHARED_DATA
INCLUDE KEYBSHAR.INC
INCLUDE KEYBCMD.INC
INCLUDE KEYBTBBL.INC
CODE SEGMENT PUBLIC 'CODE'
ASSUME CS:CODE,DS:CODE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Module: COPY_SD_AREA
;
; Description:
;
; Input Registers:
;
; Output Registers:
; N/A
;
; Logic:
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SD EQU SHARED_DATA
TSD EQU TEMP_SHARED_DATA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
COPY_SD_AREA PROC NEAR
REP MOVS ES:BYTE PTR [DI],DS:[SI] ; Copy SHARED_DATA_AREA to
; new part of memory
MOV BYTE PTR ES:SD.TABLE_OK,1 ; Activate processing flag
INT 21H ; Exit
COPY_SD_AREA ENDP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
db 'SHARED DATA'
SD_DEST_PTR LABEL BYTE
SHARED_DATA SHARED_DATA_STR <>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CODE ENDS
END
| 20.602041 | 73 | 0.471025 |
aad68576b601f68be17fe7cfb5db1a2f73b67590 | 1,935 | asm | Assembly | sys/arch/x86/boot/switch_pm.asm | NeoBSD/tunix | 5ad8d4087a987140b6a7ec24402e5f0f6907b332 | [
"BSD-2-Clause"
] | null | null | null | sys/arch/x86/boot/switch_pm.asm | NeoBSD/tunix | 5ad8d4087a987140b6a7ec24402e5f0f6907b332 | [
"BSD-2-Clause"
] | null | null | null | sys/arch/x86/boot/switch_pm.asm | NeoBSD/tunix | 5ad8d4087a987140b6a7ec24402e5f0f6907b332 | [
"BSD-2-Clause"
] | null | null | null | ; Copyright (c) 2021, Tobias Hienzsch
; 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.
; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
[bits 16]
switch_to_pm:
cli ; 1. disable interrupts
lgdt [gdt_descriptor] ; 2. load the GDT descriptor
mov eax, cr0
or eax, 0x1 ; 3. set 32-bit mode bit in cr0
mov cr0, eax
jmp CODE_SEG:init_pm ; 4. far jump by using a different segment
[bits 32]
init_pm: ; we are now using 32-bit instructions
mov ax, DATA_SEG ; 5. update the segment registers
mov ds, ax
mov ss, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ebp, 0x90000 ; 6. update the stack right at the top of the free space
mov esp, ebp
call BEGIN_PM ; 7. Call a well-known label with useful code
| 41.170213 | 77 | 0.743152 |
d6d191bb58134cb897ed3c3831fbae744ef63410 | 363 | asm | Assembly | programs/oeis/083/A083097.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/083/A083097.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/083/A083097.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A083097: a(n) = A083096(n)/6.
; 0,2,5,6,14,15,18,20,41,42,45,47,54,56,59,60,122,123,126,128,135,137,140,141,162,164,167,168,176,177,180,182,365,366,369,371,378,380,383,384,405,407,410,411,419,420,423,425,486,488,491,492,500
cal $0,191107 ; Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x+1 are in a.
div $0,2
mov $1,$0
| 51.857143 | 193 | 0.68595 |
7984f28a3e2136ceb377065c97044ee4a6d0e167 | 46,324 | asm | Assembly | test7.asm | ray5273/os_project4 | 1ed4cb594205baed90d821d5c4c93be26ec6a889 | [
"MIT-0"
] | null | null | null | test7.asm | ray5273/os_project4 | 1ed4cb594205baed90d821d5c4c93be26ec6a889 | [
"MIT-0"
] | null | null | null | test7.asm | ray5273/os_project4 | 1ed4cb594205baed90d821d5c4c93be26ec6a889 | [
"MIT-0"
] | null | null | null |
_test7: file format elf32-i386
Disassembly of section .text:
00000000 <thread>:
void *stack[NTHREAD];
int tid[NTHREAD];
void *retval[NTHREAD];
int mem;
void *thread(void *arg){
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 08 sub $0x8,%esp
// printf(1,"mem : %d , arg : %d",mem,(int)arg);
if(mem != (int)arg){
6: 8b 15 34 0c 00 00 mov 0xc34,%edx
c: 8b 45 08 mov 0x8(%ebp),%eax
f: 39 c2 cmp %eax,%edx
11: 74 17 je 2a <thread+0x2a>
printf(1, "IN THREAD WRONG\n");
13: 83 ec 08 sub $0x8,%esp
16: 68 37 09 00 00 push $0x937
1b: 6a 01 push $0x1
1d: e8 5f 05 00 00 call 581 <printf>
22: 83 c4 10 add $0x10,%esp
exit();
25: e8 b0 03 00 00 call 3da <exit>
}
thread_exit(0);
2a: 83 ec 0c sub $0xc,%esp
2d: 6a 00 push $0x0
2f: e8 56 04 00 00 call 48a <thread_exit>
00000034 <main>:
}
int
main(int argc, char **argv)
{
34: 8d 4c 24 04 lea 0x4(%esp),%ecx
38: 83 e4 f0 and $0xfffffff0,%esp
3b: ff 71 fc pushl -0x4(%ecx)
3e: 55 push %ebp
3f: 89 e5 mov %esp,%ebp
41: 51 push %ecx
42: 83 ec 14 sub $0x14,%esp
int i;
printf(1, "TEST7: ");
45: 83 ec 08 sub $0x8,%esp
48: 68 48 09 00 00 push $0x948
4d: 6a 01 push $0x1
4f: e8 2d 05 00 00 call 581 <printf>
54: 83 c4 10 add $0x10,%esp
for(i=0;i<NTHREAD;i++)
57: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
5e: eb 20 jmp 80 <main+0x4c>
stack[i] = malloc(4096);
60: 83 ec 0c sub $0xc,%esp
63: 68 00 10 00 00 push $0x1000
68: e8 e7 07 00 00 call 854 <malloc>
6d: 83 c4 10 add $0x10,%esp
70: 89 c2 mov %eax,%edx
72: 8b 45 f4 mov -0xc(%ebp),%eax
75: 89 14 85 fc 0b 00 00 mov %edx,0xbfc(,%eax,4)
{
int i;
printf(1, "TEST7: ");
for(i=0;i<NTHREAD;i++)
7c: 83 45 f4 01 addl $0x1,-0xc(%ebp)
80: 83 7d f4 06 cmpl $0x6,-0xc(%ebp)
84: 7e da jle 60 <main+0x2c>
stack[i] = malloc(4096);
for(i=0;i<NTHREAD;i++){
86: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
8d: eb 5c jmp eb <main+0xb7>
mem = i;
8f: 8b 45 f4 mov -0xc(%ebp),%eax
92: a3 34 0c 00 00 mov %eax,0xc34
tid[i] = thread_create(thread, 10, (void *)i, stack[i]);
97: 8b 45 f4 mov -0xc(%ebp),%eax
9a: 8b 14 85 fc 0b 00 00 mov 0xbfc(,%eax,4),%edx
a1: 8b 45 f4 mov -0xc(%ebp),%eax
a4: 52 push %edx
a5: 50 push %eax
a6: 6a 0a push $0xa
a8: 68 00 00 00 00 push $0x0
ad: e8 d0 03 00 00 call 482 <thread_create>
b2: 83 c4 10 add $0x10,%esp
b5: 89 c2 mov %eax,%edx
b7: 8b 45 f4 mov -0xc(%ebp),%eax
ba: 89 14 85 18 0c 00 00 mov %edx,0xc18(,%eax,4)
if(tid[i] == -1){
c1: 8b 45 f4 mov -0xc(%ebp),%eax
c4: 8b 04 85 18 0c 00 00 mov 0xc18(,%eax,4),%eax
cb: 83 f8 ff cmp $0xffffffff,%eax
ce: 75 17 jne e7 <main+0xb3>
printf(1, "CREATE WRONG\n");
d0: 83 ec 08 sub $0x8,%esp
d3: 68 50 09 00 00 push $0x950
d8: 6a 01 push $0x1
da: e8 a2 04 00 00 call 581 <printf>
df: 83 c4 10 add $0x10,%esp
exit();
e2: e8 f3 02 00 00 call 3da <exit>
printf(1, "TEST7: ");
for(i=0;i<NTHREAD;i++)
stack[i] = malloc(4096);
for(i=0;i<NTHREAD;i++){
e7: 83 45 f4 01 addl $0x1,-0xc(%ebp)
eb: 83 7d f4 06 cmpl $0x6,-0xc(%ebp)
ef: 7e 9e jle 8f <main+0x5b>
printf(1, "CREATE WRONG\n");
exit();
}
}
for(i=0;i<NTHREAD;i++){
f1: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
f8: eb 43 jmp 13d <main+0x109>
if(thread_join(tid[i], &retval[i]) == -1){
fa: 8b 45 f4 mov -0xc(%ebp),%eax
fd: c1 e0 02 shl $0x2,%eax
100: 8d 90 38 0c 00 00 lea 0xc38(%eax),%edx
106: 8b 45 f4 mov -0xc(%ebp),%eax
109: 8b 04 85 18 0c 00 00 mov 0xc18(,%eax,4),%eax
110: 83 ec 08 sub $0x8,%esp
113: 52 push %edx
114: 50 push %eax
115: e8 78 03 00 00 call 492 <thread_join>
11a: 83 c4 10 add $0x10,%esp
11d: 83 f8 ff cmp $0xffffffff,%eax
120: 75 17 jne 139 <main+0x105>
printf(1, "JOIN WRONG\n");
122: 83 ec 08 sub $0x8,%esp
125: 68 5e 09 00 00 push $0x95e
12a: 6a 01 push $0x1
12c: e8 50 04 00 00 call 581 <printf>
131: 83 c4 10 add $0x10,%esp
exit();
134: e8 a1 02 00 00 call 3da <exit>
printf(1, "CREATE WRONG\n");
exit();
}
}
for(i=0;i<NTHREAD;i++){
139: 83 45 f4 01 addl $0x1,-0xc(%ebp)
13d: 83 7d f4 06 cmpl $0x6,-0xc(%ebp)
141: 7e b7 jle fa <main+0xc6>
printf(1, "JOIN WRONG\n");
exit();
}
}
for(i=0;i<NTHREAD;i++)
143: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
14a: eb 1a jmp 166 <main+0x132>
free(stack[i]);
14c: 8b 45 f4 mov -0xc(%ebp),%eax
14f: 8b 04 85 fc 0b 00 00 mov 0xbfc(,%eax,4),%eax
156: 83 ec 0c sub $0xc,%esp
159: 50 push %eax
15a: e8 b3 05 00 00 call 712 <free>
15f: 83 c4 10 add $0x10,%esp
printf(1, "JOIN WRONG\n");
exit();
}
}
for(i=0;i<NTHREAD;i++)
162: 83 45 f4 01 addl $0x1,-0xc(%ebp)
166: 83 7d f4 06 cmpl $0x6,-0xc(%ebp)
16a: 7e e0 jle 14c <main+0x118>
free(stack[i]);
printf(1, "OK\n");
16c: 83 ec 08 sub $0x8,%esp
16f: 68 6a 09 00 00 push $0x96a
174: 6a 01 push $0x1
176: e8 06 04 00 00 call 581 <printf>
17b: 83 c4 10 add $0x10,%esp
exit();
17e: e8 57 02 00 00 call 3da <exit>
00000183 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
183: 55 push %ebp
184: 89 e5 mov %esp,%ebp
186: 57 push %edi
187: 53 push %ebx
asm volatile("cld; rep stosb" :
188: 8b 4d 08 mov 0x8(%ebp),%ecx
18b: 8b 55 10 mov 0x10(%ebp),%edx
18e: 8b 45 0c mov 0xc(%ebp),%eax
191: 89 cb mov %ecx,%ebx
193: 89 df mov %ebx,%edi
195: 89 d1 mov %edx,%ecx
197: fc cld
198: f3 aa rep stos %al,%es:(%edi)
19a: 89 ca mov %ecx,%edx
19c: 89 fb mov %edi,%ebx
19e: 89 5d 08 mov %ebx,0x8(%ebp)
1a1: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
1a4: 90 nop
1a5: 5b pop %ebx
1a6: 5f pop %edi
1a7: 5d pop %ebp
1a8: c3 ret
000001a9 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
1a9: 55 push %ebp
1aa: 89 e5 mov %esp,%ebp
1ac: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
1af: 8b 45 08 mov 0x8(%ebp),%eax
1b2: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
1b5: 90 nop
1b6: 8b 45 08 mov 0x8(%ebp),%eax
1b9: 8d 50 01 lea 0x1(%eax),%edx
1bc: 89 55 08 mov %edx,0x8(%ebp)
1bf: 8b 55 0c mov 0xc(%ebp),%edx
1c2: 8d 4a 01 lea 0x1(%edx),%ecx
1c5: 89 4d 0c mov %ecx,0xc(%ebp)
1c8: 0f b6 12 movzbl (%edx),%edx
1cb: 88 10 mov %dl,(%eax)
1cd: 0f b6 00 movzbl (%eax),%eax
1d0: 84 c0 test %al,%al
1d2: 75 e2 jne 1b6 <strcpy+0xd>
;
return os;
1d4: 8b 45 fc mov -0x4(%ebp),%eax
}
1d7: c9 leave
1d8: c3 ret
000001d9 <strcmp>:
int
strcmp(const char *p, const char *q)
{
1d9: 55 push %ebp
1da: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
1dc: eb 08 jmp 1e6 <strcmp+0xd>
p++, q++;
1de: 83 45 08 01 addl $0x1,0x8(%ebp)
1e2: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1e6: 8b 45 08 mov 0x8(%ebp),%eax
1e9: 0f b6 00 movzbl (%eax),%eax
1ec: 84 c0 test %al,%al
1ee: 74 10 je 200 <strcmp+0x27>
1f0: 8b 45 08 mov 0x8(%ebp),%eax
1f3: 0f b6 10 movzbl (%eax),%edx
1f6: 8b 45 0c mov 0xc(%ebp),%eax
1f9: 0f b6 00 movzbl (%eax),%eax
1fc: 38 c2 cmp %al,%dl
1fe: 74 de je 1de <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
200: 8b 45 08 mov 0x8(%ebp),%eax
203: 0f b6 00 movzbl (%eax),%eax
206: 0f b6 d0 movzbl %al,%edx
209: 8b 45 0c mov 0xc(%ebp),%eax
20c: 0f b6 00 movzbl (%eax),%eax
20f: 0f b6 c0 movzbl %al,%eax
212: 29 c2 sub %eax,%edx
214: 89 d0 mov %edx,%eax
}
216: 5d pop %ebp
217: c3 ret
00000218 <strlen>:
uint
strlen(char *s)
{
218: 55 push %ebp
219: 89 e5 mov %esp,%ebp
21b: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
21e: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
225: eb 04 jmp 22b <strlen+0x13>
227: 83 45 fc 01 addl $0x1,-0x4(%ebp)
22b: 8b 55 fc mov -0x4(%ebp),%edx
22e: 8b 45 08 mov 0x8(%ebp),%eax
231: 01 d0 add %edx,%eax
233: 0f b6 00 movzbl (%eax),%eax
236: 84 c0 test %al,%al
238: 75 ed jne 227 <strlen+0xf>
;
return n;
23a: 8b 45 fc mov -0x4(%ebp),%eax
}
23d: c9 leave
23e: c3 ret
0000023f <memset>:
void*
memset(void *dst, int c, uint n)
{
23f: 55 push %ebp
240: 89 e5 mov %esp,%ebp
stosb(dst, c, n);
242: 8b 45 10 mov 0x10(%ebp),%eax
245: 50 push %eax
246: ff 75 0c pushl 0xc(%ebp)
249: ff 75 08 pushl 0x8(%ebp)
24c: e8 32 ff ff ff call 183 <stosb>
251: 83 c4 0c add $0xc,%esp
return dst;
254: 8b 45 08 mov 0x8(%ebp),%eax
}
257: c9 leave
258: c3 ret
00000259 <strchr>:
char*
strchr(const char *s, char c)
{
259: 55 push %ebp
25a: 89 e5 mov %esp,%ebp
25c: 83 ec 04 sub $0x4,%esp
25f: 8b 45 0c mov 0xc(%ebp),%eax
262: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
265: eb 14 jmp 27b <strchr+0x22>
if(*s == c)
267: 8b 45 08 mov 0x8(%ebp),%eax
26a: 0f b6 00 movzbl (%eax),%eax
26d: 3a 45 fc cmp -0x4(%ebp),%al
270: 75 05 jne 277 <strchr+0x1e>
return (char*)s;
272: 8b 45 08 mov 0x8(%ebp),%eax
275: eb 13 jmp 28a <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
277: 83 45 08 01 addl $0x1,0x8(%ebp)
27b: 8b 45 08 mov 0x8(%ebp),%eax
27e: 0f b6 00 movzbl (%eax),%eax
281: 84 c0 test %al,%al
283: 75 e2 jne 267 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
285: b8 00 00 00 00 mov $0x0,%eax
}
28a: c9 leave
28b: c3 ret
0000028c <gets>:
char*
gets(char *buf, int max)
{
28c: 55 push %ebp
28d: 89 e5 mov %esp,%ebp
28f: 83 ec 18 sub $0x18,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
292: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
299: eb 42 jmp 2dd <gets+0x51>
cc = read(0, &c, 1);
29b: 83 ec 04 sub $0x4,%esp
29e: 6a 01 push $0x1
2a0: 8d 45 ef lea -0x11(%ebp),%eax
2a3: 50 push %eax
2a4: 6a 00 push $0x0
2a6: e8 47 01 00 00 call 3f2 <read>
2ab: 83 c4 10 add $0x10,%esp
2ae: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
2b1: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
2b5: 7e 33 jle 2ea <gets+0x5e>
break;
buf[i++] = c;
2b7: 8b 45 f4 mov -0xc(%ebp),%eax
2ba: 8d 50 01 lea 0x1(%eax),%edx
2bd: 89 55 f4 mov %edx,-0xc(%ebp)
2c0: 89 c2 mov %eax,%edx
2c2: 8b 45 08 mov 0x8(%ebp),%eax
2c5: 01 c2 add %eax,%edx
2c7: 0f b6 45 ef movzbl -0x11(%ebp),%eax
2cb: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
2cd: 0f b6 45 ef movzbl -0x11(%ebp),%eax
2d1: 3c 0a cmp $0xa,%al
2d3: 74 16 je 2eb <gets+0x5f>
2d5: 0f b6 45 ef movzbl -0x11(%ebp),%eax
2d9: 3c 0d cmp $0xd,%al
2db: 74 0e je 2eb <gets+0x5f>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
2dd: 8b 45 f4 mov -0xc(%ebp),%eax
2e0: 83 c0 01 add $0x1,%eax
2e3: 3b 45 0c cmp 0xc(%ebp),%eax
2e6: 7c b3 jl 29b <gets+0xf>
2e8: eb 01 jmp 2eb <gets+0x5f>
cc = read(0, &c, 1);
if(cc < 1)
break;
2ea: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
2eb: 8b 55 f4 mov -0xc(%ebp),%edx
2ee: 8b 45 08 mov 0x8(%ebp),%eax
2f1: 01 d0 add %edx,%eax
2f3: c6 00 00 movb $0x0,(%eax)
return buf;
2f6: 8b 45 08 mov 0x8(%ebp),%eax
}
2f9: c9 leave
2fa: c3 ret
000002fb <stat>:
int
stat(char *n, struct stat *st)
{
2fb: 55 push %ebp
2fc: 89 e5 mov %esp,%ebp
2fe: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
301: 83 ec 08 sub $0x8,%esp
304: 6a 00 push $0x0
306: ff 75 08 pushl 0x8(%ebp)
309: e8 0c 01 00 00 call 41a <open>
30e: 83 c4 10 add $0x10,%esp
311: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
314: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
318: 79 07 jns 321 <stat+0x26>
return -1;
31a: b8 ff ff ff ff mov $0xffffffff,%eax
31f: eb 25 jmp 346 <stat+0x4b>
r = fstat(fd, st);
321: 83 ec 08 sub $0x8,%esp
324: ff 75 0c pushl 0xc(%ebp)
327: ff 75 f4 pushl -0xc(%ebp)
32a: e8 03 01 00 00 call 432 <fstat>
32f: 83 c4 10 add $0x10,%esp
332: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
335: 83 ec 0c sub $0xc,%esp
338: ff 75 f4 pushl -0xc(%ebp)
33b: e8 c2 00 00 00 call 402 <close>
340: 83 c4 10 add $0x10,%esp
return r;
343: 8b 45 f0 mov -0x10(%ebp),%eax
}
346: c9 leave
347: c3 ret
00000348 <atoi>:
int
atoi(const char *s)
{
348: 55 push %ebp
349: 89 e5 mov %esp,%ebp
34b: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
34e: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
355: eb 25 jmp 37c <atoi+0x34>
n = n*10 + *s++ - '0';
357: 8b 55 fc mov -0x4(%ebp),%edx
35a: 89 d0 mov %edx,%eax
35c: c1 e0 02 shl $0x2,%eax
35f: 01 d0 add %edx,%eax
361: 01 c0 add %eax,%eax
363: 89 c1 mov %eax,%ecx
365: 8b 45 08 mov 0x8(%ebp),%eax
368: 8d 50 01 lea 0x1(%eax),%edx
36b: 89 55 08 mov %edx,0x8(%ebp)
36e: 0f b6 00 movzbl (%eax),%eax
371: 0f be c0 movsbl %al,%eax
374: 01 c8 add %ecx,%eax
376: 83 e8 30 sub $0x30,%eax
379: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
37c: 8b 45 08 mov 0x8(%ebp),%eax
37f: 0f b6 00 movzbl (%eax),%eax
382: 3c 2f cmp $0x2f,%al
384: 7e 0a jle 390 <atoi+0x48>
386: 8b 45 08 mov 0x8(%ebp),%eax
389: 0f b6 00 movzbl (%eax),%eax
38c: 3c 39 cmp $0x39,%al
38e: 7e c7 jle 357 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
390: 8b 45 fc mov -0x4(%ebp),%eax
}
393: c9 leave
394: c3 ret
00000395 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
395: 55 push %ebp
396: 89 e5 mov %esp,%ebp
398: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
39b: 8b 45 08 mov 0x8(%ebp),%eax
39e: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
3a1: 8b 45 0c mov 0xc(%ebp),%eax
3a4: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
3a7: eb 17 jmp 3c0 <memmove+0x2b>
*dst++ = *src++;
3a9: 8b 45 fc mov -0x4(%ebp),%eax
3ac: 8d 50 01 lea 0x1(%eax),%edx
3af: 89 55 fc mov %edx,-0x4(%ebp)
3b2: 8b 55 f8 mov -0x8(%ebp),%edx
3b5: 8d 4a 01 lea 0x1(%edx),%ecx
3b8: 89 4d f8 mov %ecx,-0x8(%ebp)
3bb: 0f b6 12 movzbl (%edx),%edx
3be: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
3c0: 8b 45 10 mov 0x10(%ebp),%eax
3c3: 8d 50 ff lea -0x1(%eax),%edx
3c6: 89 55 10 mov %edx,0x10(%ebp)
3c9: 85 c0 test %eax,%eax
3cb: 7f dc jg 3a9 <memmove+0x14>
*dst++ = *src++;
return vdst;
3cd: 8b 45 08 mov 0x8(%ebp),%eax
}
3d0: c9 leave
3d1: c3 ret
000003d2 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
3d2: b8 01 00 00 00 mov $0x1,%eax
3d7: cd 40 int $0x40
3d9: c3 ret
000003da <exit>:
SYSCALL(exit)
3da: b8 02 00 00 00 mov $0x2,%eax
3df: cd 40 int $0x40
3e1: c3 ret
000003e2 <wait>:
SYSCALL(wait)
3e2: b8 03 00 00 00 mov $0x3,%eax
3e7: cd 40 int $0x40
3e9: c3 ret
000003ea <pipe>:
SYSCALL(pipe)
3ea: b8 04 00 00 00 mov $0x4,%eax
3ef: cd 40 int $0x40
3f1: c3 ret
000003f2 <read>:
SYSCALL(read)
3f2: b8 05 00 00 00 mov $0x5,%eax
3f7: cd 40 int $0x40
3f9: c3 ret
000003fa <write>:
SYSCALL(write)
3fa: b8 10 00 00 00 mov $0x10,%eax
3ff: cd 40 int $0x40
401: c3 ret
00000402 <close>:
SYSCALL(close)
402: b8 15 00 00 00 mov $0x15,%eax
407: cd 40 int $0x40
409: c3 ret
0000040a <kill>:
SYSCALL(kill)
40a: b8 06 00 00 00 mov $0x6,%eax
40f: cd 40 int $0x40
411: c3 ret
00000412 <exec>:
SYSCALL(exec)
412: b8 07 00 00 00 mov $0x7,%eax
417: cd 40 int $0x40
419: c3 ret
0000041a <open>:
SYSCALL(open)
41a: b8 0f 00 00 00 mov $0xf,%eax
41f: cd 40 int $0x40
421: c3 ret
00000422 <mknod>:
SYSCALL(mknod)
422: b8 11 00 00 00 mov $0x11,%eax
427: cd 40 int $0x40
429: c3 ret
0000042a <unlink>:
SYSCALL(unlink)
42a: b8 12 00 00 00 mov $0x12,%eax
42f: cd 40 int $0x40
431: c3 ret
00000432 <fstat>:
SYSCALL(fstat)
432: b8 08 00 00 00 mov $0x8,%eax
437: cd 40 int $0x40
439: c3 ret
0000043a <link>:
SYSCALL(link)
43a: b8 13 00 00 00 mov $0x13,%eax
43f: cd 40 int $0x40
441: c3 ret
00000442 <mkdir>:
SYSCALL(mkdir)
442: b8 14 00 00 00 mov $0x14,%eax
447: cd 40 int $0x40
449: c3 ret
0000044a <chdir>:
SYSCALL(chdir)
44a: b8 09 00 00 00 mov $0x9,%eax
44f: cd 40 int $0x40
451: c3 ret
00000452 <dup>:
SYSCALL(dup)
452: b8 0a 00 00 00 mov $0xa,%eax
457: cd 40 int $0x40
459: c3 ret
0000045a <getpid>:
SYSCALL(getpid)
45a: b8 0b 00 00 00 mov $0xb,%eax
45f: cd 40 int $0x40
461: c3 ret
00000462 <sbrk>:
SYSCALL(sbrk)
462: b8 0c 00 00 00 mov $0xc,%eax
467: cd 40 int $0x40
469: c3 ret
0000046a <sleep>:
SYSCALL(sleep)
46a: b8 0d 00 00 00 mov $0xd,%eax
46f: cd 40 int $0x40
471: c3 ret
00000472 <uptime>:
SYSCALL(uptime)
472: b8 0e 00 00 00 mov $0xe,%eax
477: cd 40 int $0x40
479: c3 ret
0000047a <halt>:
SYSCALL(halt)
47a: b8 16 00 00 00 mov $0x16,%eax
47f: cd 40 int $0x40
481: c3 ret
00000482 <thread_create>:
SYSCALL(thread_create)
482: b8 17 00 00 00 mov $0x17,%eax
487: cd 40 int $0x40
489: c3 ret
0000048a <thread_exit>:
SYSCALL(thread_exit)
48a: b8 18 00 00 00 mov $0x18,%eax
48f: cd 40 int $0x40
491: c3 ret
00000492 <thread_join>:
SYSCALL(thread_join)
492: b8 19 00 00 00 mov $0x19,%eax
497: cd 40 int $0x40
499: c3 ret
0000049a <gettid>:
SYSCALL(gettid)
49a: b8 1a 00 00 00 mov $0x1a,%eax
49f: cd 40 int $0x40
4a1: c3 ret
000004a2 <clone>:
SYSCALL(clone)
4a2: b8 1b 00 00 00 mov $0x1b,%eax
4a7: cd 40 int $0x40
4a9: c3 ret
000004aa <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
4aa: 55 push %ebp
4ab: 89 e5 mov %esp,%ebp
4ad: 83 ec 18 sub $0x18,%esp
4b0: 8b 45 0c mov 0xc(%ebp),%eax
4b3: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
4b6: 83 ec 04 sub $0x4,%esp
4b9: 6a 01 push $0x1
4bb: 8d 45 f4 lea -0xc(%ebp),%eax
4be: 50 push %eax
4bf: ff 75 08 pushl 0x8(%ebp)
4c2: e8 33 ff ff ff call 3fa <write>
4c7: 83 c4 10 add $0x10,%esp
}
4ca: 90 nop
4cb: c9 leave
4cc: c3 ret
000004cd <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
4cd: 55 push %ebp
4ce: 89 e5 mov %esp,%ebp
4d0: 53 push %ebx
4d1: 83 ec 24 sub $0x24,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
4d4: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
4db: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
4df: 74 17 je 4f8 <printint+0x2b>
4e1: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
4e5: 79 11 jns 4f8 <printint+0x2b>
neg = 1;
4e7: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
4ee: 8b 45 0c mov 0xc(%ebp),%eax
4f1: f7 d8 neg %eax
4f3: 89 45 ec mov %eax,-0x14(%ebp)
4f6: eb 06 jmp 4fe <printint+0x31>
} else {
x = xx;
4f8: 8b 45 0c mov 0xc(%ebp),%eax
4fb: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
4fe: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
505: 8b 4d f4 mov -0xc(%ebp),%ecx
508: 8d 41 01 lea 0x1(%ecx),%eax
50b: 89 45 f4 mov %eax,-0xc(%ebp)
50e: 8b 5d 10 mov 0x10(%ebp),%ebx
511: 8b 45 ec mov -0x14(%ebp),%eax
514: ba 00 00 00 00 mov $0x0,%edx
519: f7 f3 div %ebx
51b: 89 d0 mov %edx,%eax
51d: 0f b6 80 dc 0b 00 00 movzbl 0xbdc(%eax),%eax
524: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
528: 8b 5d 10 mov 0x10(%ebp),%ebx
52b: 8b 45 ec mov -0x14(%ebp),%eax
52e: ba 00 00 00 00 mov $0x0,%edx
533: f7 f3 div %ebx
535: 89 45 ec mov %eax,-0x14(%ebp)
538: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
53c: 75 c7 jne 505 <printint+0x38>
if(neg)
53e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
542: 74 2d je 571 <printint+0xa4>
buf[i++] = '-';
544: 8b 45 f4 mov -0xc(%ebp),%eax
547: 8d 50 01 lea 0x1(%eax),%edx
54a: 89 55 f4 mov %edx,-0xc(%ebp)
54d: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
552: eb 1d jmp 571 <printint+0xa4>
putc(fd, buf[i]);
554: 8d 55 dc lea -0x24(%ebp),%edx
557: 8b 45 f4 mov -0xc(%ebp),%eax
55a: 01 d0 add %edx,%eax
55c: 0f b6 00 movzbl (%eax),%eax
55f: 0f be c0 movsbl %al,%eax
562: 83 ec 08 sub $0x8,%esp
565: 50 push %eax
566: ff 75 08 pushl 0x8(%ebp)
569: e8 3c ff ff ff call 4aa <putc>
56e: 83 c4 10 add $0x10,%esp
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
571: 83 6d f4 01 subl $0x1,-0xc(%ebp)
575: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
579: 79 d9 jns 554 <printint+0x87>
putc(fd, buf[i]);
}
57b: 90 nop
57c: 8b 5d fc mov -0x4(%ebp),%ebx
57f: c9 leave
580: c3 ret
00000581 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
581: 55 push %ebp
582: 89 e5 mov %esp,%ebp
584: 83 ec 28 sub $0x28,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
587: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
58e: 8d 45 0c lea 0xc(%ebp),%eax
591: 83 c0 04 add $0x4,%eax
594: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
597: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
59e: e9 59 01 00 00 jmp 6fc <printf+0x17b>
c = fmt[i] & 0xff;
5a3: 8b 55 0c mov 0xc(%ebp),%edx
5a6: 8b 45 f0 mov -0x10(%ebp),%eax
5a9: 01 d0 add %edx,%eax
5ab: 0f b6 00 movzbl (%eax),%eax
5ae: 0f be c0 movsbl %al,%eax
5b1: 25 ff 00 00 00 and $0xff,%eax
5b6: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
5b9: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
5bd: 75 2c jne 5eb <printf+0x6a>
if(c == '%'){
5bf: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
5c3: 75 0c jne 5d1 <printf+0x50>
state = '%';
5c5: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
5cc: e9 27 01 00 00 jmp 6f8 <printf+0x177>
} else {
putc(fd, c);
5d1: 8b 45 e4 mov -0x1c(%ebp),%eax
5d4: 0f be c0 movsbl %al,%eax
5d7: 83 ec 08 sub $0x8,%esp
5da: 50 push %eax
5db: ff 75 08 pushl 0x8(%ebp)
5de: e8 c7 fe ff ff call 4aa <putc>
5e3: 83 c4 10 add $0x10,%esp
5e6: e9 0d 01 00 00 jmp 6f8 <printf+0x177>
}
} else if(state == '%'){
5eb: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
5ef: 0f 85 03 01 00 00 jne 6f8 <printf+0x177>
if(c == 'd'){
5f5: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
5f9: 75 1e jne 619 <printf+0x98>
printint(fd, *ap, 10, 1);
5fb: 8b 45 e8 mov -0x18(%ebp),%eax
5fe: 8b 00 mov (%eax),%eax
600: 6a 01 push $0x1
602: 6a 0a push $0xa
604: 50 push %eax
605: ff 75 08 pushl 0x8(%ebp)
608: e8 c0 fe ff ff call 4cd <printint>
60d: 83 c4 10 add $0x10,%esp
ap++;
610: 83 45 e8 04 addl $0x4,-0x18(%ebp)
614: e9 d8 00 00 00 jmp 6f1 <printf+0x170>
} else if(c == 'x' || c == 'p'){
619: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
61d: 74 06 je 625 <printf+0xa4>
61f: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
623: 75 1e jne 643 <printf+0xc2>
printint(fd, *ap, 16, 0);
625: 8b 45 e8 mov -0x18(%ebp),%eax
628: 8b 00 mov (%eax),%eax
62a: 6a 00 push $0x0
62c: 6a 10 push $0x10
62e: 50 push %eax
62f: ff 75 08 pushl 0x8(%ebp)
632: e8 96 fe ff ff call 4cd <printint>
637: 83 c4 10 add $0x10,%esp
ap++;
63a: 83 45 e8 04 addl $0x4,-0x18(%ebp)
63e: e9 ae 00 00 00 jmp 6f1 <printf+0x170>
} else if(c == 's'){
643: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
647: 75 43 jne 68c <printf+0x10b>
s = (char*)*ap;
649: 8b 45 e8 mov -0x18(%ebp),%eax
64c: 8b 00 mov (%eax),%eax
64e: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
651: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
655: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
659: 75 25 jne 680 <printf+0xff>
s = "(null)";
65b: c7 45 f4 6e 09 00 00 movl $0x96e,-0xc(%ebp)
while(*s != 0){
662: eb 1c jmp 680 <printf+0xff>
putc(fd, *s);
664: 8b 45 f4 mov -0xc(%ebp),%eax
667: 0f b6 00 movzbl (%eax),%eax
66a: 0f be c0 movsbl %al,%eax
66d: 83 ec 08 sub $0x8,%esp
670: 50 push %eax
671: ff 75 08 pushl 0x8(%ebp)
674: e8 31 fe ff ff call 4aa <putc>
679: 83 c4 10 add $0x10,%esp
s++;
67c: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
680: 8b 45 f4 mov -0xc(%ebp),%eax
683: 0f b6 00 movzbl (%eax),%eax
686: 84 c0 test %al,%al
688: 75 da jne 664 <printf+0xe3>
68a: eb 65 jmp 6f1 <printf+0x170>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
68c: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
690: 75 1d jne 6af <printf+0x12e>
putc(fd, *ap);
692: 8b 45 e8 mov -0x18(%ebp),%eax
695: 8b 00 mov (%eax),%eax
697: 0f be c0 movsbl %al,%eax
69a: 83 ec 08 sub $0x8,%esp
69d: 50 push %eax
69e: ff 75 08 pushl 0x8(%ebp)
6a1: e8 04 fe ff ff call 4aa <putc>
6a6: 83 c4 10 add $0x10,%esp
ap++;
6a9: 83 45 e8 04 addl $0x4,-0x18(%ebp)
6ad: eb 42 jmp 6f1 <printf+0x170>
} else if(c == '%'){
6af: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
6b3: 75 17 jne 6cc <printf+0x14b>
putc(fd, c);
6b5: 8b 45 e4 mov -0x1c(%ebp),%eax
6b8: 0f be c0 movsbl %al,%eax
6bb: 83 ec 08 sub $0x8,%esp
6be: 50 push %eax
6bf: ff 75 08 pushl 0x8(%ebp)
6c2: e8 e3 fd ff ff call 4aa <putc>
6c7: 83 c4 10 add $0x10,%esp
6ca: eb 25 jmp 6f1 <printf+0x170>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
6cc: 83 ec 08 sub $0x8,%esp
6cf: 6a 25 push $0x25
6d1: ff 75 08 pushl 0x8(%ebp)
6d4: e8 d1 fd ff ff call 4aa <putc>
6d9: 83 c4 10 add $0x10,%esp
putc(fd, c);
6dc: 8b 45 e4 mov -0x1c(%ebp),%eax
6df: 0f be c0 movsbl %al,%eax
6e2: 83 ec 08 sub $0x8,%esp
6e5: 50 push %eax
6e6: ff 75 08 pushl 0x8(%ebp)
6e9: e8 bc fd ff ff call 4aa <putc>
6ee: 83 c4 10 add $0x10,%esp
}
state = 0;
6f1: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
6f8: 83 45 f0 01 addl $0x1,-0x10(%ebp)
6fc: 8b 55 0c mov 0xc(%ebp),%edx
6ff: 8b 45 f0 mov -0x10(%ebp),%eax
702: 01 d0 add %edx,%eax
704: 0f b6 00 movzbl (%eax),%eax
707: 84 c0 test %al,%al
709: 0f 85 94 fe ff ff jne 5a3 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
70f: 90 nop
710: c9 leave
711: c3 ret
00000712 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
712: 55 push %ebp
713: 89 e5 mov %esp,%ebp
715: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
718: 8b 45 08 mov 0x8(%ebp),%eax
71b: 83 e8 08 sub $0x8,%eax
71e: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
721: a1 f8 0b 00 00 mov 0xbf8,%eax
726: 89 45 fc mov %eax,-0x4(%ebp)
729: eb 24 jmp 74f <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
72b: 8b 45 fc mov -0x4(%ebp),%eax
72e: 8b 00 mov (%eax),%eax
730: 3b 45 fc cmp -0x4(%ebp),%eax
733: 77 12 ja 747 <free+0x35>
735: 8b 45 f8 mov -0x8(%ebp),%eax
738: 3b 45 fc cmp -0x4(%ebp),%eax
73b: 77 24 ja 761 <free+0x4f>
73d: 8b 45 fc mov -0x4(%ebp),%eax
740: 8b 00 mov (%eax),%eax
742: 3b 45 f8 cmp -0x8(%ebp),%eax
745: 77 1a ja 761 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
747: 8b 45 fc mov -0x4(%ebp),%eax
74a: 8b 00 mov (%eax),%eax
74c: 89 45 fc mov %eax,-0x4(%ebp)
74f: 8b 45 f8 mov -0x8(%ebp),%eax
752: 3b 45 fc cmp -0x4(%ebp),%eax
755: 76 d4 jbe 72b <free+0x19>
757: 8b 45 fc mov -0x4(%ebp),%eax
75a: 8b 00 mov (%eax),%eax
75c: 3b 45 f8 cmp -0x8(%ebp),%eax
75f: 76 ca jbe 72b <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
761: 8b 45 f8 mov -0x8(%ebp),%eax
764: 8b 40 04 mov 0x4(%eax),%eax
767: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
76e: 8b 45 f8 mov -0x8(%ebp),%eax
771: 01 c2 add %eax,%edx
773: 8b 45 fc mov -0x4(%ebp),%eax
776: 8b 00 mov (%eax),%eax
778: 39 c2 cmp %eax,%edx
77a: 75 24 jne 7a0 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
77c: 8b 45 f8 mov -0x8(%ebp),%eax
77f: 8b 50 04 mov 0x4(%eax),%edx
782: 8b 45 fc mov -0x4(%ebp),%eax
785: 8b 00 mov (%eax),%eax
787: 8b 40 04 mov 0x4(%eax),%eax
78a: 01 c2 add %eax,%edx
78c: 8b 45 f8 mov -0x8(%ebp),%eax
78f: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
792: 8b 45 fc mov -0x4(%ebp),%eax
795: 8b 00 mov (%eax),%eax
797: 8b 10 mov (%eax),%edx
799: 8b 45 f8 mov -0x8(%ebp),%eax
79c: 89 10 mov %edx,(%eax)
79e: eb 0a jmp 7aa <free+0x98>
} else
bp->s.ptr = p->s.ptr;
7a0: 8b 45 fc mov -0x4(%ebp),%eax
7a3: 8b 10 mov (%eax),%edx
7a5: 8b 45 f8 mov -0x8(%ebp),%eax
7a8: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
7aa: 8b 45 fc mov -0x4(%ebp),%eax
7ad: 8b 40 04 mov 0x4(%eax),%eax
7b0: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
7b7: 8b 45 fc mov -0x4(%ebp),%eax
7ba: 01 d0 add %edx,%eax
7bc: 3b 45 f8 cmp -0x8(%ebp),%eax
7bf: 75 20 jne 7e1 <free+0xcf>
p->s.size += bp->s.size;
7c1: 8b 45 fc mov -0x4(%ebp),%eax
7c4: 8b 50 04 mov 0x4(%eax),%edx
7c7: 8b 45 f8 mov -0x8(%ebp),%eax
7ca: 8b 40 04 mov 0x4(%eax),%eax
7cd: 01 c2 add %eax,%edx
7cf: 8b 45 fc mov -0x4(%ebp),%eax
7d2: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
7d5: 8b 45 f8 mov -0x8(%ebp),%eax
7d8: 8b 10 mov (%eax),%edx
7da: 8b 45 fc mov -0x4(%ebp),%eax
7dd: 89 10 mov %edx,(%eax)
7df: eb 08 jmp 7e9 <free+0xd7>
} else
p->s.ptr = bp;
7e1: 8b 45 fc mov -0x4(%ebp),%eax
7e4: 8b 55 f8 mov -0x8(%ebp),%edx
7e7: 89 10 mov %edx,(%eax)
freep = p;
7e9: 8b 45 fc mov -0x4(%ebp),%eax
7ec: a3 f8 0b 00 00 mov %eax,0xbf8
}
7f1: 90 nop
7f2: c9 leave
7f3: c3 ret
000007f4 <morecore>:
static Header*
morecore(uint nu)
{
7f4: 55 push %ebp
7f5: 89 e5 mov %esp,%ebp
7f7: 83 ec 18 sub $0x18,%esp
char *p;
Header *hp;
if(nu < 4096)
7fa: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
801: 77 07 ja 80a <morecore+0x16>
nu = 4096;
803: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
80a: 8b 45 08 mov 0x8(%ebp),%eax
80d: c1 e0 03 shl $0x3,%eax
810: 83 ec 0c sub $0xc,%esp
813: 50 push %eax
814: e8 49 fc ff ff call 462 <sbrk>
819: 83 c4 10 add $0x10,%esp
81c: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
81f: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
823: 75 07 jne 82c <morecore+0x38>
return 0;
825: b8 00 00 00 00 mov $0x0,%eax
82a: eb 26 jmp 852 <morecore+0x5e>
hp = (Header*)p;
82c: 8b 45 f4 mov -0xc(%ebp),%eax
82f: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
832: 8b 45 f0 mov -0x10(%ebp),%eax
835: 8b 55 08 mov 0x8(%ebp),%edx
838: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
83b: 8b 45 f0 mov -0x10(%ebp),%eax
83e: 83 c0 08 add $0x8,%eax
841: 83 ec 0c sub $0xc,%esp
844: 50 push %eax
845: e8 c8 fe ff ff call 712 <free>
84a: 83 c4 10 add $0x10,%esp
return freep;
84d: a1 f8 0b 00 00 mov 0xbf8,%eax
}
852: c9 leave
853: c3 ret
00000854 <malloc>:
void*
malloc(uint nbytes)
{
854: 55 push %ebp
855: 89 e5 mov %esp,%ebp
857: 83 ec 18 sub $0x18,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
85a: 8b 45 08 mov 0x8(%ebp),%eax
85d: 83 c0 07 add $0x7,%eax
860: c1 e8 03 shr $0x3,%eax
863: 83 c0 01 add $0x1,%eax
866: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
869: a1 f8 0b 00 00 mov 0xbf8,%eax
86e: 89 45 f0 mov %eax,-0x10(%ebp)
871: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
875: 75 23 jne 89a <malloc+0x46>
base.s.ptr = freep = prevp = &base;
877: c7 45 f0 f0 0b 00 00 movl $0xbf0,-0x10(%ebp)
87e: 8b 45 f0 mov -0x10(%ebp),%eax
881: a3 f8 0b 00 00 mov %eax,0xbf8
886: a1 f8 0b 00 00 mov 0xbf8,%eax
88b: a3 f0 0b 00 00 mov %eax,0xbf0
base.s.size = 0;
890: c7 05 f4 0b 00 00 00 movl $0x0,0xbf4
897: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
89a: 8b 45 f0 mov -0x10(%ebp),%eax
89d: 8b 00 mov (%eax),%eax
89f: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
8a2: 8b 45 f4 mov -0xc(%ebp),%eax
8a5: 8b 40 04 mov 0x4(%eax),%eax
8a8: 3b 45 ec cmp -0x14(%ebp),%eax
8ab: 72 4d jb 8fa <malloc+0xa6>
if(p->s.size == nunits)
8ad: 8b 45 f4 mov -0xc(%ebp),%eax
8b0: 8b 40 04 mov 0x4(%eax),%eax
8b3: 3b 45 ec cmp -0x14(%ebp),%eax
8b6: 75 0c jne 8c4 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
8b8: 8b 45 f4 mov -0xc(%ebp),%eax
8bb: 8b 10 mov (%eax),%edx
8bd: 8b 45 f0 mov -0x10(%ebp),%eax
8c0: 89 10 mov %edx,(%eax)
8c2: eb 26 jmp 8ea <malloc+0x96>
else {
p->s.size -= nunits;
8c4: 8b 45 f4 mov -0xc(%ebp),%eax
8c7: 8b 40 04 mov 0x4(%eax),%eax
8ca: 2b 45 ec sub -0x14(%ebp),%eax
8cd: 89 c2 mov %eax,%edx
8cf: 8b 45 f4 mov -0xc(%ebp),%eax
8d2: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
8d5: 8b 45 f4 mov -0xc(%ebp),%eax
8d8: 8b 40 04 mov 0x4(%eax),%eax
8db: c1 e0 03 shl $0x3,%eax
8de: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
8e1: 8b 45 f4 mov -0xc(%ebp),%eax
8e4: 8b 55 ec mov -0x14(%ebp),%edx
8e7: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
8ea: 8b 45 f0 mov -0x10(%ebp),%eax
8ed: a3 f8 0b 00 00 mov %eax,0xbf8
return (void*)(p + 1);
8f2: 8b 45 f4 mov -0xc(%ebp),%eax
8f5: 83 c0 08 add $0x8,%eax
8f8: eb 3b jmp 935 <malloc+0xe1>
}
if(p == freep)
8fa: a1 f8 0b 00 00 mov 0xbf8,%eax
8ff: 39 45 f4 cmp %eax,-0xc(%ebp)
902: 75 1e jne 922 <malloc+0xce>
if((p = morecore(nunits)) == 0)
904: 83 ec 0c sub $0xc,%esp
907: ff 75 ec pushl -0x14(%ebp)
90a: e8 e5 fe ff ff call 7f4 <morecore>
90f: 83 c4 10 add $0x10,%esp
912: 89 45 f4 mov %eax,-0xc(%ebp)
915: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
919: 75 07 jne 922 <malloc+0xce>
return 0;
91b: b8 00 00 00 00 mov $0x0,%eax
920: eb 13 jmp 935 <malloc+0xe1>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
922: 8b 45 f4 mov -0xc(%ebp),%eax
925: 89 45 f0 mov %eax,-0x10(%ebp)
928: 8b 45 f4 mov -0xc(%ebp),%eax
92b: 8b 00 mov (%eax),%eax
92d: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
930: e9 6d ff ff ff jmp 8a2 <malloc+0x4e>
}
935: c9 leave
936: c3 ret
| 33.912152 | 60 | 0.427597 |
b7c1c0b273f9d93205d0cc51d4887d9024801691 | 942 | asm | Assembly | programs/oeis/164/A164754.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/164/A164754.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/164/A164754.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A164754: Number of n X 2 1..4 arrays with all 1's connected, all 2's connected, all 3's connected, all 4's connected, 1 in the upper left corner, 2 in the upper right corner, 3 in the lower left corner, 4 in the lower right corner, and with no element having more than 2 neighbors with the same value.
; 1,8,25,50,83,124,173,230,295,368,449,538,635,740,853,974,1103,1240,1385,1538,1699,1868,2045,2230,2423,2624,2833,3050,3275,3508,3749,3998,4255,4520,4793,5074,5363,5660,5965,6278,6599,6928,7265,7610,7963,8324,8693,9070,9455,9848,10249,10658,11075,11500,11933,12374,12823,13280,13745,14218,14699,15188,15685,16190,16703,17224,17753,18290,18835,19388,19949,20518,21095,21680,22273,22874,23483,24100,24725,25358,25999,26648,27305,27970,28643,29324,30013,30710,31415,32128,32849,33578,34315,35060,35813,36574,37343,38120,38905
mov $1,$0
add $1,$0
add $1,1
mov $0,$1
mov $2,$1
pow $1,3
mul $1,2
sub $2,1
add $2,$0
div $1,$2
trn $1,3
add $1,1
| 58.875 | 522 | 0.753715 |
75959888849e4666926d9ff7063ffe3de6cc13d6 | 12,679 | nasm | Assembly | UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | NHellFire/linuxboot-edk2 | d7a09cb86a0416c099fa3a9e0fbe2c8f399b28de | [
"BSD-2-Clause"
] | 2 | 2018-09-05T02:46:11.000Z | 2020-04-14T08:38:31.000Z | UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | NHellFire/linuxboot-edk2 | d7a09cb86a0416c099fa3a9e0fbe2c8f399b28de | [
"BSD-2-Clause"
] | null | null | null | UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | NHellFire/linuxboot-edk2 | d7a09cb86a0416c099fa3a9e0fbe2c8f399b28de | [
"BSD-2-Clause"
] | null | null | null | ;------------------------------------------------------------------------------ ;
; Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php.
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; MpFuncs.nasm
;
; Abstract:
;
; This is the assembly code for MP support
;
;-------------------------------------------------------------------------------
%include "MpEqu.inc"
extern ASM_PFX(InitializeFloatingPointUnits)
DEFAULT REL
SECTION .text
;-------------------------------------------------------------------------------------
;RendezvousFunnelProc procedure follows. All APs execute their procedure. This
;procedure serializes all the AP processors through an Init sequence. It must be
;noted that APs arrive here very raw...ie: real mode, no stack.
;ALSO THIS PROCEDURE IS EXECUTED BY APs ONLY ON 16 BIT MODE. HENCE THIS PROC
;IS IN MACHINE CODE.
;-------------------------------------------------------------------------------------
global ASM_PFX(RendezvousFunnelProc)
ASM_PFX(RendezvousFunnelProc):
RendezvousFunnelProcStart:
; At this point CS = 0x(vv00) and ip= 0x0.
; Save BIST information to ebp firstly
BITS 16
mov ebp, eax ; Save BIST information
mov ax, cs
mov ds, ax
mov es, ax
mov ss, ax
xor ax, ax
mov fs, ax
mov gs, ax
mov si, BufferStartLocation
mov ebx, [si]
mov si, DataSegmentLocation
mov edx, [si]
;
; Get start address of 32-bit code in low memory (<1MB)
;
mov edi, ModeTransitionMemoryLocation
mov si, GdtrLocation
o32 lgdt [cs:si]
mov si, IdtrLocation
o32 lidt [cs:si]
;
; Switch to protected mode
;
mov eax, cr0 ; Get control register 0
or eax, 000000003h ; Set PE bit (bit #0) & MP
mov cr0, eax
; Switch to 32-bit code (>1MB)
o32 jmp far [cs:di]
;
; Following code must be copied to memory with type of EfiBootServicesCode.
; This is required if NX is enabled for EfiBootServicesCode of memory.
;
BITS 32
Flat32Start: ; protected mode entry point
mov ds, dx
mov es, dx
mov fs, dx
mov gs, dx
mov ss, dx
;
; Enable execute disable bit
;
mov esi, EnableExecuteDisableLocation
cmp byte [ebx + esi], 0
jz SkipEnableExecuteDisableBit
mov ecx, 0c0000080h ; EFER MSR number
rdmsr ; Read EFER
bts eax, 11 ; Enable Execute Disable Bit
wrmsr ; Write EFER
SkipEnableExecuteDisableBit:
;
; Enable PAE
;
mov eax, cr4
bts eax, 5
mov cr4, eax
;
; Load page table
;
mov esi, Cr3Location ; Save CR3 in ecx
mov ecx, [ebx + esi]
mov cr3, ecx ; Load CR3
;
; Enable long mode
;
mov ecx, 0c0000080h ; EFER MSR number
rdmsr ; Read EFER
bts eax, 8 ; Set LME=1
wrmsr ; Write EFER
;
; Enable paging
;
mov eax, cr0 ; Read CR0
bts eax, 31 ; Set PG=1
mov cr0, eax ; Write CR0
;
; Far jump to 64-bit code
;
mov edi, ModeHighMemoryLocation
add edi, ebx
jmp far [edi]
BITS 64
LongModeStart:
mov esi, ebx
lea edi, [esi + InitFlagLocation]
cmp qword [edi], 1 ; ApInitConfig
jnz GetApicId
; Increment the number of APs executing here as early as possible
; This is decremented in C code when AP is finished executing
mov edi, esi
add edi, NumApsExecutingLocation
lock inc dword [edi]
; AP init
mov edi, esi
add edi, LockLocation
mov rax, NotVacantFlag
TestLock:
xchg qword [edi], rax
cmp rax, NotVacantFlag
jz TestLock
lea ecx, [esi + ApIndexLocation]
inc dword [ecx]
mov ebx, [ecx]
Releaselock:
mov rax, VacantFlag
xchg qword [edi], rax
; program stack
mov edi, esi
add edi, StackSizeLocation
mov eax, dword [edi]
mov ecx, ebx
inc ecx
mul ecx ; EAX = StackSize * (CpuNumber + 1)
mov edi, esi
add edi, StackStartAddressLocation
add rax, qword [edi]
mov rsp, rax
jmp CProcedureInvoke
GetApicId:
mov eax, 0
cpuid
cmp eax, 0bh
jb NoX2Apic ; CPUID level below CPUID_EXTENDED_TOPOLOGY
mov eax, 0bh
xor ecx, ecx
cpuid
test ebx, 0ffffh
jz NoX2Apic ; CPUID.0BH:EBX[15:0] is zero
; Processor is x2APIC capable; 32-bit x2APIC ID is already in EDX
jmp GetProcessorNumber
NoX2Apic:
; Processor is not x2APIC capable, so get 8-bit APIC ID
mov eax, 1
cpuid
shr ebx, 24
mov edx, ebx
GetProcessorNumber:
;
; Get processor number for this AP
; Note that BSP may become an AP due to SwitchBsp()
;
xor ebx, ebx
lea eax, [esi + CpuInfoLocation]
mov edi, [eax]
GetNextProcNumber:
cmp dword [edi], edx ; APIC ID match?
jz ProgramStack
add edi, 20
inc ebx
jmp GetNextProcNumber
ProgramStack:
mov rsp, qword [edi + 12]
CProcedureInvoke:
push rbp ; Push BIST data at top of AP stack
xor rbp, rbp ; Clear ebp for call stack trace
push rbp
mov rbp, rsp
mov rax, qword [esi + InitializeFloatingPointUnitsAddress]
sub rsp, 20h
call rax ; Call assembly function to initialize FPU per UEFI spec
add rsp, 20h
mov edx, ebx ; edx is ApIndex
mov ecx, esi
add ecx, LockLocation ; rcx is address of exchange info data buffer
mov edi, esi
add edi, ApProcedureLocation
mov rax, qword [edi]
sub rsp, 20h
call rax ; Invoke C function
add rsp, 20h
jmp $ ; Should never reach here
RendezvousFunnelProcEnd:
;-------------------------------------------------------------------------------------
; AsmRelocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment, TopOfApStack, CountTofinish);
;-------------------------------------------------------------------------------------
global ASM_PFX(AsmRelocateApLoop)
ASM_PFX(AsmRelocateApLoop):
AsmRelocateApLoopStart:
mov rax, [rsp + 40] ; CountTofinish
lock dec dword [rax] ; (*CountTofinish)--
mov rsp, r9
push rcx
push rdx
lea rsi, [PmEntry] ; rsi <- The start address of transition code
push r8
push rsi
DB 0x48
retf
BITS 32
PmEntry:
mov eax, cr0
btr eax, 31 ; Clear CR0.PG
mov cr0, eax ; Disable paging and caches
mov ebx, edx ; Save EntryPoint to rbx, for rdmsr will overwrite rdx
mov ecx, 0xc0000080
rdmsr
and ah, ~ 1 ; Clear LME
wrmsr
mov eax, cr4
and al, ~ (1 << 5) ; Clear PAE
mov cr4, eax
pop edx
add esp, 4
pop ecx,
add esp, 4
cmp cl, 1 ; Check mwait-monitor support
jnz HltLoop
mov ebx, edx ; Save C-State to ebx
MwaitLoop:
mov eax, esp ; Set Monitor Address
xor ecx, ecx ; ecx = 0
xor edx, edx ; edx = 0
monitor
mov eax, ebx ; Mwait Cx, Target C-State per eax[7:4]
shl eax, 4
mwait
jmp MwaitLoop
HltLoop:
cli
hlt
jmp HltLoop
BITS 64
AsmRelocateApLoopEnd:
;-------------------------------------------------------------------------------------
; AsmGetAddressMap (&AddressMap);
;-------------------------------------------------------------------------------------
global ASM_PFX(AsmGetAddressMap)
ASM_PFX(AsmGetAddressMap):
lea rax, [ASM_PFX(RendezvousFunnelProc)]
mov qword [rcx], rax
mov qword [rcx + 8h], LongModeStart - RendezvousFunnelProcStart
mov qword [rcx + 10h], RendezvousFunnelProcEnd - RendezvousFunnelProcStart
lea rax, [ASM_PFX(AsmRelocateApLoop)]
mov qword [rcx + 18h], rax
mov qword [rcx + 20h], AsmRelocateApLoopEnd - AsmRelocateApLoopStart
mov qword [rcx + 28h], Flat32Start - RendezvousFunnelProcStart
ret
;-------------------------------------------------------------------------------------
;AsmExchangeRole procedure follows. This procedure executed by current BSP, that is
;about to become an AP. It switches its stack with the current AP.
;AsmExchangeRole (IN CPU_EXCHANGE_INFO *MyInfo, IN CPU_EXCHANGE_INFO *OthersInfo);
;-------------------------------------------------------------------------------------
global ASM_PFX(AsmExchangeRole)
ASM_PFX(AsmExchangeRole):
; DO NOT call other functions in this function, since 2 CPU may use 1 stack
; at the same time. If 1 CPU try to call a function, stack will be corrupted.
push rax
push rbx
push rcx
push rdx
push rsi
push rdi
push rbp
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
mov rax, cr0
push rax
mov rax, cr4
push rax
; rsi contains MyInfo pointer
mov rsi, rcx
; rdi contains OthersInfo pointer
mov rdi, rdx
;Store EFLAGS, GDTR and IDTR regiter to stack
pushfq
sgdt [rsi + 16]
sidt [rsi + 26]
; Store the its StackPointer
mov [rsi + 8], rsp
; update its switch state to STORED
mov byte [rsi], CPU_SWITCH_STATE_STORED
WaitForOtherStored:
; wait until the other CPU finish storing its state
cmp byte [rdi], CPU_SWITCH_STATE_STORED
jz OtherStored
pause
jmp WaitForOtherStored
OtherStored:
; Since another CPU already stored its state, load them
; load GDTR value
lgdt [rdi + 16]
; load IDTR value
lidt [rdi + 26]
; load its future StackPointer
mov rsp, [rdi + 8]
; update the other CPU's switch state to LOADED
mov byte [rdi], CPU_SWITCH_STATE_LOADED
WaitForOtherLoaded:
; wait until the other CPU finish loading new state,
; otherwise the data in stack may corrupt
cmp byte [rsi], CPU_SWITCH_STATE_LOADED
jz OtherLoaded
pause
jmp WaitForOtherLoaded
OtherLoaded:
; since the other CPU already get the data it want, leave this procedure
popfq
pop rax
mov cr4, rax
pop rax
mov cr0, rax
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rbp
pop rdi
pop rsi
pop rdx
pop rcx
pop rbx
pop rax
ret
| 29.762911 | 97 | 0.488367 |
eee8e73251fa740a57df93c7686ab2c4e971104b | 205,310 | asm | Assembly | Java/src/com/samuelyvon/BrainCramp/Compilation/nasm/out/mandelbrot.asm | SamuelYvon/BrainCramp | fe5ded5a395bca0b5bde671c49f65fbcbb069523 | [
"MIT"
] | 3 | 2017-05-01T10:42:59.000Z | 2019-12-11T15:09:58.000Z | Java/src/com/samuelyvon/BrainCramp/Compilation/nasm/out/mandelbrot.asm | SamuelYvon/BrainCramp | fe5ded5a395bca0b5bde671c49f65fbcbb069523 | [
"MIT"
] | null | null | null | Java/src/com/samuelyvon/BrainCramp/Compilation/nasm/out/mandelbrot.asm | SamuelYvon/BrainCramp | fe5ded5a395bca0b5bde671c49f65fbcbb069523 | [
"MIT"
] | null | null | null | section .data
buffer times 500 db 0
value db 0
section .text
global _start
_start:
mov ESI , 0
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 13
mov [buffer + ESI] , AH
loop_start_1:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 2
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 5
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 2
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1
loop_end_1:
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 6
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 3
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 10
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_19:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_19
loop_start_20:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_20
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_20
loop_end_20:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_24:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_24
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_24
loop_end_24:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_19
loop_end_19:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_31:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_31
; RIGHT
ADD ESI , 8
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_31
loop_end_31:
; LEFT
SUB ESI , 9
loop_start_37:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_37
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_37
loop_end_37:
; RIGHT
ADD ESI , 8
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 5
mov [buffer + ESI] , AH
loop_start_45:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_45
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_47:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_47
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_47
loop_end_47:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_45
loop_end_45:
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 27
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 17
loop_start_60:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_60
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_60
loop_end_60:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_66:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_66
; RIGHT
ADD ESI , 6
loop_start_68:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_68
; RIGHT
ADD ESI , 7
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_68
loop_end_68:
; LEFT
SUB ESI , 9
loop_start_74:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_74
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_74
loop_end_74:
; RIGHT
ADD ESI , 7
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 4
mov [buffer + ESI] , AH
loop_start_82:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_82
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_84:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_84
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_84
loop_end_84:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_82
loop_end_82:
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 7
mov [buffer + ESI] , AH
loop_start_96:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_96
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_98:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_98
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_98
loop_end_98:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_96
loop_end_96:
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 16
loop_start_109:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_109
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_109
loop_end_109:
; RIGHT
ADD ESI , 3
loop_start_113:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_113
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_116:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_116
; RIGHT
ADD ESI , 7
loop_start_118:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_118
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_118
loop_end_118:
; LEFT
SUB ESI , 6
loop_start_125:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_125
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_125
loop_end_125:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_116
loop_end_116:
; LEFT
SUB ESI , 9
loop_start_138:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_138
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_138
loop_end_138:
; RIGHT
ADD ESI , 9
loop_start_142:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_142
; RIGHT
ADD ESI , 8
loop_start_144:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_144
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_144
loop_end_144:
; LEFT
SUB ESI , 7
loop_start_151:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_151
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_151
loop_end_151:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_142
loop_end_142:
; LEFT
SUB ESI , 9
loop_start_164:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_164
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_164
loop_end_164:
; RIGHT
ADD ESI , 7
loop_start_168:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_168
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_168
loop_end_168:
; LEFT
SUB ESI , 7
loop_start_175:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_175
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_175
loop_end_175:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_185:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_185
loop_start_186:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_186
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_186
loop_end_186:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_209:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_209
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_209
loop_end_209:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_185
loop_end_185:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_216:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_216
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_216
loop_end_216:
; LEFT
SUB ESI , 9
loop_start_222:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_222
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_222
loop_end_222:
; RIGHT
ADD ESI , 9
loop_start_226:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_226
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_230:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_230
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_230
loop_end_230:
; LEFT
SUB ESI , 4
loop_start_237:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_237
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
loop_start_242:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_242
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_245:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_245
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_245
loop_end_245:
; LEFT
SUB ESI , 2
loop_start_252:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_252
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_252
loop_end_252:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_242
loop_end_242:
; LEFT
SUB ESI , 8
loop_start_264:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_264
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_264
loop_end_264:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_237
loop_end_237:
; RIGHT
ADD ESI , 9
loop_start_269:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_269
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_269
loop_end_269:
; LEFT
SUB ESI , 9
loop_start_273:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_273
; RIGHT
ADD ESI , 1
loop_start_275:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_275
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_275
loop_end_275:
; LEFT
SUB ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_273
loop_end_273:
; RIGHT
ADD ESI , 1
loop_start_284:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_284
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_284
loop_end_284:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_226
loop_end_226:
; LEFT
SUB ESI , 9
loop_start_295:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_295
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_301:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_301
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_306:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_306
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_306
loop_end_306:
; LEFT
SUB ESI , 1
loop_start_316:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_316
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_316
loop_end_316:
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_301
loop_end_301:
; LEFT
SUB ESI , 3
loop_start_325:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_325
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_325
loop_end_325:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_295
loop_end_295:
; RIGHT
ADD ESI , 9
loop_start_336:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_336
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_336
loop_end_336:
; LEFT
SUB ESI , 9
loop_start_342:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_342
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_342
loop_end_342:
; RIGHT
ADD ESI , 9
loop_start_346:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_346
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_350:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_350
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_350
loop_end_350:
; LEFT
SUB ESI , 5
loop_start_357:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_357
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_362:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_362
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
loop_start_365:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_365
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_365
loop_end_365:
; LEFT
SUB ESI , 3
loop_start_372:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_372
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_372
loop_end_372:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_362
loop_end_362:
; LEFT
SUB ESI , 8
loop_start_384:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_384
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_384
loop_end_384:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_357
loop_end_357:
; RIGHT
ADD ESI , 9
loop_start_389:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_389
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_389
loop_end_389:
; LEFT
SUB ESI , 9
loop_start_393:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_393
; RIGHT
ADD ESI , 2
loop_start_395:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_395
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_395
loop_end_395:
; LEFT
SUB ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_393
loop_end_393:
; RIGHT
ADD ESI , 2
loop_start_404:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_404
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_404
loop_end_404:
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_346
loop_end_346:
; LEFT
SUB ESI , 9
loop_start_415:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_415
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_421:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_421
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_426:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_426
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_426
loop_end_426:
; LEFT
SUB ESI , 1
loop_start_436:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_436
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_436
loop_end_436:
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_421
loop_end_421:
; LEFT
SUB ESI , 3
loop_start_445:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_445
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_445
loop_end_445:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_415
loop_end_415:
; RIGHT
ADD ESI , 9
loop_start_456:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_456
; RIGHT
ADD ESI , 4
loop_start_458:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_458
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 36
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 36
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_458
loop_end_458:
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_456
loop_end_456:
; LEFT
SUB ESI , 9
loop_start_467:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_467
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_467
loop_end_467:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_472:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_472
loop_start_473:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_473
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_473
loop_end_473:
; LEFT
SUB ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_479:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_479
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_479
loop_end_479:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_472
loop_end_472:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 21
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_489:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_489
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_489
loop_end_489:
; RIGHT
ADD ESI , 9
loop_start_493:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_493
; RIGHT
ADD ESI , 3
loop_start_495:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_495
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_495
loop_end_495:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_503:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_503
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_508:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_508
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_508
loop_end_508:
; LEFT
SUB ESI , 4
loop_start_515:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_515
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
loop_start_520:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_520
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_520
loop_end_520:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_527:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_527
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_527
loop_end_527:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_515
loop_end_515:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_503
loop_end_503:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_537:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_537
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_537
loop_end_537:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_545:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_545
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_550:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_550
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_550
loop_end_550:
; LEFT
SUB ESI , 3
loop_start_557:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_557
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 12
loop_start_562:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_562
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_562
loop_end_562:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_569:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_569
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_569
loop_end_569:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_557
loop_end_557:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_545
loop_end_545:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_580:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_580
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_583:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_583
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_583
loop_end_583:
; LEFT
SUB ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_580
loop_end_580:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_493
loop_end_493:
; LEFT
SUB ESI , 9
loop_start_591:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_591
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_591
loop_end_591:
; LEFT
SUB ESI , 7
loop_start_595:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_595
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_595
loop_end_595:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 26
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_606:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_606
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_606
loop_end_606:
; LEFT
SUB ESI , 4
loop_start_613:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_613
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_613
loop_end_613:
; RIGHT
ADD ESI , 2
loop_start_622:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_622
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_626:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_626
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_626
loop_end_626:
; RIGHT
ADD ESI , 1
loop_start_636:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_636
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_639:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_639
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_639
loop_end_639:
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_636
loop_end_636:
; RIGHT
ADD ESI , 13
loop_start_650:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_650
; RIGHT
ADD ESI , 2
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_650
loop_end_650:
; LEFT
SUB ESI , 9
loop_start_660:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_660
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_660
loop_end_660:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_666:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_666
; RIGHT
ADD ESI , 5
loop_start_668:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_668
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_668
loop_end_668:
; LEFT
SUB ESI , 4
loop_start_675:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_675
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_675
loop_end_675:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_666
loop_end_666:
; LEFT
SUB ESI , 9
loop_start_686:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_686
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_686
loop_end_686:
; RIGHT
ADD ESI , 9
loop_start_690:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_690
; RIGHT
ADD ESI , 2
loop_start_692:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_692
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_692
loop_end_692:
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_690
loop_end_690:
; LEFT
SUB ESI , 9
loop_start_701:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_701
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_701
loop_end_701:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_706:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_706
loop_start_707:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_707
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_707
loop_end_707:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_730:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_730
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_730
loop_end_730:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_706
loop_end_706:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_737:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_737
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_737
loop_end_737:
; LEFT
SUB ESI , 9
loop_start_743:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_743
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_743
loop_end_743:
; RIGHT
ADD ESI , 9
loop_start_747:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_747
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_751:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_751
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_751
loop_end_751:
; LEFT
SUB ESI , 5
loop_start_758:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_758
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_763:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_763
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_766:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_766
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_766
loop_end_766:
; LEFT
SUB ESI , 2
loop_start_773:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_773
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_773
loop_end_773:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_763
loop_end_763:
; LEFT
SUB ESI , 8
loop_start_785:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_785
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_785
loop_end_785:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_758
loop_end_758:
; RIGHT
ADD ESI , 9
loop_start_790:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_790
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_790
loop_end_790:
; LEFT
SUB ESI , 9
loop_start_794:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_794
; RIGHT
ADD ESI , 1
loop_start_796:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_796
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_796
loop_end_796:
; LEFT
SUB ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_794
loop_end_794:
; RIGHT
ADD ESI , 1
loop_start_805:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_805
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_805
loop_end_805:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_747
loop_end_747:
; LEFT
SUB ESI , 9
loop_start_816:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_816
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
loop_start_822:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_822
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_827:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_827
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_827
loop_end_827:
; LEFT
SUB ESI , 1
loop_start_837:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_837
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_837
loop_end_837:
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_822
loop_end_822:
; LEFT
SUB ESI , 2
loop_start_846:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_846
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_846
loop_end_846:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_816
loop_end_816:
; RIGHT
ADD ESI , 9
loop_start_857:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_857
; RIGHT
ADD ESI , 6
loop_start_859:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_859
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_859
loop_end_859:
; LEFT
SUB ESI , 5
loop_start_866:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_866
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_866
loop_end_866:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_857
loop_end_857:
; LEFT
SUB ESI , 9
loop_start_877:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_877
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_877
loop_end_877:
; RIGHT
ADD ESI , 9
loop_start_881:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_881
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_881
loop_end_881:
; LEFT
SUB ESI , 9
loop_start_887:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_887
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_887
loop_end_887:
; RIGHT
ADD ESI , 9
loop_start_891:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_891
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_895:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_895
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_895
loop_end_895:
; LEFT
SUB ESI , 5
loop_start_902:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_902
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_907:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_907
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_910:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_910
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_910
loop_end_910:
; LEFT
SUB ESI , 2
loop_start_917:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_917
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_917
loop_end_917:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_907
loop_end_907:
; LEFT
SUB ESI , 8
loop_start_929:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_929
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_929
loop_end_929:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_902
loop_end_902:
; RIGHT
ADD ESI , 9
loop_start_934:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_934
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_934
loop_end_934:
; LEFT
SUB ESI , 9
loop_start_938:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_938
; RIGHT
ADD ESI , 1
loop_start_940:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_940
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_940
loop_end_940:
; LEFT
SUB ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_938
loop_end_938:
; RIGHT
ADD ESI , 1
loop_start_949:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_949
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_949
loop_end_949:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_891
loop_end_891:
; LEFT
SUB ESI , 9
loop_start_960:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_960
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_966:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_966
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_971:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_971
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_971
loop_end_971:
; LEFT
SUB ESI , 1
loop_start_981:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_981
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_981
loop_end_981:
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_966
loop_end_966:
; LEFT
SUB ESI , 3
loop_start_990:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_990
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_990
loop_end_990:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_960
loop_end_960:
; RIGHT
ADD ESI , 9
loop_start_1001:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1001
; RIGHT
ADD ESI , 4
loop_start_1003:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1003
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 36
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 36
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1003
loop_end_1003:
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1001
loop_end_1001:
; LEFT
SUB ESI , 9
loop_start_1012:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1012
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1012
loop_end_1012:
; RIGHT
ADD ESI , 9
loop_start_1016:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1016
; RIGHT
ADD ESI , 3
loop_start_1018:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1018
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 36
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 36
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1018
loop_end_1018:
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1016
loop_end_1016:
; LEFT
SUB ESI , 9
loop_start_1027:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1027
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1027
loop_end_1027:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_1032:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1032
loop_start_1033:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1033
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1033
loop_end_1033:
; LEFT
SUB ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_1039:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1039
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1039
loop_end_1039:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1032
loop_end_1032:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_1046:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1046
; RIGHT
ADD ESI , 8
loop_start_1048:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1048
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1048
loop_end_1048:
; LEFT
SUB ESI , 7
loop_start_1055:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1055
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1055
loop_end_1055:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1046
loop_end_1046:
; LEFT
SUB ESI , 9
loop_start_1066:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1066
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1066
loop_end_1066:
; RIGHT
ADD ESI , 9
loop_start_1070:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1070
; RIGHT
ADD ESI , 6
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1070
loop_end_1070:
; LEFT
SUB ESI , 9
loop_start_1076:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1076
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1076
loop_end_1076:
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1082:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1082
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1082
loop_end_1082:
; RIGHT
ADD ESI , 1
loop_start_1091:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1091
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_1094:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1094
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 2
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1094
loop_end_1094:
; RIGHT
ADD ESI , 5
loop_start_1103:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1103
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1103
loop_end_1103:
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1091
loop_end_1091:
; LEFT
SUB ESI , 1
loop_start_1116:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1116
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1116
loop_end_1116:
; LEFT
SUB ESI , 5
loop_start_1123:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1123
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1123
loop_end_1123:
; RIGHT
ADD ESI , 6
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_1134:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1134
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1134
loop_end_1134:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_1142:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1142
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_1147:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1147
; RIGHT
ADD ESI , 2
loop_start_1149:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1149
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1149
loop_end_1149:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_1157:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1157
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1162:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1162
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1162
loop_end_1162:
; LEFT
SUB ESI , 3
loop_start_1169:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1169
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 12
loop_start_1174:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1174
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1174
loop_end_1174:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_1181:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1181
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1181
loop_end_1181:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1169
loop_end_1169:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1157
loop_end_1157:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
loop_start_1191:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1191
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1191
loop_end_1191:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_1199:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1199
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1204:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1204
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1204
loop_end_1204:
; LEFT
SUB ESI , 2
loop_start_1211:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1211
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 11
loop_start_1216:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1216
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1216
loop_end_1216:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_1223:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1223
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1223
loop_end_1223:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1211
loop_end_1211:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1199
loop_end_1199:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1234:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1234
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1237:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1237
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1237
loop_end_1237:
; LEFT
SUB ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1234
loop_end_1234:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1147
loop_end_1147:
; LEFT
SUB ESI , 9
loop_start_1245:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1245
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1245
loop_end_1245:
; RIGHT
ADD ESI , 4
loop_start_1249:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1249
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1249
loop_end_1249:
; LEFT
SUB ESI , 4
loop_start_1256:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1256
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_1261:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1261
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_1265:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1265
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1265
loop_end_1265:
; LEFT
SUB ESI , 2
loop_start_1272:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1272
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1272
loop_end_1272:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1261
loop_end_1261:
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1283:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1283
; RIGHT
ADD ESI , 1
loop_start_1285:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1285
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_1290:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1290
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
loop_start_1297:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1297
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1297
loop_end_1297:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1290
loop_end_1290:
; RIGHT
ADD ESI , 1
loop_start_1306:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1306
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1306
loop_end_1306:
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1285
loop_end_1285:
; RIGHT
ADD ESI , 1
loop_start_1317:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1317
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_1322:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1322
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1322
loop_end_1322:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1317
loop_end_1317:
; RIGHT
ADD ESI , 1
loop_start_1333:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1333
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1333
loop_end_1333:
; LEFT
SUB ESI , 12
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1283
loop_end_1283:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1256
loop_end_1256:
; RIGHT
ADD ESI , 3
loop_start_1346:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1346
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1346
loop_end_1346:
; LEFT
SUB ESI , 3
loop_start_1353:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1353
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_1358:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1358
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1362:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1362
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1362
loop_end_1362:
; LEFT
SUB ESI , 1
loop_start_1369:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1369
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1369
loop_end_1369:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1358
loop_end_1358:
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1380:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1380
; RIGHT
ADD ESI , 1
loop_start_1382:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1382
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_1387:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1387
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 10
loop_start_1394:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1394
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1394
loop_end_1394:
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1387
loop_end_1387:
; LEFT
SUB ESI , 1
loop_start_1403:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1403
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1403
loop_end_1403:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1382
loop_end_1382:
; RIGHT
ADD ESI , 2
loop_start_1414:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1414
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_1419:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1419
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1419
loop_end_1419:
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1414
loop_end_1414:
; LEFT
SUB ESI , 1
loop_start_1430:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1430
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1430
loop_end_1430:
; LEFT
SUB ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1380
loop_end_1380:
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1353
loop_end_1353:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1142
loop_end_1142:
; RIGHT
ADD ESI , 4
loop_start_1444:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1444
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1444
loop_end_1444:
; LEFT
SUB ESI , 4
loop_start_1451:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1451
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_1456:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1456
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1456
loop_end_1456:
; LEFT
SUB ESI , 9
loop_start_1460:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1460
; RIGHT
ADD ESI , 1
loop_start_1462:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1462
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_1467:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1467
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
loop_start_1474:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1474
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1474
loop_end_1474:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1467
loop_end_1467:
; RIGHT
ADD ESI , 1
loop_start_1483:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1483
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1483
loop_end_1483:
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1462
loop_end_1462:
; RIGHT
ADD ESI , 1
loop_start_1494:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1494
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_1499:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1499
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1499
loop_end_1499:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1494
loop_end_1494:
; RIGHT
ADD ESI , 1
loop_start_1510:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1510
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1510
loop_end_1510:
; LEFT
SUB ESI , 12
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1460
loop_end_1460:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1451
loop_end_1451:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_1526:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1526
; RIGHT
ADD ESI , 2
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1526
loop_end_1526:
; LEFT
SUB ESI , 9
loop_start_1534:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1534
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1534
loop_end_1534:
; RIGHT
ADD ESI , 9
loop_start_1538:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1538
; RIGHT
ADD ESI , 5
loop_start_1540:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1540
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1540
loop_end_1540:
; LEFT
SUB ESI , 4
loop_start_1547:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1547
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1547
loop_end_1547:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1538
loop_end_1538:
; LEFT
SUB ESI , 9
loop_start_1558:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1558
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1558
loop_end_1558:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_1563:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1563
loop_start_1564:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1564
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1564
loop_end_1564:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_1587:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1587
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1587
loop_end_1587:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1563
loop_end_1563:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_1594:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1594
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1594
loop_end_1594:
; LEFT
SUB ESI , 9
loop_start_1600:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1600
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1600
loop_end_1600:
; RIGHT
ADD ESI , 9
loop_start_1604:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1604
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_1608:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1608
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1608
loop_end_1608:
; LEFT
SUB ESI , 4
loop_start_1615:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1615
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
loop_start_1620:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1620
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_1623:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1623
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1623
loop_end_1623:
; LEFT
SUB ESI , 2
loop_start_1630:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1630
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1630
loop_end_1630:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1620
loop_end_1620:
; LEFT
SUB ESI , 8
loop_start_1642:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1642
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1642
loop_end_1642:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1615
loop_end_1615:
; RIGHT
ADD ESI , 9
loop_start_1647:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1647
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1647
loop_end_1647:
; LEFT
SUB ESI , 9
loop_start_1651:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1651
; RIGHT
ADD ESI , 1
loop_start_1653:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1653
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1653
loop_end_1653:
; LEFT
SUB ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1651
loop_end_1651:
; RIGHT
ADD ESI , 1
loop_start_1662:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1662
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1662
loop_end_1662:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1604
loop_end_1604:
; LEFT
SUB ESI , 9
loop_start_1673:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1673
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
loop_start_1679:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1679
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1684:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1684
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1684
loop_end_1684:
; LEFT
SUB ESI , 1
loop_start_1694:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1694
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1694
loop_end_1694:
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1679
loop_end_1679:
; LEFT
SUB ESI , 2
loop_start_1703:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1703
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1703
loop_end_1703:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1673
loop_end_1673:
; RIGHT
ADD ESI , 9
loop_start_1714:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1714
; RIGHT
ADD ESI , 3
loop_start_1716:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1716
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 36
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 36
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1716
loop_end_1716:
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1714
loop_end_1714:
; LEFT
SUB ESI , 9
loop_start_1725:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1725
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1725
loop_end_1725:
; RIGHT
ADD ESI , 5
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_1732:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1732
loop_start_1733:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1733
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1733
loop_end_1733:
; LEFT
SUB ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_1739:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1739
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1739
loop_end_1739:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1732
loop_end_1732:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_1746:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1746
; RIGHT
ADD ESI , 3
loop_start_1748:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1748
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1748
loop_end_1748:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_1756:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1756
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1761:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1761
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1761
loop_end_1761:
; LEFT
SUB ESI , 4
loop_start_1768:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1768
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
loop_start_1773:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1773
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1773
loop_end_1773:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_1780:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1780
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1780
loop_end_1780:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1768
loop_end_1768:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1756
loop_end_1756:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_1790:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1790
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1790
loop_end_1790:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_1798:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1798
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1803:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1803
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1803
loop_end_1803:
; LEFT
SUB ESI , 3
loop_start_1810:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1810
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 12
loop_start_1815:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1815
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1815
loop_end_1815:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_1822:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1822
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1822
loop_end_1822:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1810
loop_end_1810:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1798
loop_end_1798:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1833:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1833
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1836:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1836
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1836
loop_end_1836:
; LEFT
SUB ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1833
loop_end_1833:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1746
loop_end_1746:
; LEFT
SUB ESI , 9
loop_start_1844:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1844
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1844
loop_end_1844:
; RIGHT
ADD ESI , 3
loop_start_1848:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1848
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1848
loop_end_1848:
; LEFT
SUB ESI , 3
loop_start_1855:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1855
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_1860:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1860
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
loop_start_1864:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1864
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1864
loop_end_1864:
; LEFT
SUB ESI , 3
loop_start_1871:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1871
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1871
loop_end_1871:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1860
loop_end_1860:
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1882:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1882
; RIGHT
ADD ESI , 1
loop_start_1884:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1884
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_1889:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1889
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 10
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 12
loop_start_1896:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1896
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1896
loop_end_1896:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1889
loop_end_1889:
; RIGHT
ADD ESI , 1
loop_start_1905:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1905
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 10
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 12
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1905
loop_end_1905:
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1884
loop_end_1884:
; RIGHT
ADD ESI , 2
loop_start_1916:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1916
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_1921:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1921
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 10
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 12
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1921
loop_end_1921:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1916
loop_end_1916:
; RIGHT
ADD ESI , 1
loop_start_1932:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1932
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1932
loop_end_1932:
; LEFT
SUB ESI , 13
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1882
loop_end_1882:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1855
loop_end_1855:
; RIGHT
ADD ESI , 4
loop_start_1942:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1942
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1942
loop_end_1942:
; LEFT
SUB ESI , 4
loop_start_1949:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1949
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_1954:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1954
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_1958:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1958
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1958
loop_end_1958:
; LEFT
SUB ESI , 2
loop_start_1965:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1965
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1965
loop_end_1965:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1954
loop_end_1954:
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_1976:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1976
; RIGHT
ADD ESI , 1
loop_start_1978:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1978
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_1983:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1983
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 10
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
loop_start_1990:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1990
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1990
loop_end_1990:
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1983
loop_end_1983:
; LEFT
SUB ESI , 1
loop_start_1999:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_1999
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 10
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1999
loop_end_1999:
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1978
loop_end_1978:
; RIGHT
ADD ESI , 3
loop_start_2010:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2010
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2015:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2015
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 10
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2015
loop_end_2015:
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2010
loop_end_2010:
; LEFT
SUB ESI , 1
loop_start_2026:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2026
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2026
loop_end_2026:
; LEFT
SUB ESI , 12
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1976
loop_end_1976:
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_1949
loop_end_1949:
; RIGHT
ADD ESI , 9
loop_start_2039:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2039
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2039
loop_end_2039:
; LEFT
SUB ESI , 9
loop_start_2049:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2049
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2049
loop_end_2049:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_2057:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2057
; RIGHT
ADD ESI , 7
loop_start_2059:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2059
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2059
loop_end_2059:
; LEFT
SUB ESI , 6
loop_start_2066:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2066
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2066
loop_end_2066:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2057
loop_end_2057:
; LEFT
SUB ESI , 9
loop_start_2077:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2077
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2077
loop_end_2077:
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2083:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2083
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2083
loop_end_2083:
; RIGHT
ADD ESI , 2
loop_start_2092:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2092
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
loop_start_2095:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2095
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 2
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2095
loop_end_2095:
; RIGHT
ADD ESI , 5
loop_start_2104:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2104
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2104
loop_end_2104:
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2092
loop_end_2092:
; LEFT
SUB ESI , 2
loop_start_2117:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2117
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2117
loop_end_2117:
; LEFT
SUB ESI , 5
loop_start_2124:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2124
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2124
loop_end_2124:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_2132:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2132
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2132
loop_end_2132:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_2140:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2140
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_2145:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2145
; RIGHT
ADD ESI , 3
loop_start_2147:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2147
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2147
loop_end_2147:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_2155:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2155
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_2160:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2160
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2160
loop_end_2160:
; LEFT
SUB ESI , 2
loop_start_2167:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2167
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 11
loop_start_2172:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2172
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2172
loop_end_2172:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_2179:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2179
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2179
loop_end_2179:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2167
loop_end_2167:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2155
loop_end_2155:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_2189:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2189
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2189
loop_end_2189:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_2197:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2197
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2202:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2202
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2202
loop_end_2202:
; LEFT
SUB ESI , 3
loop_start_2209:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2209
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 12
loop_start_2214:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2214
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2214
loop_end_2214:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_2221:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2221
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2221
loop_end_2221:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2209
loop_end_2209:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2197
loop_end_2197:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2232:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2232
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_2235:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2235
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2235
loop_end_2235:
; LEFT
SUB ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2232
loop_end_2232:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2145
loop_end_2145:
; LEFT
SUB ESI , 9
loop_start_2243:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2243
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2243
loop_end_2243:
; RIGHT
ADD ESI , 3
loop_start_2247:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2247
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2247
loop_end_2247:
; LEFT
SUB ESI , 3
loop_start_2254:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2254
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_2259:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2259
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2263:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2263
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2263
loop_end_2263:
; LEFT
SUB ESI , 1
loop_start_2270:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2270
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2270
loop_end_2270:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2259
loop_end_2259:
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_2281:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2281
; RIGHT
ADD ESI , 1
loop_start_2283:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2283
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_2288:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2288
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 10
loop_start_2295:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2295
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2295
loop_end_2295:
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2288
loop_end_2288:
; LEFT
SUB ESI , 1
loop_start_2304:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2304
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2304
loop_end_2304:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2283
loop_end_2283:
; RIGHT
ADD ESI , 2
loop_start_2315:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2315
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_2320:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2320
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2320
loop_end_2320:
; RIGHT
ADD ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2315
loop_end_2315:
; LEFT
SUB ESI , 1
loop_start_2331:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2331
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2331
loop_end_2331:
; LEFT
SUB ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2281
loop_end_2281:
; RIGHT
ADD ESI , 5
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_2342:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2342
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2342
loop_end_2342:
; LEFT
SUB ESI , 7
loop_start_2349:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2349
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2349
loop_end_2349:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2254
loop_end_2254:
; RIGHT
ADD ESI , 4
loop_start_2359:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2359
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2359
loop_end_2359:
; LEFT
SUB ESI , 4
loop_start_2366:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2366
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_2371:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2371
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_2375:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2375
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2375
loop_end_2375:
; LEFT
SUB ESI , 2
loop_start_2382:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2382
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2382
loop_end_2382:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2371
loop_end_2371:
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_2393:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2393
; RIGHT
ADD ESI , 1
loop_start_2395:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2395
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_2400:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2400
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
loop_start_2407:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2407
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2407
loop_end_2407:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2400
loop_end_2400:
; RIGHT
ADD ESI , 1
loop_start_2416:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2416
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2416
loop_end_2416:
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2395
loop_end_2395:
; RIGHT
ADD ESI , 1
loop_start_2427:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2427
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_2432:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2432
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2432
loop_end_2432:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2427
loop_end_2427:
; RIGHT
ADD ESI , 1
loop_start_2443:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2443
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2443
loop_end_2443:
; LEFT
SUB ESI , 12
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2393
loop_end_2393:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2366
loop_end_2366:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2140
loop_end_2140:
; RIGHT
ADD ESI , 4
loop_start_2457:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2457
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2457
loop_end_2457:
; LEFT
SUB ESI , 4
loop_start_2464:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2464
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_2471:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2471
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2471
loop_end_2471:
; LEFT
SUB ESI , 7
loop_start_2478:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2478
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2478
loop_end_2478:
; RIGHT
ADD ESI , 9
loop_start_2487:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2487
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2487
loop_end_2487:
; LEFT
SUB ESI , 9
loop_start_2491:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2491
; RIGHT
ADD ESI , 1
loop_start_2493:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2493
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_2498:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2498
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
loop_start_2505:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2505
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2505
loop_end_2505:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2498
loop_end_2498:
; RIGHT
ADD ESI , 1
loop_start_2514:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2514
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2514
loop_end_2514:
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2493
loop_end_2493:
; RIGHT
ADD ESI , 1
loop_start_2525:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2525
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_2530:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2530
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2530
loop_end_2530:
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2525
loop_end_2525:
; RIGHT
ADD ESI , 1
loop_start_2541:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2541
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2541
loop_end_2541:
; LEFT
SUB ESI , 12
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2491
loop_end_2491:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2464
loop_end_2464:
; RIGHT
ADD ESI , 9
loop_start_2551:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2551
; RIGHT
ADD ESI , 2
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2551
loop_end_2551:
; LEFT
SUB ESI , 9
loop_start_2559:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2559
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2559
loop_end_2559:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_2567:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2567
; RIGHT
ADD ESI , 5
loop_start_2569:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2569
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2569
loop_end_2569:
; LEFT
SUB ESI , 4
loop_start_2576:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2576
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2576
loop_end_2576:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2567
loop_end_2567:
; LEFT
SUB ESI , 9
loop_start_2587:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2587
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2587
loop_end_2587:
; RIGHT
ADD ESI , 9
loop_start_2591:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2591
; RIGHT
ADD ESI , 6
loop_start_2593:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2593
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2593
loop_end_2593:
; LEFT
SUB ESI , 5
loop_start_2600:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2600
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2600
loop_end_2600:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2591
loop_end_2591:
; LEFT
SUB ESI , 9
loop_start_2611:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2611
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2611
loop_end_2611:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_2616:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2616
loop_start_2617:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2617
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2617
loop_end_2617:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_2640:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2640
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2640
loop_end_2640:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2616
loop_end_2616:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
loop_start_2647:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2647
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2647
loop_end_2647:
; LEFT
SUB ESI , 9
loop_start_2653:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2653
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2653
loop_end_2653:
; RIGHT
ADD ESI , 9
loop_start_2657:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2657
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_2661:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2661
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2661
loop_end_2661:
; LEFT
SUB ESI , 4
loop_start_2668:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2668
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
loop_start_2673:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2673
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_2676:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2676
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2676
loop_end_2676:
; LEFT
SUB ESI , 2
loop_start_2683:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2683
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2683
loop_end_2683:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2673
loop_end_2673:
; LEFT
SUB ESI , 8
loop_start_2695:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2695
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2695
loop_end_2695:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2668
loop_end_2668:
; RIGHT
ADD ESI , 9
loop_start_2700:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2700
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2700
loop_end_2700:
; LEFT
SUB ESI , 9
loop_start_2704:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2704
; RIGHT
ADD ESI , 1
loop_start_2706:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2706
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2706
loop_end_2706:
; LEFT
SUB ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2704
loop_end_2704:
; RIGHT
ADD ESI , 1
loop_start_2715:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2715
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2715
loop_end_2715:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2657
loop_end_2657:
; LEFT
SUB ESI , 9
loop_start_2726:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2726
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_2732:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2732
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2737:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2737
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2737
loop_end_2737:
; LEFT
SUB ESI , 1
loop_start_2747:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2747
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2747
loop_end_2747:
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2732
loop_end_2732:
; LEFT
SUB ESI , 3
loop_start_2756:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2756
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2756
loop_end_2756:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2726
loop_end_2726:
; RIGHT
ADD ESI , 9
loop_start_2767:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2767
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2767
loop_end_2767:
; LEFT
SUB ESI , 9
loop_start_2773:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2773
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2773
loop_end_2773:
; RIGHT
ADD ESI , 9
loop_start_2777:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2777
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_2781:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2781
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2781
loop_end_2781:
; LEFT
SUB ESI , 5
loop_start_2788:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2788
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_2793:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2793
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
loop_start_2796:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2796
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2796
loop_end_2796:
; LEFT
SUB ESI , 3
loop_start_2803:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2803
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2803
loop_end_2803:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2793
loop_end_2793:
; LEFT
SUB ESI , 8
loop_start_2815:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2815
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2815
loop_end_2815:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2788
loop_end_2788:
; RIGHT
ADD ESI , 9
loop_start_2820:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2820
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2820
loop_end_2820:
; LEFT
SUB ESI , 9
loop_start_2824:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2824
; RIGHT
ADD ESI , 2
loop_start_2826:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2826
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2826
loop_end_2826:
; LEFT
SUB ESI , 11
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2824
loop_end_2824:
; RIGHT
ADD ESI , 2
loop_start_2835:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2835
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2835
loop_end_2835:
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2777
loop_end_2777:
; LEFT
SUB ESI , 9
loop_start_2846:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2846
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_2852:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2852
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2857:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2857
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2857
loop_end_2857:
; LEFT
SUB ESI , 1
loop_start_2867:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2867
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2867
loop_end_2867:
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2852
loop_end_2852:
; LEFT
SUB ESI , 3
loop_start_2876:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2876
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2876
loop_end_2876:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2846
loop_end_2846:
; RIGHT
ADD ESI , 9
loop_start_2887:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2887
; RIGHT
ADD ESI , 4
loop_start_2889:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2889
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 36
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 36
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2889
loop_end_2889:
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2887
loop_end_2887:
; LEFT
SUB ESI , 9
loop_start_2898:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2898
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2898
loop_end_2898:
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 15
mov [buffer + ESI] , AH
loop_start_2903:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2903
loop_start_2904:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2904
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2904
loop_end_2904:
; LEFT
SUB ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
loop_start_2910:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2910
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2910
loop_end_2910:
; RIGHT
ADD ESI , 9
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2903
loop_end_2903:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 21
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_2920:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2920
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2920
loop_end_2920:
; RIGHT
ADD ESI , 9
loop_start_2924:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2924
; RIGHT
ADD ESI , 3
loop_start_2926:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2926
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2926
loop_end_2926:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
loop_start_2934:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2934
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_2939:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2939
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2939
loop_end_2939:
; LEFT
SUB ESI , 4
loop_start_2946:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2946
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 13
loop_start_2951:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2951
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2951
loop_end_2951:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_2958:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2958
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2958
loop_end_2958:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2946
loop_end_2946:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2934
loop_end_2934:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_2968:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2968
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2968
loop_end_2968:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_2976:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2976
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_2981:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2981
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2981
loop_end_2981:
; LEFT
SUB ESI , 3
loop_start_2988:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2988
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 12
loop_start_2993:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_2993
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2993
loop_end_2993:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_3000:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3000
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3000
loop_end_3000:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2988
loop_end_2988:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2976
loop_end_2976:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3011:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3011
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_3014:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3014
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3014
loop_end_3014:
; LEFT
SUB ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3011
loop_end_3011:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_2924
loop_end_2924:
; LEFT
SUB ESI , 9
loop_start_3022:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3022
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3022
loop_end_3022:
; RIGHT
ADD ESI , 2
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_3028:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3028
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3028
loop_end_3028:
; LEFT
SUB ESI , 4
loop_start_3035:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3035
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3035
loop_end_3035:
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_622
loop_end_622:
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_3048:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3048
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3048
loop_end_3048:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
loop_start_3056:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3056
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PRINT TO STDOUT
mov AH , [buffer + ESI]
mov [value] , AH
mov EAX , 4
mov EBX , 1
mov ECX , value
mov EDX , 1
int 0x80
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3056
loop_end_3056:
; RIGHT
ADD ESI , 4
loop_start_3065:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3065
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PRINT TO STDOUT
mov AH , [buffer + ESI]
mov [value] , AH
mov EAX , 4
mov EBX , 1
mov ECX , value
mov EDX , 1
int 0x80
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3065
loop_end_3065:
; LEFT
SUB ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
loop_start_3084:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3084
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3084
loop_end_3084:
; LEFT
SUB ESI , 9
loop_start_3100:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3100
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3100
loop_end_3100:
; RIGHT
ADD ESI , 9
loop_start_3104:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3104
; RIGHT
ADD ESI , 5
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3104
loop_end_3104:
; LEFT
SUB ESI , 9
loop_start_3110:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3110
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3110
loop_end_3110:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 11
mov [buffer + ESI] , AH
loop_start_3115:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3115
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_3117:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3117
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3117
loop_end_3117:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3115
loop_end_3115:
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
loop_start_3130:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3130
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3130
loop_end_3130:
; RIGHT
ADD ESI , 7
loop_start_3134:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3134
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3134
loop_end_3134:
; LEFT
SUB ESI , 7
loop_start_3141:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3141
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_3147:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3147
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3147
loop_end_3147:
; LEFT
SUB ESI , 9
loop_start_3151:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3151
; RIGHT
ADD ESI , 7
loop_start_3153:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3153
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3153
loop_end_3153:
; LEFT
SUB ESI , 6
loop_start_3160:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3160
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
loop_start_3165:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3165
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3165
loop_end_3165:
; RIGHT
ADD ESI , 7
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3160
loop_end_3160:
; LEFT
SUB ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3151
loop_end_3151:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3141
loop_end_3141:
; RIGHT
ADD ESI , 7
loop_start_3177:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3177
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3177
loop_end_3177:
; LEFT
SUB ESI , 7
loop_start_3184:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3184
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_3189:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3189
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
loop_start_3193:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3193
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3193
loop_end_3193:
; LEFT
SUB ESI , 4
loop_start_3200:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3200
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3200
loop_end_3200:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3189
loop_end_3189:
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
loop_start_3211:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3211
; RIGHT
ADD ESI , 5
loop_start_3213:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3213
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3213
loop_end_3213:
; LEFT
SUB ESI , 14
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3211
loop_end_3211:
; RIGHT
ADD ESI , 9
loop_start_3222:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3222
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3222
loop_end_3222:
; LEFT
SUB ESI , 9
loop_start_3226:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3226
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
loop_start_3232:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3232
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3237:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3237
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3237
loop_end_3237:
; LEFT
SUB ESI , 1
loop_start_3247:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3247
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3247
loop_end_3247:
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3232
loop_end_3232:
; LEFT
SUB ESI , 6
loop_start_3256:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3256
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3256
loop_end_3256:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3226
loop_end_3226:
; RIGHT
ADD ESI , 7
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3184
loop_end_3184:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
loop_start_3275:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3275
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3275
loop_end_3275:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
loop_start_3283:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3283
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_3288:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3288
; RIGHT
ADD ESI , 5
loop_start_3290:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3290
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3290
loop_end_3290:
; RIGHT
ADD ESI , 4
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3288
loop_end_3288:
; LEFT
SUB ESI , 9
loop_start_3299:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3299
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
loop_start_3305:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3305
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3310:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3310
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3310
loop_end_3310:
; LEFT
SUB ESI , 1
loop_start_3320:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3320
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3320
loop_end_3320:
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3305
loop_end_3305:
; LEFT
SUB ESI , 6
loop_start_3329:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3329
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3329
loop_end_3329:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3299
loop_end_3299:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 5
mov [buffer + ESI] , AH
loop_start_3341:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3341
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_3343:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3343
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3343
loop_end_3343:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3341
loop_end_3341:
; RIGHT
ADD ESI , 4
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
loop_start_3354:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3354
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3354
loop_end_3354:
; RIGHT
ADD ESI , 9
loop_start_3358:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3358
; RIGHT
ADD ESI , 5
loop_start_3360:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3360
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3360
loop_end_3360:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
loop_start_3368:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3368
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_3373:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3373
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3373
loop_end_3373:
; LEFT
SUB ESI , 7
loop_start_3380:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3380
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 16
loop_start_3385:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3385
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3385
loop_end_3385:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_3392:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3392
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3392
loop_end_3392:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3380
loop_end_3380:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3368
loop_end_3368:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
loop_start_3402:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3402
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3402
loop_end_3402:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
loop_start_3410:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3410
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_3415:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3415
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3415
loop_end_3415:
; LEFT
SUB ESI , 5
loop_start_3422:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3422
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 14
loop_start_3427:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3427
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3427
loop_end_3427:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_3434:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3434
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3434
loop_end_3434:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3422
loop_end_3422:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3410
loop_end_3410:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3445:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3445
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_3448:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3448
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3448
loop_end_3448:
; LEFT
SUB ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3445
loop_end_3445:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3358
loop_end_3358:
; LEFT
SUB ESI , 9
loop_start_3456:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3456
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3456
loop_end_3456:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 5
mov [buffer + ESI] , AH
loop_start_3463:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3463
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_3465:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3465
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3465
loop_end_3465:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3463
loop_end_3463:
; RIGHT
ADD ESI , 4
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
loop_start_3476:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3476
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3476
loop_end_3476:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3283
loop_end_3283:
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_113
loop_end_113:
; LEFT
SUB ESI , 4
; PRINT TO STDOUT
mov AH , [buffer + ESI]
mov [value] , AH
mov EAX , 4
mov EBX , 1
mov ECX , value
mov EDX , 1
int 0x80
; RIGHT
ADD ESI , 10
loop_start_3485:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3485
; RIGHT
ADD ESI , 6
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3485
loop_end_3485:
; LEFT
SUB ESI , 9
loop_start_3491:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3491
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3491
loop_end_3491:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 10
mov [buffer + ESI] , AH
loop_start_3496:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3496
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_3498:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3498
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3498
loop_end_3498:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3496
loop_end_3496:
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 15
loop_start_3511:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3511
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3511
loop_end_3511:
; RIGHT
ADD ESI , 8
loop_start_3515:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3515
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3515
loop_end_3515:
; LEFT
SUB ESI , 8
loop_start_3522:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3522
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3528:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3528
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3528
loop_end_3528:
; LEFT
SUB ESI , 9
loop_start_3532:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3532
; RIGHT
ADD ESI , 8
loop_start_3534:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3534
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3534
loop_end_3534:
; LEFT
SUB ESI , 7
loop_start_3541:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3541
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
loop_start_3546:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3546
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3546
loop_end_3546:
; RIGHT
ADD ESI , 8
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3541
loop_end_3541:
; LEFT
SUB ESI , 10
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3532
loop_end_3532:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3522
loop_end_3522:
; RIGHT
ADD ESI , 8
loop_start_3558:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3558
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3558
loop_end_3558:
; LEFT
SUB ESI , 8
loop_start_3565:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3565
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3570:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3570
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_3574:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3574
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3574
loop_end_3574:
; LEFT
SUB ESI , 5
loop_start_3581:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3581
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3581
loop_end_3581:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3570
loop_end_3570:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
loop_start_3592:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3592
; RIGHT
ADD ESI , 6
loop_start_3594:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3594
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3594
loop_end_3594:
; LEFT
SUB ESI , 15
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3592
loop_end_3592:
; RIGHT
ADD ESI , 9
loop_start_3603:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3603
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3603
loop_end_3603:
; LEFT
SUB ESI , 9
loop_start_3607:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3607
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
loop_start_3613:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3613
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3618:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3618
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3618
loop_end_3618:
; LEFT
SUB ESI , 1
loop_start_3628:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3628
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3628
loop_end_3628:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3613
loop_end_3613:
; LEFT
SUB ESI , 7
loop_start_3637:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3637
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3637
loop_end_3637:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3607
loop_end_3607:
; RIGHT
ADD ESI , 8
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 5
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3565
loop_end_3565:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
loop_start_3656:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3656
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3656
loop_end_3656:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
loop_start_3664:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3664
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3669:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3669
; RIGHT
ADD ESI , 6
loop_start_3671:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3671
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3671
loop_end_3671:
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3669
loop_end_3669:
; LEFT
SUB ESI , 9
loop_start_3680:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3680
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
loop_start_3686:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3686
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3691:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3691
; LEFT
SUB ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3691
loop_end_3691:
; LEFT
SUB ESI , 1
loop_start_3701:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3701
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3701
loop_end_3701:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3686
loop_end_3686:
; LEFT
SUB ESI , 7
loop_start_3710:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3710
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 7
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 7
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3710
loop_end_3710:
; LEFT
SUB ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3680
loop_end_3680:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 5
mov [buffer + ESI] , AH
loop_start_3722:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3722
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_3724:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3724
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3724
loop_end_3724:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3722
loop_end_3722:
; RIGHT
ADD ESI , 5
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 27
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_3737:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3737
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3737
loop_end_3737:
; RIGHT
ADD ESI , 9
loop_start_3741:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3741
; RIGHT
ADD ESI , 6
loop_start_3743:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3743
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3743
loop_end_3743:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_3751:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3751
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 2
loop_start_3756:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3756
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3756
loop_end_3756:
; LEFT
SUB ESI , 8
loop_start_3763:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3763
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 17
loop_start_3768:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3768
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3768
loop_end_3768:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 5
loop_start_3775:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3775
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3775
loop_end_3775:
; RIGHT
ADD ESI , 1
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3763
loop_end_3763:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3751
loop_end_3751:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
loop_start_3785:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3785
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3785
loop_end_3785:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 8
loop_start_3793:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3793
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 8
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 2
loop_start_3798:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3798
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3798
loop_end_3798:
; LEFT
SUB ESI , 6
loop_start_3805:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3805
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 15
loop_start_3810:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3810
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3810
loop_end_3810:
; RIGHT
ADD ESI , 3
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 6
loop_start_3817:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3817
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3817
loop_end_3817:
; RIGHT
ADD ESI , 1
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3805
loop_end_3805:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3793
loop_end_3793:
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 1
loop_start_3828:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3828
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 1
loop_start_3831:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3831
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3831
loop_end_3831:
; LEFT
SUB ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3828
loop_end_3828:
; RIGHT
ADD ESI , 8
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3741
loop_end_3741:
; LEFT
SUB ESI , 9
loop_start_3839:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3839
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3839
loop_end_3839:
; RIGHT
ADD ESI , 4
;Reset to zero
mov AH , byte [buffer + ESI]
mov AH , 0
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 3
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 5
mov [buffer + ESI] , AH
loop_start_3846:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3846
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
loop_start_3848:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3848
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 9
; PLUS
mov AH , byte [buffer + ESI]
ADD AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3848
loop_end_3848:
; RIGHT
ADD ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3846
loop_end_3846:
; RIGHT
ADD ESI , 5
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; RIGHT
ADD ESI , 27
; MINUS
mov AH , byte [buffer + ESI]
SUB AH , 1
mov [buffer + ESI] , AH
; LEFT
SUB ESI , 6
loop_start_3861:
mov AH , byte [buffer + ESI]
cmp AH , 0
je loop_end_3861
; LEFT
SUB ESI , 9
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3861
loop_end_3861:
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_3664
loop_end_3664:
; RIGHT
ADD ESI , 3
mov AH , byte [buffer + ESI]
cmp AH , 0
jne loop_start_66
loop_end_66:
;exit
mov EAX , 1
int 0x80 ;exit | 16.928595 | 29 | 0.614953 |
d78816bd0ddbf588f04a1e63ea4f949e117c410f | 475 | asm | Assembly | Lab01/Ex4.asm | frr0/Assembly-MIPS | 7f31be107b1955b2eef5ceba4b65b68b107471c7 | [
"MIT"
] | null | null | null | Lab01/Ex4.asm | frr0/Assembly-MIPS | 7f31be107b1955b2eef5ceba4b65b68b107471c7 | [
"MIT"
] | null | null | null | Lab01/Ex4.asm | frr0/Assembly-MIPS | 7f31be107b1955b2eef5ceba4b65b68b107471c7 | [
"MIT"
] | null | null | null | .data
var: .word 0x3FFFFFF0
.text
.globl main
.ent main
main: lw $t0, var
add $t1, $t0, $t0 # prima somma
move $a0, $t1
li $v0, 1
syscall
addiu $t1, 40
li $v0, 1
syscall
li $t2, 40
addu $a0 $t1, $t2
li $v0, 1
syscall
| 22.619048 | 57 | 0.294737 |
791d0bd88ed7335b97d02f6e3d0529a5ddd82620 | 369 | asm | Assembly | programs/oeis/168/A168190.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/168/A168190.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/168/A168190.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A168190: a(n) = n^3*(n^9 + 1)/2.
; 0,1,2052,265734,8388640,122070375,1088391276,6920643772,34359738624,141214768605,500000000500,1569214189026,4458050224992,11649042562339,28346956189020,64873168947000,140737488357376,291311118617337,578415690716004,1106657459536510,2048000000004000,3677913755697951,6427501315529932
mov $1,$0
pow $0,3
pow $1,12
add $1,$0
div $1,2
| 41 | 284 | 0.815718 |
e69f481f30d9ae8441053d4c0496ef43b72eda3d | 641 | asm | Assembly | programs/oeis/069/A069131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/069/A069131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/069/A069131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A069131: Centered 18-gonal numbers.
; 1,19,55,109,181,271,379,505,649,811,991,1189,1405,1639,1891,2161,2449,2755,3079,3421,3781,4159,4555,4969,5401,5851,6319,6805,7309,7831,8371,8929,9505,10099,10711,11341,11989,12655,13339,14041,14761,15499,16255,17029,17821,18631,19459,20305,21169,22051,22951,23869,24805,25759,26731,27721,28729,29755,30799,31861,32941,34039,35155,36289,37441,38611,39799,41005,42229,43471,44731,46009,47305,48619,49951,51301,52669,54055,55459,56881,58321,59779,61255,62749,64261,65791,67339,68905,70489,72091,73711,75349,77005,78679,80371,82081,83809,85555,87319,89101
sub $1,$0
bin $1,2
mul $1,18
add $1,1
mov $0,$1
| 71.222222 | 553 | 0.790952 |
38b09f6b62b5b23b4392c738eedd0cab85aba4bd | 799 | asm | Assembly | libsrc/_DEVELOPMENT/adt/b_array/z80/__array_at.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/b_array/z80/__array_at.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/b_array/z80/__array_at.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
SECTION code_adt_b_array
PUBLIC __array_at
EXTERN l_ltu_bc_hl
__array_at:
; Return & array.data[idx]
;
; enter : hl = array *
; bc = idx
;
; exit : bc = idx
; de = array.size
;
; success
;
; hl = & array.data[idx]
; carry reset
;
; fail
;
; hl = & array.data[0]
; carry set
;
; uses : af, de, hl
ld e,(hl)
inc hl
ld d,(hl) ; de = array.data
inc hl
ld a,(hl)
inc hl
ld h,(hl)
ld l,a ; hl = array.size
call l_ltu_bc_hl
ex de,hl ; de = array.size, hl = array.data
ccf
ret c ; if bc >= hl, idx >= array.size
add hl,bc
ret
| 15.98 | 65 | 0.406758 |
c2a0cc68d45dd46c7335dc90af6d454a6b54ea85 | 230 | asm | Assembly | Super Mario/GetPixelSize32.asm | yonghenghuanmie/Super-Mario | 25f977a7dc69dd0bde87a7ee14d9bd603006f36d | [
"Apache-2.0"
] | null | null | null | Super Mario/GetPixelSize32.asm | yonghenghuanmie/Super-Mario | 25f977a7dc69dd0bde87a7ee14d9bd603006f36d | [
"Apache-2.0"
] | null | null | null | Super Mario/GetPixelSize32.asm | yonghenghuanmie/Super-Mario | 25f977a7dc69dd0bde87a7ee14d9bd603006f36d | [
"Apache-2.0"
] | null | null | null | .386
.model flat,C
.code
GetPixelSize proc ID2D1Bitmap:ptr dword,D2D1_SIZE_U:ptr dword
mov eax,D2D1_SIZE_U
push eax
mov eax,ID2D1Bitmap
push eax
mov eax,dword ptr [eax]
add eax,14H
call dword ptr [eax]
ret
GetPixelSize endp
end | 13.529412 | 61 | 0.791304 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.