code wiki / _hdl_build / nx_carflip_lib.nx
nx_carflip_lib.nx
buildroot/runtime/_hdl_build/nx_carflip_lib.nx
about
nx_carflip_lib.nx -- shared Car-Flip lane library: integer parse/print + the P10-gated deal calc.
Extracted from runtime/nx_carflip_roi.nx (v1 stays FROZEN as the CLI equivalence ORACLE -- the
sts_load_slow precedent: same 10 figures MUST yield the same verdict). DRY home for the lane's
organs (deal scorer now; R1 complaints-ingest + R7 taxonomy organs next).
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_carflip_deal.nx
structs
| none |
consts
| 8 | const CF_BPS: i64 = 10000 // ROI reported in basis points (10000 = 100%) |
functions
| 10 | func cf_puts(s: *u8) -> i64 |
| 16 | func cf_atoi(s: *u8) -> i64 called by 1: main |
| 32 | func cf_putn(n: i64) -> i64 |
| 57 | func cf_kv(key: *u8, val: i64) -> i64 |
| 67 | func cf_score(asking: i64, resale_typ: i64, resale_low: i64, repair_typ: i64, repair_high: i64, recon: i64, transport: i64, fees: i64, sell_cost: i64, holding: i64) -> i64 |